0s autopkgtest [18:59:12]: starting date and time: 2026-02-09 18:59:12+0000 0s autopkgtest [18:59:12]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [18:59:12]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.rqepun9q/out --timeout-copy=6000 --needs-internet=try --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:ruby-regexp-parser --apt-upgrade rubocop --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=ruby-regexp-parser/2.11.3-1 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-amd64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@sto01-4.secgroup --name adt-resolute-amd64-rubocop-20260209-185912-juju-7f2275-prod-proposed-migration-environment-15-c6c068d2-c438-4e5d-8208-f8d20ef70b4b --image adt/ubuntu-resolute-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-autopkgtest-workers-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-amd64-rubocop-20260209-185912-juju-7f2275-prod-proposed-migration-environment-15-c6c068d2-c438-4e5d-8208-f8d20ef70b4b from image adt/ubuntu-resolute-amd64-server-20260204.img (UUID fedf54b4-458b-493e-8072-6425c19717b4)... 73s autopkgtest [19:00:25]: testbed dpkg architecture: amd64 73s autopkgtest [19:00:25]: testbed apt version: 3.1.14 74s autopkgtest [19:00:26]: @@@@@@@@@@@@@@@@@@@@ test bed setup 74s autopkgtest [19:00:26]: testbed release detected to be: None 74s autopkgtest [19:00:26]: updating testbed package index (apt update) 75s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 75s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 75s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 75s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 75s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [29.4 kB] 75s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1630 kB] 75s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [1764 B] 75s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [174 kB] 75s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main i386 Packages [202 kB] 75s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 Packages [248 kB] 75s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 c-n-f Metadata [6084 B] 75s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted i386 Packages [2444 B] 75s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 Packages [7744 B] 75s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 c-n-f Metadata [336 B] 75s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 Packages [1590 kB] 75s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/universe i386 Packages [644 kB] 75s Get:17 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 c-n-f Metadata [33.1 kB] 75s Get:18 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 Packages [25.2 kB] 76s Get:19 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse i386 Packages [4320 B] 76s Get:20 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 c-n-f Metadata [996 B] 76s Fetched 4723 kB in 1s (4514 kB/s) 77s Reading package lists... 77s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 77s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 77s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 77s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 78s Reading package lists... 78s Reading package lists... 78s Building dependency tree... 78s Reading state information... 78s Calculating upgrade... 78s The following package was automatically installed and is no longer required: 78s libpython3.13 78s Use 'sudo apt autoremove' to remove it. 78s The following NEW packages will be installed: 78s libpython3.14 libpython3.14-minimal libpython3.14-stdlib 78s linux-headers-6.19.0-3 linux-headers-6.19.0-3-generic 78s linux-image-6.19.0-3-generic linux-modules-6.19.0-3-generic 78s linux-tools-6.19.0-3 linux-tools-6.19.0-3-generic 78s The following packages will be upgraded: 78s 3cpio amd64-microcode apt bpftool busybox-initramfs busybox-static 78s cryptsetup-bin dash dbus dbus-bin dbus-daemon dbus-session-bus-common 78s dbus-system-bus-common dbus-user-session debianutils dmsetup dracut-install 78s ethtool findutils gir1.2-girepository-3.0 gir1.2-glib-2.0 hwdata iproute2 78s iptables less libapt-pkg7.0 libattr1 libbpf1 libbsd0 libcryptsetup12 78s libdbus-1-3 libdevmapper1.02.1 libdrm-amdgpu1 libdrm-common libdrm2 78s libevent-core-2.1-7t64 libgdbm-compat4t64 libgdbm6t64 libgirepository-2.0-0 78s libglib2.0-0t64 libglib2.0-data libgpm2 libgudev-1.0-0 libidn2-0 libip4tc2 78s libip6tc2 libjansson4 libkeyutils1 liblsof0 libmaxminddb0 78s libnetfilter-conntrack3 libnpth0t64 libonig5 libpcap0.8t64 libpci3 78s libsensors-config libsensors5 libusb-1.0-0 libwrap0 libxau6 libxkbcommon0 78s libxtables12 linux-generic linux-headers-generic linux-headers-virtual 78s linux-image-generic linux-image-virtual linux-perf linux-tools-common 78s linux-virtual lsof man-db mawk patch pciutils pnp.ids pollinate 78s python3-linkify-it python3-markdown-it python3-referencing sed 78s shared-mime-info tar tcpdump ubuntu-kernel-accessories ubuntu-standard wget 78s 87 upgraded, 9 newly installed, 0 to remove and 0 not upgraded. 78s Need to get 236 MB of archives. 78s After this operation, 339 MB of additional disk space will be used. 78s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 debianutils amd64 5.23.2build1 [93.3 kB] 78s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 dash amd64 0.5.12-12ubuntu3 [96.0 kB] 78s Get:3 http://ftpmaster.internal/ubuntu resolute/main amd64 findutils amd64 4.10.0-3build2 [307 kB] 78s Get:4 http://ftpmaster.internal/ubuntu resolute/main amd64 sed amd64 4.9-2build3 [195 kB] 78s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 tar amd64 1.35+dfsg-3.1build2 [257 kB] 78s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 libattr1 amd64 1:2.5.2-3build2 [11.4 kB] 78s Get:7 http://ftpmaster.internal/ubuntu resolute/main amd64 libbsd0 amd64 0.12.2-2build2 [42.3 kB] 78s Get:8 http://ftpmaster.internal/ubuntu resolute/main amd64 mawk amd64 1.3.4.20260129-1 [133 kB] 78s Get:9 http://ftpmaster.internal/ubuntu resolute/main amd64 libapt-pkg7.0 amd64 3.1.15 [1151 kB] 78s Get:10 http://ftpmaster.internal/ubuntu resolute/main amd64 apt amd64 3.1.15 [1479 kB] 78s Get:11 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus-system-bus-common all 1.16.2-2ubuntu3 [55.8 kB] 78s Get:12 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus-session-bus-common all 1.16.2-2ubuntu3 [54.4 kB] 78s Get:13 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus-user-session amd64 1.16.2-2ubuntu3 [9696 B] 78s Get:14 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus-daemon amd64 1.16.2-2ubuntu3 [119 kB] 78s Get:15 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus-bin amd64 1.16.2-2ubuntu3 [40.1 kB] 78s Get:16 http://ftpmaster.internal/ubuntu resolute/main amd64 dbus amd64 1.16.2-2ubuntu3 [24.2 kB] 78s Get:17 http://ftpmaster.internal/ubuntu resolute/main amd64 libdbus-1-3 amd64 1.16.2-2ubuntu3 [185 kB] 78s Get:18 http://ftpmaster.internal/ubuntu resolute/main amd64 libdevmapper1.02.1 amd64 2:1.02.205-2ubuntu3 [142 kB] 78s Get:19 http://ftpmaster.internal/ubuntu resolute/main amd64 dmsetup amd64 2:1.02.205-2ubuntu3 [79.4 kB] 78s Get:20 http://ftpmaster.internal/ubuntu resolute/main amd64 ethtool amd64 1:6.15-3build1 [318 kB] 78s Get:21 http://ftpmaster.internal/ubuntu resolute/main amd64 gir1.2-girepository-3.0 amd64 2.87.2-2 [25.2 kB] 78s Get:22 http://ftpmaster.internal/ubuntu resolute/main amd64 libgirepository-2.0-0 amd64 2.87.2-2 [76.1 kB] 78s Get:23 http://ftpmaster.internal/ubuntu resolute/main amd64 gir1.2-glib-2.0 amd64 2.87.2-2 [182 kB] 78s Get:24 http://ftpmaster.internal/ubuntu resolute/main amd64 libglib2.0-0t64 amd64 2.87.2-2 [1613 kB] 79s Get:25 http://ftpmaster.internal/ubuntu resolute/main amd64 libbpf1 amd64 1:1.6.2-1build1 [184 kB] 79s Get:26 http://ftpmaster.internal/ubuntu resolute/main amd64 iptables amd64 1.8.11-2ubuntu3 [381 kB] 79s Get:27 http://ftpmaster.internal/ubuntu resolute/main amd64 libip4tc2 amd64 1.8.11-2ubuntu3 [24.2 kB] 79s Get:28 http://ftpmaster.internal/ubuntu resolute/main amd64 libip6tc2 amd64 1.8.11-2ubuntu3 [24.4 kB] 79s Get:29 http://ftpmaster.internal/ubuntu resolute/main amd64 libnetfilter-conntrack3 amd64 1.1.1-1 [47.5 kB] 79s Get:30 http://ftpmaster.internal/ubuntu resolute/main amd64 libxtables12 amd64 1.8.11-2ubuntu3 [36.6 kB] 79s Get:31 http://ftpmaster.internal/ubuntu resolute/main amd64 iproute2 amd64 6.18.0-1ubuntu1 [1178 kB] 79s Get:32 http://ftpmaster.internal/ubuntu resolute/main amd64 less amd64 668-1build1 [172 kB] 79s Get:33 http://ftpmaster.internal/ubuntu resolute/main amd64 libcryptsetup12 amd64 2:2.8.0-1ubuntu3 [283 kB] 79s Get:34 http://ftpmaster.internal/ubuntu resolute/main amd64 libglib2.0-data all 2.87.2-2 [58.2 kB] 79s Get:35 http://ftpmaster.internal/ubuntu resolute/main amd64 libidn2-0 amd64 2.3.8-4build1 [67.6 kB] 79s Get:36 http://ftpmaster.internal/ubuntu resolute/main amd64 libkeyutils1 amd64 1.6.3-6ubuntu3 [10.6 kB] 79s Get:37 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-linkify-it all 2.0.3-1ubuntu3 [19.4 kB] 79s Get:38 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-markdown-it all 3.0.0-3build1 [54.4 kB] 79s Get:39 http://ftpmaster.internal/ubuntu resolute/main amd64 shared-mime-info amd64 2.4-5build3 [476 kB] 79s Get:40 http://ftpmaster.internal/ubuntu resolute/main amd64 busybox-static amd64 1:1.37.0-7ubuntu1 [1034 kB] 79s Get:41 http://ftpmaster.internal/ubuntu resolute/main amd64 libdrm-common all 2.4.131-1 [9774 B] 79s Get:42 http://ftpmaster.internal/ubuntu resolute/main amd64 libdrm2 amd64 2.4.131-1 [42.3 kB] 79s Get:43 http://ftpmaster.internal/ubuntu resolute/main amd64 libgdbm6t64 amd64 1.26-1build1 [36.5 kB] 79s Get:44 http://ftpmaster.internal/ubuntu resolute/main amd64 libgpm2 amd64 1.20.7-12build1 [14.4 kB] 79s Get:45 http://ftpmaster.internal/ubuntu resolute/main amd64 libjansson4 amd64 2.14-2build4 [33.2 kB] 79s Get:46 http://ftpmaster.internal/ubuntu resolute/main amd64 lsof amd64 4.99.4+dfsg-2build2 [239 kB] 79s Get:47 http://ftpmaster.internal/ubuntu resolute/main amd64 liblsof0 amd64 4.99.4+dfsg-2build2 [56.5 kB] 79s Get:48 http://ftpmaster.internal/ubuntu resolute/main amd64 libmaxminddb0 amd64 1.12.2-1build2 [18.9 kB] 79s Get:49 http://ftpmaster.internal/ubuntu resolute/main amd64 libpcap0.8t64 amd64 1.10.5-2ubuntu3 [154 kB] 79s Get:50 http://ftpmaster.internal/ubuntu resolute/main amd64 pciutils amd64 1:3.14.0-1build2 [95.5 kB] 79s Get:51 http://ftpmaster.internal/ubuntu resolute/main amd64 libpci3 amd64 1:3.14.0-1build2 [38.1 kB] 79s Get:52 http://ftpmaster.internal/ubuntu resolute/main amd64 libsensors-config all 1:3.6.2-2build1 [6862 B] 79s Get:53 http://ftpmaster.internal/ubuntu resolute/main amd64 libsensors5 amd64 1:3.6.2-2build1 [28.9 kB] 79s Get:54 http://ftpmaster.internal/ubuntu resolute/main amd64 libusb-1.0-0 amd64 2:1.0.29-2build1 [56.9 kB] 79s Get:55 http://ftpmaster.internal/ubuntu resolute/main amd64 libxau6 amd64 1:1.0.11-1build2 [7502 B] 79s Get:56 http://ftpmaster.internal/ubuntu resolute/main amd64 libxkbcommon0 amd64 1.13.1-1 [159 kB] 79s Get:57 http://ftpmaster.internal/ubuntu resolute/main amd64 man-db amd64 2.13.1-1build1 [1392 kB] 79s Get:58 http://ftpmaster.internal/ubuntu resolute/main amd64 tcpdump amd64 4.99.5-2ubuntu3 [477 kB] 79s Get:59 http://ftpmaster.internal/ubuntu resolute/main amd64 wget amd64 1.25.0-2ubuntu4 [353 kB] 79s Get:60 http://ftpmaster.internal/ubuntu resolute/main amd64 ubuntu-standard amd64 1.564 [13.3 kB] 79s Get:61 http://ftpmaster.internal/ubuntu resolute/main amd64 3cpio amd64 0.14.0-1ubuntu1 [285 kB] 79s Get:62 http://ftpmaster.internal/ubuntu resolute/main amd64 bpftool amd64 7.7.0+6.19.0-3.3 [1229 kB] 79s Get:63 http://ftpmaster.internal/ubuntu resolute/main amd64 busybox-initramfs amd64 1:1.37.0-7ubuntu1 [191 kB] 79s Get:64 http://ftpmaster.internal/ubuntu resolute/main amd64 cryptsetup-bin amd64 2:2.8.0-1ubuntu3 [228 kB] 79s Get:65 http://ftpmaster.internal/ubuntu resolute/main amd64 dracut-install amd64 109-11ubuntu1 [45.8 kB] 79s Get:66 http://ftpmaster.internal/ubuntu resolute/main amd64 hwdata all 0.394-1build1 [1566 B] 79s Get:67 http://ftpmaster.internal/ubuntu resolute/main amd64 pnp.ids all 0.394-1build1 [29.6 kB] 79s Get:68 http://ftpmaster.internal/ubuntu resolute/main amd64 libdrm-amdgpu1 amd64 2.4.131-1 [23.2 kB] 79s Get:69 http://ftpmaster.internal/ubuntu resolute/main amd64 libevent-core-2.1-7t64 amd64 2.1.12-stable-10build2 [93.1 kB] 79s Get:70 http://ftpmaster.internal/ubuntu resolute/main amd64 libgdbm-compat4t64 amd64 1.26-1build1 [6796 B] 79s Get:71 http://ftpmaster.internal/ubuntu resolute/main amd64 libgudev-1.0-0 amd64 1:238-7build1 [15.9 kB] 79s Get:72 http://ftpmaster.internal/ubuntu resolute/main amd64 libnpth0t64 amd64 1.8-3build1 [9302 B] 79s Get:73 http://ftpmaster.internal/ubuntu resolute/main amd64 libonig5 amd64 6.9.10-1build1 [174 kB] 79s Get:74 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-minimal amd64 3.14.2-1 [920 kB] 79s Get:75 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14-stdlib amd64 3.14.2-1 [2398 kB] 79s Get:76 http://ftpmaster.internal/ubuntu resolute/main amd64 libpython3.14 amd64 3.14.2-1 [2568 kB] 79s Get:77 http://ftpmaster.internal/ubuntu resolute/main amd64 libwrap0 amd64 7.6.q-36build2 [48.5 kB] 79s Get:78 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-modules-6.19.0-3-generic amd64 6.19.0-3.3 [171 MB] 82s Get:79 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-image-6.19.0-3-generic amd64 6.19.0-3.3+1 [16.8 MB] 82s Get:80 http://ftpmaster.internal/ubuntu resolute/main amd64 amd64-microcode amd64 3.20251202.1ubuntu1 [459 kB] 82s Get:81 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-generic amd64 6.19.0-3.3 [1698 B] 82s Get:82 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-image-generic amd64 6.19.0-3.3 [12.2 kB] 82s Get:83 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-virtual amd64 6.19.0-3.3 [1700 B] 82s Get:84 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-image-virtual amd64 6.19.0-3.3 [12.1 kB] 82s Get:85 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-headers-virtual amd64 6.19.0-3.3 [1646 B] 82s Get:86 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-headers-6.19.0-3 all 6.19.0-3.3 [14.9 MB] 82s Get:87 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-headers-6.19.0-3-generic amd64 6.19.0-3.3 [4330 kB] 82s Get:88 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-headers-generic amd64 6.19.0-3.3 [12.0 kB] 82s Get:89 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-perf amd64 6.19.0-3.3 [4480 kB] 82s Get:90 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-tools-common all 6.19.0-3.3 [345 kB] 82s Get:91 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-tools-6.19.0-3 amd64 6.19.0-3.3 [1455 kB] 82s Get:92 http://ftpmaster.internal/ubuntu resolute/main amd64 linux-tools-6.19.0-3-generic amd64 6.19.0-3.3 [1612 B] 82s Get:93 http://ftpmaster.internal/ubuntu resolute/main amd64 patch amd64 2.8-2build1 [95.7 kB] 82s Get:94 http://ftpmaster.internal/ubuntu resolute/main amd64 pollinate all 4.33-4ubuntu5 [14.0 kB] 82s Get:95 http://ftpmaster.internal/ubuntu resolute/main amd64 python3-referencing all 0.36.2-1ubuntu2 [22.2 kB] 82s Get:96 http://ftpmaster.internal/ubuntu resolute/main amd64 ubuntu-kernel-accessories amd64 1.564 [13.1 kB] 82s dpkg-preconfigure: unable to re-open stdin: No such file or directory 82s Fetched 236 MB in 4s (58.5 MB/s) 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../debianutils_5.23.2build1_amd64.deb ... 83s Unpacking debianutils (5.23.2build1) over (5.23.2) ... 83s Setting up debianutils (5.23.2build1) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../dash_0.5.12-12ubuntu3_amd64.deb ... 83s Unpacking dash (0.5.12-12ubuntu3) over (0.5.12-12ubuntu2) ... 83s Setting up dash (0.5.12-12ubuntu3) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../findutils_4.10.0-3build2_amd64.deb ... 83s Unpacking findutils (4.10.0-3build2) over (4.10.0-3build1) ... 83s Setting up findutils (4.10.0-3build2) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../sed_4.9-2build3_amd64.deb ... 83s Unpacking sed (4.9-2build3) over (4.9-2build2) ... 83s Setting up sed (4.9-2build3) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../tar_1.35+dfsg-3.1build2_amd64.deb ... 83s Unpacking tar (1.35+dfsg-3.1build2) over (1.35+dfsg-3.1build1) ... 83s Setting up tar (1.35+dfsg-3.1build2) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../libattr1_1%3a2.5.2-3build2_amd64.deb ... 83s Unpacking libattr1:amd64 (1:2.5.2-3build2) over (1:2.5.2-3build1) ... 83s Setting up libattr1:amd64 (1:2.5.2-3build2) ... 83s (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 ... 83957 files and directories currently installed.) 83s Preparing to unpack .../00-libbsd0_0.12.2-2build2_amd64.deb ... 83s Unpacking libbsd0:amd64 (0.12.2-2build2) over (0.12.2-2build1) ... 83s Preparing to unpack .../01-mawk_1.3.4.20260129-1_amd64.deb ... 83s Unpacking mawk (1.3.4.20260129-1) over (1.3.4.20250131-2) ... 83s Preparing to unpack .../02-libapt-pkg7.0_3.1.15_amd64.deb ... 83s Unpacking libapt-pkg7.0:amd64 (3.1.15) over (3.1.14) ... 83s Preparing to unpack .../03-apt_3.1.15_amd64.deb ... 83s Unpacking apt (3.1.15) over (3.1.14) ... 83s Preparing to unpack .../04-dbus-system-bus-common_1.16.2-2ubuntu3_all.deb ... 83s Unpacking dbus-system-bus-common (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../05-dbus-session-bus-common_1.16.2-2ubuntu3_all.deb ... 84s Unpacking dbus-session-bus-common (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../06-dbus-user-session_1.16.2-2ubuntu3_amd64.deb ... 84s Unpacking dbus-user-session (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../07-dbus-daemon_1.16.2-2ubuntu3_amd64.deb ... 84s Unpacking dbus-daemon (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../08-dbus-bin_1.16.2-2ubuntu3_amd64.deb ... 84s Unpacking dbus-bin (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../09-dbus_1.16.2-2ubuntu3_amd64.deb ... 84s Unpacking dbus (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../10-libdbus-1-3_1.16.2-2ubuntu3_amd64.deb ... 84s Unpacking libdbus-1-3:amd64 (1.16.2-2ubuntu3) over (1.16.2-2ubuntu2) ... 84s Preparing to unpack .../11-libdevmapper1.02.1_2%3a1.02.205-2ubuntu3_amd64.deb ... 84s Unpacking libdevmapper1.02.1:amd64 (2:1.02.205-2ubuntu3) over (2:1.02.205-2ubuntu2) ... 84s Preparing to unpack .../12-dmsetup_2%3a1.02.205-2ubuntu3_amd64.deb ... 84s Unpacking dmsetup (2:1.02.205-2ubuntu3) over (2:1.02.205-2ubuntu2) ... 84s Preparing to unpack .../13-ethtool_1%3a6.15-3build1_amd64.deb ... 84s Unpacking ethtool (1:6.15-3build1) over (1:6.15-3) ... 84s Preparing to unpack .../14-gir1.2-girepository-3.0_2.87.2-2_amd64.deb ... 84s Unpacking gir1.2-girepository-3.0:amd64 (2.87.2-2) over (2.86.3-4) ... 84s Preparing to unpack .../15-libgirepository-2.0-0_2.87.2-2_amd64.deb ... 84s Unpacking libgirepository-2.0-0:amd64 (2.87.2-2) over (2.86.3-4) ... 84s Preparing to unpack .../16-gir1.2-glib-2.0_2.87.2-2_amd64.deb ... 84s Unpacking gir1.2-glib-2.0:amd64 (2.87.2-2) over (2.86.3-4) ... 84s Preparing to unpack .../17-libglib2.0-0t64_2.87.2-2_amd64.deb ... 84s Unpacking libglib2.0-0t64:amd64 (2.87.2-2) over (2.86.3-4) ... 84s Preparing to unpack .../18-libbpf1_1%3a1.6.2-1build1_amd64.deb ... 84s Unpacking libbpf1:amd64 (1:1.6.2-1build1) over (1:1.6.2-1) ... 84s Preparing to unpack .../19-iptables_1.8.11-2ubuntu3_amd64.deb ... 84s Unpacking iptables (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 84s Preparing to unpack .../20-libip4tc2_1.8.11-2ubuntu3_amd64.deb ... 84s Unpacking libip4tc2:amd64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 84s Preparing to unpack .../21-libip6tc2_1.8.11-2ubuntu3_amd64.deb ... 84s Unpacking libip6tc2:amd64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 84s Preparing to unpack .../22-libnetfilter-conntrack3_1.1.1-1_amd64.deb ... 84s Unpacking libnetfilter-conntrack3:amd64 (1.1.1-1) over (1.1.0-1build1) ... 84s Preparing to unpack .../23-libxtables12_1.8.11-2ubuntu3_amd64.deb ... 84s Unpacking libxtables12:amd64 (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 84s Preparing to unpack .../24-iproute2_6.18.0-1ubuntu1_amd64.deb ... 84s Unpacking iproute2 (6.18.0-1ubuntu1) over (6.16.0-1ubuntu3) ... 84s Preparing to unpack .../25-less_668-1build1_amd64.deb ... 84s Unpacking less (668-1build1) over (668-1) ... 84s Preparing to unpack .../26-libcryptsetup12_2%3a2.8.0-1ubuntu3_amd64.deb ... 84s Unpacking libcryptsetup12:amd64 (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 84s Preparing to unpack .../27-libglib2.0-data_2.87.2-2_all.deb ... 84s Unpacking libglib2.0-data (2.87.2-2) over (2.86.3-4) ... 84s Preparing to unpack .../28-libidn2-0_2.3.8-4build1_amd64.deb ... 84s Unpacking libidn2-0:amd64 (2.3.8-4build1) over (2.3.8-4) ... 85s Preparing to unpack .../29-libkeyutils1_1.6.3-6ubuntu3_amd64.deb ... 85s Unpacking libkeyutils1:amd64 (1.6.3-6ubuntu3) over (1.6.3-6ubuntu2) ... 85s Preparing to unpack .../30-python3-linkify-it_2.0.3-1ubuntu3_all.deb ... 85s Unpacking python3-linkify-it (2.0.3-1ubuntu3) over (2.0.3-1ubuntu2) ... 85s Preparing to unpack .../31-python3-markdown-it_3.0.0-3build1_all.deb ... 85s Unpacking python3-markdown-it (3.0.0-3build1) over (3.0.0-3) ... 85s Preparing to unpack .../32-shared-mime-info_2.4-5build3_amd64.deb ... 85s Unpacking shared-mime-info (2.4-5build3) over (2.4-5build2) ... 85s Preparing to unpack .../33-busybox-static_1%3a1.37.0-7ubuntu1_amd64.deb ... 85s Unpacking busybox-static (1:1.37.0-7ubuntu1) over (1:1.37.0-4ubuntu1) ... 85s Preparing to unpack .../34-libdrm-common_2.4.131-1_all.deb ... 85s Unpacking libdrm-common (2.4.131-1) over (2.4.129-1) ... 85s Preparing to unpack .../35-libdrm2_2.4.131-1_amd64.deb ... 85s Unpacking libdrm2:amd64 (2.4.131-1) over (2.4.129-1) ... 85s Preparing to unpack .../36-libgdbm6t64_1.26-1build1_amd64.deb ... 85s Unpacking libgdbm6t64:amd64 (1.26-1build1) over (1.26-1) ... 85s Preparing to unpack .../37-libgpm2_1.20.7-12build1_amd64.deb ... 85s Unpacking libgpm2:amd64 (1.20.7-12build1) over (1.20.7-12) ... 85s Preparing to unpack .../38-libjansson4_2.14-2build4_amd64.deb ... 85s Unpacking libjansson4:amd64 (2.14-2build4) over (2.14-2build3) ... 85s Preparing to unpack .../39-lsof_4.99.4+dfsg-2build2_amd64.deb ... 85s Unpacking lsof (4.99.4+dfsg-2build2) over (4.99.4+dfsg-2build1) ... 85s Preparing to unpack .../40-liblsof0_4.99.4+dfsg-2build2_amd64.deb ... 85s Unpacking liblsof0 (4.99.4+dfsg-2build2) over (4.99.4+dfsg-2build1) ... 85s Preparing to unpack .../41-libmaxminddb0_1.12.2-1build2_amd64.deb ... 85s Unpacking libmaxminddb0:amd64 (1.12.2-1build2) over (1.12.2-1build1) ... 85s Preparing to unpack .../42-libpcap0.8t64_1.10.5-2ubuntu3_amd64.deb ... 85s Unpacking libpcap0.8t64:amd64 (1.10.5-2ubuntu3) over (1.10.5-2ubuntu2) ... 85s Preparing to unpack .../43-pciutils_1%3a3.14.0-1build2_amd64.deb ... 85s Unpacking pciutils (1:3.14.0-1build2) over (1:3.14.0-1build1) ... 85s Preparing to unpack .../44-libpci3_1%3a3.14.0-1build2_amd64.deb ... 85s Unpacking libpci3:amd64 (1:3.14.0-1build2) over (1:3.14.0-1build1) ... 85s Preparing to unpack .../45-libsensors-config_1%3a3.6.2-2build1_all.deb ... 85s Unpacking libsensors-config (1:3.6.2-2build1) over (1:3.6.2-2) ... 85s Preparing to unpack .../46-libsensors5_1%3a3.6.2-2build1_amd64.deb ... 85s Unpacking libsensors5:amd64 (1:3.6.2-2build1) over (1:3.6.2-2) ... 85s Preparing to unpack .../47-libusb-1.0-0_2%3a1.0.29-2build1_amd64.deb ... 85s Unpacking libusb-1.0-0:amd64 (2:1.0.29-2build1) over (2:1.0.29-2) ... 85s Preparing to unpack .../48-libxau6_1%3a1.0.11-1build2_amd64.deb ... 85s Unpacking libxau6:amd64 (1:1.0.11-1build2) over (1:1.0.11-1build1) ... 85s Preparing to unpack .../49-libxkbcommon0_1.13.1-1_amd64.deb ... 85s Unpacking libxkbcommon0:amd64 (1.13.1-1) over (1.12.3-1) ... 85s Preparing to unpack .../50-man-db_2.13.1-1build1_amd64.deb ... 85s Unpacking man-db (2.13.1-1build1) over (2.13.1-1) ... 85s Preparing to unpack .../51-tcpdump_4.99.5-2ubuntu3_amd64.deb ... 85s Unpacking tcpdump (4.99.5-2ubuntu3) over (4.99.5-2ubuntu2) ... 85s Preparing to unpack .../52-wget_1.25.0-2ubuntu4_amd64.deb ... 85s Unpacking wget (1.25.0-2ubuntu4) over (1.25.0-2ubuntu3) ... 85s Preparing to unpack .../53-ubuntu-standard_1.564_amd64.deb ... 86s Unpacking ubuntu-standard (1.564) over (1.563) ... 86s Preparing to unpack .../54-3cpio_0.14.0-1ubuntu1_amd64.deb ... 86s Unpacking 3cpio (0.14.0-1ubuntu1) over (0.13.1-1ubuntu1) ... 86s Preparing to unpack .../55-bpftool_7.7.0+6.19.0-3.3_amd64.deb ... 86s Unpacking bpftool (7.7.0+6.19.0-3.3) over (7.7.0+6.18.0-9.9) ... 86s Preparing to unpack .../56-busybox-initramfs_1%3a1.37.0-7ubuntu1_amd64.deb ... 86s Unpacking busybox-initramfs (1:1.37.0-7ubuntu1) over (1:1.37.0-4ubuntu1) ... 86s Preparing to unpack .../57-cryptsetup-bin_2%3a2.8.0-1ubuntu3_amd64.deb ... 86s Unpacking cryptsetup-bin (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 86s Preparing to unpack .../58-dracut-install_109-11ubuntu1_amd64.deb ... 86s Unpacking dracut-install (109-11ubuntu1) over (109-9ubuntu1) ... 86s Preparing to unpack .../59-hwdata_0.394-1build1_all.deb ... 86s Unpacking hwdata (0.394-1build1) over (0.394-1) ... 86s Preparing to unpack .../60-pnp.ids_0.394-1build1_all.deb ... 86s Unpacking pnp.ids (0.394-1build1) over (0.394-1) ... 86s Preparing to unpack .../61-libdrm-amdgpu1_2.4.131-1_amd64.deb ... 86s Unpacking libdrm-amdgpu1:amd64 (2.4.131-1) over (2.4.129-1) ... 86s Preparing to unpack .../62-libevent-core-2.1-7t64_2.1.12-stable-10build2_amd64.deb ... 86s Unpacking libevent-core-2.1-7t64:amd64 (2.1.12-stable-10build2) over (2.1.12-stable-10build1) ... 86s Preparing to unpack .../63-libgdbm-compat4t64_1.26-1build1_amd64.deb ... 86s Unpacking libgdbm-compat4t64:amd64 (1.26-1build1) over (1.26-1) ... 86s Preparing to unpack .../64-libgudev-1.0-0_1%3a238-7build1_amd64.deb ... 86s Unpacking libgudev-1.0-0:amd64 (1:238-7build1) over (1:238-7) ... 86s Preparing to unpack .../65-libnpth0t64_1.8-3build1_amd64.deb ... 86s Unpacking libnpth0t64:amd64 (1.8-3build1) over (1.8-3) ... 86s Preparing to unpack .../66-libonig5_6.9.10-1build1_amd64.deb ... 86s Unpacking libonig5:amd64 (6.9.10-1build1) over (6.9.10-1) ... 86s Selecting previously unselected package libpython3.14-minimal:amd64. 86s Preparing to unpack .../67-libpython3.14-minimal_3.14.2-1_amd64.deb ... 86s Unpacking libpython3.14-minimal:amd64 (3.14.2-1) ... 86s Selecting previously unselected package libpython3.14-stdlib:amd64. 86s Preparing to unpack .../68-libpython3.14-stdlib_3.14.2-1_amd64.deb ... 86s Unpacking libpython3.14-stdlib:amd64 (3.14.2-1) ... 86s Selecting previously unselected package libpython3.14:amd64. 86s Preparing to unpack .../69-libpython3.14_3.14.2-1_amd64.deb ... 86s Unpacking libpython3.14:amd64 (3.14.2-1) ... 86s Preparing to unpack .../70-libwrap0_7.6.q-36build2_amd64.deb ... 86s Unpacking libwrap0:amd64 (7.6.q-36build2) over (7.6.q-36build1) ... 86s Selecting previously unselected package linux-modules-6.19.0-3-generic. 86s Preparing to unpack .../71-linux-modules-6.19.0-3-generic_6.19.0-3.3_amd64.deb ... 86s Unpacking linux-modules-6.19.0-3-generic (6.19.0-3.3) ... 87s Selecting previously unselected package linux-image-6.19.0-3-generic. 87s Preparing to unpack .../72-linux-image-6.19.0-3-generic_6.19.0-3.3+1_amd64.deb ... 87s Unpacking linux-image-6.19.0-3-generic (6.19.0-3.3+1) ... 87s Preparing to unpack .../73-amd64-microcode_3.20251202.1ubuntu1_amd64.deb ... 87s Unpacking amd64-microcode (3.20251202.1ubuntu1) over (3.20250708.1ubuntu1) ... 87s Preparing to unpack .../74-linux-generic_6.19.0-3.3_amd64.deb ... 87s Unpacking linux-generic (6.19.0-3.3) over (6.18.0-9.9+1) ... 87s Preparing to unpack .../75-linux-image-generic_6.19.0-3.3_amd64.deb ... 87s Unpacking linux-image-generic (6.19.0-3.3) over (6.18.0-9.9+1) ... 87s Preparing to unpack .../76-linux-virtual_6.19.0-3.3_amd64.deb ... 87s Unpacking linux-virtual (6.19.0-3.3) over (6.18.0-9.9+1) ... 87s Preparing to unpack .../77-linux-image-virtual_6.19.0-3.3_amd64.deb ... 87s Unpacking linux-image-virtual (6.19.0-3.3) over (6.18.0-9.9+1) ... 87s Preparing to unpack .../78-linux-headers-virtual_6.19.0-3.3_amd64.deb ... 87s Unpacking linux-headers-virtual (6.19.0-3.3) over (6.18.0-9.9+1) ... 87s Selecting previously unselected package linux-headers-6.19.0-3. 87s Preparing to unpack .../79-linux-headers-6.19.0-3_6.19.0-3.3_all.deb ... 87s Unpacking linux-headers-6.19.0-3 (6.19.0-3.3) ... 88s Selecting previously unselected package linux-headers-6.19.0-3-generic. 88s Preparing to unpack .../80-linux-headers-6.19.0-3-generic_6.19.0-3.3_amd64.deb ... 88s Unpacking linux-headers-6.19.0-3-generic (6.19.0-3.3) ... 89s Preparing to unpack .../81-linux-headers-generic_6.19.0-3.3_amd64.deb ... 89s Unpacking linux-headers-generic (6.19.0-3.3) over (6.18.0-9.9+1) ... 89s Preparing to unpack .../82-linux-perf_6.19.0-3.3_amd64.deb ... 89s Unpacking linux-perf (6.19.0-3.3) over (6.18.0-9.9) ... 89s Preparing to unpack .../83-linux-tools-common_6.19.0-3.3_all.deb ... 89s Unpacking linux-tools-common (6.19.0-3.3) over (6.18.0-9.9) ... 89s Selecting previously unselected package linux-tools-6.19.0-3. 89s Preparing to unpack .../84-linux-tools-6.19.0-3_6.19.0-3.3_amd64.deb ... 89s Unpacking linux-tools-6.19.0-3 (6.19.0-3.3) ... 89s Selecting previously unselected package linux-tools-6.19.0-3-generic. 89s Preparing to unpack .../85-linux-tools-6.19.0-3-generic_6.19.0-3.3_amd64.deb ... 89s Unpacking linux-tools-6.19.0-3-generic (6.19.0-3.3) ... 89s Preparing to unpack .../86-patch_2.8-2build1_amd64.deb ... 89s Unpacking patch (2.8-2build1) over (2.8-2) ... 89s Preparing to unpack .../87-pollinate_4.33-4ubuntu5_all.deb ... 89s Unpacking pollinate (4.33-4ubuntu5) over (4.33-4ubuntu4) ... 89s Preparing to unpack .../88-python3-referencing_0.36.2-1ubuntu2_all.deb ... 89s Unpacking python3-referencing (0.36.2-1ubuntu2) over (0.36.2-1ubuntu1) ... 89s Preparing to unpack .../89-ubuntu-kernel-accessories_1.564_amd64.deb ... 89s Unpacking ubuntu-kernel-accessories (1.564) over (1.563) ... 89s Setting up libip4tc2:amd64 (1.8.11-2ubuntu3) ... 89s Setting up 3cpio (0.14.0-1ubuntu1) ... 89s Setting up libxau6:amd64 (1:1.0.11-1build2) ... 89s Setting up libnpth0t64:amd64 (1.8-3build1) ... 89s Setting up libkeyutils1:amd64 (1.6.3-6ubuntu3) ... 89s Setting up ubuntu-kernel-accessories (1.564) ... 89s Setting up libgpm2:amd64 (1.20.7-12build1) ... 89s Setting up libgdbm6t64:amd64 (1.26-1build1) ... 89s Setting up linux-modules-6.19.0-3-generic (6.19.0-3.3) ... 91s Setting up libgdbm-compat4t64:amd64 (1.26-1build1) ... 91s Setting up bpftool (7.7.0+6.19.0-3.3) ... 91s Setting up libip6tc2:amd64 (1.8.11-2ubuntu3) ... 91s Setting up liblsof0 (4.99.4+dfsg-2build2) ... 91s Setting up libmaxminddb0:amd64 (1.12.2-1build2) ... 91s Setting up libpython3.14-minimal:amd64 (3.14.2-1) ... 91s Setting up libsensors-config (1:3.6.2-2build1) ... 91s Setting up less (668-1build1) ... 91s Setting up linux-headers-6.19.0-3 (6.19.0-3.3) ... 91s Setting up libidn2-0:amd64 (2.3.8-4build1) ... 91s Setting up amd64-microcode (3.20251202.1ubuntu1) ... 91s amd64-microcode: microcode will be updated at next boot 91s Setting up man-db (2.13.1-1build1) ... 91s Updating database of manual pages ... 92s man-db.service is a disabled or a static unit not running, not starting it. 92s Setting up libjansson4:amd64 (2.14-2build4) ... 92s Setting up libglib2.0-0t64:amd64 (2.87.2-2) ... 92s No schema files found: doing nothing. 92s Setting up libglib2.0-data (2.87.2-2) ... 92s Setting up pollinate (4.33-4ubuntu5) ... 102s Setting up busybox-static (1:1.37.0-7ubuntu1) ... 102s Setting up libwrap0:amd64 (7.6.q-36build2) ... 102s Setting up linux-image-6.19.0-3-generic (6.19.0-3.3+1) ... 104s I: /boot/vmlinuz is now a symlink to vmlinuz-6.19.0-3-generic 104s I: /boot/initrd.img is now a symlink to initrd.img-6.19.0-3-generic 104s Setting up libdbus-1-3:amd64 (1.16.2-2ubuntu3) ... 104s Setting up shared-mime-info (2.4-5build3) ... 104s Setting up patch (2.8-2build1) ... 104s Setting up gir1.2-glib-2.0:amd64 (2.87.2-2) ... 104s Setting up libsensors5:amd64 (1:3.6.2-2build1) ... 104s Setting up busybox-initramfs (1:1.37.0-7ubuntu1) ... 104s Setting up libxtables12:amd64 (1.8.11-2ubuntu3) ... 104s Setting up lsof (4.99.4+dfsg-2build2) ... 104s Setting up libpci3:amd64 (1:3.14.0-1build2) ... 105s Setting up libdevmapper1.02.1:amd64 (2:1.02.205-2ubuntu3) ... 105s Setting up dracut-install (109-11ubuntu1) ... 105s Setting up dmsetup (2:1.02.205-2ubuntu3) ... 105s Setting up libnetfilter-conntrack3:amd64 (1.1.1-1) ... 105s Setting up pnp.ids (0.394-1build1) ... 105s Setting up dbus-session-bus-common (1.16.2-2ubuntu3) ... 105s Setting up python3-linkify-it (2.0.3-1ubuntu3) ... 105s Setting up libpcap0.8t64:amd64 (1.10.5-2ubuntu3) ... 105s Setting up libcryptsetup12:amd64 (2:2.8.0-1ubuntu3) ... 105s Setting up mawk (1.3.4.20260129-1) ... 105s Setting up libevent-core-2.1-7t64:amd64 (2.1.12-stable-10build2) ... 105s Setting up libusb-1.0-0:amd64 (2:1.0.29-2build1) ... 105s Setting up libapt-pkg7.0:amd64 (3.1.15) ... 105s Setting up linux-image-virtual (6.19.0-3.3) ... 105s Setting up dbus-system-bus-common (1.16.2-2ubuntu3) ... 105s Setting up libbsd0:amd64 (0.12.2-2build2) ... 105s Setting up libdrm-common (2.4.131-1) ... 105s Setting up dbus-bin (1.16.2-2ubuntu3) ... 105s Setting up libonig5:amd64 (6.9.10-1build1) ... 105s Setting up libgudev-1.0-0:amd64 (1:238-7build1) ... 105s Setting up libbpf1:amd64 (1:1.6.2-1build1) ... 105s Setting up ethtool (1:6.15-3build1) ... 105s Setting up python3-referencing (0.36.2-1ubuntu2) ... 105s Setting up libxkbcommon0:amd64 (1.13.1-1) ... 105s Setting up cryptsetup-bin (2:2.8.0-1ubuntu3) ... 105s Setting up linux-headers-6.19.0-3-generic (6.19.0-3.3) ... 105s Setting up tcpdump (4.99.5-2ubuntu3) ... 105s Setting up linux-image-generic (6.19.0-3.3) ... 105s Setting up apt (3.1.15) ... 105s Setting up wget (1.25.0-2ubuntu4) ... 105s Setting up libgirepository-2.0-0:amd64 (2.87.2-2) ... 105s Setting up libpython3.14-stdlib:amd64 (3.14.2-1) ... 105s Setting up iptables (1.8.11-2ubuntu3) ... 105s Setting up iproute2 (6.18.0-1ubuntu1) ... 105s Setting up linux-headers-generic (6.19.0-3.3) ... 105s Setting up dbus-daemon (1.16.2-2ubuntu3) ... 105s Setting up gir1.2-girepository-3.0:amd64 (2.87.2-2) ... 105s Setting up hwdata (0.394-1build1) ... 105s Setting up dbus-user-session (1.16.2-2ubuntu3) ... 105s Setting up dbus (1.16.2-2ubuntu3) ... 105s A reboot is required to replace the running dbus-daemon. 105s Please reboot the system when convenient. 106s Setting up pciutils (1:3.14.0-1build2) ... 106s Setting up python3-markdown-it (3.0.0-3build1) ... 106s Setting up libdrm2:amd64 (2.4.131-1) ... 106s Setting up libpython3.14:amd64 (3.14.2-1) ... 106s Setting up linux-tools-common (6.19.0-3.3) ... 106s Setting up libdrm-amdgpu1:amd64 (2.4.131-1) ... 106s Setting up linux-headers-virtual (6.19.0-3.3) ... 106s Setting up linux-generic (6.19.0-3.3) ... 106s Setting up linux-tools-6.19.0-3 (6.19.0-3.3) ... 106s Setting up ubuntu-standard (1.564) ... 106s Setting up linux-virtual (6.19.0-3.3) ... 106s Setting up linux-perf (6.19.0-3.3) ... 106s Setting up linux-tools-6.19.0-3-generic (6.19.0-3.3) ... 106s Processing triggers for debianutils (5.23.2build1) ... 106s Processing triggers for install-info (7.2-5) ... 106s Processing triggers for initramfs-tools (0.150ubuntu7) ... 106s update-initramfs: Generating /boot/initrd.img-6.18.0-9-generic 110s Processing triggers for libc-bin (2.42-2ubuntu4) ... 110s Processing triggers for linux-image-6.19.0-3-generic (6.19.0-3.3+1) ... 110s /etc/kernel/postinst.d/initramfs-tools: 110s update-initramfs: Generating /boot/initrd.img-6.19.0-3-generic 114s /etc/kernel/postinst.d/zz-update-grub: 114s Sourcing file `/etc/default/grub' 114s Sourcing file `/etc/default/grub.d/50-cloudimg-settings.cfg' 114s Sourcing file `/etc/default/grub.d/90-autopkgtest.cfg' 114s Generating grub configuration file ... 114s Found linux image: /boot/vmlinuz-6.19.0-3-generic 114s Found initrd image: /boot/initrd.img-6.19.0-3-generic 114s Found linux image: /boot/vmlinuz-6.18.0-9-generic 114s Found initrd image: /boot/initrd.img-6.18.0-9-generic 114s Warning: os-prober will not be executed to detect other bootable partitions. 114s Systems on them will not be added to the GRUB boot configuration. 114s Check GRUB_DISABLE_OS_PROBER documentation entry. 114s Adding boot menu entry for UEFI Firmware Settings ... 114s done 114s autopkgtest [19:01:06]: upgrading testbed (apt dist-upgrade and autopurge) 115s Reading package lists... 115s Building dependency tree... 115s Reading state information... 115s Calculating upgrade... 115s The following package was automatically installed and is no longer required: 115s libpython3.13 115s Use 'sudo apt autoremove' to remove it. 115s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 115s Reading package lists... 115s Building dependency tree... 115s Reading state information... 116s Solving dependencies... 116s The following packages will be REMOVED: 116s libpython3.13* 116s 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 116s After this operation, 7599 kB disk space will be freed. 116s (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 ... 125268 files and directories currently installed.) 116s Removing libpython3.13:amd64 (3.13.11-1) ... 116s Processing triggers for libc-bin (2.42-2ubuntu4) ... 116s autopkgtest [19:01:08]: rebooting testbed after setup commands that affected boot 145s autopkgtest [19:01:37]: testbed running kernel: Linux 6.19.0-3-generic #3-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 23 20:01:24 UTC 2026 146s autopkgtest [19:01:38]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 148s Get:1 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (dsc) [2425 B] 148s Get:2 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (tar) [1029 kB] 148s Get:3 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (diff) [11.1 kB] 148s gpgv: Signature made Fri Jan 9 19:37:41 2026 UTC 148s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 148s gpgv: Can't check signature: No public key 148s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1build1.dsc: no acceptable signature found 148s autopkgtest [19:01:40]: testing package rubocop version 1.39.0+dfsg-1build1 148s autopkgtest [19:01:40]: build not needed 149s autopkgtest [19:01:41]: test gem2deb-test-runner: preparing testbed 149s Reading package lists... 149s Building dependency tree... 149s Reading state information... 149s Solving dependencies... 149s The following NEW packages will be installed: 149s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 149s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.3 pry racc rake 149s rubocop ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-csv 149s ruby-did-you-mean ruby-diff-lcs ruby-docile ruby-hashdiff ruby-json 149s ruby-method-source ruby-minitest ruby-net-telnet ruby-parallel 149s ruby-power-assert ruby-progressbar ruby-public-suffix ruby-rainbow 149s ruby-regexp-parser ruby-rspec ruby-rspec-core ruby-rspec-expectations 149s ruby-rspec-mocks ruby-rspec-support ruby-rubocop-ast ruby-ruby2-keywords 149s ruby-rubygems ruby-simplecov ruby-simplecov-html ruby-test-unit 149s ruby-unicode-display-width ruby-webmock ruby-webrick ruby-whitequark-parser 149s ruby-xmlrpc ruby3.3 rubygems-integration 149s 0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded. 149s Need to get 9925 kB of archives. 149s After this operation, 58.8 MB of additional disk space will be used. 149s Get:1 http://ftpmaster.internal/ubuntu resolute/main amd64 rubygems-integration all 1.19build1 [5666 B] 149s Get:2 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-csv all 3.3.4-1 [43.0 kB] 149s Get:3 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-did-you-mean all 1.6.3-2build1 [14.9 kB] 149s Get:4 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-net-telnet all 0.2.0-1build1 [13.5 kB] 149s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-ruby2-keywords all 0.0.5-1build1 [4398 B] 149s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-webrick all 1.9.1-1build1 [60.9 kB] 149s Get:7 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-xmlrpc all 0.3.3-2build1 [24.9 kB] 149s Get:8 http://ftpmaster.internal/ubuntu resolute/main amd64 libruby3.3 amd64 3.3.8-2ubuntu2 [5986 kB] 150s Get:9 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby3.3 amd64 3.3.8-2ubuntu2 [59.0 kB] 150s Get:10 http://ftpmaster.internal/ubuntu resolute/main amd64 libruby amd64 1:3.3 [5164 B] 150s Get:11 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-rubygems all 3.6.7-2ubuntu2 [332 kB] 150s Get:12 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby amd64 1:3.3 [3666 B] 150s Get:13 http://ftpmaster.internal/ubuntu resolute/main amd64 rake all 13.2.1-1build1 [45.9 kB] 150s Get:14 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-minitest all 5.26.1-1 [49.3 kB] 150s Get:15 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-power-assert all 3.0.1-1 [11.4 kB] 150s Get:16 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-test-unit all 3.6.2-1 [67.0 kB] 150s Get:17 http://ftpmaster.internal/ubuntu resolute/universe amd64 gem2deb-test-runner amd64 2.2.5 [18.3 kB] 150s Get:18 http://ftpmaster.internal/ubuntu resolute/main amd64 libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 150s Get:19 http://ftpmaster.internal/ubuntu resolute/universe amd64 libjs-jquery-easing all 12-4build1 [7078 B] 150s Get:20 http://ftpmaster.internal/ubuntu resolute/universe amd64 libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 150s Get:21 http://ftpmaster.internal/ubuntu resolute/universe amd64 libjs-jquery-fancybox all 12-4build1 [45.8 kB] 150s Get:22 http://ftpmaster.internal/ubuntu resolute/universe amd64 libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 150s Get:23 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-coderay all 1.1.3-8build1 [78.4 kB] 150s Get:24 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-method-source all 1.1.0-1 [8502 B] 150s Get:25 http://ftpmaster.internal/ubuntu resolute/universe amd64 pry all 0.15.2-1 [122 kB] 150s Get:26 http://ftpmaster.internal/ubuntu resolute/universe amd64 racc all 1.8.1-2 [71.5 kB] 150s Get:27 http://ftpmaster.internal/ubuntu resolute/main amd64 ruby-json amd64 2.15.2+dfsg-1 [74.5 kB] 150s Get:28 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-progressbar all 1.11.0-1 [16.3 kB] 150s Get:29 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-parallel all 1.27.0-1 [13.5 kB] 150s Get:30 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-ast all 2.4.3-1 [10.8 kB] 150s Get:31 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-whitequark-parser all 3.3.4.2-2 [511 kB] 150s Get:32 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rainbow all 3.1.1-1 [12.4 kB] 150s Get:33 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 ruby-regexp-parser all 2.11.3-1 [58.1 kB] 150s Get:34 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 150s Get:35 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-unicode-display-width all 1.6.1-1 [8904 B] 150s Get:36 http://ftpmaster.internal/ubuntu resolute/universe amd64 rubocop all 1.39.0+dfsg-1build1 [455 kB] 150s Get:37 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-public-suffix all 6.0.2-1.1 [14.6 kB] 150s Get:38 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-addressable all 2.8.7-2 [55.4 kB] 150s Get:39 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-crack all 0.4.4-4 [8764 B] 150s Get:40 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-diff-lcs all 1.5.1-1 [22.8 kB] 150s Get:41 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-docile all 1.4.1-1 [7038 B] 150s Get:42 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-hashdiff all 1.2.1-1 [13.8 kB] 150s Get:43 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rspec-support all 3.13.0c0e0m0s1-2 [29.2 kB] 150s Get:44 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rspec-core all 3.13.0c0e0m0s1-2 [164 kB] 150s Get:45 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [89.8 kB] 150s Get:46 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.0 kB] 150s Get:47 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-rspec all 3.13.0c0e0m0s1-2 [3500 B] 150s Get:48 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-simplecov-html all 0.12.3-2 [477 kB] 150s Get:49 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-simplecov all 0.22.0-2 [40.9 kB] 150s Get:50 http://ftpmaster.internal/ubuntu resolute/universe amd64 ruby-webmock all 3.25.1-1 [48.0 kB] 150s Fetched 9925 kB in 0s (22.9 MB/s) 150s Selecting previously unselected package rubygems-integration. 150s (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 ... 125264 files and directories currently installed.) 150s Preparing to unpack .../00-rubygems-integration_1.19build1_all.deb ... 150s Unpacking rubygems-integration (1.19build1) ... 150s Selecting previously unselected package ruby-csv. 150s Preparing to unpack .../01-ruby-csv_3.3.4-1_all.deb ... 150s Unpacking ruby-csv (3.3.4-1) ... 150s Selecting previously unselected package ruby-did-you-mean. 150s Preparing to unpack .../02-ruby-did-you-mean_1.6.3-2build1_all.deb ... 150s Unpacking ruby-did-you-mean (1.6.3-2build1) ... 150s Selecting previously unselected package ruby-net-telnet. 150s Preparing to unpack .../03-ruby-net-telnet_0.2.0-1build1_all.deb ... 150s Unpacking ruby-net-telnet (0.2.0-1build1) ... 150s Selecting previously unselected package ruby-ruby2-keywords. 150s Preparing to unpack .../04-ruby-ruby2-keywords_0.0.5-1build1_all.deb ... 150s Unpacking ruby-ruby2-keywords (0.0.5-1build1) ... 150s Selecting previously unselected package ruby-webrick. 150s Preparing to unpack .../05-ruby-webrick_1.9.1-1build1_all.deb ... 150s Unpacking ruby-webrick (1.9.1-1build1) ... 150s Selecting previously unselected package ruby-xmlrpc. 150s Preparing to unpack .../06-ruby-xmlrpc_0.3.3-2build1_all.deb ... 150s Unpacking ruby-xmlrpc (0.3.3-2build1) ... 150s Selecting previously unselected package libruby3.3:amd64. 150s Preparing to unpack .../07-libruby3.3_3.3.8-2ubuntu2_amd64.deb ... 150s Unpacking libruby3.3:amd64 (3.3.8-2ubuntu2) ... 150s Selecting previously unselected package ruby3.3. 150s Preparing to unpack .../08-ruby3.3_3.3.8-2ubuntu2_amd64.deb ... 150s Unpacking ruby3.3 (3.3.8-2ubuntu2) ... 150s Selecting previously unselected package libruby:amd64. 150s Preparing to unpack .../09-libruby_1%3a3.3_amd64.deb ... 150s Unpacking libruby:amd64 (1:3.3) ... 150s Selecting previously unselected package ruby-rubygems. 150s Preparing to unpack .../10-ruby-rubygems_3.6.7-2ubuntu2_all.deb ... 150s Unpacking ruby-rubygems (3.6.7-2ubuntu2) ... 150s Selecting previously unselected package ruby. 150s Preparing to unpack .../11-ruby_1%3a3.3_amd64.deb ... 150s Unpacking ruby (1:3.3) ... 150s Selecting previously unselected package rake. 150s Preparing to unpack .../12-rake_13.2.1-1build1_all.deb ... 150s Unpacking rake (13.2.1-1build1) ... 150s Selecting previously unselected package ruby-minitest. 150s Preparing to unpack .../13-ruby-minitest_5.26.1-1_all.deb ... 150s Unpacking ruby-minitest (5.26.1-1) ... 150s Selecting previously unselected package ruby-power-assert. 150s Preparing to unpack .../14-ruby-power-assert_3.0.1-1_all.deb ... 150s Unpacking ruby-power-assert (3.0.1-1) ... 150s Selecting previously unselected package ruby-test-unit. 150s Preparing to unpack .../15-ruby-test-unit_3.6.2-1_all.deb ... 150s Unpacking ruby-test-unit (3.6.2-1) ... 150s Selecting previously unselected package gem2deb-test-runner. 150s Preparing to unpack .../16-gem2deb-test-runner_2.2.5_amd64.deb ... 150s Unpacking gem2deb-test-runner (2.2.5) ... 150s Selecting previously unselected package libjs-jquery. 150s Preparing to unpack .../17-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 150s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 150s Selecting previously unselected package libjs-jquery-easing. 150s Preparing to unpack .../18-libjs-jquery-easing_12-4build1_all.deb ... 150s Unpacking libjs-jquery-easing (12-4build1) ... 150s Selecting previously unselected package libjs-jquery-mousewheel. 150s Preparing to unpack .../19-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 150s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 150s Selecting previously unselected package libjs-jquery-fancybox. 150s Preparing to unpack .../20-libjs-jquery-fancybox_12-4build1_all.deb ... 150s Unpacking libjs-jquery-fancybox (12-4build1) ... 151s Selecting previously unselected package libjs-jquery-ui. 151s Preparing to unpack .../21-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 151s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 151s Selecting previously unselected package ruby-coderay. 151s Preparing to unpack .../22-ruby-coderay_1.1.3-8build1_all.deb ... 151s Unpacking ruby-coderay (1.1.3-8build1) ... 151s Selecting previously unselected package ruby-method-source. 151s Preparing to unpack .../23-ruby-method-source_1.1.0-1_all.deb ... 151s Unpacking ruby-method-source (1.1.0-1) ... 151s Selecting previously unselected package pry. 151s Preparing to unpack .../24-pry_0.15.2-1_all.deb ... 151s Unpacking pry (0.15.2-1) ... 151s Selecting previously unselected package racc. 151s Preparing to unpack .../25-racc_1.8.1-2_all.deb ... 151s Unpacking racc (1.8.1-2) ... 151s Selecting previously unselected package ruby-json:amd64. 151s Preparing to unpack .../26-ruby-json_2.15.2+dfsg-1_amd64.deb ... 151s Unpacking ruby-json:amd64 (2.15.2+dfsg-1) ... 151s Selecting previously unselected package ruby-progressbar. 151s Preparing to unpack .../27-ruby-progressbar_1.11.0-1_all.deb ... 151s Unpacking ruby-progressbar (1.11.0-1) ... 151s Selecting previously unselected package ruby-parallel. 151s Preparing to unpack .../28-ruby-parallel_1.27.0-1_all.deb ... 151s Unpacking ruby-parallel (1.27.0-1) ... 151s Selecting previously unselected package ruby-ast. 151s Preparing to unpack .../29-ruby-ast_2.4.3-1_all.deb ... 151s Unpacking ruby-ast (2.4.3-1) ... 151s Selecting previously unselected package ruby-whitequark-parser. 151s Preparing to unpack .../30-ruby-whitequark-parser_3.3.4.2-2_all.deb ... 151s Unpacking ruby-whitequark-parser (3.3.4.2-2) ... 151s Selecting previously unselected package ruby-rainbow. 151s Preparing to unpack .../31-ruby-rainbow_3.1.1-1_all.deb ... 151s Unpacking ruby-rainbow (3.1.1-1) ... 151s Selecting previously unselected package ruby-regexp-parser. 151s Preparing to unpack .../32-ruby-regexp-parser_2.11.3-1_all.deb ... 151s Unpacking ruby-regexp-parser (2.11.3-1) ... 151s Selecting previously unselected package ruby-rubocop-ast. 151s Preparing to unpack .../33-ruby-rubocop-ast_1.24.0-2_all.deb ... 151s Unpacking ruby-rubocop-ast (1.24.0-2) ... 151s Selecting previously unselected package ruby-unicode-display-width. 151s Preparing to unpack .../34-ruby-unicode-display-width_1.6.1-1_all.deb ... 151s Unpacking ruby-unicode-display-width (1.6.1-1) ... 151s Selecting previously unselected package rubocop. 151s Preparing to unpack .../35-rubocop_1.39.0+dfsg-1build1_all.deb ... 151s Unpacking rubocop (1.39.0+dfsg-1build1) ... 151s Selecting previously unselected package ruby-public-suffix. 151s Preparing to unpack .../36-ruby-public-suffix_6.0.2-1.1_all.deb ... 151s Unpacking ruby-public-suffix (6.0.2-1.1) ... 151s Selecting previously unselected package ruby-addressable. 151s Preparing to unpack .../37-ruby-addressable_2.8.7-2_all.deb ... 151s Unpacking ruby-addressable (2.8.7-2) ... 151s Selecting previously unselected package ruby-crack. 151s Preparing to unpack .../38-ruby-crack_0.4.4-4_all.deb ... 151s Unpacking ruby-crack (0.4.4-4) ... 151s Selecting previously unselected package ruby-diff-lcs. 151s Preparing to unpack .../39-ruby-diff-lcs_1.5.1-1_all.deb ... 151s Unpacking ruby-diff-lcs (1.5.1-1) ... 151s Selecting previously unselected package ruby-docile. 151s Preparing to unpack .../40-ruby-docile_1.4.1-1_all.deb ... 151s Unpacking ruby-docile (1.4.1-1) ... 151s Selecting previously unselected package ruby-hashdiff. 151s Preparing to unpack .../41-ruby-hashdiff_1.2.1-1_all.deb ... 151s Unpacking ruby-hashdiff (1.2.1-1) ... 151s Selecting previously unselected package ruby-rspec-support. 151s Preparing to unpack .../42-ruby-rspec-support_3.13.0c0e0m0s1-2_all.deb ... 151s Unpacking ruby-rspec-support (3.13.0c0e0m0s1-2) ... 151s Selecting previously unselected package ruby-rspec-core. 151s Preparing to unpack .../43-ruby-rspec-core_3.13.0c0e0m0s1-2_all.deb ... 151s Unpacking ruby-rspec-core (3.13.0c0e0m0s1-2) ... 151s Selecting previously unselected package ruby-rspec-expectations. 151s Preparing to unpack .../44-ruby-rspec-expectations_3.13.0c0e0m0s1-2_all.deb ... 151s Unpacking ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 151s Selecting previously unselected package ruby-rspec-mocks. 151s Preparing to unpack .../45-ruby-rspec-mocks_3.13.0c0e0m0s1-2_all.deb ... 151s Unpacking ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 151s Selecting previously unselected package ruby-rspec. 151s Preparing to unpack .../46-ruby-rspec_3.13.0c0e0m0s1-2_all.deb ... 151s Unpacking ruby-rspec (3.13.0c0e0m0s1-2) ... 151s Selecting previously unselected package ruby-simplecov-html. 151s Preparing to unpack .../47-ruby-simplecov-html_0.12.3-2_all.deb ... 151s Unpacking ruby-simplecov-html (0.12.3-2) ... 151s Selecting previously unselected package ruby-simplecov. 151s Preparing to unpack .../48-ruby-simplecov_0.22.0-2_all.deb ... 151s Unpacking ruby-simplecov (0.22.0-2) ... 151s Selecting previously unselected package ruby-webmock. 151s Preparing to unpack .../49-ruby-webmock_3.25.1-1_all.deb ... 151s Unpacking ruby-webmock (3.25.1-1) ... 151s Setting up ruby-rainbow (3.1.1-1) ... 151s Setting up ruby-ruby2-keywords (0.0.5-1build1) ... 151s Setting up ruby-regexp-parser (2.11.3-1) ... 151s Setting up ruby-power-assert (3.0.1-1) ... 151s Setting up ruby-hashdiff (1.2.1-1) ... 151s Setting up ruby-public-suffix (6.0.2-1.1) ... 151s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 151s Setting up rubygems-integration (1.19build1) ... 151s Setting up ruby-minitest (5.26.1-1) ... 151s Setting up ruby-method-source (1.1.0-1) ... 151s Setting up ruby-test-unit (3.6.2-1) ... 151s Setting up ruby-ast (2.4.3-1) ... 151s Setting up ruby-net-telnet (0.2.0-1build1) ... 151s Setting up ruby-csv (3.3.4-1) ... 151s Setting up ruby-rspec-support (3.13.0c0e0m0s1-2) ... 151s Setting up ruby-webrick (1.9.1-1build1) ... 151s Setting up ruby-progressbar (1.11.0-1) ... 151s Setting up ruby-docile (1.4.1-1) ... 151s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 151s Setting up ruby-did-you-mean (1.6.3-2build1) ... 151s Setting up ruby-xmlrpc (0.3.3-2build1) ... 151s Setting up libjs-jquery-easing (12-4build1) ... 151s Setting up ruby-addressable (2.8.7-2) ... 151s Setting up libjs-jquery-fancybox (12-4build1) ... 151s Setting up ruby-parallel (1.27.0-1) ... 151s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 151s Setting up rake (13.2.1-1build1) ... 151s Setting up libruby3.3:amd64 (3.3.8-2ubuntu2) ... 151s Setting up ruby-rubygems (3.6.7-2ubuntu2) ... 151s Setting up ruby3.3 (3.3.8-2ubuntu2) ... 151s Setting up libruby:amd64 (1:3.3) ... 151s Setting up ruby (1:3.3) ... 151s Setting up racc (1.8.1-2) ... 151s Setting up ruby-json:amd64 (2.15.2+dfsg-1) ... 151s Setting up ruby-coderay (1.1.3-8build1) ... 151s Setting up ruby-rspec-core (3.13.0c0e0m0s1-2) ... 151s Setting up ruby-unicode-display-width (1.6.1-1) ... 151s Setting up pry (0.15.2-1) ... 151s Setting up ruby-diff-lcs (1.5.1-1) ... 151s Setting up ruby-whitequark-parser (3.3.4.2-2) ... 151s Setting up ruby-simplecov-html (0.12.3-2) ... 151s Setting up ruby-crack (0.4.4-4) ... 151s Setting up gem2deb-test-runner (2.2.5) ... 151s Setting up ruby-rubocop-ast (1.24.0-2) ... 151s Setting up ruby-simplecov (0.22.0-2) ... 151s Setting up ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 151s Setting up rubocop (1.39.0+dfsg-1build1) ... 151s Setting up ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 151s Setting up ruby-webmock (3.25.1-1) ... 151s Setting up ruby-rspec (3.13.0c0e0m0s1-2) ... 151s Processing triggers for libc-bin (2.42-2ubuntu4) ... 151s Processing triggers for man-db (2.13.1-1build1) ... 152s autopkgtest [19:01:44]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 152s autopkgtest [19:01:44]: test gem2deb-test-runner: [----------------------- 152s 152s ┌──────────────────────────────────────────────────────────────────────────────┐ 152s │ Checking Rubygems dependency resolution on ruby3.3 │ 152s └──────────────────────────────────────────────────────────────────────────────┘ 152s 152s RUBYLIB=. GEM_PATH= ruby3.3 -e gem\ \"rubocop\" 152s mv lib ./.gem2deb.lib 152s mv ./.gem2deb.lib lib 152s 152s ┌──────────────────────────────────────────────────────────────────────────────┐ 152s │ Run tests for ruby3.3 from debian/ruby-tests.rake │ 152s └──────────────────────────────────────────────────────────────────────────────┘ 152s 152s RUBYLIB=. GEM_PATH= ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 152s mv lib ./.gem2deb.lib 152s /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb,spec/project_spec.rb,spec/rubocop/cli/options_spec.rb,spec/rubocop/cli/suggest_extensions_spec.rb,spec/rubocop/config_obsoletion_spec.rb,spec/rubocop/lockfile_spec.rb,spec/rubocop/server/rubocop_server_spec.rb,spec/rubocop/version_spec.rb,./spec/rubocop/cop/generator_spec.rb --format documentation 155s 155s Randomized with seed 2988 155s 155s RuboCop::Cop::Style::ObjectThen 155s EnforcedStyle: then 155s registers an offense for yield_self with proc param 155s accepts yield_self without a block 155s accepts yield_self with more than 1 param 155s Ruby 2.7 155s registers an offense for yield_self with block 155s Ruby 2.6 155s registers an offense for yield_self with block 155s Ruby 2.5 156s accepts yield_self with block 156s EnforcedStyle: yield_self 156s registers an offense for then with block 156s registers an offense for then with proc param 156s accepts then without a block 156s accepts then with more than 1 param 156s 156s RuboCop::Cop::Style::ZeroLengthPredicate 156s when inspecting a StringIO object 156s when initialized with a string 156s does not register an offense 156s does not register an offense with top-level ::StringIO 156s when initialized without arguments 156s does not register an offense 156s does not register an offense with top-level ::StringIO 156s when name of the variable is `size` or `length` 156s accepts equality check 156s accepts inequality check 156s accepts comparison 156s when inspecting a Tempfile object 156s does not register an offense with top-level ::Tempfile 156s does not register an offense 156s with collection variables 156s registers an offense for `0 == collection.size` 156s registers an offense for `collection.size == 0` 156s registers an offense for `collection.size != 0` 156s registers an offense for `0 != collection.size` 156s with strings 156s registers an offense for `0 != string.size` 156s registers an offense for `string.size != 0` 156s registers an offense for `0 == string.size` 156s registers an offense for `string.size == 0` 156s with arrays 156s registers an offense for `array.length > 0` 156s registers an offense for `array.size != 0` 156s registers an offense for `0 < array.length 156s registers an offense for `array.size > 0` 156s registers an offense for `0 == array.size` 156s registers an offense for `1 > array.size` 156s registers an offense for `array.length != 0` 156s registers an offense for `array.length == 0` 156s registers an offense for `0 != array.size` 156s registers an offense for `0 == array.length` 156s registers an offense for `0 != array.length` 156s registers an offense for `array.size == 0` 156s registers an offense for `array.length < 1` 156s registers an offense for `0 < array.size` 156s registers an offense for `array.size < 1` 156s registers an offense for `1 > array.length` 156s when inspecting a File::Stat object 156s does not register an offense 156s does not register an offense with ::File 156s with hashes 156s registers an offense for `0 == hash.size 156s registers an offense for `0 != hash.size` 156s registers an offense for `hash.size != 0` 156s registers an offense for `hash.size == 0` 156s 156s RuboCop::Cop::VariableForce::Variable 156s #referenced? 156s when the variable has an assignment 156s and the variable is referenced 156s is expected to be truthy 156s and the variable is not yet referenced 156s is expected to be falsey 156s when the variable is not assigned 156s is expected to be falsey 156s and the variable is referenced 156s is expected to be truthy 156s .new 156s when non variable declaration node is passed 156s raises error 156s 156s RuboCop::Cop::Style::RedundantBegin 156s does not register an offense when using `begin` with `while` 156s autocorrects when there are trailing comments 156s reports an offense for single line def with redundant begin block 156s does not register an offense when using `begin` with multiple statement for or assignment 156s does not register an offense when using `begin` for or assignment and method call 156s registers and corrects an offense when using multi-line `if` in `begin` block 156s does not register an offense when using `begin` with `ensure` 156s doesn't modify spacing when autocorrecting 156s reports an offense when assigning nested `begin` blocks 156s does not register an offense when using `begin` for assignment 156s accepts a def with a begin block after a statement 156s accepts when multi-line `begin` block has multiple statements with modifier condition 156s reports an offense when one-liner `begin` block has single statement with modifier condition 156s accepts a def with required begin block 156s reports an offense for def with redundant begin block 156s does not register an offense when using `begin` for logical operator conditions 156s reports an offense when multi-line `begin` block has single statement with modifier condition 156s does not register an offense when using body of `begin` is empty 156s does not register an offense when using `begin` with `until` 156s reports an offense for defs with redundant begin block 156s accepts when one-liner `begin` block has multiple statements with modifier condition 156s accepts a defs with required begin block 156s does not register an offense when using `begin` for method argument 156s registers and corrects an offense when using modifier `if` single statement in `begin` block 156s registers and corrects an offense when using `begin` with single statement for or assignment 156s does not register an offense when using `begin` for semantic operator conditions 156s reports an offense when multi-line `begin` block has single statement and it is inside condition 156s does not register an offense when using `begin` with no statements for or assignment 156s reports an offense when assigning nested blocks which contain `begin` blocks 156s registers an offense and corrects when using `begin` without `rescue` or `ensure` 156s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 156s does not register an offense when using `begin` with `rescue` 156s when using endless method definition 156s registers when `begin` block has a single statement 156s accepts when `begin` block has multiple statements 156s accepts when `begin` block has no statements 156s Ruby 2.7 156s reports an offense when assigning nested blocks which contain `begin` blocks 156s >= ruby 2.5 156s accepts a stabby lambda with a begin-end 156s accepts a block with a begin block after a statement 156s accepts a {} block with a begin-end 156s accepts super with block 156s registers an offense for a do-end block with redundant begin-end 156s < Ruby 2.5 156s accepts a do-end block with a begin-end 156s 156s RuboCop::Cop::Lint::AssignmentInCondition 156s registers an offense for clvar assignment in condition 156s registers an offense for gvar assignment in condition 156s registers an offense for lvar assignment in while condition 156s registers an offense for constant assignment in condition 156s accepts == in condition 156s registers an offense for assignment after ||= in condition 156s registers an offense for ivar assignment in condition 156s accepts assignment in a block after || 156s registers an offense for collection element assignment in condition 156s accepts = in a block that is called in a condition 156s accepts ||= in condition 156s accepts = in a block followed by method call 156s registers an offense for assignment methods 156s does not blow up for empty unless condition 156s does not blow up for empty if condition 156s registers an offense for lvar assignment in condition 156s registers an offense for lvar assignment in until condition 156s registers an offense for assignment after == in condition 156s registers an offense for = in condition inside a block 156s safe assignment is not allowed 156s does not accept []= in condition surrounded with braces 156s does not accept = in condition surrounded with braces 156s safe assignment is allowed 156s accepts = in condition surrounded with braces 156s accepts []= in condition surrounded with braces 156s 156s RuboCop::TargetRuby 156s when TargetRubyVersion is set 156s does not read Gemfile.lock or gems.locked 156s uses TargetRubyVersion 156s does not read .ruby-version 156s when TargetRubyVersion is not set 156s when .ruby-version is in a parent directory 156s reads it to determine the target ruby version 156s when .ruby-version is not in a parent directory 156s when Gemfile.lock is in a parent directory 156s does 156s when gems.locked is in a parent directory 156s does 156s when .ruby-version is not present 156s when bundler lock files are not present 156s uses the default target ruby version 156s and Gemfile.lock exists 156s uses the default Ruby when jruby is in Gemfile.lock 156s uses MRI Ruby version when it has multiple digits 156s uses the default Ruby when Ruby is not in Gemfile.lock 156s uses the default Ruby when rbx is in Gemfile.lock 156s uses MRI Ruby version when it is present in Gemfile.lock 156s gemspec file 156s when file contains `required_ruby_version` as a string 156s sets target_ruby from inclusive range 156s sets target_ruby from approximate version 156s sets target_ruby from exclusive range 156s when file does not contain `required_ruby_version` 156s sets default target_ruby 156s when file contains `required_ruby_version` as a requirement 156s sets target_ruby from required_ruby_version from inclusive requirement range 156s sets first known ruby version that satisfies requirement 156s when file contains `required_ruby_version` as an array 156s sets target_ruby to the minimal version satisfying the requirements 156s sets target_ruby from required_ruby_version with many requirements 156s and gems.locked exists 156s uses the default Ruby when Ruby is not in gems.locked 156s uses the default Ruby when rbx is in gems.locked 156s uses MRI Ruby version when it has multiple digits 156s uses MRI Ruby version when it is present in gems.locked 156s uses the default Ruby when jruby is in gems.locked 156s when .tool-versions is present 156s when .tool-versions does not contain a ruby version 156s uses the default ruby version 156s when .tool-versions contains a ruby version 156s reads it to determine the target ruby version 156s does not read Gemfile.lock, gems.locked 156s when .ruby-version is present 156s does not read .tool-versions, Gemfile.lock or gems.locked 156s when .ruby-version contains a version prefixed by "ruby-" 156s correctly determines the target ruby version 156s when .ruby-version contains a JRuby version 156s uses the default target ruby version 156s when .ruby-version contains a Rbx version 156s uses the default target ruby version 156s when the MRI version contains multiple digits 156s reads it to determine the target ruby version 156s when .ruby-version contains "system" version 156s uses the default target ruby version 156s when .ruby-version contains an MRI version 156s reads it to determine the target ruby version 156s 156s RuboCop::Cop::EnforceSuperclass 156s registers an offense for models that subclass ::ActiveRecord::Base 156s registers an offense for single-line definitions 156s registers an offense for model defined using top-level 156s registers an offense for models that subclass ActiveRecord::Base 156s registers an offense for Class.new definition 156s registers an offense for top-level constant ::Class.new definition 156s when ApplicationRecord subclasses ActiveRecord::Base 156s behaves like no offense 156s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 156s ` 156s behaves like no offense 156s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 156s behaves like no offense 156s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 156s behaves like no offense 156s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 156s ` 156s behaves like no offense 156s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 156s ` 156s behaves like no offense 156s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 156s ` 156s behaves like no offense 156s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 156s ` 156s behaves like no offense 156s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 156s ` 156s when MyModel subclasses ApplicationRecord 156s behaves like no offense 156s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 156s end 156s MyModel = Class.new(ApplicationRecord) 156s ` 156s behaves like no offense 156s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 156s end 156s MyModel = ::Class.new(::ApplicationRecord) 156s ` 156s behaves like no offense 156s registers no offenses for `class MyModel < ApplicationRecord; end` 156s behaves like no offense 156s registers no offenses for `class MyModel < ::ApplicationRecord; end` 156s 156s RuboCop::Cop::Style::OptionalArguments 156s allows methods without arguments 156s allows methods with only optional arguments 156s allows methods with only one required argument 156s allows methods with only one optional argument 156s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 156s registers an offense when an optional argument is followed by a required argument 156s allows methods with only required arguments 156s allows methods with multiple optional arguments at the end 156s named params 156s with default values 156s allows optional arguments before an optional named argument 156s required params 156s allows optional arguments before required named arguments 156s registers an offense for optional arguments that come before required arguments where there are name arguments 156s allows optional arguments to come before a mix of required and optional named argument 156s 156s RuboCop::Cop::Naming::MethodName 156s accepts for non-ascii characters 156s when configured for camelCase 156s accepts class emitter method in a class, even when it is defined inside another method 156s registers an offense for correct + opposite 156s registers an offense for mixed snake case and camel case in attr. 156s accepts camel case in singleton method name 156s accepts unary operator definitions 156s registers an offense for singleton snake_case method within class 156s registers an offense for snake case in names 156s accepts camel case names in attr. 156s accepts one line methods 156s accepts camel case in instance method name 156s registers an offense for camel case methods names in attr. 156s registers an offense for capitalized camel case 156s accepts class emitter method in a module, even when it is defined inside another method 156s registers an offense for singleton upper case method without corresponding class 156s registers an offense for mixed snake case and camel case in attr. 156s accepts operator definitions 156s accepts class emitter method in a class 156s accepts class emitter method in a module 156s registers an offense for snake case name in attr. 156s registers an offense for mixed snake case and camel case 156s registers an offense for capitalized camel case name in attr. 156s when specifying `AllowedPatterns` 156s does not register an offense for snake case method name matching `AllowedPatterns` 156s does not register an offense for snake case method name in attr. 156s does not register an offense for camel case method name matching `AllowedPatterns` 156s does not register an offense for camel case method name in attr. 156s when configured for snake_case 156s registers an offense for mixed snake case and camel case in attr. 156s registers an offense for camel case in instance method name 156s registers an offense for opposite + correct 156s registers an offense for capitalized camel case name in attr. 156s registers an offense for singleton camelCase method within class 156s registers an offense for camel case method names in attr. 156s registers an offense for mixed snake case and camel case 156s accepts unary operator definitions 156s accepts snake case in attr. 156s accepts one line methods 156s registers an offense for camel case methods names in attr. 156s accepts class emitter method in a module 156s accepts operator definitions 156s accepts class emitter method in a class 156s registers an offense for camel case in singleton method name 156s accepts snake case in names 156s accepts class emitter method in a module, even when it is defined inside another method 156s accepts class emitter method in a class, even when it is defined inside another method 156s registers an offense for capitalized camel case 156s registers an offense for singleton upper case method without corresponding class 156s registers an offense for mixed snake case and camel case in attr. 156s when specifying `AllowedPatterns` 156s does not register an offense for camel case method name matching `AllowedPatterns` 156s does not register an offense for camel case method name in attr. 156s does not register an offense for snake case method name matching `AllowedPatterns` 156s does not register an offense for snake case method name in attr. 156s 156s RuboCop::Cop::Style::HashTransformValues 156s when using Ruby 2.4 or newer 156s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 156s does not flag `each_with_object` when its receiver is `zip` 156s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 156s does not flag `_.map{...}.to_h` when its receiver is `zip` 156s does not flag _.map {...}.to_h when value block argument is unused 156s does not flag value transformation in the absence of to_h 156s does not flag value transformation when receiver is array literal 156s does not flag `each_with_object` when its receiver is `with_index` 156s does not flag each_with_object when its argument is not modified 156s does not flag each_with_object when receiver is array literal 156s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 156s does not flag `Hash[_.map{...}]` when its receiver is `zip` 156s does not flag `each_with_object` when its argument is used in the value 156s does not flag Hash[_.map{...}] when both key & value are transformed 156s does not flag `each_with_object` when its receiver is `each_with_index` 156s flags _.map {...}.to_h when transform_values could be used 156s does not flag each_with_object when value transformation uses key 156s does not flag `_.map{...}.to_h` when its receiver is `with_index` 156s does not flag _.map{...}.to_h when both key & value are transformed 156s correctly autocorrects _.map{...}.to_h with block 156s does not flag each_with_object when no transformation occurs 156s does not flag `Hash[_.map{...}]` when its receiver is an array literal 156s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 156s does not flag each_with_object when both key & value are transformed 156s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 156s flags Hash[_.map{...}] when transform_values could be used 156s with inline block 156s flags each_with_object when transform_values could be used 156s with multiline block 156s flags each_with_object when transform_values could be used 156s with safe navigation operator 156s flags each_with_object when transform_values could be used 156s when using Ruby 2.6 or newer 157s flags _.to_h{...} when transform_values could be used 157s does not flag `_.to_h{...}` when its receiver is `zip` 157s does not flag `_.to_h{...}` when its receiver is `with_index` 157s does not flag `_.to_h{...}` when its receiver is `each_with_index` 157s does not flag _.to_h {...} when value block argument is unused 157s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 157s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 157s does not flag `_.to_h{...}` when both key & value are transformed 157s does not flag `_.to_h{...}` when its receiver is an array literal 157s below Ruby 2.6 157s does not flag _.to_h{...} 157s below Ruby 2.4 157s does not flag even if transform_values could be used 157s 157s RuboCop::Cop::Style::RedundantInitialize 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 `super` with no arguments 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 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 empty `initialize` method with a kwsplat` 157s does not register an offense for an `initialize` method that calls another method after `super` 157s registers an offense for an `initialize` method with a default keyword argument that does nothing 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 that calls `super` with a different argument list 157s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 157s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 157s does not register an offense for a method not named `initialize` that only calls super 157s does not register an offense for an `initialize` method that calls another method 157s does not register an offense for an `initialize` method with a default argument that calls `super` 157s registers and corrects an offense for an `initialize` method that only calls `super` 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 an `initialize` method with only a comment 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 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::SingleLineMethods 157s accepts a multi-line method 157s autocorrects def with semicolon before end 157s registers an offense for a single-line method 157s autocorrects def with semicolon after method name 157s does not crash on an method with a capitalized name 157s autocorrects defs with parentheses after method name 157s registers an offense for a single-line method and method body is enclosed in parentheses 157s autocorrects def with argument and no parentheses 157s autocorrects def with argument in parentheses 157s when AllowIfMethodIsEmpty is disabled 157s registers an offense for an empty method 157s when AllowIfMethodIsEmpty is enabled 157s accepts a single-line empty method 157s when `Style/EndlessMethod` is disabled 157s corrects to an normal method 157s when `Style/EndlessMethod` is enabled 157s with `allow_always` style 157s behaves like convert to endless method 157s does not add parens if they are already present 157s handles arguments properly 157s corrects to an endless method definition when method body is a literal 157s corrects to an endless class method definition when using < 157s does not to an endless class method definition when using `return` 157s corrects to an endless method definition when single line method call without parentheses 157s corrects to an endless method definition when single line method call with parentheses 157s corrects to an endless class method definition 157s corrects to multiline method definition when defining setter method 157s retains comments 157s does not to an endless class method definition when using `next` 157s corrects to an endless class method definition when using != 157s corrects to an endless class method definition when using > 157s corrects to an endless class method definition when using >= 157s corrects to an endless class method definition when using === 157s corrects to a normal method if the method body contains multiple statements 157s corrects to an endless class method definition when using <= 157s does not to an endless class method definition when using `break` 157s corrects to an endless method definition 157s corrects to an endless class method definition when using == 157s with AllowIfMethodIsEmpty: true 157s does not correct 157s with AllowIfMethodIsEmpty: false 157s does not turn a method with no body into an endless method 157s with `allow_single_line` style 157s behaves like convert to endless method 157s corrects to multiline method definition when defining setter method 157s corrects to an endless method definition when single line method call with parentheses 157s does not to an endless class method definition when using `next` 157s does not to an endless class method definition when using `break` 157s corrects to an endless class method definition when using == 157s corrects to an endless method definition when single line method call without parentheses 157s does not to an endless class method definition when using `return` 157s handles arguments properly 157s corrects to an endless class method definition when using === 157s corrects to an endless class method definition when using <= 157s corrects to an endless class method definition when using > 157s corrects to an endless class method definition when using != 157s does not add parens if they are already present 157s corrects to an endless method definition when method body is a literal 157s corrects to an endless method definition 157s corrects to an endless class method definition 157s corrects to an endless class method definition when using >= 157s corrects to a normal method if the method body contains multiple statements 157s corrects to an endless class method definition when using < 157s retains comments 157s with AllowIfMethodIsEmpty: true 157s does not correct 157s with AllowIfMethodIsEmpty: false 157s does not turn a method with no body into an endless method 157s with `disallow` style 157s corrects to an normal method 157s prior to ruby 3.0 157s corrects to a multiline method 157s endless methods 157s does not register an offense 157s 157s RuboCop::Cop::Utils::FormatString 157s finds the correct number of fields 157s #named_interpolation? 157s behaves like named format sequence 157s does not detect escaped named format sequence 157s detects named format sequence 157s behaves like named format sequence 157s detects named format sequence 157s does not detect escaped named format sequence 157s behaves like named format sequence 157s does not detect escaped named format sequence 157s detects named format sequence 157s behaves like named format sequence 157s does not detect escaped named format sequence 157s detects named format sequence 157s #valid? 157s returns true when there are only numbered formats 157s returns false when there are unnumbered and numbered formats 157s returns false when there are unnumbered and named formats 157s returns true when there are only unnumbered formats 157s returns true when there are only named with escaped `%` formats 157s returns false when there are numbered and named formats 157s returns true when there are only named formats 157s 157s RuboCop::Formatter::TextUtil 157s pluralize 157s will not change 0 to no 157s will pluralize fractions 157s will change 0 to no when configured 157s will pluralize negative quantities less than -1 157s will pluralize quantities greater than 1 157s will not pluralize 1 157s will pluralize -1 157s 157s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 157s registers an offense for begin body ending with a blank 157s registers an offense for begin body starting in method 157s registers an offense for begin body starting with a blank 157s registers an offense for rescue body ending 157s registers an offense for ensure body ending 157s registers an offense for begin body starting with rescue 157s registers an offense for begin body ending in method 157s accepts begin block without empty line in a method 157s registers an offense for else body ending 157s registers many offenses with complex begin-end 157s accepts begin block without empty line 157s 157s RuboCop::Cop::Style::ExponentialNotation 157s EnforcedStyle is integral 157s registers no offense for a float smaller than 1 157s registers no offense for an integral mantissa 157s registers no offense for negative exponent 157s registers an offense for decimal mantissa 157s registers no offense for negative mantissa 157s registers an offense for mantissa divisible by 10 157s registers no offense for a regular float 157s EnforcedStyle is scientific 157s registers no offense for a negative exponent 157s registers an offense for mantissa equal to 10 157s registers an offense for mantissa greater than 10 157s registers no offense for a float smaller than 1 157s registers an offense for mantissa smaller than 1 157s registers no offense for a regular float 157s registers no offense for a mantissa equal to 1 157s registers no offense for a negative mantissa 157s registers no offense for a mantissa between 1 and 10 157s EnforcedStyle is engineering 157s registers no offense for a regular float 157s registers an offense for exponent equal to -2 157s registers an offense for a mantissa greater than -0.1 157s registers no offense for a float smaller than 1 157s registers no offense for a negative mantissa 157s registers no offense for a large mantissa 157s registers an offense for mantissa smaller than 0.1 157s registers no offense for a mantissa equal to 1 157s registers no offense for a negative exponent 157s registers an offense for mantissa smaller than -1000 157s registers an offense for exponent equal to 4 157s 157s RuboCop::Cop::Lint::UselessMethodDefinition 157s does not register an offense for constructor containing additional code to `super` 157s does not register an offense when non-constructor contains only comments 157s does not register an offense for empty constructor 157s does not register an offense for constructor with only comments 157s registers an offense and corrects for method containing only `super` call 157s does not register an offense for empty class level `initialize` method 157s does not register an offense when method definition contains optional keyword argument 157s does not register an offense when `super` arguments differ from method arguments 157s does not register an offense for method containing additional code to `super` 157s does not register an offense when method definition contains optional argument 157s 157s RuboCop::Cop::Style::MapToHash 157s >= Ruby 2.6 157s `map` without `to_h` 157s does not register an offense 157s when the receiver is an array 157s registers an offense and corrects 157s when the receiver is an hash 157s registers an offense and corrects 157s for `map.to_h` with block arity 2 157s registers an offense and corrects 157s when chained further 157s registers an offense and corrects 157s `collect` without `to_h` 157s does not register an offense 157s for `map.to_h` with block arity 1 157s registers an offense and corrects 157s for `collect.to_h` with block arity 2 157s registers an offense and corrects 157s `collect.to_h` with a block on `to_h` 157s registers an offense but does not correct 157s `map.to_h` with a block on `to_h` 157s registers an offense but does not correct 157s when the receiver is an hash 157s registers an offense and corrects 157s `map` and `map.to_h` with newlines 157s registers an offense and corrects with newline removal 157s when the receiver is an array 157s registers an offense and corrects 157s for `collect.to_h` with block arity 1 157s registers an offense and corrects 157s `map` and `collect.to_h` with newlines 157s registers an offense and corrects with newline removal 157s when chained further 157s registers an offense and corrects 157s 157s RuboCop::Cop::Lint::FlipFlop 157s registers an offense for inclusive flip-flops 157s registers an offense for exclusive flip-flops 157s 157s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 157s does not register an offense when not using trailing comma 157s registers an offense when using trailing comma 157s 157s RuboCop::Cop::Style::WhenThen 157s registers an offense for when b, c; 157s accepts ; separating statements in the body of when 157s registers an offense for when b; 157s when inspecting a case statement with an empty branch 157s does not register an offense 157s 157s RuboCop::Cop::Style::PercentQLiterals 157s when EnforcedStyle is upper_case_q 157s without interpolation 157s accepts %Q 157s accepts double quotes 157s registers offense for %q 157s accepts single quotes 157s with special characters 157s accepts %q 157s accepts %Q 157s with interpolation 157s accepts single quotes 157s accepts %q 157s accepts %Q 157s accepts double quotes 157s when EnforcedStyle is lower_case_q 157s without interpolation 157s registers offense for %Q 157s accepts %q 157s accepts single quotes 157s accepts double quotes 157s with special characters 157s accepts %Q 157s accepts %q 157s with interpolation 157s accepts %q 157s accepts %Q 157s accepts single quotes 157s accepts double quotes 157s 157s RuboCop::Cop::Style::TrailingUnderscoreVariable 157s configured to allow named underscore variables 157s registers an offense when multiple underscores are used as the last variables of parallel assignment 157s does not register an offense for named variables that start with an underscore 157s does not register an offense for complex nested assignments without trailing underscores 157s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 157s does not register an offense for a named variable preceded by a names splat underscore variable 157s does not register an offense for an underscore preceded by a splat variable 157s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 157s registers an offense for splat underscore as the last variable 157s does not register an offense for multiple named underscores preceded by a splat variable 157s does not register an offense for an underscore variable preceded by a named splat underscore variable 157s does not register an offense for underscores at the beginning 157s registers an offense when the last variable of parallel assignment is an underscore 157s registers an offense for nested assignments with trailing underscores 157s does not register an offense for a named splat underscore as the last variable 157s does not register an offense for nested assignments without trailing underscores 157s registers an offense for multiple underscore variables preceded by a splat underscore variable 157s registers an offense when underscore is the second to last variable and blank is the last variable 157s does not register an offense for multiple underscores preceded by a splat variable 157s does not register an offense for a named underscore variable preceded by a splat variable 157s registers an offense when underscore is the only variable in parallel assignment 157s registers an offense for an underscore as the last param when there is also an underscore as the first param 157s does not register an offense when there are no underscores 157s registers an offense for complex nested assignments with trailing underscores 157s does not register an offense for an underscore preceded by a splat variable and another underscore 157s autocorrect 157s with parentheses 157s leaves parentheses but removes trailing underscores and commas 157s removes assignment part when every assignment is to `_` 157s removes assignment part when it is the only variable 157s leaves parentheses but removes trailing underscores 157s configured to not allow named underscore variables 157s does not register an offense for an underscore preceded by a splat variable 157s does not register an offense for multiple underscores preceded by a splat variable 157s does not register an offense when there are no underscores 157s registers an offense for multiple underscore variables preceded by a splat underscore variable 157s registers an offense when the last variable of parallel assignment is an underscore 157s does not register an offense for complex nested assignments without trailing underscores 157s registers an offense for an underscore variable preceded by a named splat underscore variable 157s registers an offense for an underscore preceded by a named splat underscore 157s registers an offense for named variables that start with an underscore 157s does not register an offense for an underscore preceded by a splat variable and another underscore 157s registers an offense when multiple underscores are used as the last variables of parallel assignment 157s registers an offense for splat underscore as the last variable 157s does not register an offense for nested assignments without trailing underscores 157s registers an offense when underscore is the second to last variable and blank is the last variable 157s does not register an offense for multiple named underscores preceded by a splat variable 157s registers an offense for a named splat underscore as the last variable 157s does not register an offense for a named underscore preceded by a splat variable 157s does not register an offense for underscores at the beginning 157s registers an offense for nested assignments with trailing underscores 157s registers an offense for complex nested assignments with trailing underscores 157s does not register an offense for a named underscore variable preceded by a splat variable 157s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 157s registers an offense when underscore is the only variable in parallel assignment 157s does not register an offense for a named variable preceded by a names splat underscore variable 157s registers an offense for multiple underscore variables preceded by a named splat underscore variable 157s registers an offense for an underscore as the last param when there is also an underscore as the first param 157s autocorrect 157s with parentheses 157s removes assignment part when it is the only variable 157s removes assignment part when every assignment is to `_` 157s leaves parentheses but removes trailing underscores 157s leaves parentheses but removes trailing underscores and commas 157s 157s RuboCop::Cop::Layout::SpaceAfterMethodName 157s registers offense and corrects class def with space before parenthesis 157s accepts a defs without arguments 157s accepts a def without arguments 157s registers an offense and corrects def with space before the parenthesis 157s registers offense and corrects assignment def with space before parenthesis 157s accepts a def with arguments but no parentheses 157s accepts class method def with arguments but no parentheses 157s accepts an assignment def with arguments but no parentheses 157s 157s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 157s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 157s accepts a guard clause when the next line is `rescue` 157s does not register an offense when the clause ends with a semicolon but is followed by a newline 157s accepts modifier if 157s registers no offenses using heredoc with `and return` before guard condition with empty line 157s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 157s registers an offense and corrects only the last guard clause 157s accepts using guard clause is after `raise` 157s does not register an offense when the clause is not followed by other code 157s accepts a guard clause when the next line is `ensure` 157s accepts a guard clause when the next line is `else` 157s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 157s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 157s registers an offense and corrects a guard clause that is a ternary operator 157s registers an offense and corrects `next` guard clause not followed by empty line 157s accepts a guard clause that is after a multiline heredoc with chained calls 157s registers and corrects when using guard clause is after `rubocop:disable` comment 157s accepts a guard clause after a single line heredoc 157s registers an offense and corrects a guard clause is before `begin` 157s accepts a guard clause when the next line is `elsif` 157s does not register an offense when there are multiple clauses on the same line 157s registers and corrects when using guard clause is after `rubocop:enable` comment 157s accepts a guard clause inside oneliner block 157s accepts multiple guard clauses 157s registers an offense and corrects when using `or return` before guard condition 157s accepts using guard clause is after `rubocop:enable` comment 157s registers an offense and corrects when using `and return` before guard condition 157s accepts a modifier if when the next line is `end` 157s registers an offense and corrects using heredoc with `and return` before guard condition 157s registers an offense and corrects a method starting with end_ 157s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 157s accepts a guard clause followed by empty line when guard clause including heredoc 157s registers an offense when the clause ends with a semicolon but the next clause is on the next line 157s accepts a guard clause that is after a multiline heredoc nested argument call 157s accepts a guard clause followed by end 157s accepts a guard clause when the next line is `rescue`-`else` 157s registers an offense and corrects a guard clause not followed by empty line 157s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 157s accepts a guard clause that is after multiline heredoc 157s 157s RuboCop::Cop::Style::MutableConstant 157s Strict: true 157s freezes a heredoc 157s allows calls to freeze 157s splat expansion 157s expansion of a range 157s registers an offense and corrects to use to_a.freeze 157s with parentheses 157s registers an offense and corrects to use to_a.freeze 157s behaves like string literal 157s Ruby 2.7 or lower 157s when the frozen string literal comment is false 157s behaves like mutable objects 157s when assigning with = 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when assigning with ||= 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when the frozen string literal comment is true 157s does not register an offense when using a multiline string 157s does not register an offense when using interpolated heredoc constant 157s behaves like immutable objects 157s allows <<~HERE 157s foo 157s bar 157s HERE 157s to be ||= to a constant 157s allows <<~HERE 157s foo 157s bar 157s HERE 157s to be assigned to a constant 157s behaves like immutable objects 157s allows "#{a}" to be ||= to a constant 157s allows "#{a}" to be assigned to a constant 157s when the frozen string literal comment is missing 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s Ruby 3.0 or higher 157s when the frozen string literal comment is missing 157s behaves like mutable objects 157s when assigning with = 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when assigning with ||= 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when the frozen string literal comment is true 157s registers an offense when using interpolated heredoc constant 157s does not register an offense when using a multiline string 157s registers an offense when using a multiline string with interpolation 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows <<~HERE 157s foo 157s bar 157s HERE 157s to be ||= to a constant 157s allows <<~HERE 157s foo 157s bar 157s HERE 157s to be assigned to a constant 157s when the frozen string literal comment is false 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 157s behaves like mutable objects 157s when assigning with = 157s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 157s when assigning with ||= 157s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows Struct.new(:a, :b) to be ||= to a constant 157s allows Struct.new(:a, :b) to be assigned to a constant 157s behaves like immutable objects 157s allows Struct.new(:node) do 157s def assignment? 157s true 157s end 157s end 157s to be assigned to a constant 157s allows Struct.new(:node) do 157s def assignment? 157s true 157s end 157s end 157s to be ||= to a constant 157s behaves like mutable objects 157s when assigning with = 157s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 157s when assigning with ||= 157s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows ::Namespace::OTHER_CONST to be ||= to a constant 157s allows ::Namespace::OTHER_CONST to be assigned to a constant 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 157s when assigning with multiple operator calls 157s registers an offense and corrects with parens and freeze 157s behaves like immutable objects 157s allows Struct.new to be ||= to a constant 157s allows Struct.new to be assigned to a constant 157s behaves like immutable objects 157s allows 1 to be ||= to a constant 157s allows 1 to be assigned to a constant 157s when assigning with an operator 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s behaves like operator methods 157s registers an offense and corrects with parens and freeze 157s when assigning an array without brackets 157s does not insert brackets for %w() arrays 157s adds brackets when autocorrecting 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows ::OTHER_CONST to be ||= to a constant 157s allows ::OTHER_CONST to be assigned to a constant 157s behaves like immutable objects 157s allows Namespace::OTHER_CONST to be ||= to a constant 157s allows Namespace::OTHER_CONST to be assigned to a constant 157s behaves like immutable objects 157s allows OTHER_CONST to be ||= to a constant 157s allows OTHER_CONST to be assigned to a constant 157s behaves like immutable objects 157s allows 1.5 to be assigned to a constant 157s allows 1.5 to be ||= to a constant 157s behaves like immutable objects 157s allows ENV['foo'] to be ||= to a constant 157s allows ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows ::Struct.new to be assigned to a constant 157s allows ::Struct.new to be ||= to a constant 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows ::ENV['foo'] to be assigned to a constant 157s allows ::ENV['foo'] to be ||= to a constant 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 157s operators that produce unfrozen objects 157s registers an offense when operating on a constant and a string 157s registers an offense when operating on multiple strings 157s behaves like immutable objects 157s allows :sym to be assigned to a constant 157s allows :sym to be ||= to a constant 157s methods and operators that produce frozen objects 157s accepts operating on multiple floats 157s accepts comparison operators 157s accepts operating on a constant and an interger 157s accepts operating on a constant and a float 157s accepts operating on multiple integers 157s accepts checking fixed size 157s accepts assigning to an environment variable with a fallback 157s Strict: false 157s allows method call assignments 157s Ruby 3.0 or higher 157s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 157s raises offense when shareable_constant_value is specified as an inline comment 157s when assigning a range (irange) 157s does not register an offense when with parenthesis 157s does not register an offense when without parenthesis 157s when assigning a regexp 157s does not register an offense 157s when assigning a range (erange) 157s does not register an offense when without parenthesis 157s does not register an offense when with parenthesis 157s when using shareable_constant_value 157s behaves like literals that are frozen 157s behaves like immutable objects 157s allows FOO + BAR to be ||= to a constant 157s allows FOO + BAR to be assigned to a constant 157s behaves like immutable objects 157s allows 'foo' + 'bar' to be ||= to a constant 157s allows 'foo' + 'bar' to be assigned to a constant 157s behaves like immutable objects 157s allows 1 to be assigned to a constant 157s allows 1 to be ||= to a constant 157s behaves like immutable objects 157s allows 1.5 to be ||= to a constant 157s allows 1.5 to be assigned to a constant 157s behaves like immutable objects 157s allows :sym to be ||= to a constant 157s allows :sym to be assigned to a constant 157s behaves like immutable objects 157s allows ::ENV['foo'] to be assigned to a constant 157s allows ::ENV['foo'] to be ||= to a constant 157s behaves like immutable objects 157s allows FOO - BAR to be assigned to a constant 157s allows FOO - BAR to be ||= to a constant 157s behaves like immutable objects 157s allows ENV['foo'] to be ||= to a constant 157s allows ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows "top#{1 + 2}" to be assigned to a constant 157s allows "top#{1 + 2}" to be ||= to a constant 157s behaves like immutable objects 157s allows 'str' to be ||= to a constant 157s allows 'str' to be assigned to a constant 157s behaves like immutable objects 157s allows %w(a b c) to be ||= to a constant 157s allows %w(a b c) to be assigned to a constant 157s behaves like immutable objects 157s allows { a: 1, b: 2 } to be assigned to a constant 157s allows { a: 1, b: 2 } to be ||= to a constant 157s behaves like immutable objects 157s allows [1, 2, 3] to be assigned to a constant 157s allows [1, 2, 3] to be ||= to a constant 157s behaves like literals that are frozen 157s behaves like immutable objects 157s allows FOO - BAR to be ||= to a constant 157s allows FOO - BAR to be assigned to a constant 157s behaves like immutable objects 157s allows %w(a b c) to be assigned to a constant 157s allows %w(a b c) to be ||= to a constant 157s behaves like immutable objects 157s allows [1, 2, 3] to be ||= to a constant 157s allows [1, 2, 3] to be assigned to a constant 157s behaves like immutable objects 157s allows "top#{1 + 2}" to be assigned to a constant 157s allows "top#{1 + 2}" to be ||= to a constant 157s behaves like immutable objects 157s allows 1 to be assigned to a constant 157s allows 1 to be ||= to a constant 157s behaves like immutable objects 157s allows :sym to be assigned to a constant 157s allows :sym to be ||= to a constant 157s behaves like immutable objects 157s allows { a: 1, b: 2 } to be ||= to a constant 157s allows { a: 1, b: 2 } to be assigned to a constant 157s behaves like immutable objects 157s allows ENV['foo'] to be ||= to a constant 157s allows ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows 'str' to be assigned to a constant 157s allows 'str' to be ||= to a constant 157s behaves like immutable objects 157s allows 'foo' + 'bar' to be assigned to a constant 157s allows 'foo' + 'bar' to be ||= to a constant 157s behaves like immutable objects 157s allows FOO + BAR to be ||= to a constant 157s allows FOO + BAR to be assigned to a constant 157s behaves like immutable objects 157s allows ::ENV['foo'] to be ||= to a constant 157s allows ::ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows 1.5 to be assigned to a constant 157s allows 1.5 to be ||= to a constant 157s behaves like literals that are frozen 157s behaves like immutable objects 157s allows 'str' to be assigned to a constant 157s allows 'str' to be ||= to a constant 157s behaves like immutable objects 157s allows "top#{1 + 2}" to be ||= to a constant 157s allows "top#{1 + 2}" to be assigned to a constant 157s behaves like immutable objects 157s allows [1, 2, 3] to be ||= to a constant 157s allows [1, 2, 3] to be assigned to a constant 157s behaves like immutable objects 157s allows { a: 1, b: 2 } to be ||= to a constant 157s allows { a: 1, b: 2 } to be assigned to a constant 157s behaves like immutable objects 157s allows 1 to be ||= to a constant 157s allows 1 to be assigned to a constant 157s behaves like immutable objects 157s allows ENV['foo'] to be ||= to a constant 157s allows ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows FOO - BAR to be assigned to a constant 157s allows FOO - BAR to be ||= to a constant 157s behaves like immutable objects 157s allows FOO + BAR to be ||= to a constant 157s allows FOO + BAR to be assigned to a constant 157s behaves like immutable objects 157s allows 'foo' + 'bar' to be assigned to a constant 157s allows 'foo' + 'bar' to be ||= to a constant 157s behaves like immutable objects 157s allows 1.5 to be assigned to a constant 157s allows 1.5 to be ||= to a constant 157s behaves like immutable objects 157s allows ::ENV['foo'] to be ||= to a constant 157s allows ::ENV['foo'] to be assigned to a constant 157s behaves like immutable objects 157s allows %w(a b c) to be ||= to a constant 157s allows %w(a b c) to be assigned to a constant 157s behaves like immutable objects 157s allows :sym to be ||= to a constant 157s allows :sym to be assigned to a constant 157s behaves like literals that are not frozen 157s behaves like immutable objects 157s allows 'foo' + 'bar' to be assigned to a constant 157s allows 'foo' + 'bar' to be ||= to a constant 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 157s behaves like mutable objects 157s when assigning with ||= 157s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 157s when assigning with = 157s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 157s behaves like immutable objects 157s allows 1 to be assigned to a constant 158s allows 1 to be ||= to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1.5 to be assigned to a constant 158s allows 1.5 to be ||= to a constant 158s behaves like immutable objects 158s allows ::ENV['foo'] to be assigned to a constant 158s allows ::ENV['foo'] to be ||= to a constant 158s behaves like immutable objects 158s allows FOO - BAR to be assigned to a constant 158s allows FOO - BAR to be ||= to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like immutable objects 158s allows :sym to be assigned to a constant 158s allows :sym to be ||= to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ENV['foo'] to be ||= to a constant 158s allows ENV['foo'] to be assigned to a constant 158s behaves like immutable objects 158s allows ENV['foo'] to be assigned to a constant 158s allows ENV['foo'] to be ||= to a constant 158s behaves like string literal 158s Ruby 3.0 or higher 158s when the frozen string literal comment is true 158s registers an offense when using a multiline string with interpolation 158s does not register an offense when using a multiline string 158s registers an offense when using interpolated heredoc constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows <<~HERE 158s foo 158s bar 158s HERE 158s to be assigned to a constant 158s allows <<~HERE 158s foo 158s bar 158s HERE 158s to be ||= to a constant 158s when the frozen string literal comment is false 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when the frozen string literal comment is missing 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s Ruby 2.7 or lower 158s when the frozen string literal comment is false 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when the frozen string literal comment is true 158s does not register an offense when using interpolated heredoc constant 158s does not register an offense when using a multiline string 158s behaves like immutable objects 158s allows <<~HERE 158s foo 158s bar 158s HERE 158s to be assigned to a constant 158s allows <<~HERE 158s foo 158s bar 158s HERE 158s to be ||= to a constant 158s behaves like immutable objects 158s allows "#{a}" to be assigned to a constant 158s allows "#{a}" to be ||= to a constant 158s when the frozen string literal comment is missing 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1 to be ||= to a constant 158s allows 1 to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like immutable objects 158s allows :sym to be ||= to a constant 158s allows :sym to be assigned to a constant 158s splat expansion 158s expansion of a range 158s registers an offense and corrects to use to_a.freeze 158s with parentheses 158s registers an offense and corrects to use to_a.freeze 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ::ENV['foo'] to be assigned to a constant 158s allows ::ENV['foo'] to be ||= to a constant 158s behaves like immutable objects 158s allows 'foo' + 'bar' to be ||= to a constant 158s allows 'foo' + 'bar' to be assigned to a constant 158s behaves like immutable objects 158s allows FOO - BAR to be ||= to a constant 158s allows FOO - BAR to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning an array without brackets 158s does not insert brackets for %w() arrays 158s adds brackets when autocorrecting 158s Ruby 2.7 or lower 158s when using shareable_constant_values 158s behaves like literals that are not frozen 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ENV['foo'] to be assigned to a constant 158s allows ENV['foo'] to be ||= to a constant 158s behaves like immutable objects 158s allows ::ENV['foo'] to be ||= to a constant 158s allows ::ENV['foo'] to be assigned to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1.5 to be ||= to a constant 158s allows 1.5 to be assigned to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1 to be ||= to a constant 158s allows 1 to be assigned to a constant 158s behaves like immutable objects 158s allows FOO - BAR to be ||= to a constant 158s allows FOO - BAR to be assigned to a constant 158s behaves like immutable objects 158s allows :sym to be assigned to a constant 158s allows :sym to be ||= to a constant 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like immutable objects 158s allows 'foo' + 'bar' to be assigned to a constant 158s allows 'foo' + 'bar' to be ||= to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s behaves like literals that are not frozen 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ::ENV['foo'] to be assigned to a constant 158s allows ::ENV['foo'] to be ||= to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows :sym to be assigned to a constant 158s allows :sym to be ||= to a constant 158s behaves like immutable objects 158s allows FOO - BAR to be ||= to a constant 158s allows FOO - BAR to be assigned to a constant 158s behaves like immutable objects 158s allows 1.5 to be ||= to a constant 158s allows 1.5 to be assigned to a constant 158s behaves like immutable objects 158s allows ENV['foo'] to be ||= to a constant 158s allows ENV['foo'] to be assigned to a constant 158s behaves like immutable objects 158s allows 'foo' + 'bar' to be ||= to a constant 158s allows 'foo' + 'bar' to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1 to be assigned to a constant 158s allows 1 to be ||= to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like literals that are not frozen 158s behaves like immutable objects 158s allows 'foo' + 'bar' to be assigned to a constant 158s allows 'foo' + 'bar' to be ||= to a constant 158s behaves like immutable objects 158s allows 1 to be ||= to a constant 158s allows 1 to be assigned to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ENV['foo'] to be ||= to a constant 158s allows ENV['foo'] to be assigned to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ::ENV['foo'] to be ||= to a constant 158s allows ::ENV['foo'] to be assigned to a constant 158s behaves like immutable objects 158s allows FOO - BAR to be assigned to a constant 158s allows FOO - BAR to be ||= to a constant 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows :sym to be assigned to a constant 158s allows :sym to be ||= to a constant 158s behaves like immutable objects 158s allows 1.5 to be ||= to a constant 158s allows 1.5 to be assigned to a constant 158s behaves like literals that are not frozen 158s behaves like immutable objects 158s allows 'foo' + 'bar' to be ||= to a constant 158s allows 'foo' + 'bar' to be assigned to a constant 158s behaves like immutable objects 158s allows 1 to be ||= to a constant 158s allows 1 to be assigned to a constant 158s behaves like immutable objects 158s allows FOO + BAR to be ||= to a constant 158s allows FOO + BAR to be assigned to a constant 158s behaves like immutable objects 158s allows :sym to be assigned to a constant 158s allows :sym to be ||= to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows FOO - BAR to be ||= to a constant 158s allows FOO - BAR to be assigned to a constant 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ENV['foo'] to be ||= to a constant 158s allows ENV['foo'] to be assigned to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1.5 to be assigned to a constant 158s allows 1.5 to be ||= to a constant 158s behaves like mutable objects 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows ::ENV['foo'] to be ||= to a constant 158s allows ::ENV['foo'] to be assigned to a constant 158s when assigning a range (erange) without parenthesis 158s adds parentheses when autocorrecting 158s does not insert parenthesis to range enclosed in parentheses 158s when assigning a regexp 158s registers an offense 158s when assigning a range (irange) without parenthesis 158s does not insert parenthesis to range enclosed in parentheses 158s adds parentheses when autocorrecting 158s behaves like mutable objects 158s when assigning with = 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s when assigning with ||= 158s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 158s behaves like immutable objects 158s allows 1.5 to be assigned to a constant 158s allows 1.5 to be ||= to a constant 158s 158s RuboCop::Cop::Lint::UselessRuby2Keywords 158s with a dynamically defined method 158s does not register an offense for an allowed `ruby2_keywords` 158s registers an offense for an unnecessary `ruby2_keywords` 158s does not register an offense when the method has a `restarg` and a `shadowarg` 158s registers an offense for a numblock 158s registers an offense when the method has a `shadowarg` 158s when `ruby2_keywords` is given a `def` node 158s registers an offense for a method with a `restarg` and keyword args 158s registers an offense for a method with only `kwrestarg` 158s registers an offense for a method with a `restarg` and `kwrestarg` 158s registers an offense for a method with a `restarg` and `kwoptarg` 158s does not register an offense for a method with a `restarg` other optional args 158s registers an offense for a method with only positional args 158s does not register an offense for a method with a `restarg` and no `kwrestarg` 158s registers an offense for a method without arguments 158s does not register an offense for a method with a `restarg` and `blockarg` 158s registers an offense for a method with only keyword args 158s does not register an offense for a method with a `restarg` other positional args 158s when `ruby2_keywords` is given a symbol 158s does not register an offense when there is no `def` 158s registers an offense for an unnecessary `ruby2_keywords` 158s does not register an offense for an allowed def 158s does not register an offense when the `def` is at a different depth 158s 158s RuboCop::Cop::Metrics::PerceivedComplexity 158s when AllowedMethods is enabled 158s does not register an offense when using `define_method` 158s does not register an offense when defining a class method 158s does not register an offense when defining an instance method 158s when Max is 1 158s registers an offense for a `define_method` 158s accepts complex code outside of methods 158s accepts a method with no decision points 158s registers an offense for a case/when block 158s registers an offense for an if modifier 158s registers an offense for a rescue block 158s registers an offense for an unless modifier 158s accepts an empty `define_method` 158s accepts an empty method 158s counts known iterating block 158s registers an offense for || 158s registers an offense for a for block 158s registers an offense for && 158s counts else in a case with no argument 158s registers an offense for a ternary operator 158s counts only a single method 158s does not count unknown block calls 158s registers an offense for a case/when block without an expression after case 158s registers an offense for a while block 158s registers an offense for and 158s registers an offense for elsif and else blocks 158s registers an offense for or 158s registers an offense for an until block 158s deals with nested if blocks containing && and || 158s when AllowedPatterns is enabled 158s does not register an offense when using `define_method` 158s does not register an offense when defining an instance method 158s does not register an offense when defining a class method 158s when Max is 2 158s counts stupid nested if and else blocks 158s 158s RuboCop::Cop::Lint::RescueException 158s does not register an offense for rescue with other class 158s does not register an offense for rescue with no class 158s does not register an offense for rescue with a module prefix 158s registers an offense for rescue from Exception 158s registers an offense for rescue with Exception => e 158s does not crash when the splat operator is used in a rescue 158s does not crash when the namespace of a rescued class is in a local variable 158s registers an offense for rescue with ::Exception 158s registers an offense for rescue with StandardError, Exception 158s does not register an offense for rescue with other classes 158s does not register an offense for rescue with no class and => e 158s 158s RuboCop::Cop::Style::StabbyLambdaParentheses 158s require_parentheses 158s registers an offense for a stabby lambda without parentheses 158s does not register an offense for a stabby lambda with parentheses 158s behaves like common 158s does not check a stabby lambda without arguments 158s does not check a method call named lambda 158s does not check the old lambda syntax 158s require_no_parentheses 158s registers an offense for a stabby lambda with parentheses 158s behaves like common 158s does not check a method call named lambda 158s does not check a stabby lambda without arguments 158s does not check the old lambda syntax 158s 158s RuboCop::Cop::Lint::RedundantCopEnableDirective 158s registers offense and corrects redundant enabling of same cop 158s registers correct offense when combined with necessary enable, no white-space after comma 158s registers offense and corrects unnecessary enable 158s registers an offense and corrects when the first cop is unnecessarily enabled 158s registers multiple offenses and corrects the same comment 158s registers correct offense when combined with necessary enable 158s when all department enabled 158s registers offense and corrects redundant enabling of cop of same department 158s registers offense and corrects unnecessary enable 158s registers offense and corrects redundant enabling of department of same cop 158s registers offense and corrects redundant enabling of same department 158s registers correct offense when combined with necessary enable 158s registers an offense and corrects when the first department is unnecessarily enabled 158s registers multiple offenses and corrects the same comment 158s all switch 158s registers offense and corrects unnecessary enable all 158s when at least one cop was disabled 158s does not register offense 158s when middle cop is unnecessarily enabled 158s registers an offense and corrects when there is extra white space 158s registers an offense and corrects 158s when last cop is unnecessarily enabled 158s registers an offense and corrects 158s registers an offense and corrects when there is no space between the cops and the comma 158s when all cops are unnecessarily enabled 158s on separate lines 158s registers an offense and corrects when there is extra white space 158s on the same line 158s registers an offense and corrects 158s when cop is disabled in the configuration 158s registers no offense when enabling the cop 158s registers an offense if enabling it twice 158s 158s RuboCop::Cop::Style::NegatedIfElseCondition 158s registers an offense and corrects when negating condition with `!` for `if-else` 158s works with comments when one branch is a begin and the other is not 158s registers an offense when using negated condition and `if` branch body is empty 158s does not register an offense when negating condition for `if-elsif` 158s correctly moves comments at the end of branches 158s does not register an offense when `if` with `!!` condition 158s registers an offense and corrects a multiline ternary 158s does not register an offense when only part of the condition is negated 158s registers an offense and corrects when negating condition with `not` for `if-else` 158s works with comments when neither branch is a begin node 158s moves comments to correct branches during autocorrect 158s works with comments and multiple statements 158s does not register an offense when the `else` branch is empty 158s does not register an offense when both branches are empty 158s registers an offense and corrects nested `if-else` with negated condition 158s works with duplicate nodes 158s does not register an offense when `if` with negated condition has no `else` branch 158s registers an offense and corrects when negating condition with `not` for ternary 158s behaves like negation method 158s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 158s registers an offense and corrects when negating condition with `!~` for ternary 158s registers an offense and corrects when negating condition with `!~` for `if-else` 158s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 158s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 158s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 158s behaves like negation method 158s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 158s registers an offense and corrects when negating condition with `!=` for `if-else` 158s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 158s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 158s registers an offense and corrects when negating condition with `!=` for ternary 158s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 158s 158s RuboCop::Cop::Lint::DeprecatedClassMethods 158s prefer `block_given?` over `iterator?` 158s registers an offense and corrects iterator? 158s does not register an offense for offensive method `iterator?`on other receivers 158s does not register an offense for block_given? 158s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 158s registers an offense for ::Socket.gethostbyname 158s registers an offense for Socket.gethostbyname 158s does not register an offense for method `gethostbyname` on other receivers 158s prefer `File.exist?` over `File.exists?` 158s registers an offense and corrects File.exists? 158s registers an offense and corrects ::File.exists? 158s does not register an offense for File.exist? 158s when using `ENV.dup` 158s registers an offense 158s does not register an offense for method calls to `ENV` other than `dup` 158s when using `ENV.clone` 158s registers an offense 158s does not register an offense for method calls to `ENV` other than `clone` 158s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 158s registers an offense for ::Socket.gethostbyaddr 158s does not register an offense for method `gethostbyaddr` on other receivers 158s registers an offense for Socket.gethostbyaddr 158s prefer `Dir.exist?` over `Dir.exists?` 158s does not register an offense for offensive method `exists?`on other receivers 158s registers an offense and corrects Dir.exists? 158s does not register an offense for Dir.exist? 158s registers an offense and corrects ::Dir.exists? 158s when using `ENV.freeze` 158s does not register an offense for method calls to `ENV` other than `freeze` 158s registers an offense 158s 158s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 158s incorrect cases 158s incorrect case in array with nested calls and double heredoc and spaced out comma 158s detects 158s simple incorrect case squiggles 158s detects 158s incorrect case nested method call with comma 158s detects 158s simple incorrect case comma 158s detects 158s nested incorrect case 158s detects 158s simple incorrect case comma with spaces and comma in heredoc 158s detects 158s incorrect case with other param before constructor 158s detects 158s complex incorrect case with multiple calls 158s detects and fixes the first 158s detects and fixes the second 158s incorrect case with other param before constructor and raise call 158s detects 158s incorrect case in array with double heredoc and spaced out comma 158s detects 158s double incorrect case new line chained calls 158s detects 158s double case new line 158s detects and fixes 158s simple incorrect case hash 158s detects 158s double incorrect case 158s detects 158s simple incorrect case with call after trailing comma 158s detects 158s incorrect case with other param before 158s detects 158s simple incorrect case comma with spaces 158s detects 158s incorrect case in array with spaced out comma 158s detects 158s simple incorrect case 158s detects 158s simple incorrect case with call after 158s detects 158s complex chained incorrect case with multiple calls 158s detects and fixes the first 158s incorrect case with other param after 158s detects 158s correct cases 158s accepts method chain with heredoc argument correct case 158s accepts method with heredoc argument of proc correct case 158s accepts when there is an argument between a heredoc argument and the closing paretheses 158s accepts double correct case 158s accepts simple correct case 158s accepts correct case with other param after 158s accepts correct case with other param before 158s accepts hash correct case 158s accepts double correct case nested 158s accepts double correct case new line 158s invocation after the HEREDOC 158s ignores tr 158s ignores random call 158s ignores random call after 158s 158s RuboCop::Cop::Lint::AmbiguousOperator 158s with `-` unary operator in the first argument 158s with parentheses around the operator 158s does not register an offense 158s without parentheses 158s without whitespaces on the right of the operator 158s registers an offense and corrects 158s with a whitespace on the right of the operator 158s does not register an offense 158s with a splat operator in the first argument 158s without parentheses 158s with a whitespace on the right of the operator 158s does not register an offense 158s without whitespaces on the right of the operator 158s registers an offense and corrects 158s with parentheses around the splatted argument 158s does not register an offense 158s with a keyword splat operator in the first argument 158s with parentheses around the keyword splat operator 158s does not register an offense 158s without parentheses 158s with a whitespace on the right of the operator 158s does not register an offense 158s without whitespaces on the right of the operator 158s registers an offense and corrects 158s when using safe navigation operator with a unary operator 158s does not register an offense 158s with a block ampersand in the first argument 158s with parentheses around the block argument 158s does not register an offense 158s without parentheses 158s with a whitespace on the right of the operator 158s does not register an offense 158s without whitespaces on the right of the operator 158s registers an offense and corrects 158s with `+` unary operator in the first argument 158s without parentheses 158s without whitespaces on the right of the operator 158s registers an offense and corrects 158s without whitespaces on the right of the operator when a method with no arguments is used in advance 158s registers an offense and corrects 158s with a whitespace on the right of the operator 158s does not register an offense 158s with parentheses around the operator 158s does not register an offense 158s 158s RuboCop::Cop::Style::RedundantEach 158s registers an offense when using `each.reverse_each` 158s does not register an offense when using `reverse_each(&:foo).each {...}` 158s does not register an offense when using `each {}.reverse_each {}` 158s does not register an offense when using `each_with_object` 158s registers an offense when using `each.each` 158s does not register an offense when using `reverse_each {}.each {}` 158s registers an offense when using `each.each(&:foo)` 158s does not register an offense when using `each` as enumerator 158s registers an offense when using `reverse_each.each_with_index` 158s does not register an offense when using `each.with_object` 158s does not register an offense when any method is used between methods with `each` in the method name 158s does not register an offense when using `each {}.each_with_index {}` 158s does not register an offense when using `each_with_index.reverse_each` 158s registers an offense when using `reverse_each.each` 158s registers an offense when using `reverse_each.each_with_object` 158s does not register an offense when using `each_foo {}.each_with_object([]) {}` 158s registers an offense when using a method starting with `each_` with `each_with_index` 158s does not register an offense when using `each` with a symbol proc for last argument 158s does not register an offense when using `each.with_index` 158s registers an offense when using `each.each_with_object` 158s does not register an offense when not chaining `each_` calls 158s does not register an offense when using `each {}.each_with_object([]) {}` 158s registers an offense when using a method starting with `each_` with `each_with_object` 158s does not register an offense when using only single `each` 158s registers an offense when using `each.each_with_index` 158s does not register an offense when using `each` with a symbol proc argument 158s does not register an offense when using `each_with_index` 158s does not register an offense when using `each_ancestor.each` 158s 158s RuboCop::Cop::Style::RedundantParentheses 158s registers an offense when there is space around the parentheses 158s registers an offense and corrects an array of multiple heredocs 158s registers an offense for parens around a variable after semicolon 158s registers an offense for parens around last expressions in method body 158s accepts parentheses around the error passed to rescue 158s accepts parentheses when enclosed in parentheses at `until-post` 158s accepts parentheses in yield call with hash 158s accepts parentheses when they touch the following keyword 158s registers an offense for parens around a receiver of a method call with an argument 158s registers an offense for parens around a block body 158s registers an offense for parens around a literal in array and following newline 158s registers an offense for parens around a literal hash value 158s accepts parentheses around operator keywords 158s registers an offense for parens around a float exponentiation base 158s accepts parentheses in super call with hash 158s registers an offense for parens around a positive exponent 158s accepts parentheses when enclosed in parentheses at `while-post` 158s registers an offense for parens around method body 158s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 158s registers an offense for parens around a literal hash value and following newline 158s accepts parentheses inside an irange 158s registers an offense for parens around an integer exponentiation base 158s accepts parentheses around a constant passed to when 158s registers an offense for parens around a literal in array 158s registers an offense for parens around last expressions in block body 158s accepts parentheses around an erange 158s registers an offense and corrects when method arguments are unnecessarily parenthesized 158s accepts parentheses around an irange 158s accepts parentheses around a method call with unparenthesized arguments 158s accepts parentheses when they touch the preceding keyword 158s accepts parentheses inside an erange 158s registers an offense for parens around an interpolated expression 158s registers an offense for parens around a negative exponent 158s behaves like keyword with return value 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around an unary operation 158s behaves like redundant 158s registers an offense for parentheses around an unary operation 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like redundant 158s registers an offense for parentheses around an unary operation 158s behaves like redundant 158s registers an offense for parentheses around a variable 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s when parentheses are used like method argument parentheses 158s accepts parens around the arg 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s when the first argument in a method call begins with a hash literal 158s accepts parentheses if the argument list is not parenthesized 158s registers an offense if the argument list is parenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a variable 158s when a hash literal is the second argument in a method call 158s registers an offense 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like keyword with return value 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s when a non-parenthesized call has an arg and a block 158s accepts parens around the arg 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like keyword with arguments 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s ternaries 158s when Style/TernaryParentheses is not enabled 158s registers an offense for parens around constant ternary condition 158s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 158s registers an offense for parens around ternary condition 158s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s pin operator 158s behaves like allowed parentheses 158s accepts parentheses on a method call on a class variable 158s behaves like allowed parentheses 158s accepts parentheses on a method call on a global variable 158s behaves like redundant parentheses 158s registers an offense and corrects an instance variable 158s behaves like allowed parentheses 158s accepts parentheses on a method call on an instance variable 158s behaves like redundant parentheses 158s registers an offense and corrects a local variable 158s behaves like allowed parentheses 158s accepts parentheses on a function call with arguments 158s behaves like allowed parentheses 158s accepts parentheses on a method call on a local variable 158s behaves like allowed parentheses 158s accepts parentheses on a range literal 158s behaves like allowed parentheses 158s accepts parentheses on a hash literal 158s behaves like redundant parentheses 158s registers an offense and corrects a class variable 158s behaves like allowed parentheses 158s accepts parentheses on an int literal 158s behaves like redundant parentheses 158s registers an offense and corrects a global variable 158s behaves like allowed parentheses 158s accepts parentheses on a function call with no arguments 158s behaves like allowed parentheses 158s accepts parentheses on an expression 158s behaves like allowed parentheses 158s accepts parentheses on an array literal 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like redundant 158s registers an offense for parentheses around a variable 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like keyword with arguments 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a literal 158s behaves like redundant 158s registers an offense for parentheses around an unary operation 158s behaves like keyword with return value 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s behaves like plausible 158s accepts parentheses when arguments are unparenthesized 158s literals in an array 158s when there is a comma on the same line as the closing parentheses 158s registers an offense and corrects when there is a subsequent item 158s registers an offense and corrects when there is a trailing comma 158s registers an offense and corrects when there is no subsequent item 158s registers an offense and corrects when there is assignment 158s behaves like redundant 158s registers an offense for parentheses around a keyword 158s behaves like redundant 158s registers an offense for parentheses around a method call 158s behaves like redundant 158s registers an offense for parentheses around a constant 158s 158s RuboCop::Cop::Style::TrailingCommaInBlockArgs 158s when `->` has multiple arguments 158s does not register an offense 158s curly brace block format 158s registers an offense when a trailing comma is not needed 158s does not register an offense when a trailing comma is required 158s does not register an offense for keyword arguments 158s ignores commas in default argument strings 158s does not register an offense when more than one argument is present with no trailing comma 158s does not register an offense for default arguments 158s preserves semicolons in block/local variables 158s does not register an offense when no arguments are present 158s do/end block format 158s does not register an offense for an empty block 158s does not register an offense when a trailing comma is required 158s does not register an offense when no arguments are present 158s ignores commas in default argument strings 158s preserves semicolons in block/local variables 158s does not register an offense when more than one argument is present with no trailing comma 158s registers an offense when a trailing comma is not needed 158s does not register an offense for default arguments 158s does not register an offense for keyword arguments 158s when `lambda` has multiple arguments 158s registers an offense and corrects when a trailing comma isn't needed 158s does not register an offense when more than one argument is present with no trailing comma 158s 158s RuboCop::Cop::Layout::TrailingWhitespace 158s is not fooled by heredoc containing __END__ within a doc comment 158s registers an offense for a line ending with space 158s registers an offense for a tab in a heredoc 158s registers an offense for a line ending with tab 158s registers an offense for a blank line with space 158s autocorrects unwanted space 158s is not fooled by __END__ within a documentation comment 158s registers offenses before __END__ but not after 158s registers an offense for trailing whitespace in a heredoc string 158s accepts a line without trailing whitespace 158s is not fooled by heredoc containing __END__ 158s when `AllowInHeredoc` is set to true 158s registers an offense for trailing whitespace at the heredoc begin 158s accepts trailing whitespace in a heredoc string 158s when `AllowInHeredoc` is set to false 158s corrects by removing trailing whitespace used for indentation in a heredoc string 158s corrects safely trailing whitespace in a heredoc string 158s does not correct trailing whitespace in a static heredoc string 158s corrects a whitespace line in a heredoc string that is longer than the indentation 158s 158s RuboCop::Cop::Lint::Debugger 158s does not register an offense for a save_and_open_page in comments 158s does not register an offense for a remote_byebug in comments 158s does not register an offense for a debugger in comments 158s does not register an offense for a console method 158s does not register an offense for a byebug method 158s does not register an offense for a save_and_open_screenshot in comments 158s does not register an offense for a irb in comments 158s does not register an offense for a debugger method 158s does not register an offense for a irb method 158s does not register an offense for a pry_remote in comments 159s does not register an offense for a remote_pry in comments 159s does not register an offense for a console in comments 159s does not register an offense for a remote_pry method 159s does not register an offense for a save_and_open_page method 159s does not register an offense for a pry in comments 159s does not register an offense for a binding method that is not disallowed 159s does not register an offense for a remote_byebug method 159s does not register an offense for a byebug in comments 159s does not register an offense for a pry_remote method 159s does not register an offense for a pry method 159s does not register an offense for a save_and_open_screenshot method 159s when a method group is disabled with false 159s does register an offense for another group 159s does not register an offense for a Pry debugger call 159s with the DebuggerMethods configuration 159s registers an offense for a `custom_debugger` call 159s does not register an offense for a byebug call 159s with a const chain and a method chain 159s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 159s with a method chain 159s registers an offense for a `debugger.foo.bar` call 159s with a const chain 159s registers an offense for a `Foo::Bar::Baz.debug` call 159s nested custom configurations 159s registers an offense for a `custom_debugger call 159s debug.rb 159s registers an offense for a `binding.b` with `Kernel` call 159s registers an offense for a `b` binding call 159s registers an offense for a `break` binding call 159s registers an offense for a `binding.break` with `Kernel` call 159s web console 159s does not register an offense for `console` without a receiver 159s registers an offense for a `binding.console` call 159s when a method group is disabled with nil 159s does not register an offense for a Pry debugger call 159s does register an offense for another group 159s pry 159s registers an offense for a remote_pry binding call 159s registers an offense for a pry binding call 159s does not register an offense for a `pry` call without binding 159s registers an offense for a Pry.rescue call 159s registers an offense for a pry binding with an argument call 159s registers an offense for a pry_remote binding call 159s does not register an offense for a `rescue` call without Pry 159s registers an offense for a remote_pry binding with an argument call 159s registers an offense for a pry_remote binding with an argument call 159s registers an offense for a binding.pry with Kernel call 159s capybara 159s registers an offense for save_and_open_screenshot 159s registers an offense for save_and_open_page 159s with an argument 159s registers an offense for save_and_open_page 159s registers an offense for save_and_open_screenshot 159s byebug 159s registers an offense for a remote_byebug call 159s registers an offense for a Kernel.byebug call 159s registers an offense for a byebug call 159s registers an offense for a Kernel.remote_byebug call 159s registers an offense for a byebug with an argument call 159s built-in methods 159s registers an offense for a irb binding call 159s registers an offense for a binding.irb with Kernel call 159s rails 159s registers an offense for a debugger call 159s registers an offense for a debugger with ::Kernel call 159s registers an offense for a debugger with Kernel call 159s registers an offense for a debugger with an argument call 159s RubyJard 159s registers an offense for a jard call 159s 159s RuboCop::Cop::Style::CollectionCompact 159s registers an offense and corrects when using `reject` with block pass arg and no parentheses 159s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 159s registers an offense and corrects when using `reject` on hash to reject nils 159s registers an offense and corrects when using `reject` and receiver is a variable 159s does not register an offense when using `compact/compact!` 159s registers an offense and corrects when using `select/select!` to reject nils 159s does not register an offense when using `reject` to not to rejecting nils 159s registers an offense and corrects when using `reject` on array to reject nils 159s Ruby <= 3.0 159s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 159s does not register an offense and corrects when using `lazy.reject` on array to reject nils 159s Ruby >= 3.1 159s registers an offense and corrects when using `to_enum.reject` on array to reject nils 159s registers an offense and corrects when using `lazy.reject` on array to reject nils 159s when without receiver 159s does not register an offense and corrects when using `select/select!` to reject nils 159s does not register an offense and corrects when using `reject` on array to reject nils 159s 159s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 159s registers an offense for disabling all cops 159s registers an offense for disabled cop within source code 159s registers an offense for enabled cop within source code 159s with AllowedCops 159s when an allowed cop is disabled 159s does not register an offense 159s when using leading source comment 159s does not register an offense 159s when an mix of cops are disabled 159s registers an offense and corrects 159s when an non-allowed cop is disabled 159s registers an offense and corrects 159s 159s RuboCop::Cop::Bundler::OrderedGems 159s When there are duplicated gems in group 159s registers an offense 159s When a gem declaration takes several lines 159s registers an offense 159s When a gem is sorted but not so when disregarding _- 159s when ConsiderPunctuation is true 159s does not register an offense 159s by default 159s registers an offense 159s When gems are not alphabetically sorted 159s registers an offense 159s When a gem that starts with a capital letter is sorted 159s does not register an offense 159s When gems are asciibetically sorted irrespective of _ 159s does not register an offense 159s When each individual group of line is not sorted 159s registers some offenses 159s when a gem is referenced from a variable 159s resets the sorting to a new block 159s ignores the line 159s When gems are alphabetically sorted 159s does not register any offenses 159s When gem groups is separated by multiline comment 159s with TreatCommentsAsGroupSeparators: true 159s accepts 159s with TreatCommentsAsGroupSeparators: false 159s registers an offense 159s When gems have an inline comment, and not sorted 159s registers an offense 159s When the gemfile is empty 159s does not register any offenses 159s When a gem that starts with a capital letter is not sorted 159s registers an offense 159s When each individual group of line is sorted 159s does not register any offenses 159s 159s RuboCop::Cop::Util 159s #to_supported_styles 159s when EnforcedStyle 159s is expected to eq "SupportedStyles" 159s when EnforcedStyleInsidePipes 159s is expected to eq "SupportedStylesInsidePipes" 159s #same_line? 159s returns false if an argument is not a node or range 159s returns true when two nodes are on the same line 159s can use ranges 159s returns false when two nodes are not on the same line 159s #line_range 159s returns line range of the expression 159s 159s RuboCop::Cop::Style::OpenStructUse 159s when not using OpenStruct 159s registers no offense 159s when using custom namespaced OpenStruct 159s when inheriting from it 159s is expected to eq "class A < SomeNamespace::OpenStruct; end" 159s when used in assignments 159s registers no offense 159s when defined in custom namespace 159s when class 159s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 159s when module 159s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 159s when using OpenStruct 159s for OpenStruct 159s when inheriting from it via < 159s registers an offense 159s when used in assignments 159s registers an offense 159s when inheriting from it via Class.new 159s registers an offense 159s for ::OpenStruct 159s when inheriting from it via < 159s registers an offense 159s when used in assignments 159s registers an offense 159s when inheriting from it via Class.new 159s registers an offense 159s 159s RuboCop::Cop::Layout::SpaceAroundKeyword 159s behaves like accept before 159s accepts `<` before keyword in `a= Ruby 2.7 159s behaves like missing after 159s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 159s behaves like accept before 159s accepts `+` before keyword in `a+begin end` 159s >= Ruby 3.0 159s behaves like accept after 159s accepts `=>` after keyword in `a =>""` 159s behaves like accept before 159s accepts `=>` before keyword in `""=> a` 159s behaves like accept after 159s accepts `(` after keyword in `not(1)` 159s behaves like missing before 159s registers an offense for missing space before keyword in `if a; ""elsif b; end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `a "b"do end` 159s behaves like accept before 159s accepts `!` before keyword in `!super.method` 159s behaves like missing before 159s registers an offense for missing space before keyword in `if ""then a end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `a do "a"end` 159s behaves like accept after 159s accepts `.` after keyword in `begin end.inspect` 159s behaves like missing after 159s registers an offense for missing space after keyword in `1 while""` and autocorrects 159s behaves like accept around 159s accepts `,` around keyword in `a 1,next,1` 159s behaves like accept after 159s accepts `rescue` after keyword in `begin; rescue(Error); end` 159s behaves like accept before 159s accepts `/` before keyword in `a/begin end` 159s behaves like accept after 159s accepts `{` after keyword in `loop{}` 159s behaves like missing after 159s registers an offense for missing space after keyword in `BEGIN{}` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `if a; elsif""; end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `if""; end` and autocorrects 159s behaves like accept after 159s accepts `(` after keyword in `return(1)` 159s behaves like accept around 159s accepts `()` around keyword in `(next)` 159s behaves like missing after 159s registers an offense for missing space after keyword in `unless""; end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `next""` and autocorrects 159s behaves like accept before 159s accepts `>` before keyword in `a>begin end` 159s behaves like accept before 159s accepts `==` before keyword in `a==begin end` 159s behaves like missing after 159s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 159s behaves like accept around 159s accepts `{}` around keyword in `loop {next}` 159s behaves like missing before 159s registers an offense for missing space before keyword in `while 1 do "x"end` 159s >= Ruby 2.7 159s behaves like missing before 159s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 159s behaves like missing before 159s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `case a; in b; ""else end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `case ""when a; end` 159s behaves like accept before 159s accepts `!` before keyword in `!yield` 159s behaves like accept before 159s accepts `=*` before keyword in `a=*begin end` 159s behaves like missing after 159s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 159s behaves like accept before 159s accepts `-` before keyword in `a-begin end` 159s >= Ruby 2.7 159s behaves like missing after 159s registers an offense for missing space after keyword in `a in""` and autocorrects 159s behaves like missing before 159s registers an offense for missing space before keyword in `""in a` 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 159s behaves like missing before 159s registers an offense for missing space before keyword in `""rescue a` 159s behaves like accept after 159s accepts `\n` after keyword in `test do 159s end` 159s behaves like missing after 159s registers an offense for missing space after keyword in `END{}` and autocorrects 159s behaves like missing before 159s registers an offense for missing space before keyword in `if a; ""else end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `1while ""` 159s behaves like missing after 159s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `break""` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `not""` and autocorrects 159s behaves like accept before 159s accepts `**` before keyword in `a**begin end` 159s behaves like accept after 159s accepts `#` after keyword in `next#comment` 159s behaves like missing after 159s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 159s behaves like missing after 159s registers an offense for missing space after keyword in `1 until""` and autocorrects 159s behaves like accept around 159s accepts `;` around keyword in `test do;end` 159s behaves like missing after 159s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 159s behaves like missing before 159s registers an offense for missing space before keyword in `while 1do end` 159s behaves like missing before 159s registers an offense for missing space before keyword in `1and 2` 159s behaves like accept around 159s accepts `{}` around keyword in `{a: begin end}` 159s 159s RuboCop::Cop::Layout::LeadingCommentSpace 159s does not register an offense for #! on first line 159s accepts =begin/=end comments 159s accepts sprockets directives 159s does not register an offense for more than one # 159s does not register an offense for # followed by no text 159s does not register an offense for more than one space 159s registers an offense and corrects comment without leading space 159s does not register an offense for only #s 159s registers an offense and corrects #! after the first line 159s RDoc syntax 159s does not register an offense when using `#++` or `#--` 159s registers an offense when starting `:` 159s file not named config.ru 159s registers an offense and corrects #\ after the first line 159s registers an offense and corrects #\ on first line 159s Gemfile Ruby comment 159s when config option is enabled 159s file named Gemfile 159s does not register an offense when using ruby config as comment 159s file not named Gemfile 159s registers an offense when using ruby config as comment 159s when config option is disabled 159s registers an offense when using ruby config as comment 159s file named config.ru 159s registers an offense and corrects for #\ after the first line 159s does not register an offense for #\ on first line 159s Doxygen style 159s when config option is disabled 159s registers an offense and corrects using Doxygen style 159s when config option is enabled 159s does not register offense when using Doxygen style 159s 159s RuboCop::Cop::Style::HashLikeCase 159s MinBranchesCount: 3 159s does not register an offense when branches count is less than required 159s MinBranchesCount: 2 159s does not register an offense when `case` has an `else` branch 159s does not register an offense when using `case-when` with non-literal bodies 159s does not register an offense when using `case-when` with non-literals in conditions 159s does not register an offense when using `case-when` with literal bodies of different types 159s does not register an offense when using `case-when` with literals of different types as conditions 159s registers an offense when using `case-when` with string conditions and literal bodies of the same type 159s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 159s 159s RuboCop::Cop::Style::AccessModifierDeclarations 159s when `inline` is configured 159s accepts when #{access_modifier} is a hash literal value 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s does not offend when protected is inlined with a method 159s offends when public is not inlined and has a comment 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s offends when private is not inlined 159s accepts when #{access_modifier} is a hash literal value 159s offends when protected is not inlined 159s accepts when #{access_modifier} is a hash literal value 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s does not offend when protected is inlined with a symbol 159s does not offend when module_function is inlined with a symbol 159s offends when public is not inlined 159s does not offend when private is inlined with a symbol 159s does not offend when private is inlined with a method 159s offends when module_function is not inlined and has a comment 159s does not offend when public is inlined with a method 159s offends when module_function is not inlined 159s offends when private is not inlined and has a comment 159s does not offend when module_function is inlined with a method 159s offends when protected is not inlined and has a comment 159s does not offend when public is inlined with a symbol 159s accepts when #{access_modifier} is a hash literal value 159s when methods are modified by group modifier 159s registers and autocorrects an offense 159s when methods are modified by group modifier 159s registers and autocorrects an offense 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when methods are modified by group modifier 159s registers and autocorrects an offense 159s when methods are modified by group modifier 159s registers and autocorrects an offense 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when `group` is configured 159s accepts when using only #{access_modifier} 159s accepts when #{access_modifier} is a hash literal value 159s offends when public is inlined with a method 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s does not registers an offense when using #{access_modifier} in a block 159s accepts when using only #{access_modifier} 159s does not offend when private is not inlined and has a comment 159s does not offend when protected is not inlined and has a comment 159s offends when private is inlined with a method 159s does not registers an offense when using #{access_modifier} in a block 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 159s accepts when #{access_modifier} is a hash literal value 159s accepts when #{access_modifier} is a hash literal value 159s accepts when using only #{access_modifier} 159s does not offend when private is not inlined 159s offends when protected is inlined with a method 159s does not offend when public is not inlined 159s does not registers an offense when using #{access_modifier} in a block 159s does not offend when module_function is not inlined and has a comment 159s does not offend when module_function is not inlined 159s accepts when #{access_modifier} is a hash literal value 159s does not offend when public is not inlined and has a comment 159s does not offend when protected is not inlined 159s does not registers an offense when using #{access_modifier} in a block 159s accepts when using only #{access_modifier} 159s offends when module_function is inlined with a method 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method is modified by inline modifier with disallowed symbol 159s registers and autocorrects an offense 159s when method is modified by inline modifier 159s registers and autocorrects an offense 159s when method is modified by inline modifier 159s registers and autocorrects an offense 159s when method is modified by inline modifier where group modifier already exists 159s registers and autocorrects an offense 159s when method is modified by inline modifier where group modifier already exists 159s registers and autocorrects an offense 159s when method is modified by inline modifier with disallowed symbol 159s registers and autocorrects an offense 159s when non-existent method is modified by inline modifier with disallowed symbol 159s registers an offense but does not autocorrect it 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method has comments 159s registers and autocorrects an offense 159s when method is modified by inline modifier with disallowed symbol 159s registers and autocorrects an offense 159s when non-existent method is modified by inline modifier with disallowed symbol 159s registers an offense but does not autocorrect it 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method has comments 159s registers and autocorrects an offense 159s when method is modified by inline modifier with disallowed symbol 159s registers and autocorrects an offense 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method is modified by inline modifier where group modifier already exists 159s registers and autocorrects an offense 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method is modified by inline modifier where group modifier already exists 159s registers and autocorrects an offense 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s do not allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when method is modified by inline modifier 159s registers and autocorrects an offense 159s when method has comments 159s registers and autocorrects an offense 159s allow access modifiers on symbols 159s accepts when argument to #{access_modifier} is a symbol 159s when non-existent method is modified by inline modifier with disallowed symbol 159s registers an offense but does not autocorrect it 159s when non-existent method is modified by inline modifier with disallowed symbol 159s registers an offense but does not autocorrect it 159s when method has comments 159s registers and autocorrects an offense 159s when method is modified by inline modifier 159s registers and autocorrects an offense 159s 159s RuboCop::Cop::Lint::UnreachableLoop 159s does not register an offense when branch includes continue statement preceding break statement 159s registers an offense when using `return do_something(value) || break` in a loop 159s does not register an offense when using `return do_something(value) || next` in a loop 159s does not register an offense when using `return do_something(value) || redo` in a loop 159s handles inner loops 159s with AllowedPatterns 159s with a non ignored method call 159s registers an offense 159s Ruby 2.7 159s registers an offense 159s with a ignored method call 159s does not register an offense 159s without preceding continue statements 159s does not register an offense when using `if-elsif-else` and not all branches are breaking 159s registers an offense when using `break` 159s does not register an offense when using `case` without `else` 159s registers an offense when using `if-else` with all break branches 159s does not register an offense when using `case-when-else` and not all branches are breaking 159s registers an offense when using `case-when-else` with all break branches 159s does not register an offense when using `if` without `else` 159s with preceding continue statements 159s does not register an offense when using `if-else` with all break branches 159s does not register an offense when using `break` 159s does not register an offense when using `case-when-else` with all break branches 159s Ruby 2.7 159s registers an offense when using `return do_something(value) || break` in a loop 159s with an enumerator method 159s in the middle of a method chain 159s does not register an offense 159s not chained 159s registers an offense 159s as the last item in a method chain 159s registers an offense 159s 159s RuboCop::Cop::Style::StaticClass 159s does not register an offense when class has macro-like method 159s registers an offense when class has assignments along with class methods 159s does not register an offense when class has a parent 159s registers an offense when class has `class << self` with class methods 159s registers an offense when class extends a module 159s registers an offense when class has only class method 159s does not register an offense when class is empty 159s does not register an offense when class includes/prepends a module 159s does not register an offense when class has `class << self` with macro calls 159s does not register an offense for modules 159s does not register an offense when class has instance method 159s 159s RuboCop::Cop::Lint::PercentStringArray 159s with binary encoded source 159s accepts if tokens contain no quotes 159s adds an offense and corrects when tokens contain quotes 159s detecting quotes or commas in a %w/%W string 159s adds an offense and corrects when there are no quotes but one comma 159s accepts likely false positive %w(#{a} b) 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 adds an offense and corrects when there are no quotes but one comma 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 both types of quotes 159s accepts likely false positive %W(' " ! = # ,) 159s accepts likely false positive %W(#{a} b) 159s accepts likely false positive %w(' ") 159s accepts tokens without quotes or commas 159s accepts likely false positive %w(' " ! = # ,) 159s accepts likely false positive :"#{a}" 159s adds an offense and corrects when tokens contain both types of quotes 159s accepts likely false positive :"#{a}" 159s accepts likely false positive %W(' ") 159s with invalid byte sequence in UTF-8 159s accepts if tokens contain invalid byte sequence only 159s add an offense and corrects when tokens contain quotes 159s 159s RuboCop::Cop::Style::WhileUntilDo 159s accepts do in single-line while 159s accepts do in single-line until 159s accepts multi-line until without do 159s registers an offense for do in multiline until 159s accepts multi-line while without do 159s registers an offense for do in multiline while 159s 159s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 159s #calculate 159s assignment with ternary operator 159s is expected to eq "<2, 6, 2>" 159s equivalent to multiple assignment with method setters 159s is expected to eq "<3, 5, 0>" 159s if and arithmetic operations 159s is expected to eq "<2, 8, 4>" 159s with += 159s is expected to eq "<2, 0, 0>" 159s with &.foo 159s is expected to eq "<0, 4, 2>" 159s with repeated lvar receivers 159s is expected to eq "<3, 5, 3>" 159s multiple assignment 159s is expected to eq "<3, 1, 0>" 159s with ||= on a constant 159s is expected to eq "<1, 0, 1>" 159s with ||= 159s is expected to eq "<2, 0, 1>" 159s when counting repeated calls 159s is expected to eq "<1, 4, 0>" 159s with .foo = 159s is expected to eq "<1, 2, 0>" 159s elsif vs else if 159s else if 159s is expected to eq "<0, 5, 4>" 159s elsif 159s is expected to eq "<0, 5, 3>" 159s with []= 159s is expected to eq "<2, 1, 0>" 159s with a known iterating block 159s is expected to eq "<2, 4, 2>" 159s with a yield 159s is expected to eq "<0, 1, 0>" 159s with a block 159s is expected to eq "<2, 3, 0>" 159s same with extra condition 159s is expected to eq "<2, 9, 5>" 159s multiple calls with return 159s is expected to eq "<0, 3, 0>" 159s when discounting repeated calls 159s when some calls have arguments 159s is expected to eq "<1, 7, 0>" 159s when root receiver is self/nil 159s is expected to eq "<2, 9, 1>" 159s when root receiver is a var 159s is expected to eq "<3, 9, 0>" 159s multiple assignment with method setters 159s is expected to eq "<3, 5, 0>" 159s same but with 7 arguments 159s is expected to eq "<9, 3, 0>" 159s with a for 159s is expected to eq "<2, 1, 1>" 159s method with arguments 159s is expected to eq "<4, 0, 0>" 159s with += for setters 159s is expected to eq "<1, 2, 0>" 159s with unused assignments 159s is expected to eq "<2, 1, 0>" 159s with &&= 159s is expected to eq "<2, 0, 1>" 159s 159s RuboCop::Cop::Lint::DuplicateHashKey 159s behaves like duplicated literal key 159s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `1` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `%r{abx}ixo` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `"#{2}"` hash keys 159s When there is no duplicated key in the hash 159s does not register an offense 159s behaves like duplicated literal key 159s registers an offense for duplicated `!true` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `'str'` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `some_method_call(x, y)` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `"#{some_method_call}"` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `(1)` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `some_method_call` hash keys 159s When a key is duplicated three times in a hash literal 159s registers two offenses 159s behaves like duplicated literal key 159s registers an offense for duplicated `/./` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `(false <=> true)` hash keys 159s target ruby version >= 2.6 159s behaves like duplicated literal key 159s registers an offense for duplicated `(42..)` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `(false && true)` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `(x or false)` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `(x && false)` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `[1, 2, 3]` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `nil` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `(x == false)` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `(false or true)` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `false` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `[some_method_call]` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `1.0` hash keys 159s behaves like duplicated literal key 159s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 159s when there are two duplicated keys in a hash 159s registers two offenses 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 159s when there is a duplicated key in the hash literal 159s registers an offense 159s behaves like duplicated non literal key 159s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 159s 159s RuboCop::Cop::Style::MixinGrouping 159s when configured with separated style 159s when using a mix of diffent methods 159s registers an offense for some calls having several mixins 159s when using `include` 159s allows include call as an argument to another method 159s registers an offense for several mixins in one call 159s registers an offense for several mixins in separate calls 159s when using `prepend` 159s registers an offense for several mixins in one call 159s when using `extend` 159s registers an offense for several mixins in one call 159s when configured with grouped style 159s when using a mix of diffent methods 159s allows all different mixin methods 159s registers an offense with some duplicated mixin methods 159s when using `extend` 159s registers an offense for single mixins in separate calls 159s when using include 159s allows include with an explicit receiver 159s registers an offense for single mixins in separate calls 159s registers an offense for several mixins in separate calls 159s when using `prepend` 159s registers an offense for single mixins in separate calls 159s registers an offense for single mixins in separate calls, interspersed 159s registers an offense when other mixins have receivers 159s 159s RuboCop::Cop::Lint::SelfAssignment 159s does not register an offense when using constant var or-assignment for constant from another scope 159s registers an offense when using instance var self-assignment 159s does not register an offense when using multiple var assignment 159s registers an offense when using multiple var self-assignment through array 159s does not register an offense when using multiple var assignment through splat 159s does not register an offense when using class var assignment 159s registers an offense when using shorthand-or var self-assignment 159s registers an offense when using multiple var self-assignment 159s registers an offense when using local var self-assignment 159s does not register an offense when using multiple var assignment through method call 159s registers an offense when using class var self-assignment 159s does not register an offense when using local var assignment 159s does not register an offense when using shorthand-and var assignment 159s does not register an offense when using shorthand-or var assignment 159s registers an offense when using shorthand-and var self-assignment 159s does not register an offense when using constant var assignment for constant from another scope 159s does not register an offense when using instance var assignment 159s registers an offense when using constant var self-assignment 159s registers an offense when using global var self-assignment 159s does not register an offense when using global var assignment 159s 159s RuboCop::Formatter::JSONFormatter 159s #hash_for_file 159s sets relative file path for :path key 159s sets an array of #hash_for_offense values for :offenses key 159s #started 159s sets target file count in summary 159s #finished 159s outputs #output_hash as JSON 159s sets inspected file count in summary 159s #hash_for_location 159s sets length value for :length key 159s sets line value for :line key 159s sets column value for :column key 159s when the location is pseudo 159s returns a valid hash 159s #file_finished 159s adds detected offense count in summary 159s adds value of #hash_for_file to #output_hash[:files] 159s #hash_for_offense 159s sets Offense#correctable? value for :correctable key 159s sets Offense#severity value for :severity key 159s sets Offense#message value for :message key 159s sets Offense#cop_name value for :cop_name key 159s sets value of #hash_for_location for :location key 159s sets Offense#corrected? value for :corrected key 159s 159s RuboCop::Cop::Style::ParallelAssignment 159s corrects when the expression uses a modifier if statement 159s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 159s corrects when using single indentation 159s corrects parallel assignment in rescue statements within begin ... rescue 159s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 159s registers an offense when the right side has mulitiple arrays 159s registers an offense with attributes when assignments must be reordered to preserve meaning 159s corrects when the expression uses a modifier rescue statement inside of a method 159s registers an offense when right hand side has namespaced constants 159s registers an offense with indices 159s corrects when the expression is missing spaces 159s corrects when the number of left hand variables matches the number of right hand variables 159s corrects when assignments must be reordered to avoid changing meaning 159s corrects when the expression uses a modifier rescue statement 159s corrects when the right variable is a symbol array 159s corrects parallel assignment in until statements 159s corrects when the expression uses a modifier if statement inside a method 159s corrects when the right variable is an array 159s registers an offense when assignments must be reordered to preserve meaning 159s corrects when the right variable is a word array 159s corrects parallel assignment in unless statements 159s corrects when using constants 159s registers an offense when right hand side has maps with blocks 159s corrects parallel assignment in while statements 159s registers an offense when the right side has constants 159s registers an offense when assigning to namespaced constants 159s corrects when assigning from multiple methods with blocks 159s allows expanding an assigned var 159s corrects parallel assignment in if statements 159s allows more left variables than right variables 159s registers an offense when left hand side ends with an implicit variable 159s registers an offense with indices of different variables 159s corrects when the expression uses a modifier while statement 159s registers an offense when the right side has methods with/without blocks 159s corrects when using nested indentation 159s registers an offense when the right side has multiple hashes 159s registers an offense when assigning to same variables in same order 159s registers an offense when the right side has mixed expressions 159s corrects when using parallel assignment in singleton method 159s corrects when the expression uses a modifier unless statement 159s corrects parallel assignment inside rescue statements within method definitions 159s allows more right variables than left variables 159s corrects when the expression uses a modifier until statement 159s corrects when assigning to method returns 159s behaves like allowed 159s allows assignment of: a, b = *foo 159s behaves like allowed 159s allows assignment of: a, = *'foo' 159s behaves like allowed 159s allows assignment of: begin_token, end_token = CONSTANT 159s behaves like allowed 159s allows assignment of: a, = *foo 159s behaves like allowed 159s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 159s behaves like allowed 159s allows assignment of: a[0], a[1] = a[1], a[0] 159s behaves like allowed 159s allows assignment of: a, = 1 159s behaves like allowed 159s allows assignment of: self.a, self.b = self.b, self.a 159s behaves like allowed 159s allows assignment of: a = 1 159s behaves like allowed 159s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 159s behaves like allowed 159s allows assignment of: a, b = b, a 159s behaves like allowed 159s allows assignment of: array = [1, 2, 3]; a, = array; 159s behaves like allowed 159s allows assignment of: a, = 1, 2, 3 159s behaves like allowed 159s allows assignment of: a, b, c = 1, 2, *node 159s behaves like allowed 159s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 159s behaves like allowed 159s allows assignment of: a = *'foo' 159s behaves like allowed 159s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 159s behaves like allowed 159s allows assignment of: a, b, c = *node, 1, 2 159s behaves like allowed 159s allows assignment of: a = a 159s behaves like allowed 159s allows assignment of: self.a, self.b = b, a 159s behaves like allowed 159s allows assignment of: CONSTANT, = 1, 2 159s behaves like allowed 159s allows assignment of: a, b = foo.map { |e| e.id } 159s behaves like allowed 159s allows assignment of: a, = a 159s behaves like allowed 159s allows assignment of: a, *b = [1, 2, 3] 159s behaves like allowed 159s allows assignment of: a, b = Float::INFINITY 159s using custom indentation width 159s works with guard clauses 159s works with nesting 159s works with rescue 159s works with standard correction 159s behaves like allowed 159s allows assignment of: *a, b = [1, 2, 3] 159s behaves like allowed 159s allows assignment of: a, b = foo() 159s behaves like allowed 159s allows assignment of: a, b = (a + b), (a - b) 159s behaves like allowed 159s allows assignment of: a = 1; b = 2; 159s behaves like allowed 159s allows assignment of: a, b, c = b, c, a 159s 159s RuboCop::Cop::Layout::SpaceBeforeBrackets 159s does not register an offense when assigning an array 159s does not register an offense when using array literal argument without parentheses 159s does not register an offense when using percent array literal argument without parentheses 159s when assigning 159s does not register an offense when not using space between receiver and left brackets 159s registers an offense and corrects when using space between receiver and left brackets 159s does not register an offense when multiple spaces are inserted inside the left bracket 159s does not register an offense when space is used in left bracket 159s when referencing 159s registers an offense and corrects when using space between ivar receiver and left brackets 159s does not register an offense when not using space between method call and left brackets 159s does not register an offense when not using space between variable receiver and left brackets 159s does not register an offense when call desugared `Hash#[]` to lvar receiver 159s does not register an offense when using space between method call and left brackets 159s does not register an offense when using multiple arguments 159s does not register an offense when call desugared `Hash#[]` to cvar receiver 159s does not register an offense when it is used as a method argument 159s registers an offense and corrects when using space between lvar receiver and left brackets 159s registers an offense and corrects when using space between gvar receiver and left brackets 159s does not register an offense when call desugared `Hash#[]` to ivar receiver 159s registers an offense and corrects when using space between cvar receiver and left brackets 159s does not register an offense when array literal argument is enclosed in parentheses 159s does not register an offense when without receiver 159s 159s RuboCop::Cop::Naming::HeredocDelimiterNaming 159s with a naked heredoc 159s registers an offense with a non-meaningful delimiter 159s does not register an offense with a meaningful delimiter 159s with multiple heredocs starting on the same line 159s does not register an offense with meaningful delimiters 159s registers an offense with a trailing non-meaningful delimiter 159s registers an offense with a leading non-meaningful delimiter 159s with an interpolated heredoc 159s does not register an offense with a meaningful delimiter 159s registers an offense with a non-meaningful delimiter 159s when the delimiter contains non-letter characters 159s does not register an offense when delimiter contains a number 159s does not register an offense when delimiter contains an underscore 159s with a non-interpolated heredoc 159s when using back tick delimiters 159s registers an offense with a non-meaningful delimiter 159s does not register an offense with a meaningful delimiter 159s when using double quoted delimiters 159s registers an offense with a non-meaningful delimiter 159s does not register an offense with a meaningful delimiter 159s when using single quoted delimiters 159s does not register an offense with a meaningful delimiter 159s registers an offense with a non-meaningful delimiter 159s when using non-word delimiters 159s registers an offense 159s with a squiggly heredoc 159s registers an offense with a non-meaningful delimiter 159s does not register an offense with a meaningful delimiter 159s 159s RuboCop::Cop::Naming::ClassAndModuleCamelCase 159s is not fooled by qualified names 159s registers an offense for underscore in class and module name 159s allows module_parent method 159s accepts CamelCase names 159s custom allowed names 159s does not register offense for multiple allowed names 159s 159s RuboCop::Cop::Style::TrailingBodyOnClass 159s accepts regular class 159s registers an offense when body trails after class definition 159s accepts class inheritance 159s registers offense with multi-line class 159s autocorrects with comment after body 159s when class is not on first line of processed_source 159s autocorrect offense 159s 159s RuboCop::Cop::Style::GuardClause 159s doesn't register an error if condition has multiple lines 159s registers an error with break in the else branch 159s registers an error with raise "error" in the else branch 159s registers an error with return in the else branch 159s registers an error with raise "error" in the if branch 159s does not register an offense when assigning the result of a guard condition with `else` 159s registers an error if non-control-flow branch has multiple lines 159s registers an error with next in the else branch 159s registers an error if non-control-flow branch has multiple lines 159s does not report an offense if raise "error" is inside if..elsif..else..end 159s registers an offense when using `|| raise` in `else` branch 159s doesn't register an error if control flow expr has multiple lines 159s accepts a method which body does not end with if / unless 159s registers an error with break in the if branch 159s does not report an offense if break is inside if..elsif..else..end 159s doesn't register an error if condition has multiple lines 160s accepts a method whose body is a modifier if / unless 160s does not report an offense if next is inside elsif 160s registers an offense when using `and return` in `then` branch 160s registers an error if non-control-flow branch has multiple lines 160s does not report an offense if return is inside elsif 160s doesn't register an error if control flow expr has multiple lines 160s does not report an offense if raise "error" is inside elsif 160s registers an error if non-control-flow branch has multiple lines 160s does not report an offense if return is inside if..elsif..else..end 160s doesn't register an error if condition has multiple lines 160s registers an offense when using `and return` in `else` branch 160s doesn't register an error if condition has multiple lines 160s registers an offense when using `|| raise` in `then` branch 160s doesn't report an offense if condition has multiple lines 160s accepts a method with empty parentheses as its body 160s accepts a method which body is if / unless with else 160s registers an error with return in the if branch 160s doesn't register an error if control flow expr has multiple lines 160s does not report an offense if body is if..elsif..end 160s does not report an offense if break is inside elsif 160s registers an error with next in the if branch 160s does not report an offense if next is inside if..elsif..else..end 160s doesn't register an error if control flow expr has multiple lines 160s AllowConsecutiveConditionals: false 160s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 160s behaves like reports offense 160s reports an offense if method body ends with if / unless without else 160s reports an offense if method body is if / unless without else 160s MinBodyLength: 4 160s accepts a method whose body has 3 lines 160s behaves like reports offense 160s reports an offense if method body ends with if / unless without else 160s reports an offense if method body is if / unless without else 160s MinBodyLength: 1 160s reports an offense for if whose body has 1 line 160s with Metrics/MaxLineLength enabled 160s when the correction is too long for a single line 160s with a nested `if` node 160s does registers an offense 160s with a nested `begin` node 160s does registers an offense 160s with a trivial body 160s does not register an offense 160s Invalid MinBodyLength 160s fails with an error 160s with Metrics/MaxLineLength disabled 160s registers an offense with modifier example code regardless of length 160s method in module 160s registers an offense for singleton methods 160s registers an offense for instance method 160s AllowConsecutiveConditionals: true 160s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 160s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 160s 160s RuboCop::Cop::Style::DateTime 160s does not register an offense when using DateTime for historic date 160s registers an offense when using ::DateTime for current time 160s does not register an offense when using Time for current time 160s registers an offense when using DateTime for current time 160s does not register an offense when using DateTime in another namespace 160s does not register an offense when using ::DateTime for historic date 160s does not register an offense when using Date for modern date 160s registers an offense when using DateTime for modern date 160s when configured to allow #to_datetime 160s does not register an offense 160s when configured to not allow #to_datetime 160s registers an offense 160s 160s RuboCop::Cop::Layout::FirstArrayElementLineBreak 160s ignores properly formatted implicit arrays 160s ignores elements listed on a single line 160s elements listed on the first line 160s registers and corrects the offense 160s send implicit arrays 160s registers and corrects the offense 160s word arrays 160s registers and corrects the offense 160s masgn implicit arrays 160s registers and corrects the offense 160s array nested in a method call 160s registers an corrects the offense 160s 160s RuboCop::Cop::Style::ImplicitRuntimeError 160s registers an offense for `fail` with a multiline string 160s registers an offense for `raise` with a multiline string 160s does not register an offense for `fail` without arguments 160s does not register an offense for `fail` with an error class 160s does not register an offense for `raise` without arguments 160s registers an offense for `raise` without error class 160s does not register an offense for `raise` with an error class 160s registers an offense for `fail` without error class 160s 160s RuboCop::Cop::Style::TrailingMethodEndStatement 160s does not register on single line no op 160s register offense with trailing end on 3 line method 160s does not register on single line method 160s register offense with trailing end on method with comment 160s register offense with trailing end on method with block 160s autocorrects all trailing ends for larger example 160s register offense with trailing end on 2 line method 160s register offense with trailing end inside class 160s when Ruby 3.0 or higher 160s does not register an offense when endless method definition signature and body are on different lines 160s does not register an offense when using endless method definition 160s 160s RuboCop::CLI 160s checks a given file with faults and returns 1 160s does not register any offenses for an empty file 160s finds a file with no .rb extension but has a shebang line 160s registers an offense for a syntax error 160s registers an offense for Parser warnings 160s can process a file with an invalid UTF-8 byte sequence 160s when lines end with CR+LF 160s reports an offense 160s when errors are raised while processing files due to bugs 160s displays an error message to stderr 160s when given a file/directory that is not under the current dir 160s and the Rakefile path is absolute 160s checks a Rakefile but Style/FileName does not report 160s and the directory is absolute 160s checks a Rakefile but Style/FileName does not report 160s and the Rakefile path is relative 160s checks a Rakefile but Style/FileName does not report 160s and the directory is relative 160s checks a Rakefile but Style/FileName does not report 160s when parallel static by default 160s when specifying `--debug` option only` 161s fails with an error message 161s when specifying `--debug` and `-a` options` 161s uses parallel inspection when correcting the file 161s when setting `UseCache: true` 161s fails with an error message 161s when setting `UseCache: false` 161s fails with an error message 161s configuration from file 161s excludes the vendor directory by default 161s can disable parser-derived offenses with warning severity 161s works when a configuration file passed by -c specifies Exclude with regexp 161s matches included/excluded files correctly when . argument is given 161s can exclude a vendor directory with an erroneous config file 161s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 161s works when a configuration file passed by -c specifies Exclude with strings 161s ignores excluded files 161s fails when a configuration file has invalid YAML syntax 161s can exclude a vendor directory indirectly 161s can be configured with option to disable a certain error 161s can be configured to merge a parameter that is a hash 162s uses the DefaultFormatter if another formatter is not specified 162s can exclude a typical vendor directory 162s can exclude directories relative to .rubocop.yml 162s works when a cop that others depend on is disabled 162s prefers a config file in ancestor directory to another in home 162s prints a warning for an unrecognized configuration parameter 162s finds included files 162s can be configured to override a parameter that is a hash in a special case 162s cannot disable Syntax offenses 162s does not consider Include parameters in subdirectories 162s fails when a configuration file specifies an invalid Severity 162s can have different config files in different directories 162s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 162s can use an alternative max line length from a config file 162s prints an error message for an unrecognized EnforcedStyle 163s can be configured with project config to disable a certain error 163s shows an error if the input file cannot be found 163s displays cop names if DisplayCopNames is false 163s displays style guide URLs if DisplayStyleGuide is true 163s only reads configuration in explicitly included hidden directories 163s prints an error for an unrecognized cop name in .rubocop.yml 163s does not read files in excluded list 163s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 163s allows the default configuration file as the -c argument 163s when configuration is taken from $HOME/.rubocop.yml 163s handles relative excludes correctly when run from project root 163s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 163s fails with an error message 163s without using namespace 163s can be configured with option to disable a certain error 163s when configured for indented_internal_methods style indentation 163s accepts indented_internal_methods style indentation 164s registers offense for normal indentation in module 164s registers offense for normal indentation in class 164s when obsolete MultiSpaceAllowedForOperators param is used 164s displays a warning 164s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 164s fails with an error message 164s when a file inherits from a higher level 164s inherits relative excludes correctly 164s when --force-default-config option is specified 164s when no config file specified 164s ignores config file 164s when config file specified with -c 164s ignores config file 164s when a value in a hash is overridden with nil 164s acts as if the key/value pair was removed 164s configuration of target Ruby versions 164s when configured with an unknown version 164s fails with an error message 164s when configured with an unsupported ruby 164s fails with an error message 164s when checking a correct file 164s returns 0 164s when super is used with a block 164s still returns 0 164s configuration of `require` 164s unknown library is specified 164s exits with 2 164s style guide only usage 164s via the cli option 164s --only-guide-cops 164s overrides configuration of AllCops/StyleGuideCopsOnly 164s skips cops that have no link to a style guide 164s runs cops for rules that link to a style guide 164s via the config 164s AllCops/DisabledByDefault 164s when it is true 165s runs only the cop configured in .rubocop.yml 165s when it is false 165s runs all cops that are enabled in default configuration 165s AllCops/StyleGuideCopsOnly 165s when it is true 165s skips cops that have no link to a style guide 165s when it is false 165s runs cops for rules regardless of any link to the style guide 165s info severity 165s when there are not only info offenses 165s returns a 1 code 165s when `Lint/Syntax` is given `Severity: info` 165s is an invalid configuration 165s when there are only info offenses 165s returns a 0 code 165s when given `--display-only-fail-level-offenses` 165s returns a 0 code but does not list offenses 165s when given `--fail-level info` 165s returns a 1 code 165s configuration of `AutoCorrect` 165s when setting `AutoCorrect: false` for `Style/StringLiterals` 165s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 165s when a directory is named `*` 165s does not crash 165s rubocop:disable comment 165s can disable selected cops in a code section 165s can disable all cops in a code section 165s can disable all cops on a single line 165s can disable selected cops on a single line 165s when not necessary 166s causes an offense to be reported 166s and RedundantCopDisableDirective is individually disabled 166s does not report RedundantCopDisableDirective offenses 166s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 166s does not register an offense for `Lint/RedundantCopDisableDirective` 166s and RedundantCopDisableDirective is individually excluded 166s does not report RedundantCopDisableDirective offenses 166s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 166s does not register an offense for `Lint/RedundantCopDisableDirective` 166s and RedundantCopDisableDirective is disabled through department 166s does not report RedundantCopDisableDirective offenses 166s and there are no other offenses 166s exits with error code 166s without using namespace 166s can disable selected cops on a single line but prints a warning 166s when --autocorrect-all is given 166s does not trigger RedundantCopDisableDirective due to lines moving around 166s Specify `--init` option to `rubocop` command 166s when .rubocop.yml does not exist 166s generate a .rubocop.yml file 166s when .rubocop.yml already exists 166s fails with an error message 166s unknown cop 166s in configuration file is given 166s prints the error and exists with code 2 166s obsolete cops 166s when configuration for TrailingComma is given 166s fails with an error message 166s for a disabled cop 166s reports no offense when enabled on part of a file 166s when interrupted 166s returns 130 166s cops can exclude files based on config 167s ignores excluded files 167s 167s RuboCop::Cop::Style::FileWrite 167s does not register an offense when a splat argument is passed to `f.write` 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 167s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 167s registers an offense for and corrects `File.open(filename, 'w').write(content)` 167s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 167s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 167s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 167s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 167s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 167s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 167s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 167s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 167s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 167s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 167s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 167s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 167s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 167s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 167s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 167s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 167s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 167s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 167s 167s RuboCop::Cop::Security::Eval 167s registers an offense `Binding#eval` 167s registers an offense for eval as command 167s registers an offense for eval with string that has an interpolation 167s accepts eval as variable 167s accepts eval on a literal string 167s accepts eval with a string that interpolates a literal 167s accepts eval with no arguments 167s accepts eval with a multiline string 167s registers an offense for eval as function 167s accepts eval as method 167s with an explicit binding, filename, and line number 167s accepts eval on a literal string 167s registers an offense for eval as command 167s registers an offense for eval as function 167s 167s RuboCop::Cop::Lint::NonLocalExitFromIterator 167s allows return in define_singleton_method 167s allows return in define_method 167s allows return with value 167s when block is followed by method chain 167s and has multiple arguments 167s registers an offense 167s and has single argument 167s registers an offense 167s and has no argument 167s allows 167s when the return is within a nested method definition 167s allows return in a class method definition 167s allows return in an instance method definition 167s when block is not followed by method chain 167s allows 167s when block is lambda 167s allows 167s when block in middle of nest is followed by method chain 167s registers offenses 167s when lambda is inside of block followed by method chain 167s allows 167s 167s RuboCop::Cop::Style::YodaCondition 167s enforce not yoda 167s registers an offense for nil on left 167s registers an offense for boolean literal on left 167s accepts class variable on left 167s accepts safe navigation on left 167s accepts assignment 167s accepts __FILE__ on left in negated program name check 167s accepts number on left of <=> 167s accepts method call on receiver on left 167s accepts string literal on left of case equality check 167s registers an offense number on left 167s accepts interpolated string on left 167s registers an offense for string literal on left 167s accepts global variable on left 167s registers an offense number on left of comparison 167s accepts __FILE__ on left in program name check 167s accepts negation 167s accepts array of numbers on both sides 167s accepts number on both sides 167s accepts interpolated regex on left 167s accepts subtraction expression on left of comparison 167s accepts accessor and variable on left in boolean expression 167s accepts string literal on right 167s accepts instance variable on left 167s accepts variable on left after assign 167s with EnforcedStyle: forbid_for_equality_operators_only 167s registers an offense for negated equality check 167s accepts mixed order in comparisons 167s registers an offense for equality check 167s accepts number on left of comparison 167s accepts nil on left of comparison 167s within an if or ternary statement 167s registers an offense for number on left of comparison in if condition 167s registers an offense for number on left in modifier if 167s registers an offense for number on left in if condition 167s registers an offense for nil on left in ternary condition 167s registers an offense for number on left of <= in ternary condition 167s registers an offense for number on left of >= in ternary condition 167s enforce yoda 167s registers an offense for number on right 167s accepts assignment 167s accepts string literal on left 167s accepts subtraction on right of comparison 167s registers an offense for string literal on right 167s accepts class variable on right 167s accepts number on left of <=> 167s accepts variable on right after assignment 167s accepts arrays of numbers on both sides 167s accepts negation 167s registers an offense for number on right of comparison 167s registers an offense for nil on right 167s accepts string literal on right of case equality check 167s accepts safe navigation on right 167s accepts global variable on right 167s registers an offense for boolean literal on right 167s accepts numbers on both sides 167s accepts method call on receiver on right 167s accepts instance variable on right 167s accepts accessor and variable on right in boolean expression 167s within an if or ternary statement 167s registers an offense for number on right of <= in ternary condition 167s registers an offense for number on right of >= in ternary condition 167s registers an offense number on right of comparison in if condition 167s registers an offense for number on right in modifier if 167s registers an offense for nil on right in ternary condition 167s registers an offense number on right in if condition 167s with EnforcedStyle: require_for_equality_operators_only 167s accepts mixed order in comparisons 167s accepts number on right of comparison 167s registers an offense for equality check 167s registers an offense for negated equality check 167s accepts nil on right of comparison 167s 167s RuboCop::Cop::Style::SpecialGlobalVars 167s when style is use_perl_names 167s registers an offense for $LOAD_PATH 167s registers an offense for $PROCESS_ID 167s autocorrects #{$LOAD_PATH} to #$: 167s registers an offense for $PID 167s does not register an offense for backrefs like $1 167s autocorrects $INPUT_RECORD_SEPARATOR to $/ 167s registers an offense for $PROGRAM_NAME 167s registers an offense for $LOADED_FEATURES 167s when style is use_builtin_english_names 167s does not register an offense for backrefs like $1 167s autocorrects non-preffered builtin names 167s does not register an offenses for builtin names 167s generates correct auto-config when Perl variable names are used 167s does not register an offense for Perl names 167s generates correct auto-config when mixed styles are used 167s when style is use_english_names 167s when add require English is enabled 167s when English is already required at top-level 167s moves require English above replacement 167s leaves require English alone for $$ 167s when English has not been required at top-level 167s adds require English for $$ in nested code 167s does not add for replacement outside of English lib 167s adds require English for $$ 167s adds require English for twice `$*` in nested code 167s when add require English is disabled 167s is clear about variables from the English library vs those not 167s generates correct auto-config when Perl variable names are used 167s does not register an offense for backrefs like $1 167s autocorrects #{$!} to #{$ERROR_INFO} 167s autocorrects $/ to $INPUT_RECORD_SEPARATOR 167s registers an offense for $0 167s registers an offense for $" 167s generates correct auto-config when mixed styles are used 167s registers an offense for $: 167s autocorrects #$: to #{$LOAD_PATH} 167s registers an offense for $$ 167s 167s RuboCop::Cop::Style::UnpackFirst 167s ruby version >= 2.4 167s registers offense 167s when using `#unpack` with `#at` 167s when using `#unpack` with `#slice` 167s when using `#unpack` with `#first` 167s when using `#unpack` with square brackets 167s when using `#unpack` with dot and square brackets 167s does not register offense 167s when using `#unpack` accessing second element 167s when using `#unpack1` 167s 167s RuboCop::Cop::Layout::HeredocIndentation 167s quoted by ` 167s registers an offense for not indented enough with empty line 167s accepts for include empty lines 167s displays message to use `<<~` instead of `<<-` 167s accepts for not indented but with whitespace 167s accepts for indented, but without `~` 167s registers an offense for not indented 167s accepts for indented, with `~` 167s does not register an offense when not indented but with whitespace, with `-` 167s registers an offense for not indented, with `~` 167s registers an offense for too deep indented 167s registers an offense for not indented enough with whitespace line 167s registers an offense for first line minus-level indented, with `-` 167s accepts for an empty line 167s displays message to use `<<~` instead of `<<` 167s registers an offense for too deep indented with empty line 167s registers an offense for not indented, without `~` 167s accepts for indented, but with `-` 167s registers an offense for minus level indented 167s registers an offense for too deep indented with whitespace line 167s when Layout/LineLength is configured 167s accepts for long heredoc 167s quoted by ' 167s registers an offense for too deep indented with empty line 167s displays message to use `<<~` instead of `<<-` 167s accepts for an empty line 167s registers an offense for too deep indented with whitespace line 167s accepts for indented, but with `-` 167s accepts for not indented but with whitespace 167s registers an offense for first line minus-level indented, with `-` 167s displays message to use `<<~` instead of `<<` 167s registers an offense for not indented enough with whitespace line 167s registers an offense for not indented, without `~` 167s accepts for indented, but without `~` 167s registers an offense for not indented enough with empty line 167s registers an offense for not indented, with `~` 167s does not register an offense when not indented but with whitespace, with `-` 167s accepts for include empty lines 167s registers an offense for not indented 167s accepts for indented, with `~` 167s registers an offense for minus level indented 167s registers an offense for too deep indented 167s when Layout/LineLength is configured 167s accepts for long heredoc 167s quoted by " 167s registers an offense for not indented enough with empty line 167s registers an offense for not indented, without `~` 167s registers an offense for minus level indented 167s registers an offense for not indented 167s registers an offense for not indented enough with whitespace line 167s registers an offense for too deep indented with whitespace line 167s registers an offense for not indented, with `~` 167s accepts for an empty line 167s displays message to use `<<~` instead of `<<-` 167s registers an offense for too deep indented with empty line 167s registers an offense for first line minus-level indented, with `-` 167s accepts for indented, but with `-` 167s accepts for not indented but with whitespace 167s accepts for indented, but without `~` 167s accepts for include empty lines 167s does not register an offense when not indented but with whitespace, with `-` 167s accepts for indented, with `~` 167s displays message to use `<<~` instead of `<<` 167s registers an offense for too deep indented 167s when Layout/LineLength is configured 167s accepts for long heredoc 167s quoted by 167s displays message to use `<<~` instead of `<<-` 167s registers an offense for not indented 167s registers an offense for not indented enough with whitespace line 167s registers an offense for first line minus-level indented, with `-` 167s accepts for indented, but without `~` 167s registers an offense for too deep indented 167s accepts for not indented but with whitespace 167s accepts for include empty lines 167s registers an offense for minus level indented 167s registers an offense for too deep indented with whitespace line 167s registers an offense for not indented enough with empty line 167s registers an offense for not indented, with `~` 167s does not register an offense when not indented but with whitespace, with `-` 167s displays message to use `<<~` instead of `<<` 167s accepts for indented, with `~` 167s registers an offense for not indented, without `~` 167s accepts for an empty line 167s registers an offense for too deep indented with empty line 167s accepts for indented, but with `-` 167s when Layout/LineLength is configured 167s accepts for long heredoc 167s 167s RuboCop::Cop::Style::ReturnNil 167s when enforced style is `return` 167s registers an offense for return nil 167s does not register an offense for returning others 167s does not register an offense for return nil from iterators 167s when enforced style is `return_nil` 167s does not register an offense for returning others 167s registers an offense for return 167s 167s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 167s when EnforcedStyle is no_space 167s registers an offense and corrects default value assignment with space 167s accepts default value assignment without space 167s registers an offense and corrects assignment of empty list with space 167s registers an offense and corrects assignment of empty string with space 167s when EnforcedStyle is space 167s registers an offense and corrects missing space for arguments with unary operators 167s registers an offense and corrects assigning empty string without space 167s registers an offense and corrects default value assignment where first is partially right without space 167s accepts default value assignment with space 167s registers an offense and corrects default value assignment without space 167s accepts default value assignment with spaces and unary + operator 167s registers an offense and corrects assignment of empty list without space 167s 167s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 167s does not register an offense when `#message` with another node is passed 167s does not register an offense when formatted `MSG` is passed 167s when `#message` with offending node is passed 167s when there are others keyword arguments 167s registers an offense 167s when message is the only keyword argument 167s registers an offense 167s when `#message` is passed 167s registers an offense 167s when `MSG` is passed 167s registers an offense 167s 167s RuboCop::Cop::Style::Encoding 167s registers an offense when encoding present on 2nd line after shebang 167s does not register an offense when encoding present but not UTF-8 167s registers an offense and corrects if there are multiple encoding magic comments 167s does not register an offense on a different magic comment type 167s does not register an offense when encoding is in the wrong place 167s registers an offense and corrects the magic comment follows another magic comment 167s does not register an offense when encoding is not at the top of the file 167s registers an offense when encoding present and UTF-8 167s does not register an offense when no encoding present 167s vim comments 167s registers an offense and corrects 167s emacs comment 167s only removes encoding if there are other editor comments 167s registers an offense for encoding 167s 167s RuboCop::Cop::Style::MultilineTernaryOperator 167s register an offense and corrects when returning a multiline ternary operator expression with method call 167s registers an offense and corrects when condition is multiline and using hash key assignment 167s accepts a single line ternary operator expression 167s register an offense and corrects when returning a multiline ternary operator expression with `return` 167s registers an offense and corrects when condition is multiline 167s registers an offense and corrects when the false branch is on a separate line and assigning a return value 167s registers an offense and corrects when the false branch is on a separate line 167s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 167s registers an offense and corrects when condition is multiline and using assignment method 167s register an offense and corrects when returning a multiline ternary operator expression with `next` 167s register an offense and corrects when returning a multiline ternary operator expression with `break` 167s registers an offense and corrects when everything is on a separate line 167s 167s RuboCop::Cop::Style::SingleLineBlockParams 167s reports an offense if the names are in reverse order 167s reports an offense if the arguments names are wrong and not all arguments are given 167s finds incorrectly named parameters with leading underscores 167s ignores do..end blocks 167s does not report if no block arguments are present 167s does not report when destructuring is used 167s does not report if the right names are used but not all arguments are given 167s reports an offense if the names are partially correct 167s allows calls with proper argument names 167s finds wrong argument names in calls with different syntax 167s allows an unused parameter to have a leading underscore 167s ignores :reduce symbols 167s 167s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 167s does not register an offense for ternary operator 167s registers an offense and corrects for predicate method call with space before the parenthesis 167s accepts method with parens as arg to method without 167s does not register an offense for expression followed by chained expression with safe navigation operator 167s accepts a chain of method calls 167s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 167s registers an offense and corrects for method call with space before the parenthesis 167s accepts a space inside opening paren followed by left paren 167s does not register an offense for math expression with `to_i` 167s does not register an offesne when heredoc has a space between the same string as the method name and `(` 167s accepts a method call without arguments 167s accepts a method call with arguments but no parentheses 167s accepts an operator call with argument in parentheses 167s does not register an offense for a call with multiple arguments 167s does not register an offense for expression followed by an operator 167s does not register an offense for expression followed by chained expression 167s does not register an offense for math expression 167s when using safe navigation operator 167s registers an offense and corrects for method call with space before the parenthesis 167s 167s RuboCop::Cop::Layout::InitialIndentation 167s accepts unindented comment + assignment 167s registers an offense for indented method definition 167s accepts empty file 167s accepts unindented method definition 167s registers an offense and corrects indented assignment disregarding comment 167s for a file with byte order mark 167s registers an offense and corrects indented method call 167s registers an offense and corrects indented method call after comment 167s accepts unindented method call 167s 167s RuboCop::Cop::Gemspec::RequireMFA 167s when the specification has a metadata hash but no rubygems_mfa_required key 167s registers an offense and corrects 167s with rubygems_mfa_required: true 167s does not register an offense 167s when the gemspec is blank 167s does not register an offense 167s when the specification is blank 167s registers an offense and corrects 167s with rubygems_mfa_required: false 167s registers an offense and corrects 167s when metadata is set by key assignment 167s and `rubygems_mfa_required` is not included 167s registers an offense 167s and `rubygems_mfa_required` is included 167s does not register an offense 167s with rubygems_mfa_required: false by key access 167s registers an offense and corrects 167s when there are other metadata keys 167s and `rubygems_mfa_required` is included 167s does not register an offense 167s and `rubygems_mfa_required` is not included 167s registers an offense and corrects 167s when the specification has an non-hash metadata 167s registers an offense but does not correct 167s 167s RuboCop::Cop::Style::For 167s when for is the enforced style 167s accepts for 167s registers multiple offenses 167s registers an offense for correct + opposite style 167s registers an offense for multiline each 167s registers an offense for each without an item and uses _ as the item 167s accepts single line each 167s registers an offense for a tuple of items 167s Ruby 2.7 167s registers an offense for each without an item and uses _ as the item 167s when using safe navigation operator 167s does not break 167s when each is the enforced style 167s accepts :for 167s registers an offense for for 167s registers an offense for opposite + correct style 167s accepts def for 167s registers multiple offenses 167s accepts multiline each 167s autocorrect 167s changes for that does not have do or semicolon to each 167s corrects to `each` without parenthesize collection if non-operator method called 167s corrects an array with `&&` operator 167s corrects an array with `-` operator 167s corrects an array with `*` operator 167s corrects an array with `||` operator 167s corrects a tuple of items 167s corrects an array with `&` operator 167s corrects an array with `+` operator 167s corrects an array with `|` operator 167s with range 167s changes for to each 167s changes for that does not have do or semicolon to each 167s without parentheses 167s changes for to each 167s changes for that does not have do or semicolon to each 167s 167s RuboCop::Cop::Layout::MultilineOperationIndentation 167s when EnforcedStyle is indented 167s accepts indented operands in until body 167s registers an offense for a 2 space indentation of until condition 167s registers an offense and corrects extra indentation of third line 167s accepts indentation of assignment 167s accepts two spaces indentation of second line 167s accepts an expression where the first operand spans multiple lines 167s registers an offense for a 2 space indentation of if condition 167s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 167s accepts indented operands in unless body 167s accepts alignment inside a grouped expression 167s accepts indentation of next unless condition 167s registers an offense and corrects one space indentation of second line 167s accepts special indentation of for expression 167s does not check method calls 167s registers an offense for a 2 space indentation of unless condition 167s accepts indentation of return unless condition 167s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 167s accepts normal indentation inside grouped expression 167s accepts double indentation of until condition 167s accepts the indentation of a broken string 167s accepts two spaces indentation in assignment of array element 167s accepts double indentation of unless condition 167s accepts indented operands in while body 167s accepts unary operations 167s registers an offense and corrects aligned operands in if conditions 167s registers an offense and corrects no indentation of second line 167s registers an offense and corrects wrong indentation of for expression 167s accepts no extra indentation of third line 167s registers an offense and corrects correct + unrecognized style 167s accepts any indentation of parameters to #[] 167s accepts indented operands in for body 167s accepts two spaces indentation in assignment of local variable 167s accepts indented operands inside and outside a block 167s registers an offense for a 2 space indentation of while condition 167s accepts indentation of return if condition 167s accepts indented operands in an array 167s accepts any indentation of method parameters 167s accepts indented operands in ordinary statement 167s accepts indented operands in if condition 167s registers an offense and corrects aligned code on LHS of equality operator 167s accepts indentation of next if condition 167s accepts normal indentation of method parameters 167s registers an offense and corrects aligned operators in assignment 167s accepts indented operands in if body 167s accepts double indentation of while condition 167s accepts double indentation of if condition 167s registers an offense and corrects three space indentation of second line 167s when indentation width is overridden for this cop 167s registers an offense for a 4 space indentation of while condition 167s accepts indented operands in while body 167s accepts indentation of while condition which is offset by a single normal indentation step 167s registers an offense for a 4 space indentation of if condition 167s registers an offense for a 4 space indentation of unless condition 167s accepts indented operands in unless body 167s accepts indented operands in if body 167s accepts indentation of until condition which is offset by a single normal indentation step 167s accepts indentation of if condition which is offset by a single normal indentation step 167s registers an offense and corrects 167s registers an offense for a 4 space indentation of until condition 167s accepts indented operands in if condition 167s accepts indented operands in until body 167s accepts indentation of unless condition which is offset by a single normal indentation step 167s when EnforcedStyle is aligned 167s accepts indented operands in for body 167s registers an offense for misaligned operands in while condition 167s registers an offense and corrects indented operand in second argument 167s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 167s accepts two spaces indentation in assignment of array element 167s registers an offense for misaligned operands in unless condition 167s registers an offense and corrects three space indentation of second line 167s accepts indented operands with ternary operators 167s does not check method calls 167s accepts any indentation of parameters to #[] 167s registers an offense and corrects one space indentation of second line 167s accepts an expression where the first operand spans multiple lines 167s accepts two spaces indentation of second line 167s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 167s registers an offense and corrects extra indentation of third line 167s registers an offense and corrects indented operands in if condition 167s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 167s registers an offense for misaligned operands in until condition 167s accepts indented operands in ordinary statement 167s accepts indented code on LHS of equality operator 167s accepts aligned or:ed operands in assignment 167s accepts alignment inside a grouped expression 167s accepts aligned operands in assignment 167s accepts no extra indentation of third line 167s registers an offense and corrects unaligned operands in op-assignment 167s accepts indented operands inside and outside a block 167s registers an offense and corrects indented second part of string 167s accepts indented operands in an array 167s registers an offense and corrects misaligned string operand when plus is used 167s registers an offense for misaligned operands in if condition 167s registers an offense and corrects misaligned operands in unless condition 167s accepts indented operands inside block + assignment 167s accepts unary operations 167s accepts two spaces indentation in assignment of local variable 167s accepts aligned operands in if condition 167s registers an offense and corrects no indentation of second line 167s 167s RuboCop::Cop::VariableForce::VariableTable 167s #current_scope_level 167s decreases by popping scope 167s increases by pushing scope 167s #accessible_variables 167s when there are no variables 167s returns empty array 167s when the direct outer scope has some variables 167s and the current scope is block 167s returns the current and direct outer scope variables 167s and the current scope is not block 167s returns only the current scope variables 167s when the current scope has some variables 167s returns all the variables 167s #pop_scope 167s returns popped scope object 167s #declare_variable 167s adds variable to current scope with its name as key 167s returns the added variable 167s #push_scope 167s returns pushed scope object 167s #find_variable 167s when current scope is block 167s when a variable with the target name does not exist in current scope 167s but exists in a indirect outer scope 167s when the direct outer scope is block 167s returns the indirect outer scope variable 167s when the direct outer scope is not block 167s returns nil 167s and does not exist in all outer scopes 167s returns nil 167s but exists in the direct outer scope 167s returns the direct outer scope variable 167s when a variable with the target name exists in current scope 167s and does not exist in outer scope 167s returns the current scope variable 167s and also exists in outer scope 167s returns the current scope variable 167s when current scope is not block 167s when a variable with the target name exists in current scope 167s and also exists in outer scope 167s returns the current scope variable 167s and does not exist in outer scope 167s returns the current scope variable 167s when a variable with the target name does not exist in current scope 167s but exists in the direct outer scope 167s returns nil 167s and does not exist in all outer scopes 167s returns nil 167s #find_variable with an empty scope stack 167s returns nil 167s 167s RuboCop::Cop::Layout::AccessModifierIndentation 167s when EnforcedStyle is set to outdent 167s registers an offense and corrects private indented to method depth in module defined with Module.new 167s accepts private def indented to method depth in singleton class 167s accepts private with argument indented to method depth in singleton class 167s accepts private with argument indented to method depth in a module 167s registers an offense and corrects module_function indented to method depth in a module 167s accepts private def indented to method depth in module defined with Module.new 167s accepts private with argument indented to method depth in class defined with Class.new 167s accepts private with argument indented to method depth in a class 167s registers an offense and corrects private indented to method depth in class defined with Class.new 167s accepts protected indented to the containing class indent level 167s accepts private with argument indented to method depth in module defined with Module.new 167s accepts private def indented to method depth in a class 167s registers an offense and corrects misaligned access modifiers in nested classes 167s accepts module fn def indented to method depth in a module 167s accepts private indented to the containing class indent level 167s registers an offense and corrects private indented to method depth in a module 167s accepts private def indented to method depth in class defined with Class.new 167s registers offense and corrects private indented to method depth in a class 167s registers an offense and corrects private indented to method depth in singleton class 167s accepts private def indented to method depth in a module 167s accepts module fn with argument indented to method depth in a module 167s when EnforcedStyle is set to indent 167s registers an offense and corrects access modifiers in arbitrary blocks 167s registers an offense and corrects opposite + correct alignment 167s registers an offense and corrects misaligned private 167s accepts properly indented private 167s registers an offense and corrects misaligned access modifiers in nested classes 167s registers an offense and corrects misaligned private in module defined with Module.new 167s registers an offense and corrects misaligned private in a singleton class 167s accepts an empty class 167s accepts indented access modifiers with arguments in nested classes 167s registers an offense and corrects misaligned private in class defined with Class.new 167s registers an offense and corrects misaligned protected 167s registers an offense and corrects misaligned private in module 167s accepts properly indented private in module defined with Module.new 167s accepts properly indented protected 167s registers an offense and corrects misaligned module_function in module 167s registers an offense and corrects correct + opposite alignment 167s accepts methods with a body 167s when indentation width is overridden for this cop only 167s accepts properly indented private 167s when 4 spaces per indent level are used 167s accepts properly indented private 167s 167s RuboCop::Cop::Naming::RescuedExceptionsVariableName 167s with the `PreferredName` setup 167s registers offenses when using `foo` and `bar` in multiple rescues 167s registers an offense when using `e` 167s registers an offense when using `_e` 167s does not register an offense when using `_exception` 167s does not register an offense when using `exception` 167s with default config 167s when the variable is reassigned 167s only corrects uses of the exception 167s only corrects the exception variable 167s with explicit rescue 167s with method as `Exception` 167s does not register an offense without variable name 167s does not register an offense with expected variable name 167s registers an offense with unexpected variable name 167s with splat operator as `Exception` list 167s does not register an offense with expected variable name 167s registers an offense with unexpected variable name 167s does not register an offense without variable name 167s without `Exception` variable 167s does not register an offense 167s with `Exception` variable 167s does not register an offense when using `e` 167s registers an offense when using `exc` 167s registers an offense when using `_exc` 167s does not register an offense when using `_e` 167s does not register an offense when using _e followed by e 167s registers an offense when using `exc` and renames its usage 167s registers offenses when using `foo` and `bar` in multiple rescues 167s shadowing an external variable 167s does not register an offense 167s with lower letters class name 167s does not register an offense 167s with multiple branches 167s registers and corrects each offense 167s when the variable is reassigned using multiple assignment 167s only corrects uses of the exception 167s with implicit rescue 167s with `Exception` variable 167s registers an offense when using `_exc` 167s registers an offense when using `exc` 167s does not register an offense when using `_e` 167s does not register an offense when using `e` 167s without `Exception` variable 167s does not register an offense 167s with nested rescues 167s handles it 167s with variable being referenced 167s renames the variable references when autocorrecting 167s 167s RuboCop::Cop::Layout::EndAlignment 167s accepts matching puts 1; until ... end 167s accepts matching class ... end 167s accepts matching class ... end 167s registers an offense for mismatched puts 1; while test end and autocorrects 167s accepts matching puts 1; module ... end 167s registers an offense for mismatched unless test end and autocorrects 167s registers an offense for mismatched puts 1; class Test end and autocorrects 167s accepts matching puts 1; while ... end 167s registers an offense for mismatched while test end and autocorrects 167s registers an offense for mismatched puts 1; until test end and autocorrects 167s can handle modifier if 167s registers an offense for mismatched if test end and autocorrects 167s accepts matching puts 1; case ... end 167s accepts matching unless ... end 167s accepts matching module ... end 167s registers an offense for mismatched puts 1; unless test end and autocorrects 167s accepts matching if ... end 167s accepts matching until ... end 167s accepts matching while ... end 167s registers an offense for mismatched puts 1; class Test end and autocorrects 167s can handle ternary if 167s registers an offense for mismatched puts 1; if test end and autocorrects 167s accepts matching puts 1; if ... end 167s registers an offense for mismatched module Test end and autocorrects 167s accepts matching case ... end 167s accepts matching puts 1; class ... end 167s accepts matching puts 1; unless ... end 167s registers an offense for mismatched puts 1; case a when b end and autocorrects 167s registers an offense for mismatched case a when b end and autocorrects 167s registers an offense for mismatched module Test end and autocorrects 167s registers an offense for mismatched until test end and autocorrects 167s when EnforcedStyleAlignWith is start_of_line 167s registers an offense for mismatched unless test end and autocorrects 167s registers an offense for mismatched var << while test end and autocorrects 167s registers an offense for mismatched case a when b end and autocorrects 167s accepts matching var = if ... end 167s accepts matching puts 1; until ... end 167s registers an offense for mismatched var = while test end and autocorrects 167s accepts matching var = case ... end 167s registers an offense for mismatched puts 1; case a when b end and autocorrects 167s registers an offense for mismatched puts 1; unless test end and autocorrects 167s registers an offense for mismatched puts 1; while test end and autocorrects 167s accepts matching var << while ... end 167s registers an offense for mismatched puts 1; class Test end and autocorrects 167s registers an offense for mismatched var = case a when b end and autocorrects 167s registers an offense for mismatched var = if test end and autocorrects 167s registers an offense for mismatched var = unless test end and autocorrects 167s registers an offense for mismatched puts 1; until test end and autocorrects 167s registers an offense for mismatched puts(if test end) and autocorrects 167s accepts matching puts 1; while ... end 167s registers an offense for mismatched var << if test end and autocorrects 167s accepts matching puts 1; module ... end 167s registers an offense for mismatched var << unless test end and autocorrects 167s accepts matching var = if ... end 167s accepts matching puts 1; class ... end 167s registers an offense for mismatched until test end and autocorrects 167s registers an offense for mismatched puts 1; module Test end and autocorrects 167s registers an offense for mismatched puts 1; if test end and autocorrects 167s registers an offense for mismatched class Test end and autocorrects 168s accepts matching var = until ... end 168s accepts matching puts 1; unless ... end 168s accepts matching var = unless ... end 168s accepts matching var = while ... end 168s registers an offense for mismatched var << case a when b end and autocorrects 168s accepts matching puts 1; if ... end 168s registers an offense for mismatched var = if test end and autocorrects 168s registers an offense for mismatched var = until test end and autocorrects 168s registers an offense for mismatched if test end and autocorrects 168s registers an offense for mismatched while test end and autocorrects 168s registers an offense for mismatched module Test end and autocorrects 168s registers an offense for mismatched var << until test end and autocorrects 168s accepts matching puts 1; case ... end 168s case as argument 168s when EnforcedStyleAlignWith is keyword 168s registers an offense for mismatched test case a when b end and autocorrects 168s accepts matching test case ... end 168s when EnforcedStyleAlignWith is variable 168s accepts matching test case ... end 168s registers an offense for mismatched test case a when b end and autocorrects 168s when EnforcedStyleAlignWith is start_of_line 168s registers an offense for mismatched test case a when b end and autocorrects 168s accepts matching test case a when b ... end 168s regarding assignment 168s when EnforcedStyleAlignWith is variable 168s registers an offense for mismatched var = case a when b end and autocorrects 168s registers an offense for mismatched @@var = if test end and autocorrects 168s accepts matching var = until ... end 168s registers an offense for mismatched h.k = if test end and autocorrects 168s registers an offense for mismatched @var = if test end and autocorrects 168s registers an offense for mismatched CNST = if test end and autocorrects 168s registers an offense for mismatched var << unless test end and autocorrects 168s registers an offense for mismatched var = until test end.j and autocorrects 168s accepts matching var = unless ... end 168s registers an offense for mismatched var << if test end and autocorrects 168s registers an offense for mismatched $var = if test end and autocorrects 168s registers an offense for mismatched @var << if test end and autocorrects 168s accepts matching a, b = if ... end 168s registers an offense for mismatched var += if test end and autocorrects 168s registers an offense for mismatched var &&= if test end and autocorrects 168s accepts matching var = until ... end 168s accepts matching var = if ... end 168s registers an offense for mismatched var << case a when b end and autocorrects 168s accepts matching var = if ... end 168s registers an offense for mismatched var = if test end and autocorrects 168s accepts matching var = case ... end 168s accepts matching var << if ... end 168s accepts matching h[k] = if ... end 168s registers an offense for mismatched var = while test end and autocorrects 168s accepts matching var = until ... end 168s registers an offense for mismatched var ||= if test end and autocorrects 168s registers an offense for mismatched CNST << if test end and autocorrects 168s registers an offense for mismatched @@var << if test end and autocorrects 168s registers an offense for mismatched var = until test end and autocorrects 168s registers an offense for mismatched h[k] << if test end and autocorrects 168s accepts matching h.k = if ... end 168s registers an offense for mismatched var[x] = while test end and autocorrects 168s registers an offense for mismatched h[k] = if test end and autocorrects 168s accepts matching @@var = if ... end 168s accepts matching var = while ... end 168s registers an offense for mismatched var = if test end and autocorrects 168s registers an offense for mismatched var = # comment while test end and autocorrects 168s registers an offense for mismatched a, b = if test end and autocorrects 168s accepts matching @var = if ... end 168s registers an offense for mismatched var = unless test end and autocorrects 168s accepts matching var &&= if ... end 168s accepts matching $var = if ... end 168s accepts matching CNST = if ... end 168s registers an offense for mismatched var = until test do_something end and autocorrects 168s registers an offense for mismatched var << until test end and autocorrects 168s accepts matching var ||= if ... end 168s registers an offense for mismatched var = unless test end and autocorrects 168s registers an offense for mismatched $var << if test end and autocorrects 168s accepts matching var += if ... end 168s when EnforcedStyleAlignWith is keyword 168s registers an offense for mismatched var = if test end and autocorrects 168s accepts matching var = if ... end 168s accepts matching var = while ... end 168s accepts matching var = until ... end 168s registers an offense for mismatched var = while test end and autocorrects 168s accepts matching var = unless ... end 168s accepts matching var[0] = case ... end 168s registers an offense for mismatched var = until test end and autocorrects 168s registers an offense for mismatched var = unless test end and autocorrects 168s accepts matching var = case ... end 168s registers an offense for mismatched var << until test end and autocorrects 168s when end is preceded by something else than whitespace 168s does not register an offense 168s when EnforcedStyleAlignWith is variable 168s accepts matching puts 1; case ... end 168s accepts matching until ... end 168s registers an offense for mismatched puts 1; case a when b end and autocorrects 168s registers an offense for mismatched unless test end and autocorrects 168s registers an offense for mismatched while test end and autocorrects 168s registers an offense for mismatched puts 1; until test end and autocorrects 168s accepts matching puts 1; until ... end 168s registers an offense for mismatched if test end and autocorrects 168s accepts matching unless ... end 168s registers an offense for mismatched class Test end and autocorrects 168s registers an offense for mismatched module Test end and autocorrects 168s registers an offense for mismatched puts 1; while test end and autocorrects 168s register an offense when using `+` operator method and `end` is not aligned 168s register an offense when using `-` operator method and `end` is not aligned 168s accepts matching class ... end 168s accepts matching puts 1; class ... end 168s registers an offense for mismatched case a when b end and autocorrects 168s registers an offense for mismatched puts 1; if test end and autocorrects 168s accepts matching puts 1; unless ... end 168s registers an offense for mismatched puts 1; unless test end and autocorrects 168s registers an offense for mismatched puts 1; class Test end and autocorrects 168s register an offense when using a conditional statement in a method argument and `end` is not aligned 168s accepts matching module ... end 168s accepts matching puts 1; while ... end 168s accepts matching puts 1; module ... end 168s accepts matching puts 1; if ... end 168s registers an offense for mismatched until test end and autocorrects 168s accepts matching if ... end 168s registers an offense for mismatched puts 1; module Test end and autocorrects 168s accepts matching while ... end 168s accepts matching case ... end 168s correct + opposite 168s registers an offense and corrects 168s 168s RuboCop::Formatter::EmacsStyleFormatter 168s #file_finished 168s displays parsable text 168s when the offense is marked as todo 168s prints [Todo] along with message 168s when the offense message contains a newline 168s strips newlines out of the error message 168s when the offense is automatically corrected 168s prints [Corrected] along with message 168s #finished 168s does not report summary 168s 168s RuboCop::Cop::Style::ModuleFunction 168s when enforced style is `module_function` 168s registers an offense for `extend self` in a module 168s accepts for `extend self` in a module with declarative private 168s accepts `extend self` in a class 168s accepts for `extend self` in a module with private methods 168s when enforced style is `extend_self` 168s registers an offense for `module_function` without an argument 168s accepts module_function with an argument 168s when enforced style is `forbidden` 168s registers an offense for `module_function` without an argument 168s accepts `extend self` in a class 168s registers an offense for `extend self` 168s in a module 168s in a module with declarative private 168s in a module with private methods 168s 168s RuboCop::Cop::InternalAffairs::SingleLineComparison 168s registers and corrects an offense when comparing `last_line` with `first_line` 168s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 168s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 168s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 168s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 168s does not register an offense when the receivers are not a match 168s registers and corrects an offense when negative comparing `first_line` with `last_line` 168s does not register an offense when comparing the same line 168s registers and corrects an offense when negative comparing `last_line` with `first_line` 168s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 168s registers and corrects an offense when comparing `first_line` with `last_line` 168s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 168s 168s RuboCop::RakeTask 168s running tasks 168s runs with default options 168s runs with specified options if a block is given 168s will not error when result is not 0 and fail_on_error is false 168s exits when result is not 0 and fail_on_error is true 168s allows nested arrays inside formatters, options, and requires 168s uses the default formatter from .rubocop.yml if no formatter option is given 168s autocorrect 168s runs with with the options that were passed to its parent task 168s runs with --autocorrect-all 168s runs with --autocorrect 168s defining tasks 168s creates a named task and a named auto_correct task 168s creates a rubocop task and a rubocop autocorrect task 168s creates a rubocop task and a rubocop auto_correct task 168s creates a named task and a named autocorrect task 168s 168s RuboCop::Cop::Layout::MultilineHashBraceLayout 168s ignores implicit hashes 168s ignores empty hashes 168s ignores single-line hashes 168s behaves like multiline literal brace layout 168s symmetrical style 168s opening brace on same line as first element 168s allows closing brace on same line as last element 168s autocorrects closing brace on different line from last element 168s allows closing brace on same line as last multiline element 168s detects closing brace on different line from last element 168s with a chained call on the closing brace 168s but no comment after the last element 168s autocorrects the closing brace 168s and a comment after the last element 168s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 168s opening brace on separate line from first element 168s allows closing brace on separate line from last element 168s allows closing brace on separate line from last multiline element 168s detects closing brace on same line as last element 168s same_line style 168s opening brace on same line as first element 168s allows closing brace on same line as multi-line element 168s allows closing brace on same line from last element 168s autocorrects closing brace on different line as last element 168s detects closing brace on different line from multiline element 168s with a chained call on the closing brace 168s but no comment after the last element 168s autocorrects the closing brace 168s and a comment after the last element 168s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 168s opening brace on separate line from first element 168s allows closing brace on same line as last element 168s allows closing brace on same line as last multiline element 168s detects closing brace on different line from last element 168s heredoc 168s ignores heredocs that could share a last line 168s detects heredoc structures that are safe to add to 168s new_line style 168s opening brace on same line as first element 168s allows closing brace on different line from last element 168s detects closing brace on same line as last multiline element 168s allows closing brace on different line from multi-line element 168s autocorrects closing brace on same line as last element 168s opening brace on separate line from first element 168s detects closing brace on same line as last element 168s allows closing brace on separate line from last element 168s allows closing brace on separate line from last multiline element 168s behaves like multiline literal brace layout method argument 168s when arguments to a method 168s but no comment after the last element 168s autocorrects the closing brace 168s and a comment after the last element 168s detects closing brace on separate line from last element 168s behaves like multiline literal brace layout trailing comma 168s symmetrical style 168s opening brace on same line as first element 168s last element has a trailing comma 168s autocorrects closing brace on different line from last element 168s same_line style 168s opening brace on same line as first element 168s last element has a trailing comma 168s autocorrects closing brace on different line as last element 168s 168s RuboCop::Cop::Style::CommentedKeyword 168s registers an offense and corrects when commenting on the same line as `begin` 168s registers an offense and corrects when commenting on the same line as `end` 168s does not register an offense for certain comments 168s does not register an offense if there are no comments after keywords 168s registers an offense and corrects when commenting on the same line as `module` 168s registers an offense and corrects when commenting on the same line as `class` 168s does not register an offense if AST contains # symbol 168s checks a long comment in less than one second 168s registers an offense and corrects when commenting on the same line as `def` 168s registers an offense and corrects when commenting after keyword with spaces 168s registers an offense and corrects for one-line cases 168s registers an offense and corrects when commenting on indented keywords 168s accepts keyword letter sequences that are not keywords 168s 168s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 168s registers an offense when using an digest constant with chained methods and corrects 168s does not register an offense when using cipher with a string 168s registers an offense when using ::Digest class methods on an algorithm constant and corrects 168s registers an offense with cipher constant and no arguments and corrects 168s registers an offense with cipher constant and two arguments and corrects 168s does not register an offense with cipher constant and send argument is a method 168s registers an offense with cipher constant and no arguments and corrects 168s registers an offense with cipher constant and one argument and corrects 168s registers an offense with AES + blocksize constant and mode argument and corrects 168s registers an offense with cipher constant and `cbc` argument and corrects 168s does not register an offense with cipher constant and argument is a variable 168s registers an offense with cipher constant and no arguments and corrects 168s registers an offense with cipher constant and double quoted string argument and corrects 168s registers an offense when building an instance using an digest constant and corrects 168s does not register an offense with cipher constant and argument is a constant 168s does not register an offense when building digest using an algorithm string 168s registers an offense with AES + blocksize constant and corrects 168s does not register an offense when using ::Digest class methods with an algorithm string and value 168s does not register an offense when building digest using an algorithm string and nested digest constants 168s registers an offense with cipher constant and no arguments and corrects 168s when used in a block 168s registers an offense when using ::Digest class methods on an algorithm constant and corrects 168s 168s RuboCop::Cop::Lint::DuplicateElsifCondition 168s does not register an offense for partially repeated elsif conditions 168s registers an offense for subsequent repeated elsif conditions 168s registers an offense for repeated elsif conditions 168s does not register an offense for non-repeated elsif conditions 168s registers multiple offenses for multiple repeated elsif conditions 168s 168s RuboCop::Cop::Lint::RedundantSplatExpansion 168s allows expanding a method call on an array literal 168s allows assigning to an expanded range 168s allows assigning to a splat variable 168s allows an array using a constructor 168s allows expansions of an array that is assigned to a variable in rescue 168s allows assigning to a splat 168s registers an offense and corrects an array literal being expanded in a rescue 168s allows assigning a variable to a splat expansion of a variable 168s accepts expanding a variable as a method parameter 168s allows splat expansion inside of an array 168s expanding Array.new call on array literal 168s when the array literal contains more than one element 168s accepts 168s with ::Array.new 168s when the array literal contains exactly one element 168s registers an offense and corrects 168s when the array literal contains exactly one element 168s registers an offense and corrects 168s behaves like array splat expansion 168s method parameters 168s registers an offense and converts to a list of arguments 168s behaves like splat literal assignment 168s registers an offense and removes the splat from array 168s when `AllowPercentLiteralArrayArgument: true` 168s does not register an offense when using percent symbol literal array 168s does not register an offense when using percent string literal array 168s behaves like splat expansion 168s behaves like splat literal assignment 168s registers an offense and converts to an array 168s method parameters 168s registers an offense and converts to an array 168s behaves like splat expansion 168s method parameters 168s registers an offense and converts to an array 168s behaves like splat literal assignment 168s registers an offense and converts to an array 168s arrays being expanded with %i variants using splat expansion 168s splat expansion inside of an array 168s registers an offense and changes %I to a list of symbols 168s registers an offense and corrects %i to a list of symbols 168s expanding an array literal in a when condition 168s allows an array using a constructor 168s allows an array that is assigned to a variable 168s registers an offense and corrects an array using %w 168s registers an offense and corrects %i to a list of symbols 168s registers an offense and corrects an array using %W 168s registers an offense and corrects an array using [] 168s registers an offense and corrects %I to a list of symbols 168s behaves like splat expansion 168s behaves like splat literal assignment 168s registers an offense and converts to an array 168s method parameters 168s registers an offense and converts to an array 168s splat expansion inside of an array 168s registers an offense and corrects expansion of %w to a list of words 168s registers an offense and corrects expansion of %W to a list of words 168s registers an offense and corrects the expansion of an array literalinside of an array literal 168s assignment to splat expansion 168s registers an offense and corrects an array using a constructor 168s registers and corrects an array using top-level const 168s behaves like splat expansion 168s method parameters 168s registers an offense and converts to an array 168s behaves like splat literal assignment 168s registers an offense and converts to an array 168s when `AllowPercentLiteralArrayArgument: false` 168s registers an offense when using percent symbol literal array 168s registers an offense when using percent literal array 168s splat expansion of method parameters 168s registers an offense and corrects an array literal %i 168s registers an offense and corrects an array literal %I 168s behaves like array splat expansion 168s method parameters 168s registers an offense and converts to a list of arguments 168s behaves like splat literal assignment 168s registers an offense and removes the splat from array 168s behaves like array splat expansion 168s method parameters 168s registers an offense and converts to a list of arguments 168s behaves like splat literal assignment 168s registers an offense and removes the splat from array 168s behaves like array splat expansion 168s behaves like splat literal assignment 168s registers an offense and removes the splat from array 168s method parameters 168s registers an offense and converts to a list of arguments 168s behaves like array splat expansion 168s behaves like splat literal assignment 168s registers an offense and removes the splat from array 168s method parameters 168s registers an offense and converts to a list of arguments 168s expanding Array.new call on method argument 168s registers an offense and corrects 168s 168s RuboCop::Cop::Lint::DuplicateMagicComment 168s does not register an offense when encoding magic comments are not duplicated 168s registers an offense when frozen magic comments are duplicated 168s does not register an offense when frozen magic comments are not duplicated 168s registers an offense when encoding and frozen magic comments are duplicated 168s registers an offense when same encoding magic comments are duplicated 168s registers an offense when different encoding magic comments are duplicated 168s does not register an offense when encoding and frozen magic comments are not duplicated 168s 168s RuboCop::Runner 168s how formatter is invoked 168s #file_started 168s sends file specific information hash 168s sends a file path 168s the passed path 168s is frozen 168s #started 168s sends all file paths 168s the passed files paths 168s is frozen 168s #finished 168s when RuboCop finished inspecting all files normally 168s sends all file paths 168s the passed files paths 169s is frozen 169s when RuboCop is interrupted by user 169s sends only processed file paths 169s invocation order 169s is called in the proper sequence 169s #file_finished 169s sends a file path 169s sends an array of detected offenses for the file 169s the passed path 169s is frozen 169s 169s RuboCop::Cop::Metrics::CyclomaticComplexity 169s when Max is 1 169s counts repeated &. on same untouched local variable as 1 169s registers an offense for &&= 169s registers an offense for ||= 169s accepts an empty method 169s registers an offense for &. 169s registers an offense for an until block 169s counts enumerating methods with blocks as +1 169s registers an offense for && 169s registers an offense for an unless modifier 169s registers an offense for and 169s deals with nested if blocks containing && and || 169s registers an offense for a ternary operator 169s registers an offense for an if modifier 169s counts only a single method 169s registers an offense for a for block 169s counts enumerating methods with block-pass as +1 169s accepts an empty `define_method` 169s registers an offense for an elsif block 169s registers an offense for || 169s accepts complex code outside of methods 169s registers an offense for a `define_method` 169s accepts a method with no decision points 169s registers an offense for a case/when block 169s does not count blocks in general 169s registers an offense for a rescue block 169s registers an offense for or 169s registers an offense for a while block 169s Ruby 2.7 169s counts enumerating methods with numblocks as +1 169s when Max is 2 169s counts stupid nested if and else blocks 169s when AllowedMethods is enabled 169s does not register an offense when defining a class method 169s does not register an offense when defining an instance method 169s does not register an offense when using `define_method` 169s when AllowedPatterns is enabled 169s does not register an offense when defining a class method 169s does not register an offense when defining an instance method 169s does not register an offense when using `define_method` 169s 169s RuboCop::Cop::Style::RaiseArgs 169s when enforced style is compact 169s accepts exception constructor with keyword arguments and message argument 169s accepts a raise with msg argument 169s accepts a raise with an exception argument 169s when used in a logical and expression 169s registers an offense and autocorrects 169s with a raise with 3 args 169s reports an offense 169s when used in a ternary expression 169s registers an offense and autocorrects 169s with a raise with 2 args 169s reports an offense 169s with a raise with 2 args and exception object is assigned to a local variable 169s reports an offense 169s with a raise with exception instantiation and message arguments 169s reports an offense 169s with correct + opposite 169s reports multiple offenses 169s reports an offense 169s when used in a logical or expression 169s registers an offense and autocorrects 169s when enforced style is exploded 169s accepts exception constructor with more than 1 argument 169s accepts a raise with 3 args 169s accepts a raise with msg argument 169s accepts exception constructor with keyword arguments 169s accepts a raise when exception object is assigned to a local variable 169s ignores a raise with an exception argument 169s accepts a raise with 2 args 169s accepts a raise with `new` method without receiver 169s accepts a raise with splatted arguments 169s with a raise with exception object 169s when used in a logical or expression 169s registers an offense and autocorrects 169s with no arguments 169s reports an offense 169s when used in a logical and expression 169s registers an offense and autocorrects 169s with one argument 169s reports an offense 169s when used in a ternary expression 169s registers an offense and autocorrects 169s with opposite + correct 169s reports multiple offenses 169s reports an offense for opposite + correct 169s when an exception object is assigned to a local variable 169s autocorrects to exploded style 169s when exception type is in AllowedCompactTypes 169s accepts exception constructor with no arguments 169s with one argument 169s accepts exception constructor 169s with more than one argument 169s accepts exception constructor 169s 169s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 169s does not register an offense if the node matcher already has a directive 169s registers an offense if the matcher has multiple directives 169s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 169s autocorrects with the right arguments if the pattern references a non-contiguous argument 169s does not insert a blank line if one already exists 169s does not register an offense if called with a dynamic method name 169s registers an offense if the matcher does not have a directive 169s autocorrects with the right arguments if the pattern includes arguments 169s inserts a blank line between multiple multi-line pattern matchers 169s retains indentation properly when correcting 169s autocorrects with the right arguments if the pattern includes arguments 169s retains indentation properly when correcting 169s registers an offense if the matcher does not have a directive but has preceding comments 169s does not register an offense if the directive is in a comment block 169s registers an offense if the matcher has multiple directives 169s registers an offense if the matcher does not have a directive 169s retains indentation properly when inserting 169s retains indentation properly when inserting 169s does not register an offense if called with a dynamic method name 169s does not register an offense if the node matcher already has a directive 169s registers an offense if the directive name does not match the actual name 169s inserts a blank line between multiple pattern matchers 169s does not register an offense if the directive is in a comment block 169s registers an offense if the directive name does not match the actual name 169s does not insert a blank line if one already exists 169s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 169s inserts a blank line between multiple pattern matchers 169s autocorrects with the right arguments if the pattern references a non-contiguous argument 169s registers an offense if the matcher does not have a directive but has preceding comments 169s inserts a blank line between multiple multi-line pattern matchers 169s 169s RuboCop::Cop::Style::RescueStandardError 169s implicit 169s accepts rescue modifier 169s when rescuing in a method definition 169s accepts rescuing no error class 169s accepts rescuing StandardError with other errors 169s accepts rescuing a single error other than StandardError, assigned to a variable 169s accepts rescuing a single error other than StandardError 169s accepts rescuing StandardError with other errors, assigned to a variable 169s accepts rescuing no error class, assigned to a variable 169s when rescuing StandardError by itself 169s registers an offense 169s when the error is assigned to a variable 169s registers an offense 169s when rescuing in a begin block 169s accepts rescuing no error class 169s accepts rescuing a single error class other than StandardError 169s accepts rescuing a single error class other than StandardError, assigned to a variable 169s accepts rescuing no error class, assigned to a variable 169s accepts rescuing ::StandardError with other errors 169s accepts rescuing StandardError with other errors, assigned to a variable 169s accepts rescuing StandardError with other errors 169s when rescuing StandardError by itself 169s registers an offense 169s when the error is assigned to a variable 169s registers an offense 169s with ::StandardError 169s registers an offense 169s with ::StandardError 169s registers an offense 169s explicit 169s accepts rescue modifier 169s when rescuing in a method definition 169s accepts rescuing a single error other than StandardError 169s accepts rescuing StandardError with other errors 169s accepts rescuing a single error other than StandardError, assigned to a variable 169s accepts rescuing StandardError by itself 169s accepts rescuing StandardError with other errors, assigned to a variable 169s accepts rescuing StandardError by itself, assigned to a variable 169s when rescue is called without an error class 169s registers an offense 169s when the error is assigned to a variable 169s registers an offense 169s when rescuing in a begin block 169s accepts rescuing a single error other than StandardError 169s accepts rescuing StandardError with other errors, assigned to a variable 169s accepts rescuing StandardError by itself, assigned to a variable 169s accepts rescuing StandardError with other errors 169s accepts rescuing StandardError by itself 169s accepts rescuing a single error other than StandardErrorassigned to a variable 169s when calling rescue without an error class 169s registers an offense 169s when the error is assigned to a variable 169s registers an offense 169s 169s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 169s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 169s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 169s 169s RuboCop::Cop::Security::JSONLoad 169s registers an offense and corrects JSON.restore 169s allows JSON.parse 169s does not register an offense for JSON under another namespace 169s allows JSON.dump 169s registers an offense and corrects JSON.load 169s 169s RuboCop::Cop::Metrics::MethodLength 169s does not count commented lines by default 169s properly counts lines when method ends with block 169s accepts a method with multiline arguments and less than 5 lines of body 169s accepts a method with less than 5 lines 169s does not count blank lines 169s is not fooled by one-liner methods, syntax #2 169s is not fooled by one-liner methods, syntax #1 169s accepts empty methods 169s when `CountAsOne` is not empty 169s folds array into one line 169s when CountComments is enabled 169s also counts commented lines 169s when method is a class method 169s registers an offense 169s when method is defined on a singleton class 169s registers an offense 169s when methods to allow are defined 169s AllowedPatterns is enabled 169s raises offense for firstname 169s accepts the user_name method 169s AllowedMethods is enabled 169s still rejects other methods with more than 5 lines 169s accepts the foo method with more than 5 lines 169s when method is defined with `define_method` 169s registers an offense 169s when using numbered parameter 169s when method is defined with `define_method` 169s registers an offense 169s when method is an instance method 169s registers an offense 169s 169s Changelog 169s merges correctly 169s parses correctly 169s Changelog::Entry 169s #ref_id 169s when there is an issue referenced with [Fixes #x] the body 169s is expected to eq "123" 169s when there is no issue referenced in the body 169s is expected to eq "x" 169s when there is no body 169s is expected to eq "x" 169s when there is an issue referenced with [Fix #x] the body 169s is expected to eq "123" 169s #content 169s when there is an issue referenced 169s generates correct content 169s when there is no issue referenced 169s generates correct content 169s #body 169s when there is an issue referenced with [Fix #x] the body 169s is expected to eq "Fix something" 169s when there is no issue referenced in the body 169s is expected to eq "Fix something" 169s when there is no body 169s is expected to eq "" 169s when there is an issue referenced with [Fixes #x] the body 169s is expected to eq "Fix something" 169s 169s RuboCop::Cop::Layout::FirstHashElementIndentation 169s when hash is argument to setter 169s registers an offense and corrects incorrectly indented first pair 169s accepts correctly indented first pair 169s when the HashAlignment style is separator for : 169s accepts correctly indented first pair 169s registers an offense and corrects incorrectly indented first pair with : 169s registers an offense and corrects incorrectly indented } 169s when hash is right hand side in assignment 169s accepts correctly indented first pair 169s accepts an empty hash 169s accepts several pairs per line 169s registers an offense and corrects incorrectly indented first pair 169s accepts a first pair on the same line as the left brace 169s accepts single line hash 169s when indentation width is overridden for this cop 169s accepts correctly indented first pair 169s registers an offense and corrects incorrectly indented first pair 169s when hash is method argument 169s and argument are not surrounded by parentheses 169s 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 169s accepts braceless hash 169s 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 169s registers an offense for incorrectly indented multi-line hash with braces 169s accepts single line hash with braces 169s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 169s 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 169s accepts a correctly indented multi-line hash with braces 169s and arguments are surrounded by parentheses 169s and EnforcedStyle is consistent 169s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 169s accepts normal indentation for first argument 169s registers an offense and corrects incorrect indentation 169s 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 169s accepts normal indentation for second argument 169s 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 169s registers an offense for incorrectly indented hash that is the value of a single pair hash 169s and EnforcedStyle is special_inside_parentheses 169s accepts special indentation for second argument 169s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 169s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 169s registers an offense and corrects 'consistent' indentation 169s accepts special indentation for first argument 169s accepts normal indentation for hash within hash 169s registers an offense for incorrectly indented hash that is the value of a single pair hash 169s 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 169s registers an offense and corrects 'align_braces' indentation 169s when using safe navigation operator 169s registers an offense and corrects 'consistent' indentation 169s when the HashAlignment style is separator for => 169s registers an offense and corrects incorrectly indented } 169s accepts correctly indented first pair 169s registers an offense and corrects incorrectly indented first pair with => 169s when EnforcedStyle is align_braces 169s accepts single line hash 169s accepts correctly indented first pair 169s accepts a first pair on the same line as the left brace 169s 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 169s accepts an empty hash 169s registers an offense for incorrectly indented hash that is the value of a single pair hash 169s registers an offense and corrects incorrectly indented } 169s accepts several pairs per line 169s when 'special_inside_parentheses' style is used 169s registers an offense and corrects incorrect indentation 169s when 'consistent' style is used 169s registers an offense and corrects incorrect indentation 169s when hash is operand 169s accepts correctly indented first pair 169s registers an offense and corrects incorrectly indented } 169s registers an offense and corrects incorrectly indented first pair 169s 169s RuboCop::Cop::Layout::CaseIndentation 169s when `when` is on the same line as `case` 169s registers an offense but does not autocorrect 169s with EnforcedStyle: case 169s with IndentOneStep: true 169s `case` ... `when` 169s registers an offense and corrects a `when` clause that is equally indented with `case` 169s accepts a `when` clause that's 2 spaces deeper than `case` 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s accepts a correctly indented assignment 169s registers an offense and corrects an assignment indented some other way 169s when indentation width is overridden for this cop only 169s respects cop-specific IndentationWidth 169s `case` ... `in` 169s registers an offense and corrects an `in` clause that is equally indented with `case` 169s accepts an `in` clause that's 2 spaces deeper than `case` 169s when indentation width is overridden for this cop only 169s respects cop-specific IndentationWidth 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s accepts a correctly indented assignment 169s registers an offense and corrects an assignment indented some other way 169s with IndentOneStep: false 169s `case` ... `when` 169s doesn't get confused by strings with `case` in them 169s doesn't get confused by symbols named `case` or `when` 169s accepts a `when` clause that's equally indented with `case` 169s accepts correctly indented whens in complex combinations 169s registers an offense and corrects a `when` clause that is indented deeper than `case` 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s registers an offense and corrects assignment indented some other way 169s registers an offense and corrects assignment indented as end 169s accepts a correctly indented assignment 169s registers an offense and corrects correct + opposite style 169s `case` ... `in` 169s registers an offense and corrects an `in` clause that is indented deeper than `case` 169s accepts correctly indented whens in complex combinations 169s accepts an `in` clause that's equally indented with `case` 169s doesn't get confused by strings with `case` in them 169s doesn't get confused by symbols named `case` or `in` 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s registers an offense and corrects assignment indented some other way 169s registers an offense and corrects correct + opposite style 169s registers an offense and corrects assignment indented as `end` 169s accepts a correctly indented assignment 169s with EnforcedStyle: end 169s with IndentOneStep: true 169s `case` ... `in` 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s registers an offense and corrects an assignment indented as `case` 169s registers an offense and corrects an assignment indented some other way 169s accepts a correctly indented assignment 169s `case` ... `when` 169s with everything on a single line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s registers an offense and corrects an assignment indented some other way 169s registers an offense and corrects an assignment indented as `case` 169s accepts a correctly indented assignment 169s with IndentOneStep: false 169s `case` ... `when` 169s with everything on a single line 169s does not register an offense 169s `else` and `end` same line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s accepts a correctly indented assignment 169s registers an offense and corrects an assignment indented some other way 169s `when` and `end` same line 169s does not register an offense 169s `case` ... `in` 169s `in` and `end` same line 169s does not register an offense 169s regarding assignment where the right hand side is a `case` 169s registers an offense and corrects an assignment indented some other way 169s accepts a correctly indented assignment 169s with everything on a single line 169s does not register an offense 169s 169s RuboCop::Cop::Lint::ConstantResolution 169s registers no offense qualifying a namespace const 169s registers no offense when qualifying a const 169s registers an offense not qualifying a const 169s registers an offense not qualifying a namespace const 169s with Only set 169s registers no offense when qualifying a const 169s registers no offense not qualifying another const 169s registers no with a namespace const 169s registers no offense qualifying a namespace const 169s registers an offense when an unqualified namespace const 169s registers an offense with an unqualified const 169s module & class definitions 169s does not register offense 169s with Ignore set 169s registers no offense when qualifying a const 169s registers no offense with an unqualified const 169s registers an with a namespace const 169s registers an offense not qualifying another const 169s registers no offense when an unqualified namespace const 169s registers no offense qualifying a namespace const 169s 169s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 169s with a repeated intersection character class 169s does not register an offense 169s with a repeated character class element and %r{} literal 169s registers an offense and corrects 169s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 169s registers an offense 169s with no repeated character class elements 169s does not register an offense 169s with a repeated character class element inside a group 169s registers an offense and corrects 169s with multiple regexps with the same interpolation 169s does not register an offense 169s with a repeated character class element with quantifier 169s registers an offense and corrects 169s with a repeated character class element 169s registers an offense and corrects 169s with a repeated character class element with interpolation 169s registers an offense and corrects 169s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 169s does not register an offense 169s with repeated elements in different character classes 169s does not register an offense 169s with a repeated range element 169s registers an offense and corrects 169s with a range that covers a repeated element character class 169s does not register an offense 169s with a repeated character posix character class inside a group 169s registers an offense and corrects 169s 169s RuboCop::Cop::Force 169s #run_hook 169s invokes a hook in all cops 169s .force_name 169s returns the class name without namespace 169s 169s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 169s registers an offense for `!=` with duplicate operands 169s does not register an offense for `>>` with duplicate operands 169s does not register an offense for `+` with duplicate operands 169s registers an offense for `|` with duplicate operands 169s does not register an offense for `*` with duplicate operands 169s registers an offense for `==` with duplicate operands 169s registers an offense for `>` with duplicate operands 169s registers an offense for `||` with duplicate operands 169s registers an offense for `-` with duplicate operands 169s registers an offense for `=~` with duplicate operands 169s registers an offense for `^` with duplicate operands 169s registers an offense for `<=>` with duplicate operands 169s does not register an offense when using binary operator with different operands 169s does not register an offense for `**` with duplicate operands 169s registers an offense for `<=` with duplicate operands 169s registers an offense for `%` with duplicate operands 169s registers an offense for `>=` with duplicate operands 169s registers an offense for `<` with duplicate operands 169s registers an offense for `/` with duplicate operands 169s does not register an offense when using arithmetic operator with numerics 169s registers an offense for `&&` with duplicate operands 169s does not register an offense for `<<` with duplicate operands 169s does not crash on operator without any argument 169s registers an offense for `===` with duplicate operands 169s 169s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 169s does not register an offense for `if` with single line condition 169s registers an offense when no new line after `if` with multiline condition 169s does not register an offense for `while` with single line condition 169s does not register an offense for `when` with singleline condition 169s registers an offense when no new line after modifier `while` with multiline condition 169s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 170s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 170s does not register an offense when new line after modifier `if` with multiline condition 170s registers an offense when no new line after `elsif` with multiline condition 170s does not register an offense when new line after modifier `while` with multiline condition 170s registers an offense when no new line after `rescue` with multiline exceptions 170s does not register an offense when new line after `rescue` with multiline exceptions 170s does not register an offense when new line after `elsif` with multiline condition 170s does not register an offense for `rescue` with singleline exceptions 170s registers an offense when no new line after `while` with multiline condition 170s does not register an offense when new line after `while` with multiline condition 170s registers an offense when no new line after `until` with multiline condition 170s registers an offense when no new line after modifier `if` with multiline condition 170s does not register an offense when new line after `if` with multiline condition 170s does not register an offense when `if` at the top level 170s does not register an offense when new line after `when` with multiline condition 170s registers an offense when no new line after `when` with multiline condition 170s 170s RuboCop::Cop::Lint::ToJSON 170s does not register an offense when using `#to_json` with arguments 170s registers an offense and corrects using `#to_json` without arguments 170s 170s RuboCop::Cop::AlignmentCorrector 170s #correct 170s within string literals 170s does not insert whitespace 170s with large column deltas 170s with plain heredoc (<<) 170s behaves like heredoc indenter 170s does not change indentation of here doc bodies and end markers 170s with heredoc in backticks (<<``) 170s behaves like heredoc indenter 170s does not change indentation of here doc bodies and end markers 170s with single-line here docs 170s does not indent body and end marker 170s simple indentation 170s with a positive column delta 170s indents 170s with a negative column delta 170s outdents 170s 170s RuboCop::FileFinder 170s #find_last_file_upwards 170s returns nil when file is not found 170s returns the last file found upwards 170s #find_file_upwards 170s returns nil when file is not found 170s returns a file to be found upwards 170s 170s RuboCop::Cop::Layout::HashAlignment 170s register no offense for yield without args 170s register no offense for superclass call without args 170s accepts several pairs per line 170s accepts single line hash 170s accepts pairs that don't start a line 170s always ignore last argument hash 170s accepts misaligned keys in explicit hash 170s accepts misaligned keys in implicit hash for yield 170s accepts misaligned keys in implicit hash 170s accepts misaligned keys in explicit hash for super 170s accepts misaligned keys in explicit hash for yield 170s accepts misaligned keys in implicit hash for super 170s with table alignment configuration 170s accepts hashes that use different separators and double splats 170s registers an offense for misaligned hash values 170s accepts pairs that don't start a line 170s registers an offense and corrects misaligned hash rockets 170s accepts aligned hash keys and values 170s accepts an empty hash 170s accepts several pairs per line 170s accepts a keyword splat only hash 170s accepts hashes that use different separators 170s registers an offense and corrects for misaligned hash keys 170s accepts single line hash 170s accepts a symbol only hash followed by a keyword splat 170s accepts a multiline array of single line hashes 170s when using hash value omission 170s accepts aligned hash keys and values 170s when using hash value omission 170s accepts several pairs per line 170s accepts single line hash 170s accepts pairs that don't start a line 170s ignore implicit last argument hash 170s accepts misaligned keys in implicit hash for super 170s registers an offense and corrects misaligned keys in explicit hash 170s registers an offense and corrects misaligned keys in explicit hash for super 170s accepts misaligned keys in implicit hash 170s accepts misaligned keys in implicit hash for yield 170s registers an offense and corrects misaligned keys in explicit hash for yield 170s always inspect last argument hash 170s registers offense and corrects misaligned keys in explicit hash 170s registers an offense and corrects misaligned keys in explicit hash for yield 170s registers an offense and corrects misaligned keys in explicit hash for super 170s registers an offense and corrects misaligned keys in implicit hash for yield 170s registers an offense and corrects misaligned keys in implicit hash for super 170s registers offense and corrects misaligned keys in implicit hash 170s when using hash value omission 170s registers offense and corrects misaligned keys in implicit hash 170s registers offense and corrects misaligned keys in explicit hash 170s with `EnforcedHashRocketStyle`: `table` 170s and a double splat argument after a hash key 170s registers an offense on the misaligned key and corrects 170s and a misaligned double splat argument 170s registers an offense and corrects 170s and misaligned keys 170s registers an offense and corrects 170s and aligned keys but a double splat argument after 170s does not register an offense on the `kwsplat` 170s when the only item is a kwsplat 170s does not register an offense 170s when using hash value omission 170s accepts single line hash 170s accepts pairs that don't start a line 170s accepts several pairs per line 170s with multiple preferred(key and table) alignment configuration 170s accepts an empty hash 170s accepts aligned hash keys, by table 170s accepts aligned hash keys, by keys 170s accepts aligned hash keys with mixed hash style 170s accepts aligned hash keys, by both 170s registers an offense and corrects misaligned hash values, prefer table when least offenses 170s registers an offense and corrects misaligned hash values, works separate for each hash 170s registers an offense and corrects misaligned hash keys with mixed hash style 170s registers an offense and corrects misaligned hash values, prefer key when least offenses 170s registers an offense and corrects misaligned hash values 170s table and key config 170s registers an offense and corrects misaligned hash values, prefer table because it is specified first 170s with table+separator alignment configuration 170s accepts a single method argument entry with colon 170s with different settings for => and : 170s accepts aligned entries 170s registers offenses and correct misaligned entries 170s with default configuration 170s registers an offense and corrects alignment when using double splat in braces 170s registers an offense and corrects misaligned mixed multiline hash keys 170s registers an offense and corrects misaligned hash keys 170s registers an offense and corrects zero or multiple spaces 170s registers an offense and corrects multiline value starts in wrong place 170s accepts left-aligned hash keys with single spaces 170s registers an offense and corrects mixed hash styles 170s does not register an offense when value starts on next line 170s registers an offense and corrects separator alignment 170s registers an offense and corrects alignment when using double splat in an explicit hash 170s registers an offense and corrects table alignment 170s with implicit hash as last argument 170s accepts aligned hash keys 170s registers an offense and corrects misaligned hash keys 170s accepts an empty hash 170s registers an offense and corrects right alignment of keys 170s with invalid configuration 170s fails 170s ignore explicit last argument hash 170s accepts misaligned keys in explicit hash for super 170s registers an offense and corrects misaligned keys in implicit hash for yield 170s accepts misaligned keys in explicit hash for yield 170s registers an offense and corrects misaligned keys in implicit hash for super 170s accepts misaligned keys in explicit hash 170s registers an offense and corrects misaligned keys in implicit hash 170s when using hash value omission 170s accepts misaligned keys in explicit hash 170s registers an offense and corrects misaligned keys in implicit hash 170s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 170s does not register an offense for an empty hash literal 170s registers and corrects an offense when using misaligned keyword arguments 170s register and corrects an offense 170s does not register an offense using aligned hash argument for `proc.()` 170s does not register an offense using aligned hash literal 170s when using hash value omission 170s register and corrects an offense 170s does not register and corrects an offense when using aligned keyword arguments 170s with `EnforcedColonStyle`: `table` 170s when using hash value omission 170s and aligned keys 170s does not register an offense and corrects 170s and aligned keys but a double splat argument after 170s does not register an offense on the `kwsplat` 170s and a double splat argument after a hash key 170s registers an offense on the misaligned key and corrects 170s when the only item is a kwsplat 170s does not register an offense 170s and a misaligned double splat argument 170s registers an offense and corrects 170s and misaligned keys 170s registers an offense and corrects 170s with separator alignment configuration 170s registers an offense and corrects mixed indentation and spacing 170s accepts single line hash 170s accepts several pairs per line 170s registers an offense and corrects misaligned hash rockets 170s accepts aligned hash keys 170s doesn't break code by moving long keys too far left 170s accepts hashes with different separators 170s registers an offense and corrects misaligned hash values 170s accepts pairs that don't start a line 170s accepts an empty hash 170s when using hash value omission 170s registers an offense and corrects mixed indentation and spacing 170s accepts aligned hash keys 170s when using hash value omission 170s accepts single line hash 170s accepts several pairs per line 170s accepts pairs that don't start a line 170s 170s RuboCop::Cop::Style::OneLineConditional 170s when AlwaysCorrectToMultiline is true 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s does not register an offense for if/then/else/end with empty else 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for unless/then/else/end 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s does not register an offense for if/then/end 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s does not register an offense for unless/then/else/end with empty else 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if/then/else/end 170s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 170s does not register an offense for unless/then/end 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 170s when IndentationWidth differs from default 170s registers and corrects an offense with multi-line construct for if/then/else/end 170s when AlwaysCorrectToMultiline is false 170s registers and corrects an offense with ternary operator for unless/then/else/end 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s does not register an offense for if/then/end 170s does not register an offense for if/then/else/end with empty else 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator for if/then/else/end 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 170s does not register an offense for unless/then/end 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 170s does not register an offense for unless/then/else/end with empty else 170s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 170s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 170s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 170s behaves like if/then/else/end with constructs changing precedence 170s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 170s behaves like if/then/else/end with constructs changing precedence 170s 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 170s behaves like if/then/else/end with keyword 170s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 170s 170s RuboCop::Cop::Layout::EmptyLinesAroundArguments 170s when extra lines 170s registers and autocorrects offenses when multiple empty lines are detected 170s registers and autocorrects offense when args start on definition line 170s registers and autocorrects offense on correct lines for multi-offense example 170s registers and autocorrects offense for empty line between args 170s registers and autocorrects offense for empty line after arg 170s registers and autocorrects offense on correct line for single offense example 170s registers and autocorrects offense for empty line before arg 170s registers and autocorrects offense when empty line between normal arg & block arg 170s registers autocorrects empty line whetn args start on definition line 170s when using safe navigation operator 170s registers and autocorrects offense for empty line before arg 170s when no extra lines 170s accepts method with argument that trails off block 170s accepts multiple listed mixed args 170s accepts method with argument that trails off heredoc 170s accepts multiline style argument for method call without selector 170s accepts when blank line is inserted between method with arguments and receiver 170s accepts listed args starting on definition line 170s accepts method with no arguments that trails off block 170s accepts block argument with empty line 170s accepts one line methods 170s with one argument 170s ignores empty lines inside of method arguments 170s with multiple arguments 170s ignores empty lines inside of method arguments 170s 170s RuboCop::Cop::Layout::SpaceBeforeComma 170s registers an offense and corrects array index with space before comma 170s registers an offense and corrects block argument with space before comma 170s handles more than one space before a comma 170s registers an offense and corrects method call arg with space before comma 170s does not register an offense for no spaces before comma 170s heredocs 170s registers an offense and corrects 170s 170s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 170s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 170s does not register an offense when using `elsif` and self-assigning the value of `then` branch 170s does not register an offense when using only if branch 170s does not register an offense when self-assigning redundant else ternary branch for gvar 170s registers and corrects an offense when self-assigning redundant if branch 170s does not register an offense when using `elsif` and self-assigning the value of `else` branch 170s does not register an offense when self-assigning redundant else ternary branch for cvar 170s does not register an offense when not self-assigning redundant branches 170s registers and corrects an offense when self-assigning redundant else branch and empty if branch 170s does not register an offense when self-assigning redundant else branch and multiline else branch 170s registers and corrects an offense when self-assigning redundant else ternary branch 170s registers and corrects an offense when self-assigning redundant else branch and empty else branch 170s does not register an offense when lhs is not variable 170s registers and corrects an offense when self-assigning redundant if ternary branch 170s registers and corrects an offense when self-assigning redundant else branch 170s does not register an offense when self-assigning redundant else branch and multiline if branch 170s does not register an offense when self-assigning redundant else ternary branch for ivar 170s does not register an offense when multi assignment 170s 170s RuboCop::Formatter::ProgressFormatter 170s #file_finished 170s when no offenses are detected 170s calls #report_as_with_mark 170s when any offenses are detected 170s calls #report_as_with_mark 170s #finished 170s calls #report_summary 170s when no offenses are detected 170s does not report offenses 170s when any offenses are detected 170s reports all detected offenses for all failed files 170s #report_file_as_mark 170s when a refactor severity offense is detected 170s prints "R" 170s when different severity offenses are detected 170s prints highest level mark 170s when a refactor convention offense is detected 170s prints "C" 170s when no offenses are detected 170s prints "." 170s 170s RuboCop::Cop::Lint::TripleQuotes 170s does not register an offense for implicit concatenation 170s string interpolation 170s does not register an offense 170s with nested extra quotes 170s registers an offense and corrects 170s heredocs 170s does not register an offense 170s triple quotes 170s on one line 170s registers an offense and corrects 170s on multiple lines 170s registers an offense and corrects 170s when only quotes 170s registers an offense and corrects to a single empty quote 170s with only whitespace 170s does not register 170s quintuple quotes 170s registers an offense and corrects 170s 170s RuboCop::Formatter::QuietFormatter 170s #report_summary 170s when 2 offenses are corrected 170s handles pluralization correctly 170s when a offense detected and a offense correctable 170s handles pluralization correctly 170s when 2 offenses are corrected and 2 offenses correctable 170s handles pluralization correctly 170s when a file inspected and no offenses detected 170s handles pluralization correctly 170s when 2 offenses detected and 2 offenses correctable 170s handles pluralization correctly 170s when no files inspected 170s handles pluralization correctly 170s when an offense is corrected 170s prints about correction 170s when a offense detected 170s handles pluralization correctly 170s when 2 offenses detected 170s handles pluralization correctly 170s #report_file 170s when the offense is correctable 170s prints message as-is 170s the file is outside of the current working directory 170s prints as absolute path 170s when the offense is automatically corrected 170s prints [Corrected] along with message 170s when the offense is not corrected 170s prints message as-is 170s the file is under the current working directory 170s prints as relative path 170s 170s RuboCop::Cop::Lint::LiteralAsCondition 170s registers an offense for literal [1] in complex cond 170s registers an offense for literal :"#{a}" in until 170s registers an offense for literal {} in ! 170s registers an offense for literal [1] in case 170s registers an offense for literal :sym in case 170s registers an offense for literal 1 in while 170s registers an offense for literal 2.0 in complex cond 170s registers an offense for literal 1 in ! 170s registers an offense for literal 2.0 in if 170s registers an offense for literal [1] in ! 170s registers an offense for literal 2.0 in ! 170s accepts literal [1] in a when of a case with something after case keyword 170s registers an offense for literal :"#{a}" in post-loop while 170s accepts dstr literal in case 170s registers an offense for literal [1] in post-loop while 170s registers an offense for literal {} in while 170s registers an offense for `not 2.0` 170s registers an offense for literal 1 in complex cond 170s registers an offense for literal 1 in complex ! 170s registers an offense for literal 2.0 in a when of a case without anything after case keyword 170s registers an offense for `![1]` 170s registers an offense for literal :sym in ! 170s accepts literal {} if it's not an and/or operand 170s registers an offense for literal :"#{a}" in while 170s registers an offense for literal :sym in complex ! 170s registers an offense for literal 1 in post-loop until 170s accepts `true` literal in post-loop `while` 170s accepts literal 2.0 in a when of a case with something after case keyword 170s registers an offense for literal 2.0 in case 170s registers an offense for literal :sym in while 170s accepts literal 1 if it's not an and/or operand 170s accepts literal :sym if it's not an and/or operand 170s registers an offense for literal 1 in case 170s registers an offense for `not :sym` 170s registers an offense for `not :"#{a}"` 170s registers an offense for literal :"#{a}" in case 170s registers an offense for `!:sym` 170s registers an offense for literal 1 in until 170s registers an offense for `!2.0` 170s accepts literal 1 in a when of a case with something after case keyword 170s registers an offense for literal [1] in post-loop until 170s registers an offense for literal :sym in until 170s registers an offense for literal [1] in if 170s accepts literal :sym in a when of a case with something after case keyword 170s registers an offense for literal :sym in complex cond 170s registers an offense for literal 2.0 in complex ! 170s registers an offense for literal {} in complex cond 170s accepts `true` literal in `while` 170s registers an offense for literal [1] in a when of a case without anything after case keyword 170s accepts literal :"#{a}" in non-toplevel and/or 170s accepts literal [1] in non-toplevel and/or 170s registers an offense for literal {} in post-loop while 170s registers an offense for literal 2.0 in post-loop until 170s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 170s accepts literal [1] if it's not an and/or operand 170s accepts `false` literal in post-loop `until` 170s registers an offense for `not {}` 170s accepts literal {} in a when of a case with something after case keyword 170s registers an offense for `!:"#{a}"` 170s registers an offense for literal 2.0 in while 170s accepts literal {} in non-toplevel and/or 170s registers an offense for literal :"#{a}" in if 170s registers an offense for literal :sym in if 170s accepts literal :sym in non-toplevel and/or 170s registers an offense for literal :sym in && 170s registers an offense for literal :"#{a}" in complex cond 170s registers an offense for literal :"#{a}" in complex ! 170s registers an offense for literal {} in complex ! 170s registers an offense for literal :sym in post-loop while 170s registers an offense for literal [1] in while 170s accepts literal 2.0 in non-toplevel and/or 170s registers an offense for literal {} in a when of a case without anything after case keyword 170s accepts literal :"#{a}" in a when of a case with something after case keyword 170s registers an offense for `!{}` 170s registers an offense for literal 1 in && 170s registers an offense for literal {} in until 170s registers an offense for literal :"#{a}" in post-loop until 170s registers an offense for literal {} in && 170s registers an offense for literal [1] in until 170s registers an offense for literal 1 in post-loop while 170s registers an offense for case with a primitive array condition 170s accepts literal :"#{a}" if it's not an and/or operand 170s registers an offense for literal :sym in a when of a case without anything after case keyword 170s registers an offense for literal {} in case 170s registers an offense for `not [1]` 170s accepts array literal in case, if it has nested non-literal element 170s registers an offense for literal [1] in && 170s accepts literal 2.0 if it's not an and/or operand 170s registers an offense for literal 2.0 in && 170s registers an offense for literal 2.0 in post-loop while 170s registers an offense for literal [1] in complex ! 170s registers an offense for literal 1 in a when of a case without anything after case keyword 170s registers an offense for `!1` 170s accepts array literal in case, if it has non-literal elements 170s registers an offense for literal 2.0 in until 170s registers an offense for literal 1 in if 170s accepts literal 1 in non-toplevel and/or 170s registers an offense for `not 1` 170s registers an offense for literal :"#{a}" in ! 170s registers an offense for literal :"#{a}" in && 170s registers an offense for literal {} in post-loop until 170s accepts `false` literal in `until` 170s registers an offense for literal :sym in post-loop until 170s registers an offense for literal {} in if 170s >= Ruby 2.7 170s accepts literal [1] in a when of a case match 170s registers an offense for literal [1] in case match without a match var 170s accepts an offense for literal [1] in case match with a match var 170s >= Ruby 2.7 170s accepts an offense for literal :sym in case match with a match var 170s accepts literal :sym in a when of a case match 170s registers an offense for literal :sym in case match without a match var 170s >= Ruby 2.7 170s accepts literal 2.0 in a when of a case match 170s accepts an offense for literal 2.0 in case match with a match var 170s registers an offense for literal 2.0 in case match without a match var 170s >= Ruby 2.7 170s accepts an offense for literal {} in case match with a match var 170s accepts literal {} in a when of a case match 170s registers an offense for literal {} in case match without a match var 170s >= Ruby 2.7 170s accepts an offense for literal :"#{a}" in case match with a match var 170s accepts literal :"#{a}" in a when of a case match 170s registers an offense for literal :"#{a}" in case match without a match var 170s >= Ruby 2.7 170s accepts literal 1 in a when of a case match 170s registers an offense for literal 1 in case match without a match var 170s accepts an offense for literal 1 in case match with a match var 170s >= Ruby 2.7 170s accepts an offense for case match with a match var 170s registers an offense for case match with a primitive array condition 170s accepts array literal in case match, if it has nested non-literal element 170s accepts array literal in case match, if it has non-literal elements 170s accepts dstr literal in case match 170s 170s RuboCop::Cop::Style::CharacterLiteral 170s autocorrects ?' to "'" 170s accepts ? in a %w literal 170s accepts literals like ?\C-\M-d 170s registers an offense for literals like \n 170s registers an offense for character literals 170s 170s RuboCop::Cop::Style::RegexpLiteral 170s when EnforcedStyle is set to slashes 170s a single-line `//` regex without slashes 170s is accepted 170s a single-line `//` regex with slashes 170s registers an offense 170s when configured to allow inner slashes 170s is accepted 170s a single-line %r regex without slashes 170s registers an offense 170s a multi-line %r regex without slashes 170s registers an offense 170s a single-line `//` regex with slashes and interpolation 170s registers an offense 170s when configured to allow inner slashes 170s is accepted 170s a multi-line `//` regex with slashes 170s registers an offense 170s when configured to allow inner slashes 170s is accepted 170s a multi-line %r regex with slashes 170s is accepted 170s when configured to allow inner slashes 170s registers an offense 170s a single-line `%r//` regex with slashes 170s is accepted 170s when configured to allow inner slashes 170s preserves slashes after autocorrection 170s a multi-line `//` regex without slashes 170s is accepted 170s a single-line %r regex with slashes 170s is accepted 170s when configured to allow inner slashes 170s registers an offense 170s when PercentLiteralDelimiters is configured with slashes 170s respects the configuration when autocorrecting 170s when regex contains slashes in interpolation 170s ignores the slashes that do not belong // regex 170s when EnforcedStyle is set to mixed 170s a multi-line `//` regex with slashes 170s registers an offense 170s a single-line `//` regex with slashes 170s registers an offense 170s when configured to allow inner slashes 170s is accepted 170s a multi-line `//` regex without slashes 170s registers an offense 170s a single-line %r regex with slashes 170s is accepted 170s when configured to allow inner slashes 170s registers an offense 170s a single-line %r regex without slashes 170s registers an offense 170s a multi-line %r regex without slashes 170s is accepted 170s a single-line `//` regex without slashes 170s is accepted 170s a multi-line %r regex with slashes 170s is accepted 170s %r regex with other delimiters than curly braces 170s registers an offense 170s when EnforcedStyle is set to percent_r 170s a single-line `//` regex without slashes 170s registers an offense 170s a single-line %r regex without slashes 170s is accepted 170s a single-line %r regex with slashes 170s is accepted 170s a multi-line `//` regex without slashes 170s registers an offense 170s a multi-line `//` regex with slashes 170s registers an offense 170s a multi-line %r regex with slashes 170s is accepted 170s a single-line `//` regex with slashes 170s registers an offense 170s a multi-line %r regex without slashes 170s is accepted 170s when PercentLiteralDelimiters is configured with brackets 170s respects the configuration when autocorrecting 170s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 170s when using `%r` regexp with `EnforcedStyle: mixed` 170s registers an offense when used as a safe navigation method argument 170s registers an offense when not used as a method argument 170s registers an offense when using a regexp starts with a blank 170s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 170s registers an offense when used as a method argument 170s does not register an offense when using a regexp starts with a blank as a method argument 170s when using `%r` regexp with `EnforcedStyle: slashes` 170s registers an offense when used as a safe navigation method argument 170s registers an offense when not used as a method argument 170s does not register an offense when using a regexp starts with a blank as a method argument 170s registers an offense when using a regexp starts with a blank 170s registers an offense when used as a method argument 170s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 170s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 170s when using `%r` regexp with `EnforcedStyle: slashes` 170s does not register an offense when used as a method argument 170s does not register an offense when used as a safe navigation method argument 170s registers an offense when not used as a method argument 170s when using `%r` regexp with `EnforcedStyle: mixed` 170s registers an offense when not used as a method argument 170s does not register an offense when used as a safe navigation method argument 170s does not register an offense when used as a method argument 170s 170s RuboCop::Cop::Badge 170s exposes department name 170s exposes cop name 170s can be converted to a string with the Department/CopName format 170s compares by value 170s .for 170s parses cop class name 170s parses cop class name 170s parses cop class name 170s parses cop class name 170s parses cop class name 170s .parse 170s parses identifier 170s parses identifier 170s parses identifier 170s parses identifier 170s parses identifier 170s parses identifier 170s #camel_case 170s converts "foo_bar" to CamelCase 170s converts "lint" to CamelCase 170s converts "rspec" to CamelCase 170s #qualified? 170s says `Department/CopName` is qualified 170s says `Deep/Department/CopName` is qualified 170s says `CopName` is not qualified 170s .new 170s assigns department 170s assigns name 170s assigns department 170s assigns name 170s assigns name 170s assigns department 170s assigns department 170s assigns name 170s 170s RuboCop::Cop::Style::Alias 170s when EnforcedStyle is prefer_alias_method 170s does not register an offense for alias with gvars 170s registers an offense for alias with symbol args 170s does not register an offense for alias_method 170s does not register an offense for alias in an instance_eval block 170s registers an offense for alias with bareword args 170s when EnforcedStyle is prefer_alias 170s does not register an offense for alias_method in a block 170s does not register an offense for alias_method with non-literal constant argument 170s does not register an offense for alias_method with explicit receiver 170s registers an offense for alias with symbol args 170s registers an offense for alias_method at the top level 170s registers an offense for alias_method in a module block 170s does not register an offense for alias with bareword args 170s does not register an offense for alias_method in self.method def 170s does not register an offense for alias_method with non-literal method call argument 170s does not register an offense for alias_method in a method def 170s does not register an offense for alias in an instance_eval block 170s registers an offense for alias_method in a class block 170s 170s RuboCop::Cop::VariableForce::Scope 170s .new 170s when lvasgn node is passed 170s accepts that as top level scope 170s when begin node is passed 170s accepts that as top level scope 170s #body_node 170s when the scope is block 170s returns the body node 170s when the scope is singleton class 170s returns the body node 170s when the scope is class 170s returns the body node 170s when the scope is top level 170s returns the body node 170s when the scope is module 170s returns the body node 170s when the scope is singleton method 170s returns the body node 170s when the scope is instance method 170s returns the body node 170s #include? 170s with descendant node the scope does not include 170s is expected to equal false 170s with node of the scope itself 170s is expected to equal false 170s with ancestor node the scope does not include 170s is expected to equal false 170s with child node the scope includes 170s is expected to equal true 170s with child node the scope does not include 170s is expected to equal false 170s #name 170s when the scope is instance method definition 170s returns the method name 170s when the scope is singleton method definition 170s returns the method name 170s #each_node 170s outer scope boundary handling 170s when the scope is block 170s yields the argument and the body nodes 170s when the scope is module 170s yields the body nodes 170s when the scope is top level 170s yields the body nodes 170s when the scope is class 170s yields the body nodes 170s when the scope is instance method 170s yields the argument and the body nodes 170s when the scope is singleton class 170s yields the body nodes 170s when the scope is singleton method 170s yields the argument and the body nodes 170s inner scope boundary handling 170s when there's a singleton method definition 170s yields only the defs node and the method host node 170s when there's a method invocation with block 170s yields only the block node and the child send node 170s 170s RuboCop::Cop::Style::SingleArgumentDig 170s when without a receiver 170s does not register an offense 170s >= Ruby 2.7 170s when using dig with arguments forwarding 170s does not register an offense 170s dig over literal 170s with single argument 170s registers an offense and corrects unsuitable use of dig 170s when using dig with splat operator 170s does not register an offense 170s with multiple arguments 170s does not register an offense 170s dig over a variable as caller 170s with single argument 170s registers an offense and corrects unsuitable use of dig 170s when using multiple `dig` in a method chain 170s registers and corrects an offense 170s when using dig with splat operator 170s does not register an offense 170s with multiple arguments 170s does not register an offense 170s 170s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 170s does not register an offense when using eval-type method without string interpolation 170s does not register an offense when using eval-type method with string interpolation with comment docs 170s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 170s registers an offense when using eval-type method with string interpolation without comment docs 170s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 170s block comment outside heredoc 170s does not register an offense when using other text 170s does not register an offense for a matching block comment before the heredoc 170s does not register an offense for a matching block comment after the heredoc 170s does not register an offense when using multiple methods 170s registers an offense if the comment does not match the method 170s does not register an offense when using inline comments 170s block comment in heredoc 170s does not register an offense for a matching block comment 170s does not register an offense when using other text 170s registers an offense if the comment does not match the method 170s does not evaluate comments if there is no interpolation 170s does not register an offense when using inline comments 170s does not register an offense when using multiple methods 170s does not register an offense when using multiple methods with split comments 170s 170s RuboCop::Cop::Style::BeginBlock 170s reports an offense for a BEGIN block 170s 170s RuboCop::CLI --auto-gen-config 170s --auto-gen-config 171s generates a todo list that removes the reports 171s honors rubocop:disable comments 171s generates Exclude instead of Max when --auto-gen-only-exclude is used 171s does not include a timestamp when --no-auto-gen-timestamp is used 171s can be called when there are no files to inspection 171s generates EnforcedStyle parameter if it solves all offenses 171s does not generate configuration for the Syntax cop 171s does not include offense counts when --no-offense-counts is used 171s generates Exclude if no EnforcedStyle solves all offenses 171s overwrites an existing todo file 171s can generate Exclude properties with a given limit 172s can generate a todo list 172s includes --auto-gen-only-exclude in the command comment when given 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 is empty 172s bases other cops' configuration on the code base's current maximum line length 172s when hash value omission enabled 172s generates Exclude if it solves all offenses 172s when working in a subdirectory 172s can generate a todo list 172s when .rubocop.yml inherits only from .rubocop_todo.yml 172s bases other cops' configuration on the code base's current maximum line length 172s when --config is used 172s can generate a todo list if default .rubocop.yml exists 172s can generate a todo list 172s when .rubocop.yml inherits from another file 173s bases other cops' configuration on the code base's current maximum line length 173s when .rubocop.yml doesn't inherit 173s bases other cops' configuration on the code base's current maximum line length 173s when existing config file has a YAML document start header 173s inserts `inherit_from` key after hearder 173s when different styles appear in different files 173s disables cop if --exclude-limit is exceeded 173s generates Exclude list if --exclude-limit is not exceeded 173s for existing configuration with Exclude 173s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 173s generates Excludes that appear in .rubocop.yml 174s leaves out Excludes that appear in .rubocop.yml but are merged globally 174s when .rubocop.yml does not exist 174s bases other cops' configuration on the code base's current maximum line length 174s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 174s bases other cops' configuration on the code base's current maximum line length 174s when .rubocop.yml inherits from two other files 174s bases other cops' configuration on the code base's current maximum line length 174s console output 174s displays report summary but no offenses 174s when cop is not safe to autocorrect 174s can generate a todo list, with the appropriate flag 174s with Layout/LineLength:Max overridden 174s when .rubocop.yml has Layout/LineLength:Max less than code base max 174s bases other cops' configuration on the overridden LineLength:Max 174s when .rubocop.yml has Layout/LineLength:Max more than code base max 174s bases other cops' configuration on the overridden LineLength:Max 174s when .rubocop.yml has Layout/LineLength disabled 174s skips the cop from both phases of the run 174s when inheriting from a URL 174s when there is a single entry 174s can generate a todo list 174s when there are multiple entries 175s can generate a todo list 175s when working with a cop who do not support autocorrection 175s can generate a todo list 175s when --no-exclude-limit is given 175s always prefers Exclude to Enabled 175s when duplicated default configuration parameter 175s parameters are displayed without duplication 175s 175s RuboCop::Cop::Style::UnlessLogicalOperators 175s EnforcedStyle is `forbid_mixed_logical_operators` 175s does not register an offense when using only `and`s 175s does not register an offense when not used in unless 175s does not register an offense when not using logical operator 175s does not register an offense when using only `&&`s 175s registers an offense when using `||` and `and` 175s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 175s does not register an offense when using if 175s registers an offense when using `&&` and `and` 175s does not register an offense when using only `or`s 175s registers an offense when using parentheses 175s registers an offense when using `&&` and `or` 175s registers an offense when using `&&` and `||` 175s does not register an offense when using only `||`s 175s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 175s registers an offense when using `||` and `or` 175s EnforcedStyle is `forbid_logical_operators` 175s registers an offense when using only `||` 175s registers an offense when using only `&&` 175s registers an offense when using only `and` 175s does not register an offense when not used in unless 175s registers an offense when using `&&` followed by || 175s registers an offense when using only `or` 175s does not register an offense when not using logical operator 175s does not register an offense when using if 175s 175s RuboCop::Cop::Layout::ClassStructure 175s registers an offense and corrects when xstr heredoc constant is defined after public method 175s registers an offense and corrects when there is a comment in the macro method 175s registers an offense and corrects when str heredoc constant is defined after public method 175s registers an offense and corrects when literal constant is after method definitions 175s registers an offense and corrects when dstr heredoc constant is defined after public method 175s with a complete ordered example 175s does not create offense 175s with protected methods declared before private 175s is expected to eq class MyClass 175s def public_method 175s end 175s 175s private 175s 175s def first_private...ar before `private_methods`. 175s end 175s 175s def second_protected_method 175s end 175s end 175s simple example 175s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 175s initializer is private and comes after attribute macro 175s registers an offense and autocorrects 175s constant is not a literal 175s registers offense but does not autocorrect 175s when def modifier is used 175s registers an offense and corrects public method without modifier declared after private method with modifier 175s registers an offense and corrects public method after private method marked by its name 175s registers an offense and corrects public method with modifier declared after private method with modifier 175s with attribute macros before after validations 175s is expected to eq class Person 175s include AnotherModule 175s extend SomeModule 175s 175s CustomError = Cla...rivate :other_public_method 175s 175s private 175s 175s def some_private_method 175s end 175s end 175s when the first line ends with a comment 175s reports an offense and swaps the lines 175s 175s RuboCop::Cop::Style::EmptyMethod 175s when configured with expanded style 175s with an empty instance method definition 175s registers an offense for single line method 175s allows multi line method with blank line 175s allows multi line method 175s with an empty class method definition 175s allows multi line method with a blank line 175s registers an offense for single line method 175s allows empty multi line method 175s with a non-empty class method definition 175s allows multi line method 175s allows single line method 175s allows multi line method with comment 175s when method is nested in class scope 175s registers an offense for single line method 175s relation with Layout/LineLength 175s still corrects even if the method is longer than the configured Max 175s with a non-empty instance method definition 175s allows single line method 175s allows multi line method 175s allows multi line method with a comment 175s when configured with compact style 175s relation with Layout/LineLength 175s when the correction would exceed the configured maximum 175s reports an offense but does not correct 175s when that cop is disabled 175s corrects to long lines 175s with a non-empty instance method definition 175s allows multi line method 175s allows single line method 175s allows multi line method with comment 175s with a non-empty class method definition 175s allows multi line method with comment 175s allows multi line method 175s allows single line method 175s with an empty instance method definition 175s registers an offense for method with arguments without parens 175s registers an offense for method with closing paren on following line 175s registers an offense for method with blank line 175s registers an offense for method with arguments 175s registers an offense for empty method 175s allows single line method 175s with an empty class method definition 175s registers an offense for method with blank line 175s allows single line method 175s registers an offense for empty method with arguments 175s registers an offense for empty method 175s 175s RuboCop::Options 175s options precedence 175s .rubocop directory 175s is ignored and command line options are used 175s RUBOCOP_OPTS environment variable 175s has higher precedence then options from .rubocop file 175s has lower precedence then command line options 175s .rubocop file 175s has lower precedence then options from RUBOCOP_OPTS env variable 175s has lower precedence then command line options 175s option 175s --raise-cop-error 175s raises cop errors 175s --exclude-limit 175s fails if given alone without argument 175s fails if given without --auto-gen-config 175s fails if given first without argument 175s fails if given last without argument 175s --fix-layout 175s sets some autocorrect options 175s -s/--stdin 175s fails if more than one path is given 175s fails if no paths are given 175s succeeds with exactly one path 175s --autocorrect-all 175s sets some autocorrect options 175s --auto-gen-config 175s accepts other options 175s --fail-level 175s accepts full severity names 175s accepts the "fake" severities A/autocorrect 175s accepts severity initial letters 175s --display-only-fail-level-offenses 175s fails if given with an autocorrect argument 175s --no-parallel 175s disables parallel from file 175s deprecated options 175s --auto-correct-all 175s emits a warning and sets the correct options instead 175s --safe-auto-correct 175s emits a warning and sets the correct options instead 175s --auto-correct 175s emits a warning and sets the correct options instead 175s --display-only-correctable 175s fails if given with an autocorrect argument 175s fails if given with --display-only-failed 175s --display-only-failed 175s works if given with --format junit 175s fails if given without --format junit 175s --auto-gen-only-exclude 175s fails if given without --auto-gen-config 175s --require 175s requires the passed path 175s --cache-root 175s fails if also `--cache false` is given 175s fails if no argument is given 175s accepts a path as argument 175s --regenerate-todo 175s when todo options are overridden before --regenerate-todo 175s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 175s when no other options are given 175s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 175s when todo options are overridden after --regenerate-todo 175s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 175s when disabled options are overridden to be enabled 175s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 175s --autocorrect 175s Specify only --autocorrect 175s sets some autocorrect options 175s Specify --autocorrect and --autocorrect-all 175s emits a warning and sets some autocorrect options 175s incompatible cli options 175s rejects using -v with --show-cops 175s rejects using -v with -V 175s rejects using -V with --show-cops 175s mentions all incompatible options when more than two are used 175s --disable-uncorrectable 175s accepts together with an unsafe autocorrect argument 175s accepts together with a safe autocorrect argument 175s fails if given without an autocorrect argument 175s --cache 175s accepts false as argument 175s fails if unrecognized argument is given 175s accepts true as argument 175s fails if no argument is given 175s -h/--help 175s exits cleanly 175s shows help text 175s lists all builtin formatters 175s --parallel 175s combined with an autocorrect argument 175s combined with --autocorrect-all 175s allows --parallel 175s combined with --fix-layout 175s allows --parallel 175s combined with --autocorrect 175s allows --parallel 175s combined with --auto-gen-config 175s ignores --parallel 175s combined with --cache false 175s ignores --parallel 175s combined with --fail-fast 175s ignores --parallel 175s combined with two incompatible arguments 175s ignores --parallel and lists both incompatible arguments 175s 175s RuboCop::Config 175s #patterns_to_include 175s when config file has AllCops => Include key 175s returns the Include value 175s #file_to_include? 175s when the passed path does not match any of patterns to include 175s returns false 175s when the passed path matches any of patterns to include 175s returns true 175s #file_to_exclude? 175s when the passed path does not match any of patterns to exclude 175s returns false 175s when the passed path matches any of patterns to exclude 175s returns true 175s #possibly_include_hidden? 175s returns true when Include config includes a regex 175s returns true when Include config only includes regular paths 175s returns true when Include config includes a dotfile in a path 175s returns true when Include config includes a toplevel dotfile 175s #deprecation_check 175s when there is AllCops configuration 175s if there are is an Excludes key 175s yields 175s if there are no Excludes or Includes keys 175s does not yield 175s if there are is an Includes key 175s yields 175s when there is no AllCops configuration 175s does not yield 175s #for_badge 175s works if department has no config 175s takes into account the department 175s #make_excludes_absolute 175s when config is in root directory 175s generates valid absolute directory 175s when config is in subdirectory 175s generates valid absolute directory 175s #allowed_camel_case_file? 175s when the passed path does not match allowed camel case patterns to include 175s is expected to equal false 175s when the passed path matches allowed camel case patterns to include 175s is expected to equal true 175s when the passed path is a gemspec 175s is expected to equal true 175s #validate 175s when the configuration includes obsolete parameters and cops 175s raises validation error 175s when the configuration includes multiple valid enforced styles 175s does not raise validation error 175s when the configuration includes a valid enforced style 175s does not raise validation error 175s when the configuration includes multiple but config does not allow 175s raises validation error 175s when all cops are both Enabled and Disabled by default 175s raises validation error 175s when the configuration includes an obsolete EnforcedStyle parameter 175s raises validation error 175s when the empty section is AllCops 175s raises validation error 175s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 175s raises validation error 175s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 175s there are no unrecognized cops 175s does not print any warnings 175s there is unrecognized cop 175s prints a warning about the cop 175s conflicting Safe settings 175s when the configuration includes an unsafe cop without a declaration of its autocorrection 175s does not raise validation error 175s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 175s raises validation error 175s when the configuration includes any unrecognized parameter 175s prints a warning message 175s when the configuration includes multiple valid enforced styles and one invalid style 175s raises validation error 175s when the configuration includes an invalid enforced style 175s raises validation error 175s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 175s raises validation error 175s when the configuration includes any common parameter 175s does not raise validation error 175s when the configuration includes Lint/Syntax cop 175s when the configuration does not match the default 175s raises validation error 175s when the configuration matches the default 175s does not raise validation error 175s when the configuration includes an invalid EnforcedStyle 175s raises validation error 175s when the configuration is in the base RuboCop config folder 175s is not validated 175s when the configuration includes a valid EnforcedStyle 175s does not raise validation error 175s when the configuration includes an empty section 175s raises validation error 175s when the configuration includes an obsolete cop 175s raises validation error 175s when the configuration includes any unrecognized cop name 175s raises an validation error 175s when the configuration includes multiple invalid enforced styles 175s raises validation error 175s when the configuration includes an obsolete parameter 175s raises validation error 175s #patterns_to_exclude 175s when config file has AllCops => Exclude key 175s returns the Exclude value 175s #check 175s when a deprecated configuration is detected 175s prints a warning message for the loaded path 175s #for_department 175s accepts a Symbol 175s always returns the department's config 175s whether the cop is enabled 175s when an entire cop department is disabled 175s but an individual cop is enabled 175s the cop setting overrides the department 175s when an nested cop department is disabled 175s but an individual cop is enabled 175s the cop setting overrides the department 175s and an individual cop is not specified 175s the cop setting overrides the department 175s when configuration has no mention of a cop 175s enables the cop that is not mentioned 175s when all cops are explicitly enabled by default 175s enables the cop that is not mentioned 175s when all cops are disabled by default 175s disables the cop that is not mentioned 175s when a cop has configuration but no explicit Enabled setting 175s enables the cop by default 175s when an entire cop department is enabled 175s but an individual cop is disabled 175s still disables the cop 175s 175s RuboCop::Cop::Lint::UselessSetterCall 175s accepts exception assignments without exploding 175s is not confused by operators ending with = 175s when a lvar declared as an argument is no longer the passed object at the end of the method 175s registers an offense and corrects for the setter call on the lvar 175s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 175s registers an offense and corrects 175s with method ending with ivar assignment 175s accepts 175s with singleton method ending with setter call on local object 175s registers an offense and corrects 175s when a lvar contains an object passed as argument at the end of the method 175s accepts the setter call on the lvar 175s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 175s registers an offense and corrects 175s when a lvar contains a local object instantiated with literal 175s registers an offense and corrects for the setter call on the lvar 175s with method ending with setter call on local object 175s registers an offense and corrects 175s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 175s accepts the setter call on the lvar 175s with method ending with setter call on ivar 175s accepts 175s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 175s accepts the setter call on the lvar 175s with method ending with setter call on argument 175s accepts 175s with method ending with square bracket setter on local object 175s registers an offense and corrects 175s when a lvar contains a non-local object returned by a method 175s accepts 175s 175s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 175s when an underscore-prefixed variable is captured by a block 175s accepts 175s in a method calling `super` with arguments 175s when an underscore-prefixed argument is not used 175s does not register an offense 175s when an underscore-prefixed argument is used explicitly 175s registers an offense 175s when an underscore-prefixed block argument is used 175s registers an offense 175s registers an offense 175s when an underscore-prefixed variable is used 175s registers an offense 175s when an underscore-prefixed method argument is used 175s registers an offense 175s when an underscore-prefixed named capture variable is used 175s registers an offense 175s in a method calling `binding` without arguments 175s when an underscore-prefixed argument is not used explicitly 175s does not register an offense 175s when an underscore-prefixed argument is used explicitly 175s registers an offense 175s when an underscore-prefixed variable in top-level scope is used 175s registers an offense 175s when an underscore-prefixed keyword block argument is used 175s registers an offense 175s when AllowKeywordBlockArguments is set 175s does not register an offense 175s in a method calling `binding` with arguments 175s when an underscore-prefixed argument is used explicitly 175s registers an offense 175s when an underscore-prefixed argument is not used 175s does not register an offense 175s when non-underscore-prefixed variable is used 175s does not register an offense 175s when an underscore-prefixed variable is reassigned 175s does not register an offense 175s in a method calling `super` without arguments 175s when an underscore-prefixed argument is not used explicitly 175s does not register an offense 175s when an underscore-prefixed argument is used explicitly 175s registers an offense 175s 175s RuboCop::Cop::Style::TrivialAccessors 176s accepts reader nested within an instance_eval call 176s registers an offense on one-liner writer 176s accepts blocks 176s accepts splats 176s registers an offense on reader with `private` 176s accepts writer nested within a module 176s flags a reader inside a class, inside an instance_eval call 176s registers an offense on instance writer 176s accepts expressions within writer 176s accepts an initialize method looking like a writer 176s accepts writer using top level 176s registers an offense on writer without braces 176s accepts reader using top level 176s accepts expressions within reader 176s registers an offense on class reader 176s registers an offense on instance reader 176s accepts writer nested within an instance_eval call 176s accepts non-trivial reader 176s accepts writer with different ivar name 176s registers an offense on reader with braces 176s accepts writer in a module 176s accepts non-trivial writer 176s registers an offense on one-liner reader 176s registers an offense on class writer 176s accepts reader nested within a module 176s does not register an offense on DSL-style writer 176s accepts reader with different ivar name 176s with DSL denied 176s registers an offense on DSL-style writer 176s disallow predicates 176s does not accept predicate-like reader 176s allow predicates 176s accepts predicate-like reader 176s exact name match disabled 176s registers an offense when names mismatch in writer 176s registers an offense when names mismatch in reader 176s with allowed methods 176s accepts allowed reader 176s accepts allowed writer 176s with AllowPredicates: false 176s accepts allowed predicate 176s ignore class methods 176s accepts class writer 176s accepts class reader 176s 176s RuboCop::Cop::Layout::ArrayAlignment 176s when aligned with fixed indentation 176s accepts several elements per line 176s registers an offense and corrects misaligned array elements 176s accepts the first element being on a new row 176s accepts aligned array with fullwidth characters 176s accepts aligned array keys 176s does not indent heredoc strings when autocorrecting 176s autocorrects array within array with too little indentation 176s does not register an offense or try to correct parallel assignment 176s accepts single line array 176s autocorrects array within array with too much indentation 176s autocorrects misaligned array with the first element on a new row 176s when aligned with first parameter 176s autocorrects array within array with too little indentation 176s accepts aligned array keys 176s does not indent heredoc strings when autocorrecting 176s accepts single line array 176s registers an offense and corrects misaligned array elements 176s accepts the first element being on a new row 176s accepts aligned array with fullwidth characters 176s does not register an offense or try to correct parallel assignment 176s autocorrects misaligned array with the first element on a new row 176s autocorrects array within array with too much indentation 176s accepts several elements per line 176s 176s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 176s registers an offense when using `::RUBY_VERSION` 176s registers an offense when using `RUBY_VERSION` 176s does not register an offense when no `RUBY_VERSION` 176s 176s RuboCop::Cop::Lint::RedundantDirGlobSort 176s does not register an offense when not using `sort` for `Dir` 176s does not register an offense when using `sort` without a receiver 176s when Ruby 2.7 or lower 176s does not register an offense and correction when using `Dir[].sort.each do` 176s does not register an offense and correction when using `::Dir.glob.sort` 176s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 176s does not register an offense and correction when using `Dir.glob.sort` 176s when Ruby 3.0 or higher 176s does not register an offense when using `collection.sort` 176s registers an offense and correction when using `Dir.glob.sort` 176s does not register an offense when using `Dir.glob(*path).sort` 176s registers an offense and correction when using `Dir[].sort.each do` 176s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 176s does not register an offense when using `Dir[*path].sort` 176s registers an offense and correction when using `Dir[].sort.each(&do_something)` 176s does not register an offense when not using `sort` with `sort: false` option for `Dir` 176s registers an offense and correction when using `::Dir.glob.sort` 176s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 176s 176s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 176s does not register an offense when using `node.receiver` 176s does not register an offense when using `send_node.method_name` 176s registers an offense when using `node.send_node.receiver` 176s does not register an offense when using `node.method_name` 176s does not register an offense when using `node.send_node.arguments?` 176s registers an offense when using `node.send_node.method_name` 176s 176s RuboCop::Cop::Style::EmptyLiteral 176s Empty Hash 176s registers an offense for ::Hash.new 176s registers an offense for Hash.new 176s does not register an offense for ::Hash.new(3) 176s does not register an offense for Hash.new(3) 176s does not register an offense for Hash.new { block } 176s autocorrects Hash.new in block 176s autocorrects Hash.new to {} as the first parameter to a method 176s does not register an offense for ::Hash.new { block } 176s autocorrects Hash.new to {} as the only parameter to a method 176s registers an offense for Hash.new() 176s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 176s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 176s autocorrects Hash.new to {} in various contexts 176s Ruby 2.7 176s does not register an offense for Hash.new { _1[_2] = [] } 176s does not register an offense for ::Hash.new { _1[_2] = [] } 176s Empty Array 176s registers an offense for Array.new() 176s does not register Array.new with block in other block 176s does not register an offense for ::Array.new with block 176s does not register an offense for Array.new(3) 176s autocorrects Array.new in block in block 176s registers an offense for ::Array.new 176s registers an offense for Array.new 176s does not register an offense Array.new with block 176s Empty String 176s does not register an offense for ::String.new("top") 176s registers an offense for ::String.new 176s registers an offense for String.new 176s registers an offense for String.new() 176s does not register an offense for String.new("top") 176s when frozen string literals is enabled 176s does not register an offense for String.new 176s when double-quoted string literals are preferred 176s registers an offense for ::String.new 176s registers an offense for String.new 176s when Style/FrozenStringLiteral is enabled 176s and there is a frozen_string_literal: false comment 176s registers an offense and corrects 176s and there is no magic comment 176s does not register an offense 176s 176s RuboCop::Cop::Style::Not 176s does not register an offense for ! 176s parenthesizes when `not` is applied to or 176s parenthesizes when `not` would change the meaning of a binary exp 176s autocorrects "not" with ! 176s parenthesizes when `not` is applied to a ternary op 176s parenthesizes when `not` is applied to and 176s registers an offense for not 176s autocorrects "not" followed by parens with ! 176s uses the reverse operator when `not` is applied to a comparison 176s 176s RuboCop::Cop::Style::BarePercentLiterals 176s when EnforcedStyle is percent_q 176s and strings are dynamic 176s registers an offense for %() 176s accepts heredoc 176s accepts %q 176s accepts "" string with interpolation 176s accepts "" 176s accepts regular expressions 176s accepts '' 176s accepts __FILE__ 176s accepts %Q() 176s and strings are static 176s accepts "" 176s accepts "" string with interpolation 176s registers an offense for %() 176s accepts regular expressions 176s accepts %q 176s accepts %Q() 176s accepts '' 176s accepts heredoc 176s accepts __FILE__ 176s when EnforcedStyle is bare_percent 176s and strings are static 176s accepts "" string with interpolation 176s accepts %q 176s accepts heredoc 176s accepts "" 176s registers an offense for %Q() 176s accepts __FILE__ 176s accepts %() 176s accepts '' 176s accepts regular expressions 176s and strings are dynamic 176s accepts heredoc 176s accepts "" 176s accepts __FILE__ 176s accepts regular expressions 176s accepts %q 176s accepts '' 176s accepts "" string with interpolation 176s accepts %() 176s registers an offense for %Q() 176s 176s RuboCop::Cop::Layout::IndentationConsistency 176s with def/defs 176s registers an offense and corrects bad indentation in a defs body 176s accepts an empty def body 176s accepts an empty defs body 176s registers an offense and corrects bad indentation in a def body 176s with for 176s accepts an empty for 176s registers an offense and corrects bad indentation in a for body 176s with block 176s registers an offense and corrects bad indentation in a {} body 176s accepts a correctly indented block body 176s registers an offense and correct bad indentation in a do/end body 176s does not autocorrect an offense within another offense 176s accepts an empty block body 176s with case 176s accepts correctly indented case/when/else 176s accepts indented when/else plus indented body 176s registers an offense and corrects bad indentation in a case/when body 176s accepts case/when/else with then beginning a line 176s accepts case/when/else laid out as a table 176s registers an offense and corrects bad indentation in a case/else body 176s with top-level code 176s accepts when using access modifier at the top level 176s accepts an empty expression string interpolation 176s registers and corrects an offense when using access modifier and indented method definition at the top level 176s with while/until 176s accepts an empty while 176s registers an offense and corrects bad indentation in an until body 176s registers an offense and corrects bad indentation in a while body 176s registers an offense and corrects bad indentation in begin/end/while 176s with unless 176s accepts an empty unless 176s registers an offense and corrects bad indentation in an unless body 176s with if statement 176s accepts an if/else in assignment with end aligned with variable and chaining after the end 176s registers an offense and corrects bad indentation in an if body 176s accepts a correctly aligned if/elsif/else/end 176s accepts a one line if statement 176s accepts an empty if 176s accepts if/elsif/else/end with fullwidth characters 176s registers an offense and corrects bad indentation in an elsif body 176s accepts an if/else in assignment on next line with end aligned with if 176s accepts if/then/else/end laid out as another table 176s registers an offense and corrects bad indentation in an else body 176s accepts an if in assignment with end aligned with if 176s accepts an if/else in assignment with end aligned with variable 176s accepts an if/else in assignment with end aligned with if 176s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 176s accepts an if in assignment with end aligned with variable 176s accepts an if/else branches with rescue clauses 176s accepts if/elsif/else/end laid out as a table 176s with module 176s accepts an empty module body 176s registers an offense and corrects bad indentation of private methods 176s registers an offense and corrects bad indentation in a module body 176s even when there are no public methods 176s registers an offense and corrects bad indentation of private methods 176s with class 176s with indented_internal_methods style configured 176s accepts different indentation in different visibility sections when using `Struct.new` 176s accepts different indentation in different visibility sections 176s with normal style configured 176s registers an offense and corrects bad indentation in a class body 176s accepts indented public, protected, and private 176s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 176s accepts an empty class body 176s 176s RuboCop::Cop::Style::UnlessElse 176s unless with else 176s registers an offense 176s and nested unless with else 176s registers offenses for both but corrects only the outer unless/else 176s unless without else 176s does not register an offense 176s unless with nested if-else 176s registers an offense 176s 176s RuboCop::Cop::Lint::UselessAccessModifier 176s behaves like nested in a begin..end block 176s still flags repeated `private` 176s doesn't flag an access modifier from surrounding scope 176s behaves like unused visibility modifiers 176s registers an offense and corrects when visibility is immediately changed without any intervening defs 176s behaves like def in new block 176s doesn't register an offense if a method is defined in Struct.new 176s registers an offense if no method is defined in Struct.new 176s behaves like non-repeated visibility modifiers 176s doesn't register an offense when `protected` is not repeated 176s registers an offense and corrects even when `public` is not repeated 176s doesn't register an offense when `private` is not repeated 176s behaves like at the end of the body 176s registers an offense for trailing `protected` 176s behaves like at the end of the body 176s registers an offense for trailing `protected` 176s when private_class_method is used without arguments 176s registers an offense and corrects 176s when using inline modifiers 176s does not register an offense 176s behaves like def in new block 176s doesn't register an offense if a method is defined in ::Struct.new 176s registers an offense if no method is defined in ::Struct.new 176s behaves like def in new block 176s doesn't register an offense if a method is defined in Module.new 176s registers an offense if no method is defined in Module.new 176s behaves like method defined using instance_eval 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined 176s inside a class 176s registers an offense when a modifier is outside the block and a method is defined only inside the block 176s registers two offenses when a modifier is inside and outside the and no method is defined 176s behaves like def in new block 176s doesn't register an offense if a method is defined in ::Struct.new 176s registers an offense if no method is defined in ::Struct.new 176s behaves like def in new block 176s registers an offense if no method is defined in Module.new 176s doesn't register an offense if a method is defined in Module.new 176s behaves like repeated visibility modifiers 176s registers an offense when `public` is repeated 176s behaves like nested in a begin..end block 176s doesn't flag an access modifier from surrounding scope 176s still flags repeated `protected` 176s when an access modifier is followed by a class method defined on constant 176s registers an offense and corrects 176s behaves like methods defined in an iteration 176s doesn't register an offense for map 176s doesn't register an offense for each 176s behaves like method defined with define_method 176s doesn't register an offense if a proc is passed 176s doesn't register an offense if a block is passed 176s doesn't register an offense if a -> is passed 176s doesn't register an offense if a lambda is passed 176s behaves like conditionally defined method 176s doesn't register an offense for if 176s doesn't register an offense for unless 176s behaves like nested in a begin..end block 176s still flags repeated `private` 176s doesn't flag an access modifier from surrounding scope 176s behaves like nested modules 176s doesn't register an offense for nested modules 176s unused modifiers 176s registers an offense with a nested module 176s registers an offense when outside a nested module 176s registers an offense when inside a nested module 176s behaves like method named by access modifier name 176s does not register an offense for `public` 176s behaves like method defined with define_method 176s doesn't register an offense if a lambda is passed 176s doesn't register an offense if a block is passed 176s doesn't register an offense if a proc is passed 176s doesn't register an offense if a -> is passed 176s behaves like unused visibility modifiers 176s registers an offense and corrects when visibility is immediately changed without any intervening defs 176s when using a known method-creating method 176s is aware that this creates a new method 176s still points out redundant uses within the module 176s behaves like at the end of the body 176s registers an offense for trailing `private` 176s when a def is an argument to a method call 176s does not register an offense 176s behaves like method named by access modifier name 176s does not register an offense for `protected` 176s behaves like conditionally defined method 176s doesn't register an offense for if 176s doesn't register an offense for unless 176s behaves like at the top of the body 176s doesn't register an offense for `protected` 176s registers an offense and corrects for `public` 176s doesn't register an offense for `private` 176s behaves like method named by access modifier name 176s does not register an offense for `protected` 176s behaves like def in new block 176s doesn't register an offense if a method is defined in Class.new 176s registers an offense if no method is defined in Class.new 176s behaves like method defined on a singleton class 176s inside a class 176s registers an offense even if a non-singleton-class method is defined 176s registers an offense if no method is defined 176s registers an offense if no method is defined after the modifier 176s doesn't register an offense if the modifier is the same as outside the meta-class 176s doesn't register an offense if a method is defined 176s outside a class 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined after the modifier 176s registers an offense if no method is defined 176s behaves like methods defined in an iteration 176s doesn't register an offense for each 176s doesn't register an offense for map 176s behaves like method defined on a singleton class 176s inside a class 176s registers an offense even if a non-singleton-class method is defined 176s doesn't register an offense if the modifier is the same as outside the meta-class 176s registers an offense if no method is defined after the modifier 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined 176s outside a class 176s registers an offense if no method is defined 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined after the modifier 176s when an access modifier has no effect 176s registers an offense and corrects 176s behaves like nested in a begin..end block 176s still flags repeated `public` 176s behaves like nested in a begin..end block 176s still flags repeated `protected` 176s doesn't flag an access modifier from surrounding scope 176s behaves like at the end of the body 176s registers an offense for trailing `public` 176s when an access modifier is followed by attr_* 176s does not register an offense 176s when only a constant or local variable is defined after the modifier 176s registers an offense and corrects 176s registers an offense and corrects 176s behaves like def in new block 176s registers an offense if no method is defined in Struct.new 176s doesn't register an offense if a method is defined in Struct.new 176s behaves like methods defined in an iteration 176s doesn't register an offense for each 176s doesn't register an offense for map 176s when multiple class definitions in file but only one has offense 176s registers an offense and corrects 176s behaves like method named by access modifier name 176s does not register an offense for `private` 176s behaves like def in new block 176s registers an offense if no method is defined in Class.new 176s doesn't register an offense if a method is defined in Class.new 176s behaves like nested in a begin..end block 176s still flags repeated `public` 176s behaves like conditionally defined method 176s doesn't register an offense for unless 176s doesn't register an offense for if 176s when there are consecutive access modifiers 176s registers an offense and corrects 176s behaves like repeated visibility modifiers 176s registers an offense when `public` is repeated 176s behaves like at the end of the body 176s registers an offense for trailing `public` 176s behaves like method defined using instance_eval 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined 176s inside a class 176s registers an offense when a modifier is outside the block and a method is defined only inside the block 176s registers two offenses when a modifier is inside and outside the and no method is defined 176s when class is empty save modifier 176s registers an offense and corrects 176s behaves like def in new block 176s doesn't register an offense if a method is defined in ::Module.new 176s registers an offense if no method is defined in ::Module.new 176s when passing method as symbol 176s does not register an offense 176s behaves like def in new block 176s doesn't register an offense if a method is defined in ::Class.new 176s registers an offense if no method is defined in ::Class.new 176s behaves like nested modules 176s doesn't register an offense for nested classs 176s unused modifiers 176s registers an offense when outside a nested class 176s registers an offense when inside a nested class 176s registers an offense with a nested class 176s when using ActiveSupport behavior when Rails is not eabled 176s reports offenses and corrects 176s behaves like method defined on a singleton class 176s inside a class 176s doesn't register an offense if a method is defined 176s registers an offense even if a non-singleton-class method is defined 176s doesn't register an offense if the modifier is the same as outside the meta-class 176s registers an offense if no method is defined 176s registers an offense if no method is defined after the modifier 176s outside a class 176s registers an offense if no method is defined after the modifier 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined 176s behaves like method defined with define_method 176s doesn't register an offense if a lambda is passed 176s doesn't register an offense if a proc is passed 176s doesn't register an offense if a block is passed 176s doesn't register an offense if a -> is passed 176s behaves like repeated visibility modifiers 176s registers an offense when `protected` is repeated 176s when an access modifier has no methods 176s registers an offense and corrects 176s behaves like def in new block 176s registers an offense if no method is defined in ::Class.new 176s doesn't register an offense if a method is defined in ::Class.new 176s behaves like repeated visibility modifiers 176s registers an offense when `private` is repeated 176s behaves like method named by access modifier name 176s does not register an offense for `public` 176s behaves like nested modules 176s doesn't register an offense for nested modules 176s unused modifiers 176s registers an offense with a nested module 176s registers an offense when inside a nested module 176s registers an offense when outside a nested module 176s behaves like repeated visibility modifiers 176s registers an offense when `private` is repeated 176s behaves like method named by access modifier name 176s does not register an offense for `private` 176s behaves like repeated visibility modifiers 176s registers an offense when `protected` is repeated 176s behaves like non-repeated visibility modifiers 176s doesn't register an offense when `private` is not repeated 176s doesn't register an offense when `protected` is not repeated 176s registers an offense and corrects even when `public` is not repeated 176s when using the class_methods method from ActiveSupport::Concern 176s is aware that this creates a new scope 176s behaves like def in new block 176s doesn't register an offense if a method is defined in ::Module.new 176s registers an offense if no method is defined in ::Module.new 176s when private_class_method is used with arguments 176s does not register an offense 176s behaves like at the top of the body 176s doesn't register an offense for `protected` 176s doesn't register an offense for `private` 176s registers an offense and corrects for `public` 176s behaves like method defined using class_eval 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined 176s inside a class 176s registers two offenses when a modifier is inside and outside the block and no method is defined 176s registers an offense when a modifier is outside the block and a method is defined only inside the block 176s behaves like conditionally defined method 176s doesn't register an offense for unless 176s doesn't register an offense for if 176s behaves like nested modules 176s doesn't register an offense for nested classs 176s unused modifiers 176s registers an offense when outside a nested class 176s registers an offense when inside a nested class 176s registers an offense with a nested class 176s behaves like at the end of the body 176s registers an offense for trailing `private` 176s behaves like method defined on a singleton class 176s inside a class 176s doesn't register an offense if the modifier is the same as outside the meta-class 176s registers an offense if no method is defined 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined after the modifier 176s registers an offense even if a non-singleton-class method is defined 176s outside a class 176s doesn't register an offense if a method is defined 176s registers an offense if no method is defined after the modifier 176s registers an offense if no method is defined 176s behaves like method defined using class_eval 176s registers an offense if no method is defined 176s doesn't register an offense if a method is defined 176s inside a class 176s registers an offense when a modifier is outside the block and a method is defined only inside the block 176s registers two offenses when a modifier is inside and outside the block and no method is defined 176s behaves like method defined with define_method 176s doesn't register an offense if a lambda is passed 176s doesn't register an offense if a -> is passed 176s doesn't register an offense if a block is passed 176s doesn't register an offense if a proc is passed 176s behaves like methods defined in an iteration 176s doesn't register an offense for map 176s doesn't register an offense for each 176s when using ActiveSupport's `concerning` method 176s still points out redundant uses within the block 176s is aware that this creates a new scope 176s Ruby 2.7 176s still points out redundant uses within the block 176s 176s RuboCop::TargetFinder 176s #target_files_in_dir 176s picks files specified to be included in config 176s does not pick directories 176s picks ruby executable files with no extension 176s picks files with extension .rb 176s does not pick files with no extension and no ruby shebang 176s does not pick files specified to be excluded in config 176s w/ --fail-fast option 176s works with the expected number of .rb files 176s when an exception is raised while reading file 176s and debug mode is disabled 176s outputs nothing 176s and debug mode is enabled 176s outputs error message 176s #find_files 176s works also if a folder is named "**" 176s can exclude symlinks as well as directories 176s prevents infinite loops when traversing symlinks 176s works also if a folder is named "," 176s does not search excluded top level directories 176s resolves symlinks when looking for excluded directories 176s works also if a folder is named "{}" 176s #find(..., :all_file_types) 176s returns absolute paths 176s does not find hidden files 176s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 176s includes them 176s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 176s includes them 176s when a non-ruby file is passed 176s picks the file 176s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 176s when it's forced to adhere file exclusion configuration 176s excludes them 176s normally 176s does not exclude them 176s when same paths are passed 176s does not return duplicated file paths 176s when no argument is passed 176s finds files under the current directory 176s when input is passed on stdin 176s includes the file 176s when a hidden directory path is passed 176s finds files under the specified directory 176s when a pattern is passed 176s finds files which match the pattern 176s when a directory path is passed 176s finds files under the specified directory 176s when a file with a ruby filename is passed 176s picks all the ruby files 176s when files with ruby interpreters are passed 176s picks all the ruby files 176s when files with a ruby extension are passed 176s picks all the ruby files 176s when local AllCops/Include lists two patterns 176s picks all the ruby files 176s when a subdirectory AllCops/Include only lists one pattern 176s picks all the ruby files 176s #find(..., :only_recognized_file_types) 176s returns absolute paths 176s does not find hidden files 176s when a hidden directory path is passed 176s finds files under the specified directory 176s when a pattern is passed 176s finds files which match the pattern 176s when input is passed on stdin 176s includes the file 176s when a file with a ruby filename is passed 176s picks all the ruby files 176s when files with ruby interpreters are passed 176s picks all the ruby files 176s when files with a ruby extension are passed 176s picks all the ruby files 176s when local AllCops/Include lists two patterns 176s picks two files 176s when a subdirectory AllCops/Include only lists one pattern 176s picks two files 176s when same paths are passed 176s does not return duplicated file paths 176s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 176s normally 176s does not exclude them 176s when it's forced to adhere file exclusion configuration 176s excludes them 176s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 176s includes them 176s when no argument is passed 176s finds files under the current directory 176s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 176s includes them 176s when a directory path is passed 176s finds files under the specified directory 176s when a hidden directory path is passed 176s finds files under the specified directory 176s when a non-ruby file is passed 176s doesn't pick the file 176s 176s RuboCop::Cop::Style::EmptyBlockParameter 176s registers an offense for an empty block parameter with lambda 176s accepts a non-empty block parameter with do-end style 176s accepts a block that is do-end style without parameter 176s accepts a non-empty block parameter with {} style 176s accepts an empty block parameter with a lambda 176s accepts a block that is {} style without parameter 176s registers an offense for an empty block parameter with {} style 176s registers an offense for an empty block parameter with do-end style 176s registers an offense for an empty block parameter with super 176s 176s RuboCop::Cop::Lint::EmptyClass 176s registers an offense for empty object metaclass 176s does not register an offense when class is not empty 176s registers an offense for empty class 176s registers an offense for empty class metaclass 176s registers an offense when empty metaclass contains only comments 176s does not register an offense when metaclass is not empty 176s does not register an offense when empty has a parent 176s when AllowComments is true 176s does not register an offense when empty metaclass contains only comments 176s does not register an offense when empty class contains only comments 176s 176s RuboCop::Cop::Style::Documentation 176s does not raise an error for an implicit match conditional 176s accepts non-empty module with documentation 176s accepts namespace class without documentation 176s accepts namespace class which defines constants 176s registers an offense for non-namespace 176s registers an offense for non-empty class 176s registers an offense for compact-style nested class 176s accepts non-empty class with comment that ends with an annotation 176s registers an offense if the comment line contains code 176s does not consider comment followed by empty line to be class documentation 176s accepts namespace module which defines constants 176s registers an offense for empty module without documentation 176s accepts empty class without documentation 176s registers offense for non-empty class with frozen string comment 176s registers an offense for non-empty class with directive comment 176s registers an offense for a deeply nested class 176s registers an offense for compact-style nested module 176s registers an offense for non-empty cbase class 176s accepts non-empty class with documentation 176s accepts namespace module without documentation 176s accepts non-empty class with annotation comment followed by other comment 176s registers an offense for non-empty class with annotation comment 176s registers an offense for non-empty class with encoding comment 176s sparse and trailing comments 176s ignores comments after class node end 176s ignores sparse comments inside module node 176s ignores comments after module node end 176s ignores sparse comments inside class node 176s without documentation 176s with non-empty class 176s with constants visibility declaration content 176s does not register an offense 176s macro-only class 176s does not register offense with multiple macros 176s registers offense for macro with other methods 176s does not register offense with single macro 176s with non-empty module 176s with constants visibility declaration content 176s does not register an offense 176s with # :nodoc: 176s accepts non-namespace class without documentation 176s accepts compact-style nested module without documentation 176s accepts compact-style nested class without documentation 176s accepts non-namespace module without documentation 176s registers an offense for nested module without documentation 176s registers an offense for nested class without documentation 176s on a subclass 176s registers an offense for nested subclass without documentation 176s accepts non-namespace subclass without documentation 176s with `all` modifier 176s accepts nested subclass without documentation 176s when AllowedConstants is configured 176s ignores the constants in the config 176s with `all` modifier 176s accepts nested module without documentation 176s with `all` modifier 176s accepts nested class without documentation 176s 176s RuboCop::Cop::Layout::AssignmentIndentation 176s allows a properly indented rhs 176s ignores comparison operators 176s allows a properly indented rhs with fullwidth characters 176s registers an offense for multi-lhs 176s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 176s allows assignments that do not start on a newline 176s registers an offense for incorrectly indented rhs when multiple assignment 176s registers an offense for incorrectly indented rhs 176s when indentation width is overridden for this cop only 176s allows a properly indented rhs 176s autocorrects indentation 176s 176s RuboCop::Cop::Lint::Syntax 176s .offenses_from_processed_source 176s with a parser error 176s returns an offense 176s with --display-cop-names option 176s returns an offense with cop name 176s with a diagnostic error 176s returns an offense 176s with --autocorrect --disable-uncorrectable options 176s returns an offense 176s with --display-cop-names option 176s returns an offense with cop name 176s 176s RuboCop::Cop::Style::ConstantVisibility 176s registers an offense for module definitions 176s does not register an offense when passing a string to the visibility declaration 176s does not register an offense in the top level scope 176s when defining a constant in a module 176s registers an offense when not using a visibility declaration 176s does not register an offense when using a visibility declaration 176s when defining a constant in a class 176s with a multi-statement body 176s registers an offense when there is no matching visibility declaration 176s registers an offense when not using a visibility declaration 176s does not register an offense when using a visibility declaration 176s with a single-statement body 176s registers an offense when not using a visibility declaration 176s IgnoreModules 176s does not register an offense for class definitions 176s registers an offense for constants 176s 176s RuboCop::Cop::Style::RedundantAssignment 176s accepts empty method body 176s does not register an offense when ensure block present 176s accepts empty when nodes 176s accepts empty if body 176s reports an offense for def ending with assignment and returning 176s when inside begin-end body 176s registers an offense and autocorrects 176s when inside an if-branch 176s registers an offense and autocorrects 176s when inside a when-branch 176s registers an offense and autocorrects 176s when rescue blocks present 176s registers an offense and autocorrects when inside function or rescue block 176s 176s RuboCop::Cop::Lint::Loop 176s registers an offense for begin/end/until 176s accepts loop/break if 176s registers an offense and corrects for begin/end/while 176s accepts loop/break unless 176s 176s RuboCop::Formatter::OffenseCountFormatter 176s #file_finished 176s when any offenses are detected 176s increments the count for the cop in offense_counts 176s when no offenses are detected 176s does not add to offense_counts 176s #report_summary 176s when an offense is detected 176s shows the cop and the offense count 176s #finished 176s when output tty is true 176s has a progress bar 176s when there are many offenses 176s when --display-style-guide was not given 176s sorts by offense count first and then by cop name 176s when --display-style-guide was given 176s shows links and sorts by offense count first and then by cop name 176s 176s RuboCop::Cop::Style::NestedModifier 176s autocorrects if + unless 176s adds parentheses when needed in autocorrection 176s autocorrects unless + unless 176s autocorrects unless + if 176s does not add redundant parentheses in autocorrection 176s registers one offense for more than two modifiers 176s autocorrects if + if 176s autocorrects unless with a comparison operator + if 176s adds parentheses to method arguments when needed in autocorrection 176s until 176s behaves like not correctable 176s does not autocorrect when until is the inner modifier 176s does not autocorrect when until is the outer modifier 176s while 176s behaves like not correctable 176s does not autocorrect when while is the inner modifier 176s does not autocorrect when while is the outer modifier 176s 176s RuboCop::Cop::Style::HashExcept 176s does not register an offense when not using key block argument` 176s does not register an offense when using `reject` and `include?` 176s does not register an offense when not using block` 176s does not register an offense when using `select` and comparing with `lvar == :key` 176s does not register an offense when using `Hash#except` 176s does not register an offense when using `reject` and comparing with `lvar != :key` 176s does not register an offense when using `reject` and comparing with `:key != lvar` 176s does not register an offense when using `select` and comparing with `:key == lvar` 176s Ruby 3.0 or higher 176s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 176s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 176s does not register an offense when comparing with hash value 176s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 176s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 176s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 176s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 176s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 176s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 176s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 176s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 176s using `in?` 176s does not register offenses when using `reject` and calling `key.in?` method with symbol array 176s using `include?` 176s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 176s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 176s registers and corrects an offense when using `reject` and calling `include?` method with method call 176s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 176s registers and corrects an offense when using `reject` and calling `include?` method with variable 176s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 176s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 176s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 176s using `exclude?` 176s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 176s when `AllCops/ActiveSupportExtensionsEnabled: true` 176s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 176s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 176s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 176s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 176s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 177s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 177s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 177s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 177s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 177s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 177s does not register an offense when comparing with hash value 177s using `in?` 177s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 177s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 177s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 177s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 177s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 177s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 177s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 177s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 177s using `include?` 177s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 177s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 177s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 177s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 177s registers and corrects an offense when using `reject` and calling `include?` method with variable 177s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 177s registers and corrects an offense when using `reject` and calling `include?` method with method call 177s using `exclude?` 177s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 177s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 177s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 177s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 177s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 177s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 177s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 177s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 177s Ruby 2.7 or lower 177s does not register an offense when using `select` and comparing with `:key != lvar` 177s does not register an offense when using `reject` and comparing with `lvar == :key` 177s does not register an offense when using `select` and comparing with `lvar != :key` 177s does not register an offense when using `reject` and comparing with `:key == lvar` 177s 177s RuboCop::Cop::Style::EnvHome 177s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 177s registers and corrects an offense when using `::ENV['HOME']` 177s registers and corrects an offense when using `ENV['HOME']` 177s does not register an offense when using `ENV['HOME'] = '/home/foo'` 177s registers and corrects an offense when using `ENV.fetch('HOME')` 177s does not register an offense when using `Dir.home` 177s does not register an offense when using `ENV.fetch('HOME', default)` 177s 177s RuboCop::Cop::Security::YAMLLoad 177s does not register an offense for YAML.dump 177s registers an offense and corrects a fully qualified ::YAML.load 177s does not register an offense for YAML.load under a different namespace 177s registers an offense and corrects load with a literal string 177s Ruby >= 3.1 177s does not register an offense and corrects a fully qualified `::YAML.load` 177s does not register an offense and corrects load with a literal string 177s 177s RuboCop::Cop::Style::RedundantConditional 177s registers an offense for ternary with boolean results 177s registers an offense for ternary with negated boolean results 177s allows ternary with non-boolean results 177s does not register an offense for if/elsif/else with non-boolean results 177s registers an offense for if/elsif/else with boolean results 177s does not register an offense for if/else with non-boolean results 177s registers an offense for if/elsif/else with negated boolean results 177s registers an offense for if/else with negated boolean results 177s registers an offense for if/else with boolean results 177s 177s RuboCop::Cop::Layout::CommentIndentation 177s when allow_for_alignment is false 177s registers offenses and corrects before __END__ but not after 177s registers an offense and corrects 177s registers an offense for comments with extra indentation 177s on outer level 177s registers an offense and corrects an incorrectly indented (1) comment 177s accepts a comment that follows code 177s registers an offense and corrects a documentation comment 177s accepts a correctly indented comment 177s registers an offense for each incorrectly indented comment 177s registers an offense and corrects an incorrectly indented (2) comment 177s near various kinds of brackets 177s is unaffected by closing bracket that does not begin a line 177s accepts correctly indented comments 177s around program structure keywords 177s accepts correctly indented comments 177s with a blank line following the comment 177s accepts a correctly indented comment 177s when allow_for_alignment is true 177s registers an offense and corrects 177s accepts comments with extra indentation if aligned with comment on previous line 177s registers offenses and corrects before __END__ but not after 177s near various kinds of brackets 177s accepts correctly indented comments 177s is unaffected by closing bracket that does not begin a line 177s on outer level 177s registers an offense and corrects an incorrectly indented (1) comment 177s registers an offense and corrects an incorrectly indented (2) comment 177s registers an offense for each incorrectly indented comment 177s accepts a comment that follows code 177s registers an offense and corrects a documentation comment 177s accepts a correctly indented comment 177s around program structure keywords 177s accepts correctly indented comments 177s with a blank line following the comment 177s accepts a correctly indented comment 177s 177s RuboCop::CLI --disable-uncorrectable 177s --disable-uncorrectable 177s does not disable anything for cops that support autocorrect 177s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 177s when `EnforcedStyle: space` 177s does not disable anything for cops that support autocorrect 177s when `EnforcedStyle: no_space` 177s does not disable anything for cops that support autocorrect 177s if a one-line disable statement doesn't fit 177s adds before-and-after disable statement 177s and the offense is inside a heredoc 177s adds before-and-after disable statement around the heredoc 177s if one one-line disable statement fits 177s adds it when the cop supports autocorrect but does not correct the offense 177s adds it 177s but there are more offenses on the line and they don't all fit 177s adds both one-line and before-and-after disable statements 177s and there are two offenses of the same kind on one line 177s adds a single one-line disable statement 177s 177s RuboCop::Cop::Lint::EnsureReturn 177s does not check when ensure block has no body 177s does not register an offense for return outside ensure 177s registers an offense when returning multiple values in `ensure` 177s registers an offense and corrects for return with argument in ensure 177s registers an offense and corrects for return in ensure 177s 177s RuboCop::Cop::Style::FormatString 177s when enforced style is format 177s registers an offense for something followed by a hash 177s registers an offense for variable argument but does not autocorrect 177s does not autocorrect String#% with variable argument and assignment 177s registers an offense for something followed by an array 177s does not register an offense for ambiguous cases 177s registers an offense for a string followed by something 177s registers an offense for sprintf with 2 arguments 177s works if the first operand contains embedded expressions 177s does not register an offense for numbers 177s registers an offense for sprintf 177s when enforced style is sprintf 177s works if the first operand contains embedded expressions 177s does not register an offense for numbers 177s registers an offense for String#% with a hash argument 177s registers an offense for variable argument but does not autocorrect 177s registers an offense for something followed by an array 177s registers an offense for format with 2 arguments 177s registers an offense for format 177s registers an offense for a string followed by something 177s does not register an offense for ambiguous cases 177s registers an offense for variable argument and assignment but does not autocorrect 177s when enforced style is percent 177s registers an offense and corrects when using springf with second argument that uses an operator 177s accepts format without arguments 177s registers an offense for sprintf 177s accepts String#% 177s registers an offense for format 177s registers an offense for format with a hash argument 177s registers an offense for format with 3 arguments 177s registers an offense for sprintf with a hash argument 178s registers an offense for sprintf with 3 arguments 178s accepts sprintf with 1 argument 178s accepts format with 1 argument 178s accepts sprintf without arguments 178s 178s RuboCop::Cop::Style::SlicingWithRange 178s >= Ruby 2.7 178s reports no offense for startless 178s <= Ruby 2.5 178s reports no offense for array slicing with -1 178s >= Ruby 2.6 178s reports an offense for slicing to ..-1 178s reports an offense for slicing from expression to ..-1 178s reports no offense for excluding end 178s reports no offense for array with range inside 178s reports no offense for other methods 178s 178s RuboCop::Cop::AnnotationComment 178s #annotation? 178s when it includes a keyword 178s is expected to be falsey 178s when given a keyword followed by a space 178s is expected to equal true 178s when annotated with a non keyword 178s is expected to be falsey 178s when given as the first word of a sentence 178s is expected to be falsey 178s when given a keyword followed by a colon 178s is expected to equal true 178s when the keyword is multiple words 178s is expected to equal true 178s when the keyword is not capitalized properly 178s is expected to equal true 178s #correct? 178s when there is duplication in the keywords 178s when the shorter keyword is given first 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s when the longer keyword is given first 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s when no colon is required 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s when a colon is required 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like correct 178s is expected to be truthy 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s behaves like incorrect 178s is expected to be falsey 178s 178s RuboCop::Cop::Lint::EachWithObjectArgument 178s registers an offense for float argument 178s registers an offense for bignum argument 178s registers an offense for fixnum argument 178s accepts a variable argument 178s accepts two arguments 178s accepts a string argument 178s when using safe navigation operator 178s registers an offense for fixnum argument 178s 178s RuboCop::Cop::Layout::SpaceAroundOperators 178s accepts operators with spaces 178s accepts an assignment followed by newline 178s accepts [] without space 178s accepts an operator at the beginning of a line 178s accepts some operators that are exceptions & don't need spaces 178s accepts splat operator 178s accepts an assignment with a blank line 178s accepts an operator called with method syntax 178s accepts the result of the ExtraSpacing Cop 178s registers an offense and corrects exclamation point negation 178s accepts unary operators without space 178s registers an offenses for exponent operator with spaces 178s accepts def of operator 178s accepts an assignment by `for` statement 178s accepts ranges 178s accepts []= without space 178s accepts operator surrounded by tabs 178s accepts rational 178s accepts argument default values without space 178s accepts an assignment with the same alignment margins 178s accepts an assignment with spaces 178s accepts [arg] without space 178s accepts ::Kernel::raise 178s accepts scope operator 178s accepts an operator at the end of a line 178s registers an offense and corrects singleton class operator` 178s accepts exclamation point definition 178s accepts exponent operator without spaces 178s accepts a unary 178s accepts operator symbols 178s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 178s allows variables to be aligned 178s allows constants to be aligned 178s >= Ruby 2.7 178s does not register an offenses for one-line pattern matching syntax (`in`) 178s extra space around operators 178s registers an offense and corrects equality operators with too many spaces 178s does not register an offenses match operators between `<<` and `+=` 178s registers an offense and corrects a setter call with too many spaces 178s registers an offense and corrects arguments to a method 178s registers an offense and corrects assignment with too many spaces on either side 178s registers an offense and corrects match operators with too many spaces 178s registers an offense and corrects `-` with too many spaces with negative lhs operand 178s registers an offense and corrects binary operators that could be unary 178s registers an offense and corrects hash rocket with too many spaces at rescue 178s registers an offense and corrects ternary operator with too many spaces 178s registers an offense and corrects inheritance < with too many spaces 178s does not register an offenses match operators between `+=` and `<<` 178s accepts for a hash rocket with an extra space for alignment on multiple line 178s registers an offense and corrects operators with too many spaces 178s registers an offense and corrects various assignments with too many spaces 178s registers an offense and corrects a hash rocket with too many spaces 178s registers an offense and corrects a hash rocket with an extra spaceon multiple line 178s registers an offense and corrects operators with too many spaces on the same line 178s behaves like modifier with extra space 178s registers an offense in presence of modifier unless statement 178s behaves like modifier with extra space 178s registers an offense in presence of modifier while statement 178s behaves like modifier with extra space 178s registers an offense in presence of modifier until statement 178s when does not allowed for alignment 178s registers an offense and corrects an extra space 178s behaves like modifier with extra space 178s registers an offense in presence of modifier if statement 178s when EnforcedStyleForExponentOperator is space 178s registers an offenses for exponent operator without spaces 178s >= Ruby 3.0 178s registers an offenses for one-line pattern matching syntax (`=>`) 178s missing space around operators 178s registers an offense and corrects various assignments without space 178s doesn't register an offense for operators with newline on right 178s registers an offense and corrects equality operators without space 178s registers an offense and corrects inheritance < without space 178s registers an offense and corrects hash rocket without space at rescue 178s registers an offense and corrects a setter call without spaces 178s registers an offense and corrects match operators without space 178s registers an offense and corrects arguments to a method 178s registers an offense and corrects `-` without space with a negative lhs operand 178s registers an offense and corrects string concatenation without messing up new lines 178s registers an offense for operators without spaces 178s registers an offense for assignment without space on both sides 178s registers an offense for binary operators that could be unary 178s when a hash literal is on multiple lines 178s and Layout/HashAlignment:EnforcedHashRocketStyle is table 178s doesn't register an offense for a hash rocket without spaces 178s and Layout/HashAlignment:EnforcedHashRocketStyle is key 178s registers an offense and corrects a hash rocket without spaces 178s when a hash literal is on a single line 178s and Layout/HashAlignment:EnforcedHashRocketStyle is key 178s registers an offense and corrects a hash rocket without spaces 178s and Layout/HashAlignment:EnforcedHashRocketStyle is table 178s registers an offense and corrects a hash rocket without spaces 178s ternary operators 178s registers an offense and corrects operators with just a trailing space 178s registers an offense and corrects operators with no spaces 178s registers an offense and corrects operators with just a leading space 178s behaves like modifier with missing space 178s registers an offense in presence of modifier unless statement 178s behaves like modifier with missing space 178s registers an offense in presence of modifier until statement 178s behaves like modifier with missing space 178s registers an offense in presence of modifier if statement 178s behaves like modifier with missing space 178s registers an offense in presence of modifier while statement 178s 178s RuboCop::Cop::Style::ColonMethodCall 178s does not register an offense for nested class 178s does not register an offense when for constructor methods 178s registers an offense for class method call with arg 178s does not register an offense for Java static types 178s registers an offense for instance method call 178s registers an offense for instance method call with arg 178s does not register an offense for constant access 178s does not register an offense for Java package namespaces 178s registers an offense for class method call 178s does not register an offense for op methods 178s 178s RuboCop::Cop::Security::IoMethods 178s when using `IO` receiver and string argument 178s registers and corrects an offense when using `foreach` 178s behaves like offense 178s registers and corrects an offense when using `readlines` 178s behaves like offense 178s registers and corrects an offense when using `read` 178s behaves like offense 178s registers and corrects an offense when using `binwrite` 178s behaves like offense 178s registers and corrects an offense when using `binwrite` 178s behaves like offense 178s registers and corrects an offense when using `write` 178s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 178s behaves like accepts 178s does not register an offense when using `IO.write(" | command", "hi")` 178s behaves like accepts 178s does not register an offense when using `IO.read(" | command")` 178s behaves like accepts 178s does not register an offense when using `IO.binwrite(" | command", "hi")` 178s behaves like accepts 178s does not register an offense when using `IO.readlines(" | command")` 178s behaves like accepts 178s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 178s when using `IO` receiver and variable argument 178s registers and corrects an offense when using `foreach` 178s behaves like offense 178s registers and corrects an offense when using `binwrite` 178s behaves like offense 178s registers and corrects an offense when using `readlines` 178s behaves like offense 178s registers and corrects an offense when using `write` 178s behaves like offense 178s registers and corrects an offense when using `read` 178s behaves like offense 178s registers and corrects an offense when using `binread` 178s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 178s behaves like accepts 178s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 178s behaves like accepts 178s does not register an offense when using `IO.readlines("| command")` 178s behaves like accepts 178s does not register an offense when using `IO.write("| command", "hi")` 178s behaves like accepts 178s does not register an offense when using `IO.read("| command")` 178s behaves like accepts 178s does not register an offense when using `IO.binwrite("| command", "hi")` 178s when using `File` receiver 178s behaves like accepts 178s does not register an offense when using `File.binwrite(path, "hi")` 178s behaves like accepts 178s does not register an offense when using `File.binread(path)` 178s behaves like accepts 178s does not register an offense when using `File.read(path)` 178s behaves like accepts 178s does not register an offense when using `File.foreach(path) { |x| puts x }` 178s behaves like accepts 178s does not register an offense when using `File.readlines(path)` 178s when using no receiver 178s behaves like accepts 178s does not register an offense when using `binwrite("command", "hi")` 178s behaves like accepts 178s does not register an offense when using `read("command")` 178s behaves like accepts 178s does not register an offense when using `write("command", "hi")` 178s behaves like accepts 178s does not register an offense when using `readlines("command")` 178s behaves like accepts 178s does not register an offense when using `foreach("command") { |x| puts x }` 178s 178s RuboCop::Cop::Style::NilLambda 178s Proc.new 178s registers an offense when returning nil with `break` 178s properly corrects single line 178s registers an offense when returning nil implicitly 178s does not register an offense when doing more than returning nil 178s registers an offense when returning nil with `next` 178s does not remove block params or change spacing 178s registers an offense when returning nil with `return` 178s does not register an offense when not returning nil 178s proc 178s registers an offense when returning nil with `break` 178s registers an offense when returning nil with `next` 178s properly corrects single line 178s registers an offense when returning nil implicitly 178s does not remove block params or change spacing 178s does not register an offense when not returning nil 178s does not register an offense when doing more than returning nil 178s registers an offense when returning nil with `return` 178s stabby lambda 178s registers an offense when returning nil with `return` 178s registers an offense when returning nil implicitly 178s does not register an offense when doing more than returning nil 178s properly corrects multiline 178s does not register an offense when not returning nil 178s registers an offense when returning nil with `break` 178s registers an offense when returning nil with `next` 178s block lambda 178s registers an offense when returning nil with `return` 178s properly corrects single line 178s registers an offense when returning nil with `next` 178s does not register an offense when doing more than returning nil 178s does not register an offense when not returning nil 178s registers an offense when returning nil with `break` 178s does not remove block params or change spacing 178s registers an offense when returning nil implicitly 178s 178s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 178s accepts `begin` and `rescue` are on the same line 178s registers an offense for rescue section ending for method definition a blank 178s accepts no empty line 178s registers an offense for rescue section ending with a blank 178s with complex method definition - registers many offenses 178s accepts empty begin 178s registers an offense for above rescue keyword with a blank 178s registers an offense for rescue section starting with a blank 178s accepts last `rescue` and `end` are on the same line 178s accepts `rescue` and `end` are on the same line 178s accepts empty method definition 178s accepts `def` and `rescue` are on the same line 178s accepts empty lines around begin body 178s with complex begin-end - registers many offenses 178s 178s RuboCop::Cop::Style::AutoResourceCleanup 178s does not register an offense for File.open with block-pass 178s does not register an offense for File.open with block 178s registers an offense for File.open without block 178s does not register an offense for File.open with immediate close 178s 178s RuboCop::Cop::Layout::EmptyComment 178s register offenses and correct multiple aligned empty comments next to code 178s does not register an offense when using comment text 178s register offenses and correct multiple empty comments next to code 178s registers an offense and corrects an empty comment without space next to code 178s does not register an offense when using comment text with leading and trailing blank lines 178s registers an offense and corrects using an empty comment next to code 178s registers an offense and corrects using multiline empty comments 178s registers an offense and corrects using single line empty comment 178s disallow margin comment 178s registers an offense and corrects using margin comment 178s allow margin comment (default) 178s does not register an offense when using margin comment 178s disallow border comment 178s registers an offense and corrects using border comment 178s registers an offense and corrects using single line empty comment 178s allow border comment (default) 178s does not register an offense when using border comment 178s 178s RuboCop::MagicComment 178s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 178s returns nil for shareable_constant_value when comment is # incoding: utf-8 178s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 178s returns nil for frozen_string_literal when comment is # typed: strict 178s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for shareable_constant_value when comment is # typed: false 178s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 178s returns nil for encoding when comment is # typed:strict 178s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for frozen_string_literal when comment is # coding: utf-8 178s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 178s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for encoding when comment is # incoding: utf-8 178s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 178s returns nil for encoding when comment is # 178s returns nil for shareable_constant_value when comment is # coding: utf-8 178s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 178s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 178s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 178s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 178s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 178s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 178s returns nil for encoding when comment is # xyz shareable_constant_value: literal 178s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 178s returns nil for shareable_constant_value when comment is # typed: strong 178s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 178s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 178s returns nil for encoding when comment is # typed: ignore 178s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 178s returns nil for shareable_constant_value when comment is # typed:strict 178s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 178s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 178s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 178s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 178s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 178s returns nil for encoding when comment is # frozen_string_literal: invalid 178s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 178s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 178s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 178s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 178s returns nil for typed when comment is # vim:fileencoding=utf-8 178s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # frozen_string_literal: true 178s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 178s returns nil for typed when comment is # frozen_string_literal: true 178s returns true for frozen_string_literal when comment is # frozen-string-literal: true 178s returns nil for encoding when comment is # shareable_constant_value: literal 178s returns "strong" for typed when comment is # typed: strong 178s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 178s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 178s returns "ignore" for typed when comment is # typed: ignore 178s returns nil for frozen_string_literal when comment is # incoding: utf-8 178s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 178s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 178s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 178s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 178s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 178s returns nil for typed when comment is # incoding: utf-8 178s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 178s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 178s returns nil for typed when comment is # coding: utf-8 178s returns nil for encoding when comment is # typed: strict 178s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 178s returns nil for encoding when comment is # typed: true 178s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 178s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 178s returns nil for encoding when comment is # shareable_constant_value:literal 178s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 178s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for typed when comment is # frozen-string-literal: true 178s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 178s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 178s returns nil for typed when comment is # frozen_string_literal: false 178s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for encoding when comment is # typed: false 178s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 178s returns nil for encoding when comment is # shareable_constant_value: none 178s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for encoding when comment is # frozen_string_literal:true 178s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 178s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for typed when comment is # @typed 178s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # xyz shareable_constant_value: literal 178s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 178s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 178s returns nil for frozen_string_literal when comment is # typed: ignore 178s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 178s returns nil for encoding when comment is # frozen_string_literal: true 178s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 178s returns nil for typed when comment is # eNcOdInG: utf-8 178s returns nil for encoding when comment is # frozen-string-literal: true 178s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 178s returns true for frozen_string_literal when comment is # frozen_string_literal: true 178s returns nil for frozen_string_literal when comment is # coding: utf-8 178s returns "strict" for typed when comment is # typed:strict 178s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 178s returns nil for shareable_constant_value when comment is # @typed 178s returns false for frozen_string_literal when comment is # frozen_string_literal: false 178s returns nil for frozen_string_literal when comment is # typed: false 178s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 178s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for encoding when comment is # vim:fileencoding=utf-8 178s returns nil for frozen_string_literal when comment is # encoding: utf-8 178s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 178s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 178s returns nil for typed when comment is # ENCODING: utf-8 178s returns true for frozen_string_literal when comment is # frozen_string_literal: true 178s returns nil for typed when comment is # frozen_string_literal:true 178s returns nil for shareable_constant_value when comment is # typed: strict 178s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 178s returns nil for shareable_constant_value when comment is # typed: ignore 178s returns nil for typed when comment is # shareable_constant_value:literal 178s returns nil for shareable_constant_value when comment is # coding: utf-8 178s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 178s returns "true" for typed when comment is # typed: true 178s returns nil for typed when comment is # shareable-constant-value: literal 178s returns nil for encoding when comment is # frozen_string_literal: true 178s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 178s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 178s returns nil for frozen_string_literal when comment is # typed: strong 178s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 178s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 178s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 178s returns nil for shareable_constant_value when comment is # 178s returns nil for shareable_constant_value when comment is # encoding: utf-8 178s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 178s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for frozen_string_literal when comment is # @typed 178s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 178s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 178s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 178s returns nil for shareable_constant_value when comment is #typed:strict 178s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 178s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 178s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 178s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 178s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # frozen_string_literal: invalid 178s returns "utf-8" for encoding when comment is # encoding: utf-8 178s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 178s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 178s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 178s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 178s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 178s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 178s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 178s returns nil for encoding when comment is # shareable-constant-value: literal 178s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 178s returns "strict" for typed when comment is # typed: strict 178s returns nil for frozen_string_literal when comment is #typed:strict 178s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 178s returns nil for typed when comment is # coding: utf-8 178s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 178s returns nil for typed when comment is # shareable_constant_value: none 178s returns nil for typed when comment is # shareable_constant_value: experimental_everything 178s returns nil for typed when comment is # 178s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 178s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for frozen_string_literal when comment is # 178s returns nil for encoding when comment is #typed:strict 178s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 178s returns nil for typed when comment is # shareable_constant_value: literal 178s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 178s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 178s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 178s returns nil for encoding when comment is # typed: strong 178s returns nil for frozen_string_literal when comment is # typed:strict 178s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 178s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 178s returns nil for typed when comment is # encoding: utf-8 178s returns nil for shareable_constant_value when comment is # typed: true 178s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 178s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 178s returns nil for encoding when comment is # frozen_string_literal: false 178s returns "strict" for typed when comment is #typed:strict 178s returns "utf-8" for encoding when comment is # ENCODING: utf-8 178s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 178s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 178s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 178s returns nil for typed when comment is # shareable_constant_value: experimental_copy 178s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 178s returns nil for frozen_string_literal when comment is # typed: true 178s returns "utf-8" for encoding when comment is # coding: utf-8 178s returns true for frozen_string_literal when comment is # frozen_string_literal:true 178s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 178s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 178s returns "utf-8" for encoding when comment is # coding: utf-8 178s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 178s returns "false" for typed when comment is # typed: false 178s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 178s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 178s returns nil for encoding when comment is # @typed 178s #without 178s vim format 178s when the comment has multiple tokens 178s is expected to eq "# vim: filetype=ruby" 178s simple format 178s when the comment contains a different magic value 178s is expected to eq "# frozen-string-literal: true" 178s when the entire comment is a single value 178s is expected to eq "" 178s emacs format 178s with one token 178s is expected to eq "" 178s with multiple tokens 178s is expected to eq "# -*- frozen_string_literal: true -*-" 178s #valid_shareable_constant_value? 178s when given comment specified as `experimental_copy` 178s is expected to equal true 178s when given comment is not specified 178s is expected to equal false 178s when given comment specified as `literal` 178s is expected to equal true 178s when given comment specified as `none` 178s is expected to equal true 178s when given comment specified as `experimental_everything` 178s is expected to equal true 178s when given comment specified as unknown value 178s is expected to equal false 178s #valid? 178s with an encoding comment 178s is expected to equal true 178s with a non magic comment 178s is expected to equal false 178s with an frozen string literal comment 178s is expected to equal true 178s with an empty string 178s is expected to equal false 178s with an shareable constant value comment 178s is expected to equal true 178s 178s RuboCop::Cop::Lint::UnifiedInteger 178s target ruby version >= 2.4 178s when Bignum 178s when explicitly specified as toplevel constant 178s registers an offense 178s without any decorations 178s registers an offense 178s with MyNamespace 178s does not register an offense 178s when Integer 178s with MyNamespace 178s does not register an offense 178s without any decorations 178s does not register an offense 178s when explicitly specified as toplevel constant 178s does not register an offense 178s target ruby version < 2.4 178s when Bignum 178s when explicitly specified as toplevel constant 178s registers an offense 178s without any decorations 178s registers an offense and autocorrects 178s with MyNamespace 178s does not register an offense 178s target ruby version >= 2.4 178s when Fixnum 178s without any decorations 178s registers an offense 178s when explicitly specified as toplevel constant 178s registers an offense 178s with MyNamespace 178s does not register an offense 178s target ruby version < 2.4 178s when Fixnum 178s without any decorations 178s registers an offense and autocorrects 178s with MyNamespace 178s does not register an offense 178s when explicitly specified as toplevel constant 178s registers an offense 178s 178s RuboCop::Cop::Style::ClassCheck 178s when enforced style is is_a? 178s registers an offense for kind_of? and corrects to is_a? 178s when enforced style is kind_of? 178s registers an offense for is_a? and corrects to kind_of? 178s 178s RuboCop::Cop::Lint::ErbNewArguments 178s >= Ruby 2.6 178s does not register an offense when using `ERB.new` with keyword arguments 178s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 178s registers an offense when using `ERB.new` with non-keyword 2nd argument 178s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 178s does not register an offense when using `ERB.new` without optional arguments 178s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 178s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 178s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 178s when using `ActionView::Template::Handlers::ERB.new` 178s does not register an offense when using `ERB.new` without arguments 178s <= Ruby 2.5 178s does not register an offense when using `ERB.new` with non-keyword arguments 178s 178s RuboCop::Cop::Style::BlockComments 178s autocorrects a block comment into a regular comment (without trailingnewline) 178s autocorrects an empty block comment by removing it 178s registers an offense for block comments 178s accepts regular comments 178s autocorrects a block comment into a regular comment 178s 178s RuboCop::Cop::Lint::InheritException 178s when class inherits from `Exception` 178s with enforced style set to `standard_error` 178s registers an offense and corrects 178s when inheriting a standard lib exception class that is not a subclass of `StandardError` 178s does not register an offense 178s when creating a subclass using Class.new 178s registers an offense and corrects 178s with enforced style set to `runtime_error` 178s registers an offense and corrects 178s when inheriting a standard lib exception class that is not a subclass of `StandardError` 178s does not register an offense 178s when creating a subclass using Class.new 178s registers an offense and corrects 178s 178s RuboCop::Cop::Lint::RedundantRequireStatement 178s registers an offense when using requiring `enumerator` 178s registers an offense when using requiring `enumerator` with modifier form 178s registers an offense when using requiring `enumerator` in condition 178s target ruby version <= 2.1 178s does not register an offense when using requiring `rational`, `complex` 178s target ruby version >= 2.7 178s registers an offense when using requiring `ruby2_keywords` or already redundant features 178s target ruby version < 3.1 178s does not register an offense and corrects when using requiring `fiber` 178s target ruby version >= 2.5 178s register an offense and corrects when using requiring `pp` or already redundant features 178s target ruby version <= 2.6 178s does not register an offense when using requiring `ruby2_keywords` 178s target ruby version <= 2.4 178s does not register an offense when using requiring `pp` 178s target ruby version >= 2.2 178s registers an offense when using requiring `rational`, `complex` 178s target ruby version >= 2.1 178s register an offense and corrects when using requiring `thread` 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.0 178s does not register an offense when using requiring `thread` 178s 178s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 178s when EnforcedStyle is no_space 178s registers an offense and corrects correct + opposite style 178s accepts left brace without outer space 178s registers an offense and corrects braces surrounded by spaces 178s with `EnforcedStyle` of `Style/BlockDelimiters` 178s accepts left brace without outer space 178s Ruby 2.7 178s registers an offense and corrects correct + opposite style 178s when EnforcedStyle is space 178s registers an offense and corrects left brace without outer space 178s registers an offense and corrects multiline block where the left brace has no outer space 178s accepts braces surrounded by spaces 178s registers an offense and corrects opposite + correct style 178s Ruby 2.7 178s registers an offense and corrects opposite + correct style 178s registers an offense and corrects multiline block where the left brace has no outer space 178s with space before empty braces not allowed 178s registers an offense and corrects empty braces 178s accepts empty braces without outer space 178s with invalid value for EnforcedStyleForEmptyBraces 178s fails with an error 178s with space before empty braces allowed 178s accepts empty braces with outer space 178s registers an offense and corrects empty braces 178s 178s RuboCop::Cop::Lint::MissingSuper 178s constructor 178s does not register an offense for the constructor-like method defined outside of a class 178s does not register an offense for the class with stateless parent class 178s does not register an offense when there is a `super` call 178s does not register an offense for the class without parent class 178s registers an offense when no `super` call 178s callbacks 178s registers an offense when method callback is without `super` call 178s registers an offense when class callback without `super` call 178s registers an offense when class callback within `self << class` and without `super` call 178s registers no offense when module callback without `super` call 178s does not register an offense when callback has a `super` call 178s 178s RuboCop::Cop::Style::RedundantPercentQ 178s accepts %q at the beginning of a double quoted string with interpolation 178s accepts %q at the beginning of a section of a double quoted string with interpolation 178s accepts a heredoc string that contains %q 178s accepts %q containing string interpolation 178s accepts %Q at the beginning of a double quoted string with interpolation 178s accepts %Q at the beginning of a section of a double quoted string with interpolation 178s with %q strings 178s accepts regular expressions starting with %q 178s accepts a string with escaped non-backslash characters 178s registers an offense for a string containing escaped backslashes 178s registers an offense for only double quotes 178s autocorrects for strings that are concatenated with backslash 178s accepts a string with single quotes and double quotes 178s registers an offense for only single quotes 178s registers an offense for no quotes 178s accepts a string with escaped backslash and non-backslash characters 178s with %Q strings 178s accepts regular expressions starting with %Q 178s accepts a string with double quotes and an escaped normal character 178s registers an offense for static string with only double quotes 178s accepts a string with single quotes and double quotes 178s registers an offense for dynamic string without quotes 178s autocorrects for strings that are concatenated with backslash 178s registers an offense for static string without quotes 178s accepts a string with double quotes and an escaped special character 178s accepts a dynamic %Q string with double quotes 178s 178s RuboCop::Cop::Lint::UnusedBlockArgument 178s inspection 178s when a block have a block local variable 178s and the variable is unused 178s registers an offense 178s and the variable is used 178s does not register offense 178s with an empty block 178s when not configured to ignore empty blocks 178s registers an offense 178s when configured to ignore empty blocks 178s does not register an offense 178s when a method argument is not used 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 optional keyword argument is unused 178s when the method call is `define_method` 178s registers an offense 178s when AllowUnusedKeywordArguments set 178s does not care 178s when the method call is not `define_method` 178s registers an offense 178s when AllowUnusedKeywordArguments set 178s does not care 178s when a block takes multiple arguments 178s and an argument with default value is unused 178s registers an offense and preserves default value 178s and all the arguments are unused 178s registers offenses and suggests omitting them 178s and unused arguments span multiple lines 178s registers offenses and suggests omitting them 178s and arguments are swap-assigned 178s accepts 178s and a splat argument is unused 178s registers an offense and preserves splat 178s and one argument is assigned to another, whilst other's value is not used 178s registers an offense 178s and all arguments are used 178s accepts 178s and an argument is unused 178s registers an offense 178s when a lambda block takes arguments 178s and all the arguments are unused 178s registers offenses and suggests using a proc 178s and an argument is unused 178s registers an offense 178s when an underscore-prefixed block argument is not used 178s accepts 178s when a block takes single argument 178s and the method call is `define_method` 178s registers an offense 178s and the argument is unused 178s registers an offense and suggests omitting that 178s when a variable is not used 178s does not care 178s in a method calling `binding` without arguments 178s accepts all arguments 178s inside a method definition 178s registers offenses 178s when IgnoreEmptyBlocks config parameter is set 178s accepts an empty block with a single unused parameter 178s registers an offense for a non-empty block with an unused parameter 178s accepts an empty block with multiple unused parameters 178s registers an offense for a non-empty block with multiple unused args 178s 178s RuboCop::Cop::Lint::RedundantWithObject 178s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 178s registers an offense and corrects when using ary.each_with_object([]) do-end block 178s an object is used as a block argument 178s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 178s registers an offense and corrects when using `ary.each_with_object { |v| v }` 178s Ruby 2.7 178s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 178s registers an offense and corrects when using `ary.each_with_object { _1 }` 178s when missing argument to `each_with_object` 178s does not register an offense when block has 2 arguments 178s does not register an offense when block has 1 argument 178s 178s RuboCop::Cop::Style::ExpandPathArguments 178s does not register an offense when using `File.expand_path(path, __FILE__)` 178s does not register an offense when using `Pathname(__dir__).expand_path` 178s registers an offense when using `File.expand_path('..', __FILE__)` 178s does not register an offense when using `File.expand_path(__dir__)` 178s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 178s registers an offense when using `File.expand_path('.', __FILE__)` 178s registers an offense when using `::File.expand_path('./../..', __FILE__)` 178s registers an offense when using `File.expand_path('../..', __FILE__)` 178s does not register an offense when using `File.expand_path('..', __dir__)` 178s registers an offense when using `File.expand_path('../../lib', __FILE__)` 178s registers an offense when using `Pathname(__FILE__).parent.expand_path` 178s registers an offense when using `File.expand_path('./../..', __FILE__)` 178s registers an offense when using `File.expand_path('../../..', __FILE__)` 178s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 178s does not register an offense when using `File.expand_path(__FILE__)` 178s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 178s 178s RuboCop::Cop::Style::RedundantRegexpCharacterClass 178s with an array index inside an interpolation 178s does not register an offense 178s with a character class containing an unescaped-# 178s registers an offense and corrects 178s with a character class containing a single character 178s registers an offense and corrects 178s with a character class containing a posix bracket expression 178s does not register an offense 178s with a character class containing an interpolation 178s does not register an offense 178s with consecutive escaped square brackets 178s does not register an offense 178s with a character class containing a single unicode code-point 178s registers an offense and corrects 178s with a character class containing a space 178s with an unnecessary-character-class after a comment 178s registers an offense and corrects 178s when not using free-spaced mode 178s registers an offense and corrects 178s when using free-spaced mode 178s with a single space character class 178s does not register an offense with /ix 178s does not register an offense with /iux 178s does not register an offense with only /x 178s with a commented single-element character class 178s does not register an offense 178s with a character class containing a single range 178s does not register an offense 178s with a character class containing an escaped-b 178s does not register an offense 178s with a character class containing a single character inside a group 178s registers an offense and corrects 178s with consecutive escaped square brackets inside a character class 178s does not register an offense 178s with a character class containing set intersection 178s does not register an offense 178s with a redundant character class after an interpolation 178s registers an offense and corrects 178s with a regexp containing invalid g escape 178s registers an offense and corrects 178s with a character class containing a single negated unicode character property 178s registers an offense and corrects 178s with a character class containing two characters 178s does not register an offense 178s with %r{} regexp 178s with a character class containing a single character 178s registers an offense and corrects 178s with a character class containing a single character before `{n,m}` quantifier 178s registers an offense and corrects 178s with a character class containing a single character before `+` quantifier 178s registers an offense and corrects 178s with multiple character classes containing single characters 178s registers an offense and corrects 178s with a character class containing a single character inside a group 178s registers an offense and corrects 178s with a character class containing multiple unicode code-points 178s does not register an offense and corrects 178s with a character class containing a character requiring escape outside 178s does not register an offense 178s with a character class containing a single unicode character property 178s registers an offense and corrects 178s with a character class containing an escaped ] 178s registers an offense and corrects 178s with a character class containing a single character before `{n,m}` quantifier 178s registers an offense and corrects 178s with a character class with first element an escaped ] 178s does not register an offense 178s with a character class containing an escaped-# 178s registers an offense and corrects 178s with a character class containing an escaped [ 178s registers an offense and corrects 178s with a character class containing an escaped-0 178s does not register an offense (FAILED - 1) 178s with a negated character class with a single element 178s does not register an offense 178s with a character class containing a negated posix bracket expression 178s does not register an offense 178s with a multi-line interpolation 178s ignores offenses in the interpolated expression 178s with a character class containing a negated-space meta-character 178s registers an offense and corrects 178s with an interpolated unnecessary-character-class regexp 179s registers an offense and corrects 179s with a character class containing escaped character requiring escape outside 179s registers an offense and corrects 179s with multiple character classes containing single characters 179s registers an offense and corrects 179s with a character class containing a single character before `+` quantifier 179s registers an offense and corrects 179s with a character class containing a space meta-character 179s registers an offense and corrects 179s with escaped square brackets surrounding a single character 179s does not register an offense 179s 179s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 179s does not register an offense when using `Base` 179s does not register an offense when not inherited super class 179s registers an offense when using `Cop` 179s registers an offense when using `RuboCop::Cop::Cop` 179s 179s RuboCop::Formatter::GitHubActionsFormatter 179s #finished 179s when no offenses are detected 179s does not print anything 179s when message contains % 179s escapes message 179s when file is relative to the current directory 179s reports offenses as error with the relative path 179s when offenses are detected 179s reports offenses as errors 179s when fail level is defined 179s reports offenses below fail level as warnings 179s reports offenses above or at fail level as errors 179s 179s RuboCop::Cop::Style::IpAddresses 179s does not register an offense on an empty string 179s IPv6 179s registers an offense for a very short address 179s registers an offense for a shortened address 179s registers an offense for the loopback address 179s registers an offense for an address with 0s collapsed 179s does not register an offense for an invalid address 179s registers an offense for a valid address 179s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 179s does not register an offense 179s when it is removed from the allowed addresses 179s registers an offense 179s with allowed addresses 179s does not register an offense if the case differs 179s does not register an offense for a allowed addresses 179s IPv4 179s does not register an offense for an address inside larger text 179s registers an offense for a valid address 179s does not register an offense for an invalid address 179s 179s RuboCop::Cop::Style::AndOr 179s when style is always 179s also warns on while (and) 179s also warns on until (or) 179s autocorrects "and" with && in method calls (2) 179s also warns on while (or) 179s autocorrects "and" with && and adds parentheses to expr 179s autocorrects "and" inside def 179s autocorrects "and" with && in method calls (3) 179s autocorrects "or" with || and doesn't add extra parentheses 179s autocorrects "or" with an assignment on the left 179s also warns on until (and) 179s autocorrects "or" with || in method calls 179s autocorrects "or" with an assignment on the right 179s warns on short-circuit (and) 179s autocorrects "and" with && in method calls 179s also warns on non short-circuit (or) (unless) 179s autocorrects "and" with && and doesn't add extra parentheses 179s registers an offense for "or" 179s autocorrects "and" with && in method calls (4) 179s also warns on non short-circuit (and) (unless) 179s registers an offense for "and" 179s autocorrects "and" with an Enumerable accessor on either side 179s autocorrects "or" inside def 179s autocorrects "or" with || in method calls (3) 179s autocorrects "or" with || and adds parentheses to expr 179s also warns on non short-circuit (or) 179s warns on short-circuit (or) 179s autocorrects "or" with || in method calls (4) 179s autocorrects "or" with || in method calls (2) 179s also warns on non short-circuit (and) 179s with predicate method with arg without space on right 179s autocorrects "and" with && and adds parens 179s autocorrects "or" with || and adds parens 179s with two predicate methods with args without spaces on right 179s autocorrects "and" with && and adds parens 179s autocorrects "or" with || and adds parens 179s within a nested begin node 179s autocorrects "and" with && and adds parens 179s with obj.method = arg on left 179s autocorrects "and" with && and adds parens 179s when left hand side is a comparison method 179s autocorrects "and" with && and adds parens 179s when `and` precedes `||` 179s registers an offense and corrects 179s when `or` precedes `&&` 179s registers an offense and corrects 179s within a nested begin node with one child only 179s autocorrects "and" with && and adds parens 179s with !obj.method arg on right 179s autocorrects "and" with && and adds parens 179s with !variable on left 179s doesn't crash and burn 179s with a file which contains __FILE__ 179s autocorrects "or" with || 179s when `and` precedes `or` 179s registers an offense and corrects 179s with one predicate method without space on right and another method 179s autocorrects "and" with && and adds parens 179s autocorrects "or" with || and adds parens 179s with `not` expression on right 179s autocorrects "and" with && and adds parens 179s with !obj.method arg on left 179s autocorrects "and" with && and adds parens 179s with `not` expression on left 179s autocorrects "and" with && and adds parens 179s with obj.method= arg on left 179s autocorrects "and" with && and adds parens 179s when `or` precedes `and` 179s registers an offense and corrects 179s when style is conditionals 179s accepts "and" in post-until body 179s accepts || outside of conditional 179s registers an offense for "or" in post-until condition 179s registers an offense for "or" in while condition 179s registers an offense for "and" in if condition 179s accepts "and" in post-while body 179s accepts "or" outside of conditional 179s accepts "or" in post-while body 179s registers an offense for "or" in post-while condition 179s accepts "and" outside of conditional 179s registers an offense for "and" in post-until condition 179s accepts "and" in while body 179s registers an offense for "and" in while condition 179s accepts && outside of conditional 179s registers an offense for "or" in if condition 179s registers an offense for "and" in post-while condition 179s accepts "or" in if body 179s accepts "or" in until body 179s accepts "or" in post-until body 179s accepts && inside of conditional 179s registers an offense for "and" in until condition 179s accepts "and" in if body 179s accepts "and" in until body 179s accepts "or" in while body 179s registers an offense for "or" in until condition 179s accepts || inside of conditional 179s 179s RuboCop::Cop::Layout::ClosingParenthesisIndentation 179s accepts begin nodes that are not grouped expressions 179s for method definitions 179s with line break before 1st parameter 179s accepts a correctly aligned ) 179s registers an offense for misaligned ) 179s with no line break before 1st parameter 179s registers an offense for misaligned ) 179s accepts a correctly aligned ) 179s accepts empty () 179s for method assignments with indented parameters 179s without arguments 179s can handle indentation up against the left edge 179s accepts empty () 179s accepts a correctly aligned ) against ( 179s can handle indentation up against the method 179s registers an offense for misaligned ) 179s with no line break before 1st parameter 179s can handle individual arguments that are broken over lines 179s accepts a correctly indented ) 179s can handle inner method calls 179s accepts a correctly aligned ) 179s can handle indentation up against the left edge 179s can handle hash arguments that are not broken over lines 179s registers an offense for misaligned ) 179s with line break before 1st parameter 179s registers an offense for misaligned ) 179s accepts a correctly aligned ) 179s for method chains 179s can handle multiple chains with differing breaks 179s registers an offense and corrects method chains 179s when using safe navigation operator 179s registers an offense and corrects misaligned ) 179s for grouped expressions 179s with no line break before 1st operand 179s accepts a correctly aligned ) 179s registers an offense for misaligned ) 179s accepts ) that does not begin its line 179s with line break before 1st operand 179s registers an offense for misaligned ) 179s accepts a correctly aligned ) 179s for method calls 179s with first multiline arg on new line 179s accepts ) on the same level as ( with args on same line 179s accepts ) on the same level as ( with second arg on new line 179s without arguments 179s can handle indentation up against the left edge 179s accepts empty () 179s accepts a correctly aligned ) against ( 179s with no line break before 1st parameter 179s does not register an offense when using keyword arguments 179s accepts a correctly indented ) 179s accepts a correctly aligned ) 179s registers an offense for misaligned ) 179s accepts a correctly indented ) inside a block 179s registers an offense and corrects misindented ) when ) is aligned with the params 179s with line break before 1st parameter 179s registers an offense for misaligned ) 179s accepts a correctly aligned ) 179s 179s RuboCop::Cop::Layout::ElseAlignment 179s accepts a ternary if 179s with def/defs 179s accepts an empty defs body 179s accepts an empty def body 179s when modifier and def are on the same line 179s accepts a correctly aligned body 179s registers an offense for else not aligned with private 179s with def/rescue/else/ensure/end 179s accepts a correctly aligned else 179s registers an offense for misaligned else 179s with begin/rescue/else/ensure/end 179s accepts a correctly aligned else 179s registers an offense for misaligned else 179s with unless 179s registers an offense for misaligned else 179s accepts a correctly aligned else in an otherwise empty unless 179s accepts an empty unless 179s ensure/rescue/else in Block Argument 179s registers an offense for misaligned else 179s accepts a correctly aligned else with assignment 179s accepts a correctly aligned else 179s with if statement 179s accepts an if/else branches with rescue clauses 179s accepts a one line if statement 179s accepts indentation after else when if is on new line after assignment 179s registers an offense for misaligned elsif 179s registers an offense for misaligned else 179s accepts a correctly aligned if/elsif/else/end 179s with assignment 179s when alignment style is keyword by choice 179s and end is aligned with keyword 179s accepts an until in assignment 179s accepts a while in assignment 179s accepts an if/else in assignment 179s accepts an if in assignment 179s accepts an if/else in assignment on next line 179s and end is aligned with variable 179s registers an offense for an if 179s when alignment style is variable 179s and end is aligned with keyword 179s registers an offense for an if with element assignment 179s registers an offense for an if 179s registers offenses for an if with setter 179s and end is aligned with variable 179s accepts an if with end aligned with element assignment 179s accepts an if/else 179s accepts an if/else with chaining with a block after the end 179s accepts an if/else with chaining after the end 179s accepts an if-elsif-else with end aligned with setter 179s accepts an if-else with end aligned with setter 179s for a file with byte order mark 179s accepts a correctly aligned if/elsif/else/end 179s with case 179s accepts else aligned with when but not with case 179s accepts case without else 179s registers an offense for misaligned else 179s accepts correctly aligned case/when/else 179s >= Ruby 2.7 179s with case match 179s accepts correctly aligned case/when/else 179s accepts case match without else 179s registers an offense for misaligned else 179s accepts correctly aligned empty else 179s with def/rescue/else/end 179s registers an offense for misaligned else 179s accepts a correctly aligned else 179s 179s RuboCop::Cop::Lint::SuppressedException 179s with AllowComments set to true 179s registers an offense for empty rescue on single line with a comment after it 179s does not register an offense for empty rescue with comment 179s Ruby 2.7 or higher 179s when empty rescue for `do` block with a numbered parameter 179s does not register an offense for empty rescue with comment 179s registers an offense for empty rescue without comment 179s when empty rescue for `defs` 179s does not register an offense for empty rescue with comment 179s registers an offense for empty rescue without comment 179s Ruby 2.5 or higher 179s when empty rescue for `do` block 179s registers an offense for empty rescue without comment 179s does not register an offense for empty rescue with comment 179s when empty rescue for `def` 179s registers an offense for empty rescue without comment 179s does not register an offense for empty rescue with comment 179s with AllowComments set to false 179s does not register an offense for rescue with body 179s registers an offense for empty rescue block 179s Ruby 2.5 or higher 179s when empty rescue for `do` block 179s registers an offense for empty rescue with comment 179s registers an offense for empty rescue without comment 179s when empty rescue for defs 179s registers an offense for empty rescue without comment 179s registers an offense for empty rescue with comment 179s when empty rescue for `def` 179s registers an offense for empty rescue without comment 179s registers an offense for empty rescue with comment 179s with AllowNil set to true 179s does not register an offense for inline nil rescue 179s does not register an offense for rescue block with nil 179s with AllowNil set to false 179s registers an offense for inline nil rescue 179s registers an offense for rescue block with nil 179s 179s RuboCop::Cop::Style::MultilineMemoization 179s EnforcedStyle: braces 179s with a single line memoization 179s allows expression on the following line 179s allows expression on first line 179s with a multiline memoization 179s without a `begin` and `end` block 179s allows with another block on the following line 179s allows with a conditional on the following line 179s allows with a conditional on the first line 179s allows with another block on the first line 179s with a multiline memoization 179s without braces 179s when the expression is wrapped in `begin` and `end` keywords 179s registers an offense for begin...end block on following line 179s registers an offense for begin...end block on first line 179s EnforcedStyle: keyword 179s with a multiline memoization 179s without a `begin` and `end` block 179s when the expression is wrapped in parentheses 179s registers an offense when expression starts on first line 179s registers an offense when expression starts on following line 179s registers an offense with multiline expression 179s with a multiline memoization 179s without a `begin` and `end` block 179s allows with another block on the first line 179s allows with another block on the following line 179s allows with a conditional on the first line 179s allows with a conditional on the following line 179s with a single line memoization 179s allows expression on the following line 179s allows expression on first line 179s 179s RuboCop::Cop::Style::QuotedSymbols 179s configured with `single_quotes` 179s behaves like enforce single quotes 179s accepts single quoted symbol with an escaped quote 179s accepts double quotes when control characters are used 179s accepts single quotes with double quotes 179s accepts double quotes with line breaks 179s accepts double quotes when interpolating an instance variable 179s accepts double quotes with interpolation 179s accepts double quotes when interpolating a global variable 179s registers an offense and corrects escape characters properly 179s registers an offense and corrects for an escaped quote within double quotes 179s registers an offense and corrects for double quotes without interpolation 179s accepts single quotes 179s registers an offense and corrects for double quotes in hash keys 179s accepts single quotes with line breaks 179s accepts double quotes with some other special symbols 179s accepts double quotes when interpolating a class variable 179s accepts unquoted symbols 179s accepts double quotes with single quotes 179s accepts double quotes when unicode control sequence is used 179s accepts double quotes with escape sequences 179s hash with hashrocket style 179s corrects wrong quotes 179s accepts properly quoted symbols 179s configured with `double_quotes` 179s behaves like enforce double quotes 179s accepts double quotes when interpolating an instance variable 179s registers an offense and corrects escape characters properly 179s accepts double quotes when interpolating a global variable 179s accepts double quotes with escape sequences 179s accepts double quoted symbol with an escaped quote 179s accepts double quotes with interpolation 179s accepts single quotes with line breaks 179s accepts double quotes when interpolating a class variable 179s registers an offense for single quotes 179s accepts double quotes with single quotes 179s accepts double quotes 179s accepts unquoted symbols 179s accepts single quotes with double quotes 179s registers an offense and corrects for an escaped quote within single quotes 179s accepts double quotes with line breaks 179s hash with hashrocket style 179s accepts properly quoted symbols 179s corrects wrong quotes 179s configured with `same_as_string_literals` 179s when Style/StringLiterals is disabled 179s behaves like enforce single quotes 179s accepts double quotes with line breaks 179s accepts double quotes when interpolating a class variable 179s accepts double quotes when unicode control sequence is used 179s accepts double quotes with some other special symbols 179s registers an offense and corrects for double quotes in hash keys 179s accepts single quotes with double quotes 179s registers an offense and corrects for double quotes without interpolation 179s accepts double quotes with single quotes 179s accepts single quoted symbol with an escaped quote 179s accepts double quotes when interpolating an instance variable 179s accepts double quotes when interpolating a global variable 179s accepts double quotes when control characters are used 179s registers an offense and corrects for an escaped quote within double quotes 179s accepts double quotes with interpolation 179s accepts single quotes 179s accepts double quotes with escape sequences 179s accepts single quotes with line breaks 179s accepts unquoted symbols 179s registers an offense and corrects escape characters properly 179s hash with hashrocket style 179s corrects wrong quotes 179s accepts properly quoted symbols 179s when Style/StringLiterals is configured with single_quotes 179s behaves like enforce single quotes 179s accepts single quotes with double quotes 179s accepts double quotes with single quotes 179s accepts double quotes with some other special symbols 179s accepts double quotes with line breaks 179s accepts double quotes when unicode control sequence is used 179s accepts double quotes when interpolating an instance variable 179s accepts single quotes 179s accepts double quotes when interpolating a global variable 179s accepts single quoted symbol with an escaped quote 179s accepts double quotes with interpolation 179s registers an offense and corrects for double quotes in hash keys 179s registers an offense and corrects escape characters properly 179s accepts double quotes when control characters are used 179s accepts double quotes with escape sequences 179s registers an offense and corrects for double quotes without interpolation 179s accepts double quotes when interpolating a class variable 179s registers an offense and corrects for an escaped quote within double quotes 179s accepts unquoted symbols 179s accepts single quotes with line breaks 179s hash with hashrocket style 179s accepts properly quoted symbols 179s corrects wrong quotes 179s when Style/StringLiterals is configured with double_quotes 179s behaves like enforce double quotes 179s accepts single quotes with line breaks 179s accepts unquoted symbols 179s registers an offense for single quotes 179s accepts double quotes when interpolating a global variable 179s accepts double quotes with single quotes 179s accepts double quotes when interpolating an instance variable 179s accepts double quotes with line breaks 179s registers an offense and corrects escape characters properly 179s accepts double quotes when interpolating a class variable 179s accepts double quotes with interpolation 179s accepts double quotes 179s accepts double quotes with escape sequences 179s accepts single quotes with double quotes 179s accepts double quoted symbol with an escaped quote 179s registers an offense and corrects for an escaped quote within single quotes 179s hash with hashrocket style 179s corrects wrong quotes 179s accepts properly quoted symbols 179s 179s RuboCop::Cop::Lint::ElseLayout 179s does not register an offense if the entire if is on a single line 179s registers and corrects an offense when using multiple `elsif`s 179s accepts proper else 179s registers an offense and corrects for elsifs 179s accepts empty braces 179s does not register an offense for an elsif with no body 179s registers an offense and corrects for the entire else body being on the same line 179s registers an offense and corrects for expr on same line as else 179s accepts modifier forms 179s accepts ternary ops 179s 179s RuboCop::Cop::Naming::VariableNumber 179s when AllowedPatterns is set 179s does not register an offense for a symbol that matches an allowed pattern 179s does not register an offense for a global variable name that matches an allowed pattern 179s registers an offense for a instance variable name that does not match an allowed pattern 179s does not register an offense for a local variable name that matches an allowed pattern 179s does not register an offense for a method name that matches an allowed pattern 179s registers an offense for a local variable name that does not match an allowed pattern 179s registers an offense for a symbol that does not match an allowed pattern 179s registers an offense for a method name that does not match an allowed pattern 179s does not register an offense for a instance variable name that matches an allowed pattern 179s does not register an offense for a class variable name that matches an allowed pattern 179s registers an offense for a global variable name that does not match an allowed pattern 179s registers an offense for a class variable name that does not match an allowed pattern 179s when AllowedIdentifiers is set 179s does not register an offense for a global variable name that is allowed 179s does not register an offense for a symbol that is allowed 179s does not register an offense for a local variable name that is allowed 179s does not register an offense for a instance variable name that is allowed 179s does not register an offense for a class variable name that is allowed 179s does not register an offense for a method name that is allowed 179s when configured for normal 179s registers an offense for snake case numbering in method camel case parameter 179s registers an offense for snake case numbering in a global variable name 179s registers an offense for snake case numbering in method name 179s does not register an offense for normal case numbering in symbol 179s registers an offense for snake case numbering in symbol 179s registers an offense for snake case numbering in method parameter 179s behaves like offense 179s registers an offense for local_FOO_1 in normalcase 179s behaves like accepts integer symbols 179s accepts integer symbol 179s accepts integer symbol array literal 179s behaves like accepts 179s accepts @__foo__ in normalcase 179s behaves like offense 179s registers an offense for myAttribute_1 in normalcase 179s behaves like accepts 179s accepts _1 in normalcase 179s behaves like offense_array 179s registers an offense for ["a_1", "a2"] in normalcase 179s behaves like accepts 179s accepts target_u2f_device in normalcase 179s behaves like offense 179s registers an offense for @myAttribute_1 in normalcase 179s behaves like accepts 179s accepts emparejó in normalcase 179s behaves like accepts 179s accepts localFOO1 in normalcase 179s behaves like accepts 179s accepts _foo in normalcase 179s behaves like accepts 179s accepts _ in normalcase 179s behaves like accepts 179s accepts foo10_bar in normalcase 179s behaves like offense 179s registers an offense for local_1 in normalcase 179s behaves like offense 179s registers an offense for @@local_1 in normalcase 179s behaves like offense 179s registers an offense for @local_1 in normalcase 179s behaves like accepts 179s accepts local_ in normalcase 179s behaves like accepts 179s accepts sha256 in normalcase 179s behaves like offense 179s registers an offense for sha_256 in normalcase 179s behaves like accepts 179s accepts snake_case in normalcase 179s behaves like offense 179s registers an offense for localFOO_1 in normalcase 179s behaves like offense 179s registers an offense for _myLocal_1 in normalcase 179s behaves like accepts 179s accepts user1_id in normalcase 179s behaves like accepts 179s accepts user_1_id in normalcase 179s behaves like accepts 179s accepts @foo in normalcase 179s behaves like accepts 179s accepts local1 in normalcase 179s when configured for snake_case 179s registers an offense for normal case numbering in symbol 179s registers an offense for normal case numbering in method camel case parameter 179s registers an offense for normal case numbering in method name 179s registers an offense for normal case numbering in method parameter 179s does not register an offense for snake case numbering in symbol 179s registers an offense for normal case numbering in a global variable name 179s behaves like accepts 179s accepts local_ in snake_case 179s behaves like accepts 179s accepts a_1_b in snake_case 179s behaves like offense 179s registers an offense for camelCase1 in snake_case 179s behaves like accepts 179s accepts _ in snake_case 179s behaves like offense_array 179s registers an offense for ["a1", "a_2"] in snake_case 179s behaves like accepts 179s accepts @__foo__ in snake_case 179s behaves like accepts 179s accepts _foo in snake_case 179s behaves like offense 179s registers an offense for aB1 in snake_case 179s behaves like accepts 179s accepts local_123 in snake_case 179s behaves like accepts 179s accepts @foo in snake_case 179s behaves like accepts 179s accepts a_1_b_1 in snake_case 179s behaves like offense 179s registers an offense for @@local1 in snake_case 179s behaves like accepts integer symbols 179s accepts integer symbol array literal 179s accepts integer symbol 179s behaves like accepts 179s accepts local_1 in snake_case 179s behaves like accepts 179s accepts emparejó in snake_case 179s behaves like accepts 179s accepts _1 in snake_case 179s behaves like offense 179s registers an offense for _unused1 in snake_case 179s behaves like offense 179s registers an offense for @local1 in snake_case 179s behaves like offense 179s registers an offense for @camelCase1 in snake_case 179s behaves like accepts 179s accepts local_12 in snake_case 179s behaves like offense 179s registers an offense for local1 in snake_case 179s behaves like accepts 179s accepts aB_1 in snake_case 179s when CheckMethodNames is false 179s does not register an offense for snake case numbering in method name 179s when CheckSymbols is false 179s does not register an offense for snake case numbering in symbol 179s when configured for non integer 179s registers an offense for snake case numbering in symbol 179s registers an offense for normal case numbering in method camel case parameter 179s registers an offense for normal case numbering in method name 179s registers an offense for normal case numbering in method parameter 179s registers an offense for snake case numbering in method parameter 179s registers an offense for snake case numbering in method camel case parameter 179s registers an offense for normal case numbering in symbol 179s registers an offense for snake case numbering in method name 179s behaves like accepts 179s accepts @foo in non_integer 179s behaves like offense 179s registers an offense for _myLocal1 in non_integer 179s behaves like accepts 179s accepts local_ in non_integer 179s behaves like offense_array 179s registers an offense for ["a_1", "aone"] in non_integer 179s behaves like accepts 179s accepts localone in non_integer 179s behaves like offense 179s registers an offense for @myAttribute_1 in non_integer 179s behaves like accepts 179s accepts _1 in non_integer 179s behaves like offense 179s registers an offense for local1 in non_integer 179s behaves like accepts 179s accepts emparejó in non_integer 179s behaves like offense 179s registers an offense for @myAttribute1 in non_integer 179s behaves like offense 179s registers an offense for local_1 in non_integer 179s behaves like offense 179s registers an offense for myAttribute1 in non_integer 179s behaves like offense 179s registers an offense for myAttribute_1 in non_integer 179s behaves like offense 179s registers an offense for @local1 in non_integer 179s behaves like accepts 179s accepts @__foo__ in non_integer 179s behaves like accepts 179s accepts _foo in non_integer 179s behaves like accepts 179s accepts local_one in non_integer 179s behaves like accepts integer symbols 179s accepts integer symbol 179s accepts integer symbol array literal 179s behaves like offense 179s registers an offense for _myLocal_1 in non_integer 179s behaves like accepts 179s accepts _ in non_integer 179s behaves like accepts 179s accepts fooBar in non_integer 179s behaves like offense 179s registers an offense for @local_1 in non_integer 179s behaves like accepts 179s accepts @@foo in non_integer 179s 179s RuboCop::Cop::Style::InPatternThen 179s >= Ruby 2.7 179s registers an offense for `in b, c, d;` (array pattern) 179s registers an offense for `in b;` 179s accepts `;` separating statements in the body of `in` 179s registers an offense for `in b | c | d;` (alternative pattern) 179s registers an offense for `in b, c | d;` 179s when inspecting a case statement with an empty branch 179s does not register an offense 179s 179s RuboCop::Cop::Style::StringLiteralsInInterpolation 179s when configured with a bad value 179s fails 179s configured with single quotes preferred 179s can handle character literals 179s registers an offense for double quotes within embedded expression in a heredoc string 179s accepts double quotes on static strings within a method 179s accepts double quotes on a broken static string 179s accepts double quotes on a static string 179s registers an offense for double quotes within embedded expression 179s can handle a built-in constant parsed as string 179s configured with double quotes preferred 179s registers an offense for single quotes within embedded expression in a heredoc string 179s registers an offense for single quotes within embedded expression 179s 179s RuboCop::RemoteConfig 179s .inherit_from_remote 179s when the remote includes file starting with `./` 179s returns remote includes URI 179s .file 179s does not download the file if cache lifetime has not been reached 179s downloads the file if cache lifetime has been reached 179s downloads the file if the file does not exist 179s when the remote URL responds with 500 179s raises error 179s when remote URL is configured with basic auth 179s downloads the file if the file does not exist 179s downloads the file if cache lifetime has been reached 179s does not download the file if cache lifetime has not been reached 179s when the remote URL responds with 404 179s raises error 179s when the remote URL responds with 500 179s raises error 179s when remote URL is configured with token auth 179s downloads the file if cache lifetime has been reached 179s downloads the file if the file does not exist 179s does not download the file if cache lifetime has not been reached 179s when the remote URL responds with 404 179s raises error 179s when the network is inaccessible 179s reuses the existing cached file 179s when the remote URL responds with redirect 179s follows the redirect and downloads the file 179s when the remote URL responds with not modified 179s reuses the existing cached file 179s 179s RuboCop::Cop::Style::MissingElse 179s configured to warn only on empty case 179s given an if-statement 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with no else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s given an unless-statement 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s >= Ruby 2.7 179s does not register an offense 179s given a case statement 179s with no else-clause 179s registers an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s UnlessElse enabled 179s >= Ruby 2.7 179s does not register an offense 179s given a case statement 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s given an unless-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s doesn't register an offense 179s given an if-statement 179s with no else-clause 179s registers an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s EmptyElse enabled and set to warn on empty 179s >= Ruby 2.7 179s does not register an offense 179s given an if-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s given an unless-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s given a case statement 179s with no else-clause 179s registers an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s EmptyElse enabled and set to warn on nil 179s given an unless-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s given an if-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s given a case statement 179s with no else-clause 179s registers an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s >= Ruby 2.7 179s does not register an offense 179s UnlessElse disabled 179s given an unless-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s given a case statement 179s with no else-clause 179s registers an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s given an if-statement 179s with no else-clause 179s registers an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s >= Ruby 2.7 179s does not register an offense 179s configured to warn only on empty if 179s given a case statement 179s with no else-clause 179s doesn't register an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s given an unless-statement 179s with no else-clause 179s registers an offense 179s with an else-clause with side-effects 179s doesn't register an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s >= Ruby 2.7 179s does not register an offense 179s given an if-statement 179s with an else-clause with side-effects 179s doesn't register an offense 179s with a completely empty else-clause 179s doesn't register an offense 179s with no else-clause 179s registers an offense 179s with an else-clause containing only the literal nil 179s doesn't register an offense 179s 179s RuboCop::Cop::Lint::SafeNavigationChain 179s TargetRubyVersion >= 2.3 179s accepts usages of safe navigation at last only with argument 179s accepts usages of ordinary method chain with argument 179s registers an offense for safe navigation with < operator 179s accepts usages of safe navigation with `in?` method 179s accepts usages of safe navigation with `+@` method 179s accepts usages of safe navigation with === operator 179s accepts usages of safe navigation with `nil?` method 179s accepts usages of safe navigation with && operator 179s accepts usages of safe navigation with | operator 179s accepts usages of safe navigation at last only 179s accepts usages of method chain with safe navigation only with argument 179s accepts usages of safe navigation with `try` method 179s accepts usages of safe navigation with `blank?` method 179s accepts usages of safe navigation with `to_d` method 179s accepts usages of safe navigation with self assignment method 179s accepts usages of ordinary method chain 179s registers an offense for ordinary method call exists after safe navigation method call 179s registers an offense for ordinary method call exists after safe navigation method call with an argument 179s registers an offense for ordinary method chain exists after safe navigation method call 179s registers an offense for safe navigation with + operator 179s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 179s registers an offense for safe navigation with [] operator 179s registers an offense for safe navigation with []= operator 179s accepts usages of safe navigation with & operator 179s registers an offense for ordinary method chain exists after safe navigation method call with a block 179s registers an offense for safe navigation on the right-hand side of the `*` 179s registers an offense for safe navigation on the right-hand side of the `/` 179s accepts usages of method chain with safe navigation only 179s accepts usages of safe navigation with || operator 179s accepts usages of safe navigation with assignment method 179s registers an offense for safe navigation with > operator 179s registers an offense for safe navigation on the right-hand side of the `-` 179s registers an offense for safe navigation on the right-hand side of the `+` 179s registers an offense for ordinary method chain exists after safe navigation method call with an argument 179s registers an offense for safe navigation with <= operator 179s accepts usages of safe navigation with == operator 179s accepts usages of safe navigation with `-@` method 179s registers an offense for safe navigation with >= operator 179s accepts usages of safe navigation with `present?` method 179s proper highlighting 179s when in a method 179s when there are methods before 179s when there are methods after 179s when in a begin 179s when used with a modifier if 179s >= Ruby 2.7 179s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 179s 179s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 179s without line break after opening bracket 179s registers an offense and corrects nested hashes 179s registers an offense and corrects when key starts on same line as another 179s when on same line 179s does not add any offenses 179s with line break after opening bracket 179s registers an offense and corrects when key starts on same line as another 179s when on all keys on one line different than brackets 179s does not add any offenses 179s when on different lines than brackets but keys on one 179s does not add any offenses 179s when key starts on same line as another with rockets 179s adds an offense 179s 179s RuboCop::Cop::Offense 179s redefines == to compare offenses based on their contents 179s is frozen 179s overrides #to_s 179s does not blow up if a message contains % 179s has a few required attributes 179s when unknown severity is passed 179s raises error 179s #cop_name 179s is frozen 179s #severity_level 179s when severity is :info 179s is 1 179s when severity is :fatal 179s is 6 179s when severity is :refactor 179s is 2 179s #severity 179s is frozen 179s #<=> 179s when receiver has {:line=>6} and other has {:line=>5} 179s returns 1 179s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 179s returns 1 179s when receiver has {} and other has {} 179s returns 0 179s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 179s returns 1 179s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 179s returns 1 179s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 179s returns 1 179s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 179s returns 1 179s when the location is pseudo 179s returns a column 179s returns the last column 179s returns a line 179s returns a real column 179s returns the last line 179s returns the first line 179s returns a source line 179s returns a column length 179s returns a location with valid size and length 179s returns a column range 179s offenses that span multiple lines 179s highlights the first line 179s #message 179s is frozen 179s offenses that span part of a line 179s highlights the first line 179s #location 179s is frozen 179s 179s RuboCop::Cop::Lint::EmptyFile 179s registers an offense when the file is empty 179s does not register an offense when the file contains comments 179s does not register an offense when the file contains code 179s when AllowComments is false 179s registers an offense when the file contains comments 179s 179s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 179s when EnforcedStyle is space 179s accepts square brackets as method name 179s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 179s registers an offense and corrects second ref brackets with no trailing whitespace 179s accepts spaces in array brackets 179s does not register offense for ref bcts with spaces that assign 179s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 179s does not register offense for reference brackets with spaces 179s accepts square brackets called with method call syntax 179s accepts an array as a reference object 179s does not register offense for array literals 179s registers and corrects multiple offenses for multiple sets of ref brackets 179s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 179s registers and corrects multiple offenses in one set of ref brackets 179s registers an offense and correct third ref brackets with no trailing whitespace 179s registers an offense and corrects third ref brackets with no leading whitespace 179s registers an offense and corrects ref brackets with no trailing whitespace 179s registers an offense and corrects ref brackets with no leading whitespace 179s registers an offense and corrects second ref brackets with no leading whitespace 179s with space inside empty brackets not allowed 179s registers an offense and corrects empty brackets with multiple spaces inside 179s registers an offense and corrects empty brackets with newline inside 179s accepts empty brackets with no space inside 179s registers an offense and corrects empty brackets with 1 space inside 179s when EnforcedStyle is no_space 179s registers an offense and corrects third ref brackets with leading whitespace 179s register and correct multiple offenses for multiple sets of ref brackets 179s does not register offense for ref bcts with no spaces that assign 179s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 179s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 179s accepts square brackets as method name 179s does not register offense for array literals 179s registers an offense and corrects third ref brackets with trailing whitespace 179s registers an offense and corrects ref brackets with leading whitespace 179s registers an offense and corrects ref brackets with trailing whitespace 179s accepts square brackets called with method call syntax 179s registers an offense and corrects second ref brackets with leading whitespace 179s registers multiple offenses and corrects multiple sets of ref brackets 179s registers multiple offenses and corrects one set of ref brackets 179s does not register offense for reference brackets with no spaces 179s registers an offense and corrects second ref brackets with trailing whitespace 179s accepts an array as a reference object 179s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 179s accepts extra spacing in array brackets 179s does not register offense for non-empty brackets with newline inside 179s registers an offense and corrects outer ref brackets 179s with space inside empty braces allowed 179s accepts empty brackets with space inside 179s registers offense and corrects empty brackets with no space inside 179s registers offense and corrects empty brackets with more than one space inside 179s registers offense and corrects empty brackets with newline inside 179s 179s RuboCop::Cop::Layout::SpaceInsideBlockBraces 179s accepts left brace without outer space 179s registers an offense and corrects right brace without inner space 179s accepts braces surrounded by spaces 179s registers an offense and corrects both left and right brace without inner space after success 179s register offenses and correct both braces without inner space 179s registers an offense and corrects left brace without inner space 179s with space inside empty braces allowed 179s registers an offense and corrects empty braces with no space inside 179s accepts empty braces with space inside 179s configured with no_space 179s accepts left brace without outer space 179s registers an offense and corrects left brace with inner space 179s registers an offense and corrects both left and right brace with inner space after success 179s registers an offense and corrects right brace with inner space 179s accepts braces without spaces inside 179s with passed in parameters 179s and space before block parameters not allowed 179s accepts new lambda syntax 179s registers an offense and corrects left brace with inner space 179s registers an offense when braces are not aligned in multiline block with bracket 179s accepts when braces are aligned in multiline block with bracket 179s accepts when braces are aligned in multiline block 179s registers an offense when braces are not aligned in multiline block 179s and space before block parameters allowed 179s accepts new lambda syntax 179s accepts left brace with inner space 179s registers an offense and corrects left brace without inner space 179s Ruby >= 2.7 180s registers an offense for numblocks without inner space 180s with space inside empty braces not allowed 180s accepts empty braces with line break inside 180s accepts empty braces with no space inside 180s registers an offense and corrects empty braces with space inside 180s accepts multiline braces with content 180s accepts empty braces with comment and line break inside 180s accepts braces that are not empty 180s accepts braces with something inside 180s with passed in parameters 180s accepts new lambda syntax 180s for single-line blocks 180s registers an offense and corrects left brace without inner space 180s accepts left brace with inner space 180s for multi-line blocks 180s registers an offense and corrects left brace without inner space 180s accepts left brace with inner space 180s and BlockDelimiters cop enabled 180s registers an offense and corrects for single-line blocks 180s registers an offense and corrects multi-line blocks 180s and space before block parameters not allowed 180s accepts left brace without inner space 180s accepts new lambda syntax 180s registers an offense and corrects left brace with inner space 180s with invalid value for EnforcedStyleForEmptyBraces 180s fails with an error 180s 180s RuboCop::Formatter::SimpleTextFormatter 180s #report_file 180s behaves like report for severity 180s the file is outside of the current working directory 180s prints as absolute path 180s the file is under the current working directory 180s prints as relative path 180s when the offense is correctable 180s prints message as-is 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s when the offense is marked as todo 180s prints [Todo] along with message 180s when the offense is not corrected 180s prints message as-is 180s behaves like report for severity 180s when the offense is not corrected 180s prints message as-is 180s the file is outside of the current working directory 180s prints as absolute path 180s when the offense is correctable 180s prints message as-is 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s the file is under the current working directory 180s prints as relative path 180s when the offense is marked as todo 180s prints [Todo] along with message 180s behaves like report for severity 180s when the offense is correctable 180s prints message as-is 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s the file is outside of the current working directory 180s prints as absolute path 180s when the offense is not corrected 180s prints message as-is 180s when the offense is marked as todo 180s prints [Todo] along with message 180s the file is under the current working directory 180s prints as relative path 180s behaves like report for severity 180s the file is under the current working directory 180s prints as relative path 180s when the offense is marked as todo 180s prints [Todo] along with message 180s the file is outside of the current working directory 180s prints as absolute path 180s when the offense is correctable 180s prints message as-is 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s when the offense is not corrected 180s prints message as-is 180s behaves like report for severity 180s when the offense is correctable 180s prints message as-is 180s the file is under the current working directory 180s prints as relative path 180s when the offense is marked as todo 180s prints [Todo] along with message 180s when the offense is not corrected 180s prints message as-is 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s the file is outside of the current working directory 180s prints as absolute path 180s behaves like report for severity 180s when the offense is not corrected 180s prints message as-is 180s the file is under the current working directory 180s prints as relative path 180s when the offense is marked as todo 180s prints [Todo] along with message 180s the file is outside of the current working directory 180s prints as absolute path 180s when the offense is automatically corrected 180s prints [Corrected] along with message 180s when the offense is correctable 180s prints message as-is 180s #report_summary 180s when 2 offenses are corrected and 2 offenses autocorrectable 180s handles pluralization correctly 180s when an offense is corrected 180s prints about correction 180s when 2 offenses detected and 2 offenses autocorrectable 180s handles pluralization correctly 180s when a offense detected 180s handles pluralization correctly 180s when 2 offenses detected 180s handles pluralization correctly 180s when no files inspected 180s handles pluralization correctly 180s when a file inspected and no offenses detected 180s handles pluralization correctly 180s when a offense detected and a offense autocorrectable 180s handles pluralization correctly 180s when 2 offenses are corrected 180s handles pluralization correctly 180s 180s RuboCop::Cop::Style::PercentLiteralDelimiters 180s `%Q` interpolated string 180s registers an offense for other delimiters 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s `%w` string array 180s does not register an offense for preferred delimiters with a pairing delimiters 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s does not register an offense for preferred delimiters 180s does not register an offense for preferred delimiters with only a closing delimiter 180s does not register an offense for preferred delimiters with not a pairing delimiter 180s registers an offense for other delimiters 180s `%W` interpolated string array 180s registers an offense for other delimiters 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s `%i` symbol array 180s does not register an offense for non-preferred delimiters enclosing escaped delimiters 180s registers an offense for other delimiters 180s does not register an offense for preferred delimiters 180s `%s` symbol 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters 180s `%I` interpolated symbol array 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s registers an offense for other delimiters 180s `%q` string 180s does not register an offense for preferred delimiters 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s registers an offense for other delimiters 180s invalid cop config 180s raises an error when invalid configuration is specified 180s `default` override 180s allows all preferred delimiters to be set with one key 180s allows individual preferred delimiters to override `default` 180s `%` interpolated string 180s registers an offense for a string with no content 180s registers an offense for other delimiters 180s registers an offense when the source contains invalid characters 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s does not register an offense for preferred delimiters 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s `%x` interpolated system call 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s registers an offense for other delimiters 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s `%r` interpolated regular expression 180s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 180s does not register an offense for other delimiters when containing preferred delimiter characters 180s registers an offense for a regular expression with option 180s does not register an offense for preferred delimiters 180s registers an offense for other delimiters 180s autocorrect 180s preserves indentation when correcting a multiline array 180s preserves irregular indentation when correcting a multiline array 180s fixes a string array in a scope 180s preserves line breaks when fixing a multiline array 180s behaves like escape characters 180s corrects % with \t in it 180s corrects % with \n in it 180s behaves like escape characters 180s corrects %Q with \n in it 180s corrects %Q with \t in it 180s behaves like escape characters 180s corrects %s with \t in it 180s corrects %s with \n in it 180s behaves like escape characters 180s corrects %i with \n in it 180s corrects %i with \t in it 180s behaves like escape characters 180s corrects %w with \n in it 180s corrects %w with \t in it 180s behaves like escape characters 180s corrects %x with \n in it 180s corrects %x with \t in it 180s behaves like escape characters 180s corrects %W with \t in it 180s corrects %W with \n in it 180s behaves like escape characters 180s corrects %r with \n in it 180s corrects %r with \t in it 180s behaves like escape characters 180s corrects %q with \t in it 180s corrects %q with \n in it 180s 180s RuboCop::Cop::Style::NumericLiterals 180s does not count a leading minus sign as a digit 180s handles numeric literal with exponent 180s accepts a short integer without underscore 180s accepts short numbers without underscore 180s accepts long numbers with underscore 180s registers an offense for a long undelimited integer 180s registers an offense for an integer with misplaced underscore 180s accepts integers with less than three places at the end 180s autocorrects numbers with spaces between leading minus and numbers 180s ignores non-decimal literals 180s autocorrects negative floating-point numbers 180s autocorrects numeric literal with exponent and dot 180s autocorrects numeric literal with exponent (large E) and dot 180s autocorrects negative numbers 180s registers an offense for a float with a long undelimited integer part 180s AllowedPatterns 180s registers an offense for numbers that do not exactly match the pattern 180s corrects by inserting underscores every 3 digits 180s does not register an offense for numbers that exactly match the pattern 180s AllowedPatterns with repetition 180s does not register an offense for numbers that match the pattern 180s for --auto-gen-config 180s with separators 180s does not disable the cop if the line is disabled 180s disables the cop 180s when the number is only digits 180s sets the right value if one is disabled inline 180s detects right value of MinDigits based on the longest number 180s when `3000` is specified for `AllowedNumbers` 180s registers an offense 180s does not register an offense 180s strict 180s registers an offense for an integer with misplaced underscore 180s when `'3000'` is specified for `AllowedNumbers` 180s does not register an offense 180s registers an offense 180s 180s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 180s rejects a return statement inside a block when using += 180s accepts a block with no return when using = 180s accepts a block with no return when using -= 180s accepts a block with no return when using *= 180s rejects a return statement inside a block when using ||= 180s accepts a block with no return when using ||= 180s rejects a return statement inside a block when using /= 180s rejects a return statement inside a block when using = 180s rejects a return statement inside a block when using -= 180s rejects a return statement inside a block when using **= 180s rejects a return statement inside a block when using *= 180s accepts a block with no return when using += 180s accepts a block with no return when using /= 180s accepts a block with no return when using **= 180s 180s RuboCop::Cop::Style::MethodCallWithArgsParentheses 180s allowing parens in string interpolation 180s accepts parens for camel-case method names 180s when EnforcedStyle is require_parentheses (default) 180s autocorrects calls where the argument node is a number 180s autocorrects parenthesized args for local methods by removing space 180s autocorrects partially parenthesized args by adding needed braces 180s register an offense for yield without parens 180s register an offense for method call without parens 180s autocorrects calls where the argument node is a constant 180s autocorrects calls with multiple args by adding needed braces 180s autocorrects calls where arg is method call 180s register no offense for superclass call with parens 180s register no offense for yield without args 180s autocorrects call with multiple args by adding braces 180s register no offense for superclass call without args 180s autocorrects calls where multiple args are method calls 180s register an offense for superclass call without parens 180s register an offense for non-receiver method call without parens 180s accepts no parens in method call without args 180s accepts no parens for unary operators 180s autocorrects fully parenthesized args by removing space 180s accepts no parens for operators 180s register an offense for methods starting with capital without parens 180s accepts parens in method call with do-end blocks 180s accepts no parens for setter methods 180s accepts parens in method call with args 180s with AllowedMethods 180s allow method listed in AllowedMethods 180s AllowedPatterns 180s ignored methods listed in AllowedPatterns 180s when using safe navigation operator 180s register an offense for method call without parens 180s when inspecting macro methods 180s in a module body 180s does not register an offense 180s in a class body 180s does not register an offense 180s behaves like endless methods 180s endless methods 180s without arguments 180s does not register an offense when there are no parens 180s does not register an offense for `defs` when there are arguments 180s does not register an offense for `defs` when there are parens 180s does not register an offense when there are arguments 180s does not register an offense when there are parens 180s with arguments 180s requires method calls to have parens 180s when EnforcedStyle is omit_parentheses 180s accepts special lambda call syntax 180s accepts parens in chaining with safe operators 180s accepts parens in nested method args 180s accepts parens in args splat 180s accepts parens in calls with hash as arg 180s accepts parens in method args 180s accepts parens in default keyword argument value calls 180s accepts parens in splat calls 180s accepts parens in super method calls as arguments 180s accepts parens in yield argument method calls 180s autocorrects multi-line calls with trailing whitespace 180s register an offense in multi-line inheritance 180s register an offense for multi-line method calls 180s accepts parens in args with ternary conditions 180s accepts parens in calls with logical operators 180s register an offense for %r regex literal as arguments 180s register an offense for superclass call with parens 180s autocorrects complex multi-line calls 180s accepts parens in argument calls with braced blocks 180s accepts parens in calls with args with logical operators 180s autocorrects single-line calls 180s accepts parens in chained method calls 180s accepts parens in super calls with braced blocks 180s accepts parens in implicit #to_proc 180s register an offense for camel-case methods with arguments 180s accepts parens in blocks with braces 180s accepts parens in chaining with operators 180s accepts no parens in method call without args 180s accepts parens in default argument value calls 180s register an offense for parens in string interpolation 180s register an offense for hashes in keyword values 180s register an offense in assignments 180s accepts parens in operator method calls 180s accepts parens in assignment in conditions 180s accepts parens in range literals 180s accepts parens in ternary condition calls 180s register an offense for yield call with parens 180s accepts parens in camel case method without args 180s register an offense for parens in method call without args 180s register an offense in complex conditionals 180s accepts parens in slash regexp literal as argument 180s register an offense for parens in do-end blocks 180s accepts parens in block passing calls 180s accepts no parens in method call with args 180s accepts parens in literals with unary operators as first argument 180s accepts parens in single-line inheritance 180s accepts parens in super without args 180s register an offense for parens in the last chain 180s allowing parens in multi-line calls 180s accepts parens for multi-line calls 180s allowing parenthesis in chaining 180s accepts no parens in the last call if previous calls with parens 180s register offense for single-line chaining without previous parens 180s accepts parens in the last call if any previous calls with parentheses 180s register offense for multi-line chaining without previous parens 180s behaves like endless methods 180s endless methods 180s with arguments 180s requires method calls to have parens 180s without arguments 180s does not register an offense when there are no parens 180s registers an offense when there are parens 180s does not register an offense for `defs` when there are arguments 180s registers an offense for `defs` when there are parens 180s does not register an offense when there are arguments 180s numbered parameters in 2.7 180s accepts parens for braced numeric block calls 180s forwarded arguments in 3.0 180s accepts parens for forwarded arguments 180s allowing parens in camel-case methods 180s accepts parens for camel-case method names 180s hash value omission in 3.1 180s registers an offense using assignment with parentheses call expr follows 180s does not register an offense when without parentheses call expr follows 180s registers an offense when last argument is a hash value omission 180s registers and corrects an offense when explicit hash value with parentheses and using modifier form 180s does not register an offense when hash value omission with parentheses and using modifier form 180s registers an offense when with parentheses call expr follows 180s forwarded arguments in 2.7 180s accepts parens for forwarded arguments 180s when inspecting macro methods with IncludedMacros 180s behaves like endless methods 180s endless methods 180s with arguments 180s requires method calls to have parens 180s without arguments 180s does not register an offense when there are parens 180s does not register an offense for `defs` when there are parens 180s does not register an offense when there are no parens 180s does not register an offense for `defs` when there are arguments 180s does not register an offense when there are arguments 180s in a module body 180s finds offense 180s for a macro not on the included list 180s allows 180s in a class body 180s finds offense 180s for a macro in both IncludedMacros and AllowedMethods 180s allows 180s 180s RuboCop::Cop::VariableForce::Assignment 180s #operator 180s when it is normal assignment 180s returns = 180s when it is += operator assignment 180s returns += 180s when it is multiple assignment 180s returns = 180s when it is &&= operator assignment 180s returns &&= 180s when it is ||= operator assignment 180s returns ||= 180s #meta_assignment_node 180s when it is multiple assignment 180s returns masgn node 180s when it is ||= operator assignment 180s returns or_asgn node 180s when it is &&= operator assignment 180s returns and_asgn node 180s when it is += operator assignment 180s returns op_asgn node 180s #name 180s returns the variable name 180s .new 180s when any other type node is passed 180s raises error 180s when an assignment node is passed 180s does not raise error 180s when an argument declaration node is passed 180s raises error 180s 180s RuboCop::Cop::Naming::InclusiveLanguage 180s flagged term matching 180s registers an offense when using a flagged term 180s registers an offense when using a flagged term with mixed case 180s registers an offense for a partial word match 180s disable default flagged term 180s ignores flagged terms that are set to nil 180s regex 180s registers an offense for a flagged term matched with a regexp 180s multiple offenses on a line 180s registers an offense for each word 180s WholeWord: true 180s only flags when the term is a whole word 180s comments 180s registers an offense in a block comment 180s registers an offense in a single line comment 180s when CheckComments is false 180s does not register an offense 180s strings 180s registers an offense in a heredoc 180s registers an offense for an interpolated string 180s registers an offense for a multiline string 180s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 180s when CheckStrings config is false 180s does not register offenses for strings 180s constants 180s when CheckConstants config is false 180s does not register offenses for constants 180s when CheckConstants config is true 180s registers offenses for constants 180s filepath 180s multiple offenses in filename 180s registers an offense with all problematic words 180s offense in directory name 180s registers an offense for a director 180s CheckFilepaths is false 180s does not register an offense 180s one offense in filename 180s registers an offense 180s allowed use 180s does not register an offense for an allowed use 180s offense after an allowed use 180s registers an offense at the correct location 180s symbols 180s when CheckSymbols is true 180s registers an offense 180s when CheckSymbols is false 180s does not register an offense 180s identifiers 180s when CheckIdentifiers config is true 180s registers an offense 180s when CheckIdentifiers config is false 180s does not register offenses for identifiers 180s suggestions 180s flagged term with one suggestion 180s includes the suggestion in the offense message 180s flagged term with two suggestions 180s includes both suggestions in the offense message 180s flagged term with three or more suggestions 180s includes all suggestions in the message 180s variables 180s when CheckVariables config is true 180s registers offenses for global variables 180s registers offenses for class variables 180s registers offenses for instance variables 180s when CheckVariables config is false 180s does not register offenses for variables 180s 180s RuboCop::Cop::Metrics::AbcSize 180s when Max is 2 180s accepts two assignments 180s when Max is 10.3 180s reports size and max as <10, 10, 40> 42.43/10.3 180s when Max is 100.321 180s reports size and max as <100, 100, 400> 424.3/100.3 180s when Max is 1000.3 180s reports size and max as <1000, 1000, 4000> 4243/1000 180s when Max is 2.3 180s accepts a total score of 2.24 180s when Max is 1.3 180s reports size and max as <1, 1, 4> 4.24/1.3 180s when Max is 0 180s registers an offense for an assignment of a local variable 180s registers an offense for complex content including A, B, and C scores 180s accepts an empty method 180s registers an offense for a `define_method` 180s treats safe navigation method calls like regular method calls + a condition 180s registers an offense for an if modifier 180s accepts an empty `define_method` 180s registers an offense for an assignment of an element 180s when CountRepeatedAttributes is `false` 180s does not count repeated attributes 180s when CountRepeatedAttributes is `true` 180s counts repeated attributes 180s Ruby 2.7 180s registers an offense for a `define_method` with numblock 180s when method is in list of allowed methods 180s when AllowedMethods is enabled 180s does not register an offense when defining a class method 180s does not register an offense when using `define_method` 180s does not register an offense when defining an instance method 180s when AllowedPatterns is enabled 180s does not register an offense when using `define_method` 180s does not register an offense when defining an instance method 180s does not register an offense when defining a class method 180s 180s RuboCop::YAMLDuplicationChecker 180s when yaml has duplicated keys in the top level 180s calls block 180s calls block with keys 180s when yaml does not have any duplication 180s does not call block 180s when yaml has duplicated keys in the second level 180s calls block with keys 180s calls block 180s 180s RuboCop::Cop::Gemspec::DuplicatedAssignment 180s registers an offense when using `name=` twice with `cbase` 180s registers an offense when using `name=` twice 180s registers an offense when using `required_ruby_version=` twice 180s does not register an offense when using `spec.add_dependency` twice 180s does not register an offense when using `<<` twice 180s registers an offense when using `version=` twice 180s does not register an offense when `name=` method call is not block value 180s 180s RuboCop::Cop::Layout::LineContinuationSpacing 180s EnforcedStyle: space 180s registers an offense when too much space in front of backslash 180s ignores heredocs and comments 180s registers no offense with one space in front of backslash 180s ignores empty code 180s marks the offense correctly when offense is not in first line 180s ignores when too much space in front of backslash after `__END__` 180s registers an offense when no space in front of backslash 180s EnforcedStyle: no_space 180s registers an offense when many spaces in front of backslash 180s ignores when too much space in front of backslash after `__END__` 180s ignores empty code 180s marks the offense correctly when offense is not in first line 180s registers no offense with zero spaces in front of backslash 180s ignores heredocs and comments 180s registers an offense when one space in front of backslash 180s 180s RuboCop::Cop::Naming::MethodParameterName 180s registers offense for offensive default parameter 180s registers offense when parameter ends in number on class method 180s registers offense when parameter ends in number 180s does not register offense for empty kwrestarg 180s does not register offense for valid keyword parameters 180s registers offense when parameter is less than minimum length 180s can register multiple offenses in one method definition 180s registers offense when parameter contains uppercase characters 180s does not register offense for valid parameter names on self.method 180s does not register offense for valid parameter names 180s does not register offense for empty restarg 180s does not register for method without parameters 180s does not register offense for valid default parameters 180s registers offense for offensive keyword parameters 180s registers offense when parameter with prefix is less than minimum length 180s with AllowedNames 180s accepts param names prefixed with underscore 180s registers unlisted offensive names 180s accepts underscore param names 180s accepts specified block param names 180s with AllowNamesEndingInNumbers 180s accept parameters that end in numbers 180s with ForbiddenNames 180s registers offense for parameter listed as forbidden 180s accepts parameter that uses a forbidden name's letters 180s when using argument forwarding 180s does not register an offense 180s 180s RuboCop::Cop::Lint::AmbiguousAssignment 180s registers an offense when using `!` with `X` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `*` with `x` 180s registers an offense when using `!` with `@x` 180s registers an offense when using `-` with `@x` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `-` with `X` 180s registers an offense when using `-` with `@@x` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `!` with `@@x` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `*` with `@x` 180s does not register an offense when no mistype assignments 180s registers an offense when using `*` with `$x` 180s registers an offense when using `+` with `x` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `-` with `$x` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s registers an offense when using `!` with `x` 180s registers an offense when using `+` with `X` 180s registers an offense when using `-` with `x` 180s registers an offense when using `+` with `@@x` 180s registers an offense when using `+` with `@x` 180s registers an offense when using `!` with `$x` 180s does not register an offense when no mistype assignments 180s registers an offense when using `+` with `$x` 180s does not register an offense when no mistype assignments 180s registers an offense when using `*` with `@@x` 180s registers an offense when using `*` with `X` 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s does not register an offense when no mistype assignments 180s 180s RuboCop::Cop::Style::WhileUntilModifier 180s behaves like condition modifier cop 180s for a multiline 'until' 180s doesn't break when used as RHS of instance var assignment 180s accepts it if body spans more than one line 180s handles inline comments during autocorrection 180s doesn't break when used as RHS of local var assignment 180s doesn't break when used as RHS of constant assignment 180s accepts it when condition has local variable assignment 180s corrects it if result fits in one line 180s accepts it if single line would not fit on one line 180s accepts an empty body 180s doesn't break when used as RHS of binary arithmetic 180s handles one-line usage 180s doesn't break when used as RHS of class var assignment 180s corrects it when assignment is in body 180s when Layout/LineLength is disabled 180s registers an offense even for a long modifier statement 180s when there is a comment on the first line and some code after the end keyword 180s does not register an offense 180s accepts multiline condition in modifier form 180s registers an offense 180s behaves like condition modifier cop 180s for a multiline 'while' 180s accepts it if body spans more than one line 180s accepts it if single line would not fit on one line 180s corrects it if result fits in one line 180s doesn't break when used as RHS of local var assignment 180s doesn't break when used as RHS of binary arithmetic 180s corrects it when assignment is in body 180s handles one-line usage 180s accepts it when condition has local variable assignment 180s accepts an empty body 180s handles inline comments during autocorrection 180s doesn't break when used as RHS of constant assignment 180s doesn't break when used as RHS of class var assignment 180s doesn't break when used as RHS of instance var assignment 180s accepts multiline condition in modifier form 180s registers an offense 180s when there is a comment on the first line and some code after the end keyword 180s does not register an offense 180s when Layout/LineLength is disabled 180s registers an offense even for a long modifier statement 180s 180s RuboCop::Cop::Naming::ConstantName 180s does not check if rhs is another constant 180s does not check names if rhs is a `Struct.new` 180s does not check names if rhs is a `Class.new` with conditional assign 180s registers an offense for non-POSIX upper case in const name 180s does not check names if rhs is a `Struct.new` with conditional assign 180s registers an offense for camel case in const namewhen using frozen range assignment 180s registers an offense for camel case in const name 180s does not check names if rhs is a `Class.new` 180s does not check if rhs is a non-offensive const assignment 180s registers 1 offense if rhs is offending const assignment 180s does not check names if rhs is a method call with conditional assign 180s registers an offense for camel case in const namewhen using frozen object assignment 180s checks qualified const names 180s registers offenses for camel case in multiple const assignment 180s does not check names if rhs is a method call 180s does not check names if rhs is a method call with block 180s allows screaming snake case with POSIX upper case characters 180s allows screaming snake case in const name 180s registers an offense for snake case in const name 180s allows screaming snake case in multiple const assignment 180s when a rhs is a conditional expression 180s when conditional branches contain only constants 180s does not check names 180s when conditional branches contain only string values 180s registers an offense 180s when conditional branches contain a value other than a constant 180s does not check names 180s 180s RuboCop::Cop::Lint::Void 180s accepts void op <= by itself without a begin block 180s registers an offense for void op == if not on last line 180s registers an offense for void var VAR if not on last line 180s accepts void op <=> by itself without a begin block 180s accepts void op + if on last line 180s registers an offense for void op <= if not on last line 180s registers an offense for void sign op - if not on last line 180s registers two offenses for void literals in `#tap` method 180s registers an offense for void op + if not on last line 180s registers an offense for void op != if not on last line 180s accepts void op * by itself without a begin block 180s accepts method with erange block 180s accepts void unary op ! by itself without a begin block 180s registers an offense for void lit 2.0 if not on last line 180s registers an offense for void lit 1 if not on last line 180s registers an offense for void lit /test/ if not on last line 180s accepts void op - if on last line 180s accepts void op - by itself without a begin block 180s registers an offense for void op <=> if not on last line 180s accepts void op > if on last line 180s registers an offense for void literal in a method definition 180s registers two offenses for void literals in a `for` 180s accepts void op * if on last line 180s registers an offense for void var $var if not on last line 180s registers an offense for void unary op ~ if not on last line 180s accepts backtick commands 180s accepts void op % by itself without a begin block 180s accepts void unary op ~ by itself without a begin block 180s registers an offense for void `self` if not on last line 180s registers two offenses for void literals in an initialize method 180s accepts void op != by itself without a begin block 180s registers an offense for void op / if not on last line 180s registers an offense for void sign op + if not on last line 180s accepts void op < if on last line 180s registers an offense for void unary op ! if not on last line 180s accepts void op === by itself without a begin block 180s accepts percent-x commands 180s registers two offenses for void literals in a `#each` method 180s accepts void op / if on last line 180s accepts method with irange block 180s accepts void unary op ! if on last line 180s registers an offense for void lit {} if not on last line 180s accepts void op <=> if on last line 180s accepts short call syntax 180s registers an offense for void var @var if not on last line 180s accepts void unary op + by itself without a begin block 180s accepts void unary op - if on last line 180s accepts void op != if on last line 180s registers an offense for void lit :test if not on last line 180s accepts void op <= if on last line 180s registers an offense for void op === if not on last line 180s accepts void op % if on last line 180s accepts void unary op + if on last line 180s accepts void op >= by itself without a begin block 180s registers an offense for void `defined?` if not on last line 180s accepts void op / by itself without a begin block 180s accepts void unary op - by itself without a begin block 180s registers an offense for void op >= if not on last line 180s accepts void unary op ~ if on last line 180s accepts void op == by itself without a begin block 180s registers two offenses for void literals in a setter method 180s registers an offense for void op > if not on last line 180s accepts void op > by itself without a begin block 180s registers an offense for void var var if not on last line 180s handles explicit begin blocks 180s accepts void op + by itself without a begin block 180s registers an offense for void op - if not on last line 180s accepts void op < by itself without a begin block 180s registers an offense for void op % if not on last line 180s accepts void op === if on last line 180s registers an offense for void var @@var if not on last line 180s accepts void op >= if on last line 180s handles `#each` block with single expression 180s accepts empty block 180s registers an offense for void op < if not on last line 180s registers an offense for void lit [1] if not on last line 180s registers an offense for void op * if not on last line 180s accepts void op == if on last line 180s Ruby 2.7 180s registers two offenses for void literals in `#tap` method 180s when checking for methods with no side effects 180s registers an offense if not on last line 180s registers an offense for chained methods 180s when not checking for methods with no side effects 180s does not register an offense for void nonmutating methods 180s 180s RuboCop::Cop::Lint::UnexpectedBlockArity 180s registers multiple offenses 180s with a block 180s with optargs 180s with arity 2 180s does not register an offense 180s with arity 1 180s registers an offense 180s when destructuring 180s with arity 1 180s registers an offense 180s with arity 2 180s does not register an offense 180s when given two parameters 180s does not register an offense 180s when given one parameter 180s registers an offense 180s with shadow args 180s registers an offense 180s when given a splat parameter 181s does not register an offense 181s with a keyword splat 181s registers an offense 181s when given no parameters 181s registers an offense 181s when given three parameters 181s does not register an offense 181s with no receiver 181s does not register an offense 181s with keyword args 181s registers an offense 181s with a numblock 181s when given three parameters 181s does not register an offense 181s when using enough parameters, but not all explicitly 181s does not register an offense 181s when given two parameters 181s does not register an offense 181s with no receiver 181s does not register an offense 181s when given no parameters 181s registers an offense 181s when given one parameter 181s registers an offense 181s 181s RuboCop::Cop::Layout::LeadingEmptyLines 181s allows blank lines without any comments or code 181s registers an offense and corrects a new line before code 181s accepts not having a blank line before a class 181s allows an empty input 181s accepts not having a blank line before a comment 181s accepts not having a blank line before code 181s registers an offense and corrects multiple new lines before a class 181s registers an offense and corrects a new line before a class 181s registers an offense and corrects a new line before a comment 181s autocorrect 181s in collaboration 181s does not invoke conflicts with other cops 181s 181s RuboCop::Cop::Lint::IdentityComparison 181s does not register an offense when using `==` 181s does not register an offense when rhs is `object_id` without receiver 181s registers an offense and corrects when using `==` for comparison between `object_id`s 181s does not register an offense when a receiver that is not `object_id` uses `==` 181s does not register an offense when using `==` for comparison between `object_id` and other 181s does not register an offense when lhs is `object_id` without receiver 181s 181s RuboCop::Cop::Layout::EndOfLine 181s when EnforcedStyle is lf 181s does not register offenses after __END__ 181s registers an offense for CR at end of file 181s accepts an empty file 181s registers an offense for CR+LF 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 and there are many lines ending with CR+LF 181s registers only one offense 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 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 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::Style::ExplicitBlockArgument 181s registers an offense and corrects when `yield` is inside block of `super` 181s does not register an offense when `yield` arguments is not a prefix of block arguments 181s adds to the existing arguments when correcting 181s does not register an offense when `yield` is the sole block body 181s registers an offense and corrects when multiple arguments are yielded 181s correctly corrects when method already has an explicit block argument 181s does not register an offense when arguments are yielded in a different order 181s registers an offense and corrects when block just yields its arguments 181s registers an offense and corrects when method contains multiple `yield`s 181s does not register an offense when `yield` is not inside block 181s does not register an offense when code is called outside of a method 181s does not add extra parens to `super` when correcting 181s correctly corrects when the method call has a trailing comma in its argument list 181s does not add extra parens when correcting 181s does not register an offense when there is more than one block argument and not all are yielded 181s registers an offense and corrects when `yield` inside block has no arguments 181s correctly corrects when using safe navigation method call 181s 181s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 181s ignores calls with a multiline empty brace 181s ignores calls with an empty brace 181s ignores implicit calls 181s ignores calls without arguments 181s ignores single-line calls 181s behaves like multiline literal brace layout trailing comma 181s symmetrical style 181s opening brace on same line as first element 181s last element has a trailing comma 181s autocorrects closing brace on different line from last element 181s same_line style 181s opening brace on same line as first element 181s last element has a trailing comma 181s autocorrects closing brace on different line as last element 181s when comment present before closing brace 181s corrects closing brace without crashing 181s behaves like multiline literal brace layout 181s same_line style 181s opening brace on separate line from first element 181s allows closing brace on same line as last element 181s detects closing brace on different line from last element 181s allows closing brace on same line as last multiline element 181s opening brace on same line as first element 181s allows closing brace on same line from last element 181s allows closing brace on same line as multi-line element 181s autocorrects closing brace on different line as last element 181s detects closing brace on different line from multiline element 181s with a chained call on the closing brace 181s and a comment after the last element 181s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 181s but no comment after the last element 181s autocorrects the closing brace 181s symmetrical style 181s opening brace on same line as first element 181s autocorrects closing brace on different line from last element 181s detects closing brace on different line from last element 181s allows closing brace on same line as last multiline element 181s allows closing brace on same line as last element 181s with a chained call on the closing brace 181s and a comment after the last element 181s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 181s but no comment after the last element 181s autocorrects the closing brace 181s opening brace on separate line from first element 181s allows closing brace on separate line from last element 181s detects closing brace on same line as last element 181s allows closing brace on separate line from last multiline element 181s heredoc 181s ignores heredocs that could share a last line 181s detects heredoc structures that are safe to add to 181s new_line style 181s opening brace on same line as first element 181s allows closing brace on different line from multi-line element 181s allows closing brace on different line from last element 181s detects closing brace on same line as last multiline element 181s autocorrects closing brace on same line as last element 181s opening brace on separate line from first element 181s allows closing brace on separate line from last element 181s allows closing brace on separate line from last multiline element 181s detects closing brace on same line as last element 181s when EnforcedStyle is new_line 181s ignores single-line calls with multi-line receiver 181s ignores single-line calls with multi-line receiver with leading dot 181s still ignores single-line calls 181s 181s RuboCop::Cop::VisibilityHelp 181s #node_visibility 181s with visibility block public 181s is expected to eq :public 181s with inline public 181s is expected to eq :public 181s with inline private 181s is expected to eq :private 181s with visibility block private 181s is expected to eq :private 181s with visibility block private after public 181s is expected to eq :private 181s without visibility block 181s is expected to eq :public 181s with inline private with symbol 181s is expected to eq :private 181s 181s RuboCop::Cop::Style::KeywordParametersOrder 181s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 181s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 181s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 181s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 181s does not register an offense when there are no `kwoptarg`s before `kwarg`s 181s registers an offense and corrects when `kwoptarg` is before `kwarg` 181s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 181s when using block keyword parameters 181s does not register an offense when there are no `kwoptarg`s before `kwarg`s 181s registers an offense and corrects when `kwoptarg` is before `kwarg` 181s 181s RuboCop::Cop::Style::RandomWithOffset 181s does not register an offense when using range with triple dots 181s registers an offense when using Random.rand 181s registers an offense when using rand(erange) - offset 181s does not register an offense when using rand(irange) + offset with a non-integer range value 181s registers an offense when using rand(irange).succ 181s registers an offense when using rand(int).next 181s registers an offense when using Random.rand(int).succ 181s registers an offense when using rand(int) + offset 181s registers an offense when using offset - rand(erange) 181s does not register an offense when using rand(irange).succ with a non-integer range value 181s registers an offense when using offset + rand(int) 181s registers an offense when using rand(irange) - offset 181s registers an offense when using rand(erange) + offset 181s registers an offense when using rand(erange).succ 181s does not register an offense when using rand(erange).pred with a non-integer range value 181s does not register an offense when using range with double dots 181s registers an offense when using ::Random.rand 181s registers an offense when using ::Kernel.rand 181s does not register an offense when using offset - rand(erange) with a non-integer range value 181s registers an offense when using ::Random.rand(int).pred 181s registers an offense when using rand(int).pred 181s registers an offense when using rand(irange) + offset 181s registers an offense when using rand(int).succ 181s registers an offense when using offset - rand(int) 181s registers an offense when using rand(int) - offset 181s registers an offense when using offset - ::Random.rand(int) 181s registers an offense when using offset - rand(irange) 181s registers an offense when using Kernel.rand 181s registers an offense when using offset + Random.rand(int) 181s 181s RuboCop::Ext::RegexpNode 181s #each_capture 181s when called with a `named: false` 181s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 181s when called with a `named: true` 181s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 181s when called without argument 181s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 181s #parsed_tree 181s with an extended mode regexp with comment 181s returns the expected tree 181s with a regexp containing a multi-line interpolation 181s returns the expected blanked tree 181s with a regexp not containing interpolation 181s returns the expected tree 181s with a regexp containing interpolation 181s returns the expected blanked tree 181s with a regexp with subexpressions 181s has location information 181s 181s RuboCop::Cop::Lint::DuplicateBranch 181s registers an offense when `case` has duplicate `when` branch 181s does not register an offense for simple `if` without other branches 181s does not register an offense for modifier `if` 181s registers an offense when `if` has duplicate `else` branch 181s registers an offense when `rescue` has duplicate `else` branch 181s registers an offense when `case` has multiple duplicate branches 181s registers an offense when ternary has duplicate branches 181s does not register an offense for empty `unless` 181s does not register an offense when ternary has no duplicate branches 181s does not register an offense for simple `unless` without other branches 181s registers an offense when `if` has multiple duplicate branches 181s does not register an offense when `case` has no duplicate branches 181s registers an offense when `rescue` has duplicate `resbody` branch 181s registers an offense when `case` has duplicate `else` branch 181s does not register an offense when `rescue` has no duplicate branches 181s does not register an offense when `if` has no duplicate branches 181s does not register an offense for modifier `unless` 181s does not register an offense for empty `if` 181s registers an offense when `if` has duplicate `elsif` branch 181s registers an offense when `unless` has duplicate `else` branch 181s registers an offense when `rescue` has multiple duplicate `resbody` branches 181s does not register an offense when `unless` has no duplicate branches 181s with IgnoreLiteralBranches: true 181s with `case` 181s behaves like literal case allowed 181s when returning a nil in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a false in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a simple erange in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a variable in multiple branches 181s registers an offense 181s behaves like literal case disallowed 181s when returning a xstr in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a complex in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a rational in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a complex irange in multiple branches 181s registers an offense 181s behaves like literal case disallowed 181s when returning a dsym in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a string in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a method call in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a hash of literals in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a complex regexp in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a regexp with modifier in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a dstr in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a simple irange in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a complex array in multiple branches 181s registers an offense 181s behaves like literal case disallowed 181s when returning a complex erange in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a array of literals in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: true 181s behaves like literal case allowed 181s when returning a array of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a hash of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a integer in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a float in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a true in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a regexp in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a symbol in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: false 181s behaves like literal case disallowed 181s when returning a hash of constants in multiple branches 181s registers an offense 181s behaves like literal case disallowed 181s when returning a array of constants in multiple branches 181s registers an offense 181s behaves like literal case disallowed 181s when returning a complex hash in multiple branches 181s registers an offense 181s behaves like literal case allowed 181s when returning a empty hash in multiple branches 181s allows branches to be duplicated 181s behaves like literal case allowed 181s when returning a empty array in multiple branches 181s allows branches to be duplicated 181s with `rescue` 181s behaves like literal rescue disallowed 181s when returning a variable in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a complex regexp in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a complex irange in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a complex in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue disallowed 181s when returning a xstr in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a integer in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a simple irange in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: true 181s behaves like literal rescue allowed 181s when returning a array of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a hash of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a regexp in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a empty array in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue disallowed 181s when returning a method call in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a simple erange in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a regexp with modifier in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a empty hash in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue disallowed 181s when returning a complex erange in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a complex array in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a complex hash in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a dsym in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a hash of literals in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: false 181s behaves like literal rescue disallowed 181s when returning a hash of constants in multiple branches 181s registers an offense 181s behaves like literal rescue disallowed 181s when returning a array of constants in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a false in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a float in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a true in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a rational in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a symbol in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a array of literals in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue allowed 181s when returning a nil in multiple branches 181s allows branches to be duplicated 181s behaves like literal rescue disallowed 181s when returning a dstr in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a string in multiple branches 181s allows branches to be duplicated 181s with `if` 181s behaves like literal if allowed 181s when returning a false in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a complex array in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a string in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: true 181s behaves like literal if allowed 181s when returning a array of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a hash of constants in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a regexp in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a simple irange in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a array of literals in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a complex hash in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a empty hash in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a dsym in multiple branches 181s registers an offense 181s behaves like literal if disallowed 181s when returning a method call in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a empty array in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a xstr in multiple branches 181s registers an offense 181s behaves like literal if disallowed 181s when returning a dstr in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a nil in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a complex regexp in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a complex in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a integer in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a rational in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a symbol in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a complex irange in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a true in multiple branches 181s allows branches to be duplicated 181s and IgnoreConstBranches: false 181s behaves like literal if disallowed 181s when returning a array of constants in multiple branches 181s registers an offense 181s behaves like literal if disallowed 181s when returning a hash of constants in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a simple erange in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a variable in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a float in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a complex erange in multiple branches 181s registers an offense 181s behaves like literal if allowed 181s when returning a regexp with modifier in multiple branches 181s allows branches to be duplicated 181s behaves like literal if allowed 181s when returning a hash of literals in multiple branches 181s allows branches to be duplicated 181s with IgnoreConstantBranches: true 181s with `rescue` 181s behaves like literal rescue disallowed 181s when returning a object in multiple branches 181s registers an offense 181s behaves like literal rescue allowed 181s when returning a constant in multiple branches 181s allows branches to be duplicated 181s with `if` 181s behaves like literal if allowed 181s when returning a constant in multiple branches 181s allows branches to be duplicated 181s behaves like literal if disallowed 181s when returning a object in multiple branches 181s registers an offense 181s with `case` 181s behaves like literal case allowed 181s when returning a constant in multiple branches 181s allows branches to be duplicated 181s behaves like literal case disallowed 181s when returning a object in multiple branches 181s registers an offense 181s with `case-match` 181s behaves like literal case-match allowed 181s when returning a constant in multiple branches 181s allows branches to be duplicated 181s behaves like literal case-match disallowed 181s when returning a object in multiple branches 181s registers an offense 181s 181s RuboCop::Cop::Layout::BeginEndAlignment 181s registers an offense for mismatched begin end and autocorrects 181s accepts matching begin ... end 181s accepts matching puts 1; begin ... end 181s when EnforcedStyleAlignWith is start_of_line 181s registers an offense for mismatched begin end and autocorrects 181s accepts matching var = begin ... end 181s registers an offense for mismatched var << begin end and autocorrects 181s accepts matching puts 1; begin ... end 181s 181s RuboCop::Cop::Style::ArgumentsForwarding 181s TargetRubyVersion >= 3.1 181s registers an offense when using restarg, kwargs, and anonymous block arg 181s registers an offense when using restarg and anonymous block arg 181s TargetRubyVersion <= 2.6 181s does not register an offense when using restarg with block arg 181s TargetRubyVersion >= 2.7 181s registers an offense when passing restarg and block arg in defs 181s registers an offense when using restarg and block arg 181s does not register an offense when body of method definition is empty 181s does not register an offense when different argument names are used 181s does not register an offense when different arguments are used 181s does not register an offense when using the restarg outside forwarding method arguments 181s does not register an offense when using arguments forwarding 181s registers an offense when delegating 181s registers an offense when using restarg, kwargs and block arg 181s does not register an offense when the restarg is overwritten 181s registers an offense when forwarding to a method in block 181s registers an offense when the parentheses of arguments are omitted 181s does not register an offense when the kwarg is overwritten 181s does not register an offense when referencing the restarg outside forwarding method arguments 181s does not register an offense when assigning the restarg outside forwarding method arguments 181s does not register an offense when the block arg is overwritten 181s AllowOnlyRestArgument: false 181s registers an offense when using only kwrest arg 181s registers an offense when using only rest arg 181s AllowOnlyRestArgument: true 181s does not register an offense when using only kwrest arg 181s does not register an offense when using only rest arg 181s 181s RuboCop::Cop::Style::StringConcatenation 181s does not register an offense when using `+` with all non string arguments 181s correctly handles strings with special characters 181s registers an offense and corrects for string concatenation as part of other expression 181s correctly handles nested concatenable parts 181s registers an offense and corrects for string concatenation 181s empty quotes 181s registers offense and corrects 181s double quotes inside string 181s registers an offense and corrects with percentage quotes 181s registers an offense and corrects with double quotes 181s inline block 181s registers an offense but does not correct 181s multiline 181s string continuation 181s does not register an offense 181s multiline block 181s registers an offense but does not correct 181s if condition 181s registers an offense but does not correct 181s simple expressions 181s registers an offense and corrects 181s heredoc 181s registers an offense but does not correct when string concatenation with multiline heredoc text 181s registers an offense but does not correct 181s double quotes inside string surrounded single quotes 181s registers an offense and corrects with double quotes 181s Mode = conservative 181s when first operand is not string literal 181s does not register offense 181s when first operand is string literal 181s registers offense 181s nested interpolation 181s registers an offense and corrects 181s 181s RuboCop::Cop::Style::SoleNestedConditional 181s registers an offense and corrects when `if` foo do_something end `if` bar && baz 181s registers an offense and corrects when using nested `unless` modifier multiple conditional 181s registers an offense and corrects when using `||` in the outer condition 181s registers an offense and corrects for multiple nested conditionals 181s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 181s does not register an offense when using nested ternary within conditional 181s registers an offense and corrects when using nested `if` within `unless foo == bar` 181s registers an offense and corrects when using nested `if` within `if` 181s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 181s registers an offense and corrects when using nested conditional and branch contains a comment 181s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 181s registers an offense and corrects when using nested `if` within `if foo = bar` 181s registers an offense and corrects when `if` foo && bar do_something end `if` baz 181s does not register an offense when using nested conditional is not the whole body 181s registers an offense and corrects when `unless` foo do_something end `if` bar 181s does not register an offense for nested conditionals when outer conditional has an `else` branch 181s registers an offense and corrects when using nested `unless` modifier with a single expression condition 181s registers an offense and corrects when using nested `if` within `unless` 181s registers an offense and corrects when using nested `unless` modifier conditional 181s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 181s registers an offense and corrects when using nested `unless` within `unless` 181s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 181s does not register an offense when no nested conditionals 181s registers an offense and corrects when using guard conditional with outer comment 181s registers an offense and corrects when nested `||` operator modifier condition 181s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 181s does not register an offense when using nested modifier on value assigned in multiple conditions 181s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 181s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 181s registers an offense and corrects when `if` foo do_something end `unless` bar 181s does not register an offense when using nested conditional within `elsif` 181s registers an offense and corrects when using nested `if` modifier conditional 181s does not register an offense when using nested modifier on value assigned in single condition 181s registers an offense and corrects when using nested `unless` within `if` 181s registers an offense and corrects when `if` foo do_something end `if` bar 181s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 181s registers an offense and corrects when there are outer and inline comments 181s registers an offense and corrects when nested `||` operator condition 181s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 181s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 181s does not register an offense when nested conditional has an `else` branch 181s when the inner condition has a send node without parens 181s in modifier style 181s registers an offense and corrects 181s with a `csend` node 181s registers an offense and corrects 181s with a block 181s registers an offense and corrects 181s in guard style 181s registers an offense and corrects 181s when the inner condition has a send node with parens 181s in guard style 181s registers an offense and corrects 181s in modifier style 181s registers an offense and corrects 181s when disabling `Style/IfUnlessModifier` 181s registers an offense and corrects when using nested conditional and branch contains a comment 181s registers an offense and corrects when there are outer and inline comments 181s when AllowModifier is true 181s does not register an offense when using nested modifier conditional 181s 181s RuboCop::Cop::Style::IfUnlessModifier 181s accepts if-else-end 181s accepts if-end followed by a chained call using `&.` 181s accepts if-end when used as LHS of binary arithmetic 181s adds parens in autocorrect when if-end used with `||` operator 181s accepts code with EOL comment since user might want to keep it 181s accepts if-end followed by a chained call using `.` 181s adds parens in autocorrect when if-end used with `&&` operator 181s accepts if/elsif 181s when if-end condition is a value in a hash 181s when it is not short enough to fit on a single line 181s accepts it in the multiline form 181s when it is short enough to fit on a single line 181s corrects it to the single-line form 181s if-end with conditional as body 181s accepts 181s if-end is argument to a non-parenthesized method call 181s adds parentheses so as not to change meaning 181s with a named regexp capture on the LHS 181s does not register an offense 181s if-end is argument to a parenthesized method call 181s adds parentheses because otherwise it would cause SyntaxError 181s multiline if that fits on one line 181s registers an offense 181s and has two statements separated by semicolon 181s accepts 181s with tabs used for indentation 181s with Layout/IndentationWidth: Width config 181s behaves like with tabs indentation 181s it fits on one line 181s registers an offense 181s it doesn't fit on one line 181s doesn't register an offense 181s with Layout/IndentationStyle: IndentationWidth config 181s behaves like with tabs indentation 181s it fits on one line 181s registers an offense 181s it doesn't fit on one line 181s doesn't register an offense 181s modifier if that does not fit on one line 181s when Layout/LineLength is disabled in configuration 181s accepts 181s when Layout/LineLength is disabled with enable/disable comments 181s accepts 181s when Layout/LineLength is enabled 181s corrects it to normal form 181s when using a method with heredoc argument 181s accepts 181s and the long line is too long because AllowURI is false 181s registers an offense 181s IgnoreCopDirectives 181s and the long line is too long because IgnoreCopDirectives is false 181s registers an offense 181s and the long line is allowed because IgnoreCopDirectives is true 181s accepts 181s when variable assignment is used in the branch body of if modifier 181s registers an offense 181s and the long line is allowed because AllowURI is true 181s accepts 181s when Layout/LineLength is disabled with an EOL comment 181s accepts 181s when Layout/LineLength is disabled 181s registers an offense even for a long modifier statement 181s when if-end condition is an element of an array 181s when not short enough to fit on a single line 181s accepts it in the multiline form 181s when short enough to fit on a single line 181s corrects it to the single-line form 181s when if-end condition has a first line comment 181s when it is short enough to fit on a single line 181s corrects it to the single-line form 181s when it is not short enough to fit on a single line 181s accepts it in the multiline form 181s modifier if that does not fit on one line, but is not the only statement on the line 181s accepts 181s when if-end condition has some code after the end keyword 181s when it is short enough to fit on a single line 181s corrects it to the single-line form 181s when it is not short enough to fit on a single line 181s accepts it in the multiline form 181s multiline if that fits on one line with comment near end 181s accepts 181s multiline unless that fits on one line 181s registers an offense 181s multiline if that fits on one line with comment on first line 181s registers an offense and preserves comment 181s when if-end condition is assigned to a variable 181s with variable being on the previous line 181s when it is short enough to fit on a single line 181s corrects it to the single-line form 181s when it is not short enough to fit on a single line 181s accepts it in the multiline form 181s with variable being on the same line 181s when it is short enough to fit on a single line 181s corrects it to the single-line form 181s when it is not short enough to fit on a single line 181s accepts it in the multiline form 181s behaves like condition modifier cop 181s for a multiline 'if' 181s corrects it when assignment is in body 181s accepts an empty body 181s doesn't break when used as RHS of binary arithmetic 181s corrects it if result fits in one line 181s doesn't break when used as RHS of instance var assignment 181s doesn't break when used as RHS of constant assignment 181s handles one-line usage 181s doesn't break when used as RHS of class var assignment 181s accepts it when condition has local variable assignment 181s accepts it if body spans more than one line 181s handles inline comments during autocorrection 181s accepts it if single line would not fit on one line 181s doesn't break when used as RHS of local var assignment 181s when Layout/LineLength is disabled 181s registers an offense even for a long modifier statement 181s accepts multiline condition in modifier form 181s registers an offense 181s when there is a comment on the first line and some code after the end keyword 181s does not register an offense 181s unless-end with conditional as body 181s accepts 181s behaves like condition modifier cop 181s for a multiline 'unless' 181s corrects it when assignment is in body 181s accepts it if single line would not fit on one line 181s handles inline comments during autocorrection 181s doesn't break when used as RHS of constant assignment 181s doesn't break when used as RHS of binary arithmetic 181s handles one-line usage 181s accepts it if body spans more than one line 181s accepts it when condition has local variable assignment 181s doesn't break when used as RHS of local var assignment 181s doesn't break when used as RHS of instance var assignment 181s accepts an empty body 181s doesn't break when used as RHS of class var assignment 181s corrects it if result fits in one line 181s when Layout/LineLength is disabled 181s registers an offense even for a long modifier statement 181s when there is a comment on the first line and some code after the end keyword 181s does not register an offense 181s accepts multiline condition in modifier form 181s registers an offense 181s short multiline if near an else etc 181s registers an offense 181s with implicit match conditional 181s when a multiline if fits on one line 181s registers an offense 181s when a multiline if doesn't fit on one line 181s accepts 181s 181s RuboCop::Cop::Layout::MultilineArrayLineBreaks 181s when nested arrays 181s registers an offense and corrects 181s when on same line, separate line from brackets 181s does not add any offenses 181s when on same line 181s does not add any offenses 181s when two elements on same line 181s registers an offense and corrects 181s 181s RuboCop::Cop::Style::EndlessMethod 181s Ruby >= 3.0 181s EnforcedStyle: allow_always 181s does not register an offense for a multiline endless method 181s does not register an offense for an endless method with arguments 181s does not register an offense for an endless method 181s does not register an offense for a multiline endless method with begin 181s does not register an offense for a multiline endless method with arguments 181s EnforcedStyle: allow_single_line 181s registers an offense and corrects for a multiline endless method with begin 181s registers an offense and corrects for a multiline endless method 181s does not register an offense for an endless method with arguments 181s does not register an offense for an endless method 181s registers an offense and corrects for a multiline endless method with arguments 181s EnforcedStyle: disallow 181s registers an offense for an endless method with arguments 181s registers an offense for an endless method 181s 181s RuboCop::Cop::Lint::DuplicateCaseCondition 181s registers an offense for repeated logical operator when expressions 181s accepts non-redundant case expressions 181s registers an offense for subsequent repeated case conditionals 181s accepts similar but not equivalent && expressions 181s registers multiple offenses for repeated multi-value conditionals 181s registers an offense for repeated case conditionals 181s registers multiple offenses for multiple repeated case conditionals 181s accepts trivial case expressions 181s accepts non-redundant case expressions with an else expression 181s 181s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 181s when EnforcedStyle is aligned 181s registers an offense for unaligned strings in hash literal values 181s accepts string literal with line break concatenated with other string 181s accepts indented strings in implicit return statement of a method definition 181s accepts aligned strings in method call 181s accepts single line string literal concatenation 181s registers an offense for aligned strings in an if/elsif/else statement 181s accepts indented strings in implicit return statement of a method definition after other statement 181s registers an offense for indented string 181s accepts an empty heredoc string with interpolation 181s registers an offense for third part of a string if it is aligned only with the first 181s accepts indented strings in implicit return statement of a block 181s accepts a multiline string literal 181s accepts indented strings in implicit return statement of a singleton method definition 181s accepts indented strings in ordinary statement 181s accepts a heredoc string with interpolation 181s accepts a heredoc string ... 181s for assignment with x ||= 181s registers an offense for indented strings 181s accepts aligned strings 181s for assignment with x = 181s registers an offense for indented strings 181s accepts aligned strings 181s for assignment with $x = 181s registers an offense for indented strings 181s accepts aligned strings 181s for assignment with x += 181s accepts aligned strings 181s registers an offense for indented strings 181s for assignment with X = 181s accepts aligned strings 181s registers an offense for indented strings 181s for assignment with @x = 181s registers an offense for indented strings 181s accepts aligned strings 181s when EnforcedStyle is indented 181s accepts string literal with line break concatenated with other string 181s accepts indented strings in implicit return statement of a singleton method definition 181s registers an offense for aligned string 181s accepts a heredoc string ... 181s accepts indented strings in implicit return statement of a block 181s registers an offense for aligned strings in hash literal values 181s accepts a multiline string literal 181s accepts indented strings 181s registers an offense for aligned strings in an if/elsif/else statement 181s accepts a heredoc string with interpolation 181s accepts an empty heredoc string with interpolation 181s accepts indented strings in ordinary statement 181s registers an offense for unaligned third part of string 181s accepts single line string literal concatenation 181s accepts indented strings in implicit return statement of a method definition 181s accepts indented strings in implicit return statement of a method definition after other statement 181s for assignment with x += 181s accepts indented strings 181s registers an offense for aligned strings 181s for assignment with x = 181s registers an offense for aligned strings 181s accepts indented strings 181s for assignment with @x = 181s accepts indented strings 181s registers an offense for aligned strings 181s for assignment with X = 181s registers an offense for aligned strings 181s accepts indented strings 181s when IndentationWidth is 1 181s accepts indented strings 181s for assignment with x ||= 181s accepts indented strings 181s registers an offense for aligned strings 181s for assignment with $x = 181s accepts indented strings 181s registers an offense for aligned strings 181s 181s RuboCop::Cop::Lint::ShadowedException 181s single rescue 181s rescue a exception without causing constant name deprecation warning 181s accepts splat arguments passed to rescue 181s accepts an empty rescue 181s accepts rescuing multiple custom exceptions 181s registers an offense rescuing Exception with any other error or exception 181s accepts rescuing a single exception that has an else 181s accepts rescuing a single exception that is assigned to a variable 181s accepts rescuing a single exception 181s accepts rescue containing multiple same error code exceptions 181s accepts rescuing a custom exception and a standard exception 181s accepts rescuing a multiple exceptions that are not ancestors that have an else 181s accepts rescuing a single custom exception 181s accepts rescuing a single exception that has an ensure 181s registers an offense rescuing exceptions that are ancestors of each other 181s registers an offense for the same exception multiple times 181s when there are multiple levels of exceptions in the same rescue 181s registers an offense for two exceptions 181s registers an offense for more than two exceptions 181s modifier rescue 181s accepts rescue in its modifier form 181s multiple rescues 181s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 181s accepts rescuing exceptions in order of level with multiple exceptions in a group 181s registers an offense when a higher level exception is rescued before a lower level exception 181s accepts rescuing exceptions in order of level 181s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 181s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 181s accepts rescuing a known exception between unknown exceptions 181s accepts many (>= 7) rescue groups 181s accepts rescuing a known exception after an unknown exceptions 181s registers an offense rescuing out of order exceptions when there is an ensure 181s ignores expressions of non-const 181s registers an offense rescuing Exception before an unknown exceptions 181s accepts rescuing a known exception before an unknown exceptions 181s accepts rescuing custom exceptions in multiple rescue groups 181s last rescue does not specify exception class 181s highlights range ending at rescue keyword 181s splat arguments 181s does not register an offense for splat arguments rescued after rescuing a known exception 181s accepts splat arguments passed to multiple rescues 181s registers an offense for splat arguments rescued after rescuing Exception 181s exceptions from different ancestry chains 181s accepts rescuing exceptions in one order 181s accepts rescuing exceptions in another order 181s 181s RuboCop::Cop::Lint::EmptyConditionalBody 181s registers an offense for missing `unless` body with `else` 181s registers an offense for missing `if` and `elsif` body 181s registers an offense for missing `if` and `else` body with some indentation 181s registers an offense for missing `if` body with present `else` body 181s autocorrects properly when the if is assigned to a variable 181s registers an offense for missing `unless` body 181s registers an offense for missing `if` and `else` body 181s registers an offense for missing all branches of `if` and `elsif` body 181s registers an offense for missing `unless` and `else` body 181s registers an offense for missing `if` body with `elsif` 181s registers an offense for missing all branches of `if` and multiple `elsif` body 181s does not register an offense for missing `unless` body with a comment 181s registers an offense for missing `if` body with `else` 181s registers an offense for missing `elsif` body that is not the one with a comment 181s registers an offense for missing second `elsif` body without an inline comment 181s does not register an offense for missing `elsif` body with an inline comment 181s does not register an offense for missing `if` body with a comment 181s does not register an offense for missing `elsif` body with a comment 182s registers an offense for missing `elsif` body 182s registers an offense for missing `if` body 182s when AllowComments is false 182s registers an offense for missing `if` body with a comment 182s registers an offense for missing `elsif` body with a comment 182s registers an offense for missing `unless` body with a comment 182s 182s RuboCop::Cop::Layout::ConditionPosition 182s registers an offense and corrects for condition on the next line 182s accepts condition on the same line 182s accepts condition on a different line for modifiers 182s accepts condition on the same line 182s accepts condition on a different line for modifiers 182s accepts condition on the same line 182s accepts condition on a different line for modifiers 182s registers an offense and corrects for condition on the next line 182s registers an offense and corrects for elsif condition on the next line 182s registers an offense and corrects for condition on the next line 182s registers an offense and corrects for condition on the next line 182s accepts ternary ops 182s accepts condition on a different line for modifiers 182s accepts condition on the same line 182s 182s RuboCop::Cop::Lint::SymbolConversion 182s does not register an offense for a normal symbol 182s does not register an offense for a dstr 182s does not register an offense for a symbol that requires quotes 182s behaves like offense 182s registers an offense for "foo-bar".intern 182s behaves like offense 182s registers an offense for "foo_bar".intern 182s behaves like offense 182s registers an offense for "foo_bar".to_sym 182s behaves like offense 182s registers an offense for :"foo" 182s behaves like offense 182s registers an offense for :"foo_bar" 182s EnforcedStyle: consistent 182s with a mix of string and symbol keys 182s does not register an offense 182s with different quote styles 182s does not register an offense 182s hash where no keys need to be quoted 182s does not register an offense 182s with a key with = 182s requires symbols to be quoted 182s hash where keys are quoted but do not need to be 182s registers an offense 182s hash where there are keys needing quoting 182s registers an offense for unquoted keys 182s in an alias 182s does not register an offense 182s behaves like offense 182s registers an offense for :foo.intern 182s behaves like offense 182s registers an offense for :foo.to_sym 182s in a hash 182s values 182s does not register an offense for a normal symbol 182s registers an offense for a quoted symbol key 182s registers an offense for a quoted symbol value 182s keys 182s registers and corrects an offense for a quoted symbol that ends with `?` 182s does not register an offense for operators 182s does not register an offense for a require quoted symbol that ends with `=` 182s does not register an offense for a require quoted symbol that contains `:` 182s registers an offense for a quoted symbol 182s registers and corrects an offense for a quoted symbol that ends with `!` 182s does not register an offense for a require quoted symbol 182s does not register an offense for a normal symbol 182s behaves like offense 182s registers an offense for "foo".to_sym 182s behaves like offense 182s registers an offense for "foo-bar".to_sym 182s inside a percent literal array 182s does not register an offense 182s single quoted symbol 182s does not register an offense 182s behaves like offense 182s registers an offense for "foo".intern 182s implicit `to_sym` call 182s does not register an offense 182s 182s RuboCop::Cop::Style::NestedParenthesizedCalls 182s on a non-parenthesized call nested in a parenthesized one 182s with multiple arguments to the nested call 182s registers an offense 182s with a single argument to the nested call 182s registers an offense 182s when using safe navigation operator 182s registers an offense 182s on a deeply nested argument 182s doesn't register an offense 182s on a call to a setter method 182s doesn't register an offense 182s on a nested, parenthesized method call 182s doesn't register an offense 182s on a method call with no arguments 182s doesn't register an offense 182s on a call with no arguments, nested in a parenthesized one 182s doesn't register an offense 182s on a permitted method 182s doesn't register an offense 182s on an aref, nested in a parenthesized method call 182s doesn't register an offense 182s on a non-parenthesized method call 182s doesn't register an offense 182s backslash newline in method call 182s registers an offense 182s 182s RuboCop::Cop::Style::DocumentationMethod 182s when declaring methods outside a class 182s with documentation comment 182s does not register an offense with `end` on the same line 182s does not register an offense 182s when declaring methods for class instance 182s without documentation comment 182s registers an offense 182s registers an offense with `end` on the same line 182s with documentation comment 182s does not register an offense 182s does not register an offense with `end` on the same line 182s with both public and private methods 182s when the public method has no documentation 182s registers an offense 182s when required for non-public methods 182s registers an offense 182s when the public method has documentation 182s does not register an offense 182s when method is private 182s does not register an offense 182s does not register an offense with inline `private` and `end` 182s does not register an offense with inline `private` 182s does not register an offense with `end` on the same line 182s when required for non-public methods 182s registers an offense with `end` on the same line 182s registers an offense 182s registers an offense with inline `private` 182s registers an offense with inline `private` and `end` 182s when declaring methods in a class 182s with directive comment 182s registers an offense 182s without documentation comment 182s when method is public 182s registers an offense 182s registers an offense with `end` on the same line 182s when method is private 182s does not register an offense 182s does not register an offense with `end` on the same line 182s does not register an offense with inline `private` 182s does not register an offense with inline `private` and `end` 182s when required for non-public methods 182s registers an offense 182s registers an offense with `end` on the same line 182s registers an offense with inline `private` 182s registers an offense with inline `private` and `end` 182s with both public and private methods 182s when the public method has no documentation 182s registers an offense 182s when the public method has documentation 182s does not register an offense 182s when required for non-public methods 182s registers an offense 182s with documentation comment 182s when method is public 182s does not register an offense with `end` on the same line 182s does not register an offense 182s with annotation comment 182s registers an offense 182s with both public and private methods 182s when required for non-public methods 182s registers an offense 182s when the public method has documentation 182s does not register an offense 182s when the public method has no documentation 182s registers an offense 182s without documentation comment 182s when method is protected 182s does not register an offense 182s does not register an offense with inline `protected` 182s when required for non-public methods 182s registers an offense 182s registers an offense with inline `protected` 182s when method is private 182s does not register an offense with `end` on the same line 182s does not register an offense 182s does not register an offense with inline `private` and `end` 182s does not register an offense with inline `private` 182s when required for non-public methods 182s registers an offense with inline `private` and `end` 182s registers an offense with inline `private` 182s registers an offense 182s registers an offense with `end` on the same line 182s when method is public 182s registers an offense with `end` on the same line 182s registers an offense 182s registers an offense when method is public, but there were private methods before 182s when declaring methods in a module 182s without documentation comment 182s when method is public 182s registers an offense 182s registers an offense with `end` on the same line 182s when method is module_function 182s registers an offense for separate def 182s registers an offense for inline def 182s when method is private 182s does not register an offense 182s does not register an offense with inline `private` and `end` 182s does not register an offense with inline `private` 182s does not register an offense with `end` on the same line 182s when required for non-public methods 182s registers an offense with inline `private` 182s registers an offense with inline `private` and `end` 182s registers an offense with `end` on the same line 182s registers an offense 182s with documentation comment 182s when method is public 182s does not register an offense 182s does not register an offense with `end` on the same line 182s when method is module_function 182s does not register an offense for inline def 182s does not register an offense for separate def 182s with both public and private methods 182s when the public method has documentation 182s does not register an offense 182s when the public method has no documentation 182s registers an offense 182s when required for non-public methods 182s registers an offense 182s 182s RuboCop::Cop::InternalAffairs::ExampleDescription 182s with `expect_offense` 182s does not register an offense when given a proper description 182s registers an offense when given an improper description 182s does not register an offense when given an unexpected description 182s with `expect_no_offenses` 182s does not register an offense when given an unexpected description 182s does not crash when given a proper description that is split with + 182s does not register an offense when given a proper description 182s registers an offense when given an improper description 182s with `expect_no_corrections` 182s registers an offense when given an improper description 182s in conjunction with expect_offense 182s registers an offense when given an improper description 182s with `expect_correction` 182s registers an offense when given an improper description 182s in conjunction with expect_offense 182s registers an offense when given an improper description 182s when the description is invalid for both methods 182s registers an offense for the first method encountered 182s when not making an expectation on offenses 182s does not register an offense 182s 182s RuboCop::Cop::Lint::RedundantSafeNavigation 182s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 182s does not register an offense when using `&.` outside of conditions 182s does not register an offense when using `&.` with non-allowed method in condition 182s registers an offense and corrects when `&.` is used inside complex condition 182s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 182s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 182s registers an offense and corrects when `&.` is used inside `if` condition 182s registers an offense and corrects when `&.` is used inside `unless` condition 182s 182s RuboCop::Cop::Lint::DuplicateMethods 182s accepts for attr_writer and getter in dynamic class 182s doesn't register offense for non-duplicate class methods in dynamic class 182s doesn't register an offense for different private methods in module 182s accepts for attr_writer and getter in module 182s registers 2 offenses for pair of duplicate methods in class 182s accepts for non-duplicate alias_method in class 182s doesn't register offense for non-duplicate class methods in dynamic module 182s doesn't register an offense for different private methods in class_eval block 182s recognizes difference between instance and class methods in dynamic class 182s registers an offense for duplicate nested method in self method of class_eval block 182s registers an offense for duplicate alias in dynamic module 182s ignores method definitions in RSpec `describe` blocks 182s properly registers and offense when deeply nested 182s registers an offense for duplicate attr in class_eval block 182s registers an offense for duplicate private self methods in dynamic module 182s registers an offense for duplicate attr_writer in dynamic class 182s registers an offense for duplicate attr_writer in class_eval block 182s accepts for attr_reader and setter in dynamic class 182s registers an offense for duplicate method in dynamic module 182s recognizes difference between instance and class methods in class_eval block 182s registers an offense for duplicate private self methods in module 182s registers an offense for duplicate protected methods in dynamic module 182s doesn't register an offense for non-duplicate alias in class_eval block 182s registers offenses for duplicate assignable attr in dynamic module 182s registers an offense for a duplicate instance method in separate dynamic module blocks 182s registers an offense for duplicate nested method in module 182s recognizes difference between instance and class methods in module 182s registers an offense for duplicate attr in dynamic module 182s registers an offense for duplicate nested method in self method of dynamic module 182s registers an offense for duplicate class methods in class 182s registers an offense for duplicate private methods in dynamic module 182s registers an offense for duplicate attr_writer in class 182s registers an offense for duplicate attr_writer in module 182s registers offenses for duplicate attr_accessor in dynamic class 182s doesn't register an offense for non-duplicate alias in module 182s registers an offense for duplicate private methods in class 182s doesn't register an offense for alias for gvar in class 182s registers an offense for duplicate private methods in module 182s registers an offense for duplicate class methods in dynamic class 182s registers an offense for duplicate nested method in self method of class 182s doesn't register an offense for different private methods in dynamic class 182s doesn't register offense for non-duplicate class methods in class 182s does not register an offense for same method name defined in different self methods 182s doesn't register an offense for non-duplicate method in dynamic class 182s registers an offense for duplicate attr_reader in dynamic class 182s registers offenses for duplicate assignable attr in class 182s registers offenses for duplicate attr_accessor in class 182s registers an offense for a duplicate class method in separate class blocks 182s registers an offense for duplicate class methods with named receiver in module 182s doesn't register an offense for non-duplicate alias in class 182s registers 2 offenses for pair of duplicate methods in dynamic class 182s registers an offense for duplicate alias_method in module 182s registers an offense for duplicate method in module 182s registers an offense for duplicate attr_writer in dynamic module 182s accepts for attr_writer and getter in class 182s understands class << A 182s accepts for non-duplicate alias_method in dynamic class 182s registers an offense for duplicate alias in class_eval block 182s understands class << self 182s registers an offense for duplicate alias in class 182s only registers an offense for the second instance of a duplicate instance method in separate files 182s registers an offense for a duplicate class method in separate dynamic class blocks 182s registers an offense for duplicate class methods with named receiver in class 182s registers offenses for duplicate attr_accessor in dynamic module 182s registers an offense for duplicate private self methods in class_eval block 182s registers offenses for duplicate assignable attr in dynamic class 182s registers an offense for duplicate class methods in class_eval block 182s understands nested modules 182s registers an offense for duplicate attr_reader in class 182s doesn't register offense for non-duplicate class methods in class_eval block 182s registers offenses for duplicate assignable attr in class_eval block 182s registers an offense for duplicate private methods in class_eval block 182s accepts for non-duplicate alias_method in class_eval block 182s does not register an offense for same method name defined in different methods 182s ignores Class.new blocks which are assigned to local variables 182s registers an offense for duplicate class methods in module 182s does not register an offense for same method name defined in different methods 182s doesn't register an offense for non-duplicate method in dynamic module 182s registers an offense for duplicate nested method in dynamic class 182s accepts for attr_reader and setter in dynamic module 182s registers an offense for duplicate class methods with `<<` and named receiver in class 182s does not register an offense for same method name defined in different methods 182s registers an offense for duplicate protected methods in class 182s registers an offense for a duplicate instance method in separate dynamic class blocks 182s understands nested modules 182s recognizes difference between instance and class methods in dynamic module 182s registers an offense for duplicate private self methods in class 182s registers an offense for duplicate class methods in dynamic module 182s registers an offense for duplicate protected methods in module 182s registers an offense for a duplicate class method in separate class_eval block blocks 182s registers an offense for duplicate nested method in dynamic module 182s registers an offense for duplicate protected methods in dynamic class 182s registers 2 offenses for pair of duplicate methods in module 182s registers an offense for duplicate private self methods in dynamic class 182s accepts for non-duplicate alias_method in dynamic module 182s registers an offense for duplicate attr_reader in module 182s registers an offense for duplicate attr_reader in dynamic module 182s registers an offense when class << exp is used 182s only registers an offense for the second instance of a duplicate instance method in separate files 182s registers an offense for duplicate nested method in class_eval block 182s registers an offense for duplicate method in class_eval block 182s understands nested modules 182s doesn't register an offense for non-duplicate alias in dynamic module 182s registers an offense when class << exp is used 182s does not register an offense for same method name defined in different self methods 182s registers 2 offenses for pair of duplicate methods in class_eval block 182s registers an offense for duplicate alias in dynamic class 182s registers an offense for duplicate alias_method in class 182s registers offenses for duplicate assignable attr in module 182s registers an offense for a duplicate instance method in separate class_eval block blocks 182s accepts for attr_reader and setter in class 182s registers an offense for duplicate alias in module 182s registers an offense for duplicate nested method in self method of module 182s registers an offense when class << exp is used 182s only registers an offense for the second instance of a duplicate instance method in separate files 182s registers an offense for a duplicate instance method in separate module blocks 182s doesn't register an offense for alias for gvar in dynamic class 182s does not register an offense for same method name defined in different methods 182s doesn't register an offense for alias for gvar in module 182s doesn't register offense for non-duplicate class methods in module 182s doesn't register an offense for different private methods in class 182s accepts for attr_reader and setter in class_eval block 182s registers an offense for duplicate methods at top level 182s registers an offense for duplicate attr in module 182s registers an offense for a duplicate instance method in separate class blocks 182s does not register an offense for same method name defined in different self methods 182s doesn't register an offense for alias for gvar in class_eval block 182s understands nested modules 182s registers an offense for duplicate alias_method in class_eval block 182s registers an offense for duplicate method in dynamic class 182s does not register an offense for same method name defined in different methods 182s registers an offense for a duplicate class method in separate module blocks 182s registers an offense when class << exp is used 182s doesn't register an offense for different private methods in dynamic module 182s registers an offense for a duplicate class method in separate dynamic module blocks 182s accepts for attr_writer and getter in class_eval block 182s registers offenses for duplicate attr_accessor in class_eval block 182s recognizes difference between instance and class methods in class 182s doesn't register an offense for non-duplicate method in module 182s doesn't register an offense for alias for gvar in dynamic module 182s registers an offense for duplicate class methods with `self` and named receiver in module 182s only registers an offense for the second instance of a duplicate instance method in separate files 182s registers an offense for duplicate attr in dynamic class 182s does not register for the same method in different scopes within `class << self` 182s doesn't register an offense for non-duplicate method in class_eval block 182s registers an offense for duplicate attr in class 182s accepts for non-duplicate alias_method in module 182s registers an offense for duplicate class methods with `self` and named receiver in class 182s registers 2 offenses for pair of duplicate methods in dynamic module 182s registers an offense for duplicate nested method in class 182s registers an offense for duplicate alias_method in dynamic class 182s registers offenses for duplicate attr_accessor in module 182s registers an offense for duplicate alias_method in dynamic module 182s registers an offense for duplicate protected methods in class_eval block 182s registers an offense when class << exp is used 182s understands nested modules 182s registers an offense for duplicate attr_reader in class_eval block 182s registers an offense for duplicate class methods with `<<` and named receiver in module 182s registers an offense for duplicate method in class 182s accepts for attr_reader and setter in module 182s doesn't register an offense for non-duplicate alias in dynamic class 182s registers an offense for duplicate nested method in self method of dynamic class 182s understands class << self 182s only registers an offense for the second instance of a duplicate instance method in separate files 182s handles class_eval with implicit receiver 182s understands class << self 182s doesn't register an offense for non-duplicate method in class 182s understands class << self 182s accepts for attr_writer and getter in dynamic module 182s does not register an offense for same method name defined in different self methods 182s does not register an offense for same method name defined in different self methods 182s registers an offense for duplicate private methods in dynamic class 182s understands class << self 182s when path is in the project root 182s adds a message with relative path 182s when path is not in the project root 182s adds a message with absolute path 182s 182s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 182s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 182s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 182s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 182s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 182s 182s RuboCop::Cop::Lint::IneffectiveAccessModifier 182s when there is `begin` before a method definition 182s does not register an offense 182s when there is an intervening instance method 182s still registers an offense 182s when a `class << self` block is used 182s doesn't register an offense 182s when `private` is applied to a class method 182s registers an offense 182s when no access modifier is used 182s doesn't register an offense 182s when `private_class_method` is used 182s when `private_class_method` contains all private method names 182s doesn't register an offense 182s when `private_class_method` does not contain the method 182s registers an offense 182s when `protected` is applied to a class method 182s registers an offense 182s 182s RuboCop::Cop::Lint::RequireRelativeSelfPath 182s does not register an offense when using `require_relative` without self file path argument 182s does not register an offense when using `require_relative` without argument 182s does not register an offense when using a variable as an argument of `require_relative` 182s registers an offense when using `require_relative` with self file path argument (with ext) 182s registers an offense when using `require_relative` with self file path argument 182s does not register an offense when the filename is the same but the extension does not match 182s 182s RuboCop::Cop::VariableForce 182s #process_node 182s when processing a regexp with a line break at the start of capture parenthesis 182s does not raise an error 182s when processing an empty regex 182s does not raise an error 182s when processing a regex with regopt 182s does not raise an error 182s when processing lvar node 182s when the variable is not yet declared 182s does not raise error 182s 182s RuboCop::Cop::Style::SelfAssignment 182s registers an offense for non-shorthand assignment && and @x 182s registers an offense for non-shorthand assignment - and @@x 182s registers an offense for non-shorthand assignment && and @@x 182s registers an offense for non-shorthand assignment ** and @@x 182s registers an offense for non-shorthand assignment || and @x 182s registers an offense for non-shorthand assignment | and x 182s registers an offense for non-shorthand assignment || and @@x 182s registers an offense for non-shorthand assignment + and @x 182s registers an offense for non-shorthand assignment + and x 182s registers an offense for non-shorthand assignment / and @@x 182s registers an offense for non-shorthand assignment | and @x 182s registers an offense for non-shorthand assignment * and @@x 182s registers an offense for non-shorthand assignment & and @@x 182s registers an offense for non-shorthand assignment || and x 182s registers an offense for non-shorthand assignment | and @@x 182s registers an offense for non-shorthand assignment - and @x 182s registers an offense for non-shorthand assignment - and x 182s registers an offense for non-shorthand assignment ** and @x 182s registers an offense for non-shorthand assignment & and @x 182s registers an offense for non-shorthand assignment / and x 182s registers an offense for non-shorthand assignment && and x 182s registers an offense for non-shorthand assignment & and x 182s registers an offense for non-shorthand assignment / and @x 182s registers an offense for non-shorthand assignment ** and x 182s registers an offense for non-shorthand assignment * and x 182s registers an offense for non-shorthand assignment * and @x 182s registers an offense for non-shorthand assignment + and @@x 182s 182s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 182s registers an offense for correct + opposite 182s accepts hash literals with no braces 182s registers an offense for hashes with no spaces if so configured 182s accepts hashes with spaces by default 182s can handle interpolation in a braceless hash literal 182s with space inside empty braces not allowed 182s accepts empty braces with no space inside 182s registers an offense for empty braces with space inside 182s when EnforcedStyle is no_space 182s accepts multiline hash with comment 182s accepts multiline hash 182s accepts hashes with no spaces 182s registers an offense for opposite + correct 182s registers an offense for hashes with spaces 182s when using method argument that both key and value are hash literals 182s accepts hashes with no spaces 182s offending hash following empty hash 182s registers an offense on both sides 182s on Hash[{ x: 1 } => [1]] 182s does not register an offense 182s on { key: "{" } 182s does not register an offense 182s when EnforcedStyle is compact 182s doesn't register an offense for non-nested hashes with spaces 182s accepts multiline hash with comment 182s registers offenses for hashes with no spaces 182s accepts multiline hash 182s registers an offense for opposite + correct 182s registers an offense for nested hashes with spaces 182s with space inside empty braces allowed 182s registers an offense for empty braces with no space inside 182s accepts empty braces with space inside 182s when using method argument that both key and value are hash literals 182s registers hashes with no spaces 182s with newline inside empty braces not allowed 182s registers an offense 182s 182s RuboCop::Cop::Style::DoubleNegation 182s when `EnforcedStyle: allowed_in_returns` 182s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 182s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 182s does not register an offense for `!!` when return location 182s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 182s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 182s does not register an offense for `!!` when return location and using `ensure` 182s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 182s does not register an offense for `!!` when return location and using `rescue` and `ensure` 182s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 182s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 182s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 182s does not register an offense for `!!` when return location and using `rescue` 182s registers an offense and corrects for `!!` with nested hash at return location 182s does not register an offense for `!!` when return location and using `unless` 182s does not register an offense for `!!` when return location by `define_method` 182s registers an offense and corrects for `!!` with single-line hash at return location 182s registers an offense and corrects for `!!` with nested array at return location 182s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 182s registers an offense and corrects for `!!` with multi-line hash at return location 182s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 182s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 182s does not register an offense for `!!` when return location by `define_singleton_method` 182s registers an offense and corrects for `!!` 182s does not register an offense for ! 182s registers an offense and corrects for `!!` when not a return location 182s registers an offense and corrects for `!!` with multi-line array at return location 182s does not register an offense for `!!` when using `return` keyword 182s registers an offense and corrects for `!!` with complex array at return location 182s registers an offense and corrects for `!!` when not return location and using `unless` 182s registers an offense and corrects for `!!` with single-line array at return location 182s does not register an offense for `not not` 182s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 182s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 182s Ruby >= 2.7 182s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 182s Ruby >= 2.7 182s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 182s when `EnforcedStyle: forbidden` 182s registers an offense and corrects for `!!` 182s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 182s registers an offense and corrects for `!!` when using `return` keyword 182s registers an offense and corrects for `!!` when return location 182s registers an offense for `!!` when return location and using `rescue` and `ensure` 182s registers an offense and corrects for `!!` when not a return location 182s registers an offense for `!!` when return location and using `rescue` 182s does not register an offense for `not not` 182s registers an offense for `!!` when return location and using `ensure` 182s does not register an offense for ! 182s 182s RuboCop::Cop::Generator::RequireFileInjector 182s when using an unknown department 182s inserts a `require_relative` statement to the bottom of the file 182s when a cop of style department already exists 182s injects a `require_relative` statement on the end of style department 182s when a `require` entry already exists 182s does not write to any file 182s when a `require_relative` entry does not exist from before 182s injects a `require_relative` statement on the right line in the root file 182s 182s RuboCop::Cop::Style::NegatedUnless 182s does not blow up for empty unless condition 182s does not blow up on a negated ternary operator 182s does not blow up for empty if condition 182s does not blow up for ternary ops 182s with “both” style 182s registers an offense for unless with "not" condition 182s accepts an unless/else with negative condition 182s registers an offense for unless with exclamation point condition 182s autocorrects by replacing parenthesized unless not with if 182s accepts an unless where only part of the condition is negated 182s accepts an unless where the condition is doubly negated 182s with “postfix” style 182s registers an offense for postfix 182s does not register an offense for prefix 182s with “prefix” style 182s registers an offense for prefix 182s does not register an offense for postfix 182s 182s RuboCop::Cop::Style::MinMax 182s with an array literal containing calls to `#min` and `#max` 182s when the expression is used as a return value 182s does not register an offense if the receiver is implicit 182s does not register an offense if the receivers do not match 182s registers an offense if the receivers match 182s does not register an offense if there are additional elements 182s when the expression is used in a parallel assignment 182s registers an offense if the receivers match 182s does not register an offense if the receivers do not match 182s does not register an offense if the receiver is implicit 182s does not register an offense if there are additional elements 182s when the expression stands alone 182s does not register an offense if the receivers do not match 182s does not register an offense if there are additional elements 182s registers an offense if the receivers match 182s does not register an offense if the receiver is implicit 182s 182s RuboCop::Cop::Style::RescueModifier 182s handles more complex expression with modifier rescue 182s registers an offense for modifier rescue around parallel assignment 182s handles modifier rescue in a method 182s registers an offense for modifier rescue 182s handles modifier rescue in normal rescue 182s does not register an offense for nested normal rescue 182s handles parentheses around a rescue modifier 182s does not register an offense for normal rescue 182s does not register an offense for normal rescue with ensure 182s when an instance method has implicit begin 182s handles modifier rescue in body of implicit begin 182s accepts normal rescue 182s autocorrect 182s corrects complex rescue modifier 182s corrects doubled rescue modifiers 182s when a singleton method has implicit begin 182s handles modifier rescue in body of implicit begin 182s accepts normal rescue 182s excluded file 182s processes excluded files with issue 182s 182s RuboCop::Cop::Naming::HeredocDelimiterCase 182s when enforced style is uppercase 182s with a non-interpolated heredoc 182s when using double quoted delimiters 182s does not register an offense with an uppercase delimiter 182s registers an offense and corrects with a lowercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s when using single quoted delimiters 182s does not register an offense with an uppercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s registers an offense and corrects with a lowercase delimiter 182s when using back tick delimiters 182s does not register an offense with an uppercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s registers an offense and corrects with a lowercase delimiter 182s when using non-word delimiters 182s does not register an offense 182s with a squiggly heredoc 182s does not register an offense with an uppercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s registers an offense and corrects with a lowercase delimiter 182s with an interpolated heredoc 182s does not register an offense with an uppercase delimiter 182s registers an offense and corrects with a lowercase delimiter 182s registers an offense with a camel case delimiter 182s when enforced style is lowercase 182s with a squiggly heredoc 182s registers an offense and corrects with an uppercase delimiter 182s does not register an offense with a lowercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s with an interpolated heredoc 182s registers an offense and corrects with a camel case delimiter 182s registers an offense and corrects with an uppercase delimiter 182s does not register an offense with a lowercase delimiter 182s with a non-interpolated heredoc 182s registers an offense and corrects with an uppercase delimiter 182s registers an offense and corrects with a camel case delimiter 182s does not register an offense with a lowercase delimiter 182s 182s RuboCop::Cop::Style::StringChars 182s registers and corrects an offense when using `split('')` 182s does not register an offense when using `split(/ /)` 182s registers and corrects an offense when using `split(//)` 182s registers and corrects an offense when using `split("")` 182s does not register an offense when using `split` 182s does not register an offense when using `chars` 182s registers and corrects an offense when using `split` without parentheses 182s 182s RuboCop::Cop::Style::EvenOdd 182s converts x._(y) % 2 != 1 to even? 182s accepts x % 2 == 2 182s converts (y % 2) != 1 to #even? 182s converts (x(y) % 2) != 1 to #even? 182s converts (x % 2) != 0 to #odd? 182s converts (x.y % 2) != 1 to #even? 182s converts (x % 2) == 0 to #even? 182s converts x % 2 != 0 to #odd? 182s converts complex examples 182s converts (x._(y)) % 2 != 1 to even? 182s converts x % 2 == 0 to #even? 182s converts (x % 2) == 1 to #odd? 182s accepts x % 3 != 0 182s accepts x % 3 == 0 182s converts (x._(y) % 2) != 1 to even? 182s converts 1 % 2 != 1 to even? 182s converts x % 2 != 1 to #even? 182s converts x % 2 == 1 to #odd? 182s 182s RuboCop::Cop::Layout::ArgumentAlignment 182s aligned with first argument 182s registers an offense and correct multi-line parametersindented too far 182s can handle a call embedded in a string 182s can handle parentheses used with no arguments 182s accepts calls that only span one line 182s doesn't get confused by a symbol argument 182s can handle heredoc strings 182s can handle a method call within a method call 182s doesn't get confused by symbols with embedded expressions 182s doesn't crash and burn when there are nested issues 182s can handle a string literal as other argument 182s can handle do-end 182s can handle a call with a block inside another call 182s can handle a correctly aligned string literal as first argument 182s can handle a ternary condition with a block reference 182s doesn't get confused by extra comma at the end 182s registers an offense and corrects arguments with single indent 182s can handle other method calls without parentheses 182s accepts the first parameter being on a new row 182s registers an offense and corrects when missed indentation kwargs 182s accepts correctly aligned arguments with fullwidth characters 182s can handle method calls without parentheses 182s doesn't get confused by regexen with embedded expressions 182s accepts braceless hashes 182s registers an offense and corrects arguments with double indent 182s doesn't get confused by a line break inside a parameter 182s accepts correctly aligned arguments 182s can handle a multiline hash as second parameter 182s does not crash in autocorrect on dynamic string in parameter value 182s accepts multiline []= method call 182s registers an offense and corrects splat operator 182s registers an offense and corrects multi-line outdented parameters 182s registers an offense and corrects multiline missed indentation 182s when using safe navigation operator 182s registers an offense and corrects arguments with single indent 182s assigned methods 182s accepts the first parameter being on a new row 182s accepts the first parameter being on method row 182s aligned with fixed indentation 182s autocorrects by outdenting when indented too far 182s corrects indentation for kwargs starting on same line as other args 182s autocorrects when first line is indented 182s does not register an offense when using aligned braced hash as a argument 182s registers an offense and corrects when missed indentation kwargs 182s autocorrects by indenting when not indented 182s multi-line method calls 182s does not err on method call without a method name 182s registers offenses and corrects double indentation from relevant method 182s autocorrects relative to position of relevant method call 182s can handle existing indentation from multi-line method calls 182s assigned methods 182s with IndentationWidth:Width set to 4 182s autocorrects even when first argument is in wrong position 182s accepts the first parameter being on method row 182s accepts the first parameter being on a new row 182s with ArgumentAlignment:IndentationWidth set to 4 182s accepts the first parameter being on a new row 183s accepts the first parameter being on method row 183s 183s RuboCop::Formatter::HTMLFormatter 183s outputs the cached result in HTML 183s outputs the result in HTML 183s 183s RuboCop::Cop::Style::ConditionalAssignment 183s SingleLineConditionsOnly true 183s registers an offense for assignment using []= 183s registers an offense for assignment using a method that ends with an equal sign 183s corrects assignment when without `else` branch 183s registers an offense for assignment to an if then else 183s corrects assignment to a namespaced constant 183s registers an offense for assignment to case when then else 183s allows a method call in the subject of a ternary operator 183s behaves like all assignment types 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s behaves like all variable types 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to unless else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline unless else 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to an if else with multiline in one branch 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s behaves like all assignment types 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to if else 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s registers an offense any assignment to case when 183s behaves like all assignment types 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s behaves like all assignment types 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to case when 183s does not crash when used inside rescue 183s registers an offense for any assignment to ternary 183s behaves like all assignment types 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense for any assignment to unless else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s behaves like all variable types 183s allows assignment to if without else 183s registers an offense assigning any variable type to ternary 183s registers an offense assigning any variable type to if else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsif else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to unless else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s behaves like all assignment types 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s behaves like all assignment types 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s behaves like all variable types 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s registers an offense assigning any variable type to unless else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to if else 183s registers an offense for assigning any variable type to case when 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s behaves like all assignment types 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s does not crash when used inside rescue 183s registers an offense for any assignment to ternary 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline unless else 183s behaves like all assignment types 183s allows any assignment to if without else 183s registers an offense any assignment to case when 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline unless else 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline case when 183s assigning any variable type to an if else with multiline in one branch 183s behaves like multiline all assignment types allow 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline unless else 183s behaves like all assignment types 183s registers an offense for any assignment to ternary 183s allows any assignment to if without else 183s registers an offense any assignment to if else 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s registers an offense any assignment to case when 183s behaves like all variable types 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to ternary 183s registers an offense assigning any variable type to if elsif else 183s allows assignment to if without else 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to unless else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline unless else 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline case when 183s assigning any variable type to an if else with multiline in one branch 183s behaves like all assignment types 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s for loop 183s ignores pseudo assignments in a for loop 183s behaves like all assignment types 183s registers an offense any assignment to if else 183s registers an offense for any assignment to ternary 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s behaves like multiline all variable types allow 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline unless else 183s behaves like all assignment types 183s allows any assignment to if without else 183s does not crash when used inside rescue 183s registers an offense for any assignment to ternary 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s behaves like all assignment types 183s registers an offense any assignment to if else 183s does not crash when used inside rescue 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense for any assignment to unless else 183s behaves like single line condition autocorrect 183s corrects assignment to an if elsif else condition 183s corrects assignment to an if elsif else with multiple elsifs 183s corrects assignment to a case when else with multiple whens 183s corrects assignment to a ternary operator 183s corrects assignment to an if else condition 183s corrects assignment to a case when else condition 183s corrects assignment to an unless else condition 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s behaves like all assignment types 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to if else 183s behaves like all variable types 183s allows assignment to if without else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to unless else 183s registers an offense for assigning any variable type to case when 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to ternary 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like all variable types 183s allows assignment to if without else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to unless else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to ternary 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all variable types allow 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline unless else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline if elsif else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like all variable types 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to unless else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s registers an offense assigning any variable type to if else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like all assignment types 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s registers an offense any assignment to if else 183s registers an offense for any assignment to ternary 183s behaves like all assignment types 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to if else 183s behaves like multiline all assignment types allow 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s behaves like all assignment types 183s registers an offense any assignment to case when 183s does not crash when used inside rescue 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s behaves like all assignment types 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s IncludeTernaryExpressions false 183s allows assigning any variable type to ternary 183s SingleLineConditionsOnly false 183s corrects assignment to a case when else condition 183s corrects assignment to a multiline if else condition 183s corrects assignment to a case when else with multiple whens 183s corrects assignment to an if elsif else with multiple elsifs 183s corrects assignment to a multiline if elsif else condition 183s corrects assignment to an unless else condition 183s behaves like multiline all variable types offense 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline unless else 183s behaves like all assignment types 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s registers an offense any assignment to case when 183s behaves like all variable types 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to unless else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types offense 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s behaves like all assignment types 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s does not crash when used inside rescue 183s behaves like all assignment types 183s registers an offense for any assignment to ternary 183s allows any assignment to if without else 183s does not crash when used inside rescue 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to if else 183s behaves like single line condition autocorrect 183s corrects assignment to a case when else condition 183s corrects assignment to a case when else with multiple whens 183s corrects assignment to an if elsif else condition 183s corrects assignment to an unless else condition 183s corrects assignment to an if else condition 183s corrects assignment to a ternary operator 183s corrects assignment to an if elsif else with multiple elsifs 183s behaves like multiline all variable types offense 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to a multiline unless else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if else 183s behaves like multiline all assignment types offense 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s behaves like multiline all variable types offense 183s assigning any variable type to a multiline unless else 183s assigning any variable type to a multiline if else 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to an if else with multiline in one branch 183s behaves like multiline all assignment types offense 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s behaves like all assignment types 183s does not crash when used inside rescue 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s registers an offense for any assignment to unless else 183s behaves like all variable types 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to ternary 183s registers an offense assigning any variable type to unless else 183s allows assignment to if without else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to if else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like all assignment types 183s registers an offense any assignment to case when 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to if else 183s allows any assignment to if without else 183s does not crash when used inside rescue 183s registers an offense for any assignment to ternary 183s behaves like multiline all assignment types offense 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s behaves like multiline all variable types offense 183s assigning any variable type to a multiline case when 183s assigning any variable type to a multiline if elsif else 183s assigning any variable type to an if else with multiline in one branch 183s assigning any variable type to a multiline unless else 183s assigning any variable type to a multiline if else 183s behaves like all assignment types 183s registers an offense any assignment to case when 183s registers an offense any assignment to if else 183s registers an offense for any assignment to ternary 183s registers an offense for any assignment to unless else 183s does not crash when used inside rescue 183s allows any assignment to if without else 183s behaves like multiline all assignment types offense 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s behaves like all assignment types 183s allows any assignment to if without else 183s registers an offense for any assignment to ternary 183s registers an offense for any assignment to unless else 183s registers an offense any assignment to case when 183s does not crash when used inside rescue 183s registers an offense any assignment to if else 183s behaves like multiline all assignment types offense 183s any assignment to a multiline if else 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s behaves like all assignment types 183s registers an offense for any assignment to unless else 183s registers an offense for any assignment to ternary 183s registers an offense any assignment to case when 183s allows any assignment to if without else 183s registers an offense any assignment to if else 183s does not crash when used inside rescue 183s behaves like all variable types 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to ternary 183s registers an offense assigning any variable type to unless else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if else 183s allows assignment to if without else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like all variable types 183s registers an offense assigning any variable type to ternary 183s registers an offense assigning any variable type to if elsif else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to unless else 183s allows assignment to if without else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like all variable types 183s registers an offense assigning any variable type to unless else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s registers an offense assigning any variable type to if elsif else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types offense 183s any assignment to a multiline case when 183s any assignment to a multiline unless else 183s any assignment to a multiline if else 183s behaves like all variable types 183s registers an offense assigning any variable type to if elsif else 183s allows assignment to if without else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to ternary 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s registers an offense assigning any variable type to unless else 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types offense 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s any assignment to a multiline unless else 183s behaves like all variable types 183s registers an offense assigning any variable type to ternary 183s allows assignment to if without else 183s does not crash for rescue assignment 183s registers an offense assigning any variable type to if else 183s registers an offense assigning any variable type to unless else 183s registers an offense for assigning any variable type to case when 183s registers an offense assigning any variable type to if elsif else 183s registers an offense assigning any variable type to if elsewith multiple assignment 183s >= Ruby 2.7 183s registers an offense for assigning any variable type to case in 183s behaves like multiline all assignment types offense 183s any assignment to a multiline unless else 183s any assignment to a multiline case when 183s any assignment to a multiline if else 183s behaves like all assignment types 184s registers an offense any assignment to case when 184s registers an offense for any assignment to ternary 184s does not crash when used inside rescue 184s registers an offense any assignment to if else 184s registers an offense for any assignment to unless else 184s allows any assignment to if without else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline unless else 184s any assignment to a multiline case when 184s behaves like all assignment types 184s allows any assignment to if without else 184s registers an offense any assignment to if else 184s registers an offense for any assignment to ternary 184s registers an offense any assignment to case when 184s registers an offense for any assignment to unless else 184s does not crash when used inside rescue 184s behaves like all assignment types 184s registers an offense for any assignment to ternary 184s registers an offense for any assignment to unless else 184s registers an offense any assignment to case when 184s does not crash when used inside rescue 184s registers an offense any assignment to if else 184s allows any assignment to if without else 184s behaves like all assignment types 184s registers an offense any assignment to if else 184s registers an offense for any assignment to unless else 184s does not crash when used inside rescue 184s registers an offense for any assignment to ternary 184s allows any assignment to if without else 184s registers an offense any assignment to case when 184s behaves like multiline all variable types offense 184s assigning any variable type to an if else with multiline in one branch 184s assigning any variable type to a multiline case when 184s assigning any variable type to a multiline if elsif else 184s assigning any variable type to a multiline unless else 184s assigning any variable type to a multiline if else 184s behaves like all assignment types 184s does not crash when used inside rescue 184s allows any assignment to if without else 184s registers an offense for any assignment to unless else 184s registers an offense any assignment to case when 184s registers an offense any assignment to if else 184s registers an offense for any assignment to ternary 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline case when 184s any assignment to a multiline unless else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline unless else 184s any assignment to a multiline case when 184s any assignment to a multiline if else 184s behaves like all assignment types 184s registers an offense for any assignment to ternary 184s registers an offense for any assignment to unless else 184s registers an offense any assignment to if else 184s allows any assignment to if without else 184s registers an offense any assignment to case when 184s does not crash when used inside rescue 184s behaves like all assignment types 184s registers an offense for any assignment to unless else 184s allows any assignment to if without else 184s does not crash when used inside rescue 184s registers an offense any assignment to case when 184s registers an offense for any assignment to ternary 184s registers an offense any assignment to if else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline case when 184s any assignment to a multiline if else 184s any assignment to a multiline unless else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline unless else 184s any assignment to a multiline case when 184s behaves like multiline all variable types offense 184s assigning any variable type to a multiline if elsif else 184s assigning any variable type to a multiline case when 184s assigning any variable type to a multiline if else 184s assigning any variable type to an if else with multiline in one branch 184s assigning any variable type to a multiline unless else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline case when 184s any assignment to a multiline unless else 184s behaves like all assignment types 184s allows any assignment to if without else 184s does not crash when used inside rescue 184s registers an offense for any assignment to ternary 184s registers an offense any assignment to if else 184s registers an offense for any assignment to unless else 184s registers an offense any assignment to case when 184s behaves like all assignment types 184s does not crash when used inside rescue 184s registers an offense for any assignment to unless else 184s registers an offense for any assignment to ternary 184s registers an offense any assignment to if else 184s allows any assignment to if without else 184s registers an offense any assignment to case when 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline case when 184s any assignment to a multiline unless else 184s behaves like all assignment types 184s registers an offense for any assignment to unless else 184s registers an offense any assignment to if else 184s registers an offense any assignment to case when 184s registers an offense for any assignment to ternary 184s does not crash when used inside rescue 184s allows any assignment to if without else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline case when 184s any assignment to a multiline unless else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline unless else 184s any assignment to a multiline case when 184s behaves like all assignment types 184s registers an offense any assignment to case when 184s registers an offense for any assignment to unless else 184s does not crash when used inside rescue 184s registers an offense any assignment to if else 184s registers an offense for any assignment to ternary 184s allows any assignment to if without else 184s behaves like multiline all assignment types offense 184s any assignment to a multiline if else 184s any assignment to a multiline case when 184s any assignment to a multiline unless else 184s behaves like multiline all variable types offense 184s assigning any variable type to a multiline if elsif else 184s assigning any variable type to a multiline if else 184s assigning any variable type to a multiline unless else 184s assigning any variable type to an if else with multiline in one branch 184s assigning any variable type to a multiline case when 184s 184s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 184s does not register an offense for an assertion about the message 184s registers an offense for described_class::MSG in let 184s registers an offense for specs that expect offense using the MSG 184s registers an offense for specs that assert using the MSG 184s 184s RuboCop::Cop::Style::TopLevelMethodDefinition 184s registers an offense top-level methods 184s does not register an offense when using module 184s does not register an offense when using Struct 184s does not register an offense when defined within arbitrary block 184s registers an offense top-level class methods 184s registers an offense when defining a top-level method after a class definition 184s does not register an offense when just called method on top-level 184s does not register an offense when using class 184s does not register an offense when define_method is not top-level 184s top-level define_method 184s registers offense for multi-line block 184s registers offense with inline block 184s registers offense for proc argument 184s Ruby >= 2.7 184s registers offense with inline numblock 184s 184s RuboCop::Cop::Gemspec::DependencyVersion 184s with `EnforcedStyle: forbidden` 184s using add_runtime_dependency 184s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 184s registers an offense when adding runtime dependency by parenthesized call with version specification 184s does not register an offense when adding runtime dependency using git option without version specification 184s does not register an offense when adding runtime dependency without version specification 184s registers an offense when adding runtime dependency by parenthesized call with tag specification 184s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 184s registers an offense when adding runtime dependency by parenthesized call with branch specification 184s registers an offense when adding runtime dependency with branch specification 184s registers an offense when adding runtime dependency with tag specification 184s does not register an offense when adding runtime dependency by parenthesized call without version specification 184s registers an offense when adding runtime dependency with commit ref specification 184s registers an offense when adding runtime dependency with version specification 184s using add_dependency 184s registers an offense when adding dependency by parenthesized call with commit ref specification 184s does not register an offense when adding dependency without version specification 184s registers an offense when adding dependency by parenthesized call with branch specification 184s registers an offense when adding dependency by parenthesized call with version specification 184s registers an offense when adding dependency with tag specification 184s does not register an offense when adding dependency using git option without version specification 184s registers an offense when adding dependency with commit ref specification 184s does not register an offense when adding dependency using git option by parenthesized call without version specification 184s registers an offense when adding dependency with version specification 184s does not register an offense when adding dependency by parenthesized call without version specification 184s registers an offense when adding dependency by parenthesized call with tag specification 184s registers an offense when adding dependency with branch specification 184s with `AllowedGems` 184s registers an offense when adding dependency by parenthesized call without version specification 184s registers an offense when adding dependency without version specification 184s using add_development_dependency 184s does not register an offense when adding development dependency using git option by parenthesized call without version specification 184s registers an offense when adding development dependency with tag specification 184s registers an offense when adding development dependency by parenthesized call with branch specification 184s registers an offense when adding development dependency by parenthesized call with tag specification 184s does not register an offense when adding development dependency without version specification 184s registers an offense when adding development dependency with branch specification 184s registers an offense when adding development dependency with commit ref specification 184s does not register an offense when adding development dependency using git option without version specification 184s does not register an offense when adding development dependency by parenthesized call without version specification 184s registers an offense when adding development dependency by parenthesized call with version specification 184s registers an offense when adding development dependency with version specification 184s registers an offense when adding development dependency by parenthesized call with commit ref specification 184s with `EnforcedStyle: required` 184s using add_development_dependency 184s registers an offense when adding development dependency using git option without version specification 184s does not register an offense when adding development dependency with branch specification 184s does not register an offense when adding development dependency by parenthesized call with tag specification 184s does not register an offense when adding development dependency by parenthesized call with version specification 184s does not register an offense when adding development dependency with tag specification 184s does not register an offense when adding development dependency by parenthesized call with commit ref specification 184s registers an offense when adding development dependency without version specification 184s registers an offense when adding development dependency by parenthesized call without version specification 184s does not register an offense when adding development dependency by parenthesized call with branch specification 184s does not register an offense when adding development dependency with commit ref specification 184s does not register an offense when adding development dependency with version specification 184s registers an offense when adding development dependency using git option by parenthesized call without version specification 184s using add_runtime_dependency 184s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 184s does not register an offense when adding runtime dependency with commit ref specification 184s registers an offense when adding runtime dependency using git option without version specification 184s does not register an offense when adding runtime dependency with tag specification 184s does not register an offense when adding runtime dependency by parenthesized call with tag specification 184s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 184s does not register an offense when adding runtime dependency by parenthesized call with version specification 184s does not register an offense when adding runtime dependency by parenthesized call with branch specification 184s does not register an offense when adding runtime dependency with version specification 184s registers an offense when adding runtime dependency by parenthesized call without version specification 184s registers an offense when adding runtime dependency without version specification 184s does not register an offense when adding runtime dependency with branch specification 184s using add_dependency 184s registers an offense when adding dependency by parenthesized call without version specification 184s does not register an offense when adding dependency with version specification 184s does not register an offense when adding dependency with commit ref specification 184s registers an offense when adding dependency without version specification 184s does not register an offense when adding dependency with tag specification 184s does not register an offense when adding dependency by parenthesized call with version specification 184s registers an offense when adding dependency using git option without version specification 184s does not register an offense when adding dependency by parenthesized call with tag specification 184s does not register an offense when adding dependency with branch specification 184s registers an offense when adding dependency using git option by parenthesized call without version specification 184s does not register an offense when adding dependency by parenthesized call with branch specification 184s does not register an offense when adding dependency by parenthesized call with commit ref specification 184s with `AllowedGems` 184s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 184s registers an offense when adding dependency without version specification excepts allowed gems 184s 184s RuboCop::Cop::InternalAffairs::NodeTypePredicate 184s does not register an offense for a predicate node type check 184s comparison node type check 184s registers an offense and autocorrects 184s 184s RuboCop::Cop::Style::NegatedIf 184s does not blow up for empty if condition 184s does not blow up for empty unless condition 184s does not blow up on a negated ternary operator 184s does not blow up for ternary ops 184s with “postfix” style 184s registers an offense for postfix 184s does not register an offense for prefix 184s with “prefix” style 184s does not register an offense for postfix 184s registers an offense for prefix 184s with “both” style 184s registers an offense for if with exclamation point condition 184s accepts an if/else with negative condition 184s accepts an if where only part of the condition is negated 184s autocorrects by replacing parenthesized if not with unless 184s accepts an if where the condition is doubly negated 184s is not confused by negated elsif 184s registers an offense for if with "not" condition 184s 184s RuboCop::Cop::Style::FetchEnvVar 184s registers an offense with using an `ENV` at multiple `if` condition in the body 184s registers an offense when using an `ENV` at `if` condition in the body 184s registers an offense when using `ENV && x` that is different from `if` condition in the body 184s registers an offense when using `ENV || x` that is different from `if` condition in the body 184s when it is an array element 184s registers an offense 184s when it receives a message 184s registers no offenses 184s when it is compared `!=` with other object 184s does not register an offense 184s when it is used in a conditional expression 184s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 184s registers no offenses with `unless` 184s registers no offenses with `if` 184s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 184s registers an offense with `case` 184s registers no offenses when using the same `ENV` var as `if` condition in the body 184s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 184s registers no offenses with ternary operator 184s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 184s registers an offense when using an `ENV` var that is different from `if` condition in the body 184s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 184s when `ENV[]` is the LHS of `||` 184s registers no offenses 184s when it is a hash value 184s registers an offense 184s with negation 184s registers no offenses 184s when it is a hash key 184s registers an offense 184s when it is compared `==` with other object 184s does not register an offense 184s when the env val is excluded from the inspection by the config 184s registers no offenses 184s when the node is a assigned by `||=` 184s registers an offense 184s when it is assigned to a variable 184s registers an offense when using multiple assignment 184s registers an offense when using single assignment 184s when it receives a message with safe navigation 184s registers no offenses 184s when it is an argument of a method 184s registers an offense 184s when the node is a receiver of `||=` 184s does not register an offense 184s when it is used in an interpolation 184s registers an offense 184s when the node is a assigned by `&&=` 184s registers an offense 184s when `ENV[]` is the right end of `||` chains 184s registers an offense 184s when it is evaluated with no default values 184s registers an offense 184s when using `fetch` instead of `[]` 184s registers no offenses 184s when the node is a receiver of `&&=` 184s does not register an offense 184s 184s RuboCop::Cop::Layout::ParameterAlignment 184s aligned with fixed indentation 184s accepts a method definition without parameters 184s accepts parameter lists on a single line 184s accepts proper indentation 184s doesn't get confused by splat 184s registers an offense and corrects parameters aligned to first param 184s registers an offense and corrects parameters with double indent 184s accepts the first parameter being on a new row 184s defining self.method 184s accepts proper indentation 184s registers an offense and corrects parameters aligned to first param 184s aligned with first parameter 184s accepts a method definition without parameters 184s accepts proper indentation 184s accepts the first parameter being on a new row 184s registers an offense and corrects parameters with single indent 184s doesn't get confused by splat 184s registers an offense and corrects parameters with double indent 184s registers an offense and corrects alignment in simple case 184s accepts parameter lists on a single line 184s defining self.method 184s accepts proper indentation 184s registers an offense and corrects parameters with single indent 184s 184s RuboCop::Cop::Bundler::DuplicatedGem 184s when investigating Ruby files 184s does not register any offenses 184s when investigating Gemfiles 184s does not register an offense when gem is duplicated within `if-else` statement 184s does not register an offense when gem is duplicated within `if-elsif` statement 184s does not register an offense when gem is duplicated within `case` statement 184s registers an offense when gem from default group is conditionally duplicated 184s and the file is empty 184s does not register any offenses 184s and no duplicate gems are present 184s does not register any offenses 184s and a duplicated gem is in a git/path/group/platforms block 184s registers an offense 184s and a gem is duplicated in default group 184s registers an offense 184s 184s RuboCop::Cop::Layout::DefEndAlignment 184s when EnforcedStyleAlignWith is start_of_line 184s accepts matching foo def ... end 184s accepts matching def ... end 184s accepts matching foo bar def ... end 184s registers an offense for mismatched foo def test end and autocorrects 184s accepts matching defs ... end 184s registers an offense for mismatched def test end and autocorrects 184s registers an offense for mismatched def Test.test end and autocorrects 184s accepts matching def ... end 184s when using refinements and `private def` 184s does not register an offense 184s when including an anonymous module containing `private def` 184s does not register an offense 184s correct + opposite 184s registers an offense 184s when EnforcedStyleAlignWith is def 184s accepts matching def ... end 184s registers an offense for mismatched foo def test end and autocorrects 184s registers an offense for mismatched def test end and autocorrects 184s accepts matching defs ... end 184s registers an offense for mismatched def Test.test end and autocorrects 184s accepts matching foo def ... end 184s correct + opposite 184s registers an offense 184s 184s RuboCop::Cop::Bundler::GemComment 184s when investigating Gemfiles 184s and the gem is commented on the same line 184s does not register any offenses 184s and the file is empty 184s does not register any offenses 184s and the gem is commented 184s does not register any offenses 184s when the "OnlyFor" option is set 184s including "version_specifiers" 184s when a gem is uncommented and has a version specifier along with other options 184s registers an offense 184s when a gem is uncommented and has options but no version specifiers 184s does not register an offense 184s when a gem is uncommented and has a version specifier 184s registers an offense 184s when a gem is uncommented and has no version specified 184s does not register an offense 184s when a gem is uncommented and has multiple version specifiers 184s registers an offense 184s when a gem is commented 184s does not register an offense 184s including "restrictive_version_specifiers" 184s when a gem is uncommented and has options but no version specifiers 184s does not register an offense 184s when a gem is uncommented and has both minimum and non-minimum version specifier 184s registers an offense 184s when a gem is uncommented and has a frozen version specifier 184s registers an offense 184s when a gem is uncommented and has a version specifier without operator 184s registers an offense 184s when a gem is uncommented and has a non-minimum version specifier with a leading space 184s registers an offense 184s when a gem is uncommented and has a version specifier along with other options 184s registers an offense 184s when a gem is uncommented and has only a minimum version specifier 184s does not register an offense 184s when a gem is uncommented and has a pessimistic version specifier 184s registers an offense 184s when a gem is commented 184s does not register an offense 184s when a gem is uncommented and has no version specified 184s does not register an offense 184s including one or more option names but not "version_specifiers" 184s when a gem is uncommented and has one of the specified options 184s registers an offense 184s when a gem is uncommented and contains only options not specified 184s does not register an offense 184s when a gem is uncommented and has a version specifier but none of the specified options 184s does not register an offense 184s and a gem has no comment 184s registers an offense 184s and the file contains source and group 184s does not register any offenses 184s and the gem is permitted 184s does not register any offenses 184s when investigating Ruby files 184s does not register any offenses 184s 184s RuboCop::Cop::Style::InfiniteLoop 184s registers an offense for a while loop with 1 as condition 184s registers an offense for while true or until false if loop {} would work because of an earlier assignment 184s registers an offense for a while loop with 2.0 as condition 184s registers an offense for a until loop with nil as condition 184s registers an offense for a while loop with [1] as condition 184s registers an offense for modifier until false if loop {} would not change semantics 184s accepts Kernel#loop 184s registers an offense for a until loop with false as condition 184s registers an offense for a while loop with {} as condition 184s registers an offense for while true if loop {} would work because it is an instance variable being assigned 184s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 184s registers an offense for until false if loop {} would work because of previous assignment in a while loop 184s accepts while true if loop {} would change semantics 184s accepts modifier while true if loop {} would change semantics 184s behaves like autocorrector 184s autocorrects begin-end-until with one statement 184s autocorrects the usage of until with do 184s autocorrects the usage of until without do 184s autocorrects single line modifier until with and 184s autocorrects single line modifier until 184s autocorrects begin-end-until with two statements 184s with non-default indentation width 184s autocorrects multi-line modifier until and indents correctly 184s behaves like autocorrector 184s autocorrects begin-end-while with one statement 184s autocorrects single line modifier while with and 184s autocorrects single line modifier while 184s autocorrects the usage of while with do 184s autocorrects begin-end-while with two statements 184s autocorrects the usage of while without do 184s with non-default indentation width 184s autocorrects multi-line modifier while and indents correctly 184s 184s RuboCop::Cop::RangeHelp 184s source indicated by #range_by_whole_lines 184s with a whole line except newline selected 184s with include_final_newline 184s is expected to eq "puts 'example'\n" 184s without include_final_newline 184s is expected to eq "puts 'example'" 184s with parts of two lines 184s without include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'" 184s with include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'\n" 184s with beginning of one line 184s with include_final_newline 184s is expected to eq "puts 'another example'\n" 184s without include_final_newline 184s is expected to eq "puts 'another example'" 184s with end of one line 184s without include_final_newline 184s is expected to eq "puts 'example'" 184s with include_final_newline 184s is expected to eq "puts 'example'\n" 184s with a whole line plus beginning of next line 184s without include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'" 184s with include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'\n" 184s when source doesn't end with a newline 184s with include_final_newline 184s is expected to eq 30 184s is expected to eq "newline_at_end" 184s without include_final_newline 184s is expected to eq "newline_at_end" 184s with parts of four lines 184s with include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 184s without include_final_newline 184s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 184s when part of a single line is selected 184s with include_final_newline 184s is expected to eq "puts 'example'\n" 184s without include_final_newline 184s is expected to eq "puts 'example'" 184s source indicated by #range_with_surrounding_space 184s when passing range as a positional argument 184s behaves like works with various `side`s 184s when side is :left 184s is expected to eq " a(2)" 184s when side is :right 184s is expected to eq "a(2) " 184s when side is :both 184s is expected to eq " a(2) " 184s when passing range as a kwarg 184s behaves like works with various `side`s 184s when side is :left 184s is expected to eq " a(2)" 184s when side is :both 184s is expected to eq " a(2) " 184s when side is :right 184s is expected to eq "a(2) " 184s source indicated by #range_with_surrounding_comma 184s when side is :right 184s is expected to eq "Error," 184s when side is :both 184s is expected to eq ",Error," 184s when side is :left 184s is expected to eq ",Error" 184s #range_with_comments_and_lines 184s returns a range that includes related comments and whole lines 184s 184s RuboCop::Cop::Style::RedundantReturn 184s autocorrects by removing redundant returns 184s reports an offense for defs with only a return 184s reports an offense for defs ending with return 184s accepts return in a non-final position 184s does not blow up on empty method body 184s does not blow up on empty if body 184s reports an offense for def ending with return with splat argument 184s reports an offense for def ending with return 184s reports an offense for def with only a return 184s when return is inside begin-end body 184s registers an offense and autocorrects 184s when return is inside a when-branch 184s registers an offense and autocorrects 184s when multi-value returns are allowed 184s accepts def ending with return 184s accepts defs ending with return 184s accepts def with only a return 184s accepts defs with only a return 184s when case nodes are empty 184s accepts empty when nodes 184s when multi-value returns are not allowed 184s reports an offense for def with only a return 184s autocorrects by making an implicit hash explicit 184s autocorrects by removing return when using an explicit hash 184s reports an offense for defs ending with return 184s reports an offense for defs with only a return 184s reports an offense for def ending with return 184s reports an offense when multiple return values have a parenthesized return value 184s when return is inside an if-branch 184s registers an offense and autocorrects 184s when rescue and return blocks present 184s registers an offense and autocorrects when rescue has else clause 184s registers an offense and autocorrects when inside function or rescue block 184s when return has no arguments 184s behaves like common behavior 184s registers an offense for return() and autocorrects replacing return() with nil 184s behaves like common behavior 184s registers an offense for return and autocorrects replacing return with nil 184s 184s RuboCop::FeatureLoader 184s .load 184s with dot-prefixed namespaced feature 184s loads it as namespaced feature 184s with namespaced feature 184s loads it as namespaced feature 184s with dot-prefixed loadable feature 184s loads it as relative path 184s with normally loadable feature 184s loads it normally 184s with unexpected LoadError from require 184s raises LoadError 184s with unloadable namespaced feature 184s raises LoadError with preferred message 184s 184s RuboCop::DirectiveComment 184s #disabled_all? 184s when disabled all cops 184s is expected to equal true 184s when disabled specific cops 184s is expected to equal false 184s when enabled specific cops 184s is expected to equal false 184s when enabled all cops 184s is expected to equal false 184s #enabled_all? 184s when disabled all cops 184s is expected to equal false 184s when enabled all cops 184s is expected to equal true 184s when enabled specific cops 184s is expected to equal false 184s when disabled specific cops 184s is expected to equal false 184s #directive_count 184s when cops and departments used 184s is expected to eq 4 184s when few department used 184s is expected to eq 3 184s when few cops used 184s is expected to eq 2 184s #overridden_by_department? 184s when cop is overridden by it's department 184s is expected to equal true 184s when there are no cops 184s is expected to equal false 184s when cop is not overridden by it's department 184s is expected to equal false 184s when there are no departments 184s is expected to equal false 184s #match? 184s when cop names are same as in the comment 184s is expected to equal true 184s when there are no cop names 184s is expected to equal false 184s when disabled all cops 184s is expected to equal true 184s when cop names are subset of names 184s is expected to equal false 184s when cop names are same but in a different order 184s is expected to equal true 184s when cop names are superset of names 184s is expected to equal false 184s when cop names are same but have duplicated names 184s is expected to equal true 184s #department_names 184s when couple departments specified 184s is expected to eq ["Foo", "Baz"] 184s when only department specified 184s is expected to eq ["Foo"] 184s when all cops mentioned 184s is expected to eq [] 184s when department and cops specified 184s is expected to eq ["Foo"] 184s when only cop specified 184s is expected to eq [] 184s #cop_names 184s when only department specified 184s is expected to eq ["Foo/Bar", "Foo/Baz"] 184s when redundant directive cop department specified 184s is expected to eq ["Lint/One", "Lint/Two"] 184s when only cop specified 184s is expected to eq ["Foo/Bar"] 184s when all cops mentioned 184s is expected to eq ["all_names"] 184s when couple departments specified 184s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 184s when department and cops specified 184s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 184s .before_comment 184s when line has NO code 184s is expected to eq "" 184s when line has code 184s is expected to eq "def foo " 184s #line_number 184s returns line number for directive 184s #disabled? 184s when disable 184s is expected to equal true 184s when todo 184s is expected to equal true 184s when enable 184s is expected to equal false 184s #all_cops? 184s when mentioned specific cops 184s is expected to equal false 184s when mentioned all 184s is expected to equal true 184s #enabled? 184s when enable 184s is expected to equal true 184s when disable 184s is expected to equal false 184s when todo 184s is expected to equal false 184s #match_captures 184s when enable 184s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 184s when todo 184s is expected to eq ["todo", "all", nil, nil] 184s when typo 184s is expected to be nil 184s when disable 184s is expected to eq ["disable", "all", nil, nil] 184s #single_line? 184s when relates to single line 184s is expected to equal true 184s when does NOT relate to single line 184s is expected to equal false 184s #in_directive_department? 184s when cop department disabled 184s is expected to equal true 184s when cop disabled 184s is expected to equal false 184s when another department disabled 184s is expected to equal false 184s 184s RuboCop::Cop::Style::PerlBackrefs 184s autocorrects $POSTMATCH to Regexp.last_match.post_match 184s autocorrects puts $1 to puts Regexp.last_match(1) 184s autocorrects $MATCH to Regexp.last_match(0) 184s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 184s autocorrects $1 to ::Regexp.last_match(1) in namespace 184s autocorrects $9 to Regexp.last_match(9) 184s autocorrects $PREMATCH to Regexp.last_match.pre_match 184s autocorrects $` to Regexp.last_match.pre_match 184s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 184s autocorrects `#$1` to `#{Regexp.last_match(1)}` 184s autocorrects $' to Regexp.last_match.post_match 184s autocorrects "#$1" to "#{Regexp.last_match(1)}" 184s autocorrects $& to Regexp.last_match(0) 184s autocorrects $+ to Regexp.last_match(-1) 184s 184s RuboCop::Cop::Lint::PercentSymbolArray 184s detecting colons or commas in a %i/%I string 184s accepts tokens without colons or commas 184s accepts tokens without colons or commas 184s registers an offense and corrects when there are no colons but one comma 184s registers an offense and corrects when symbols contain colons and are comma separated 184s accepts likely false positive $, 184s accepts likely false positive $, 184s registers an offense and corrects when one symbol has a colon but there are no commas 184s registers an offense and corrects when one symbol has a colon but there are no commas 184s registers an offense and corrects when there are no colons but one comma 184s registers an offense and corrects when symbols contain colons and are comma separated 184s with binary encoded source 184s registers an offense and corrects when tokens contain quotes 184s accepts if tokens contain no quotes 184s 184s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 184s behaves like reduce/inject 184s does not affect inject called without a block 184s does not affect inject called with no block args 184s given a inject block 184s allows break with no value 184s does not register an offense when comparing 184s does not register an offense when returning accumulator[element] 184s registers an offense with the element in interpolation 184s registers an offense when returning accumulator[element]= 184s does not register an offense when calling a method on the accumulator with the element 184s registers an offense when called with no argument 184s registers an offense when returning the element 184s does not look inside inner blocks 184s does not register an offense when shovelling the accumulator 184s does not register an offense when and-assigning the accumulator 184s does not register an offense when or-assigning the accumulator 184s registers an offense when mutating the accumulator with the element but not returning it 184s registers an offense for values returned with `next` 184s does not register an offense when returning a literal 184s allows the element to be the return value if the accumulator is returned in any branch 184s does not register an offense with the accumulator in heredoc 184s does not register an offense when mutating the element with the accumulator 184s registers an offense for every violating return value 184s does not register an offense if the return value cannot be determined 184s does not register an offense when mutating the element with the another value 184s registers an offense for values returned with `break` 184s does not register an offense with the accumulator in interpolation 184s registers an offense when returning an expression with the element 184s registers an offense when returning an index of the accumulator 184s does not register an offense when returning the accumulator in an expression 184s does not register an offense when returning a method called on the accumulator 184s does not register an offense when returning the accumulator 184s does not register an offense when op-assigning the accumulator 184s registers an offense when returning an index setter on the accumulator 184s does not register an offense when returning a method called with the accumulator 184s registers an offense with the element in heredoc 184s does not register an offense when returning the accumulator in a boolean statement 184s does not register an offense when assigning the accumulator 184s numblocks 184s registers an offense when returning the element 184s does not register an offense when when returning the accumulator 184s argument count 184s ignores when there is a splat argument 184s ignores when there are not enough block arguments 184s registers an offense when there are more than two arguments but the element is returned 184s behaves like reduce/inject 184s does not affect reduce called without a block 184s does not affect reduce called with no block args 184s given a reduce block 184s does not register an offense when returning the accumulator in a boolean statement 184s does not look inside inner blocks 184s registers an offense when returning an index setter on the accumulator 184s does not register an offense when mutating the element with the accumulator 184s does not register an offense when shovelling the accumulator 184s registers an offense with the element in interpolation 184s does not register an offense when returning the accumulator in an expression 184s registers an offense for values returned with `break` 184s does not register an offense with the accumulator in heredoc 184s does not register an offense when calling a method on the accumulator with the element 184s registers an offense when returning accumulator[element]= 184s does not register an offense with the accumulator in interpolation 184s does not register an offense when returning the accumulator 184s registers an offense for every violating return value 184s does not register an offense if the return value cannot be determined 184s allows break with no value 184s does not register an offense when op-assigning the accumulator 184s registers an offense when called with no argument 184s does not register an offense when or-assigning the accumulator 184s registers an offense for values returned with `next` 184s registers an offense when mutating the accumulator with the element but not returning it 184s registers an offense when returning an index of the accumulator 184s does not register an offense when assigning the accumulator 184s does not register an offense when returning accumulator[element] 184s does not register an offense when and-assigning the accumulator 184s does not register an offense when mutating the element with the another value 184s does not register an offense when returning a method called with the accumulator 184s registers an offense when returning the element 184s allows the element to be the return value if the accumulator is returned in any branch 184s does not register an offense when returning a literal 184s does not register an offense when comparing 184s registers an offense when returning an expression with the element 184s registers an offense with the element in heredoc 184s does not register an offense when returning a method called on the accumulator 184s argument count 184s registers an offense when there are more than two arguments but the element is returned 184s ignores when there is a splat argument 184s ignores when there are not enough block arguments 184s numblocks 184s registers an offense when returning the element 184s does not register an offense when when returning the accumulator 184s 184s RuboCop::Cop::Lint::LiteralInInterpolation 184s handles backslash in double quotes when autocorrecting 184s handles nested interpolations when autocorrecting 184s accepts interpolation of irange where endpoints are not literals 184s handles double quotes in single quotes when autocorrecting 184s handles backslash in single quotes when autocorrecting 184s accepts empty interpolation 184s does not register an offense when space literal at the end of heredoc line 184s accepts interpolation of xstr 184s accepts interpolation of erange where endpoints are not literals 185s behaves like special keywords 185s accepts strings like __END__ 185s registers an offense and autocorrects interpolation after __END__ 185s behaves like literal interpolation 185s removes interpolation around multiple %i[s1 s2] 185s removes interpolation around %i[s1 s2] when there is more text 185s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 185s registers an offense only for final %i[s1 s2] in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 185s removes interpolation around %i[ s1 s2 ] when there is more text 185s registers an offense only for final %i[ s1 s2 ] in interpolation 185s removes interpolation around multiple %i[ s1 s2 ] 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like special keywords 185s registers an offense and autocorrects interpolation after __ENCODING__ 185s accepts strings like __ENCODING__ 185s behaves like literal interpolation 185s registers an offense only for final 1..2 in interpolation 185s removes interpolation around 1..2 when there is more text 185s removes interpolation around multiple 1..2 185s registers an offense for 1..2 in interpolation and removes interpolation around it 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around multiple %w[v1] 185s registers an offense only for final %w[v1] in interpolation 185s registers an offense for %w[v1] in interpolation and removes interpolation around it 185s removes interpolation around %w[v1] when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for false in interpolation and removes interpolation around it 185s registers an offense only for final false in interpolation 185s removes interpolation around false when there is more text 185s removes interpolation around multiple false 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation in words literal 185s accepts interpolation of an array literal containing a symbol with space in %I[] 185s accepts interpolation of an array literal containing a string with space in %I[] 185s accepts interpolation of a symbol literal with space in %I[] 185s removes interpolation of a symbol literal without space in %I[] 185s removes interpolation of an array containing a string literal without space in %I[] 185s accepts interpolation of a string literal with space in %I[] 185s removes interpolation of an array containing a symbol literal without space in %I[] 185s removes interpolation of a string literal without space in %I[] 185s behaves like non-special string literal interpolation 185s registers an offense for "foo" and removes the interpolation and quotes around "foo" 185s behaves like literal interpolation in words literal 185s removes interpolation of a symbol literal without space in %W[] 185s accepts interpolation of an array literal containing a string with space in %W[] 185s accepts interpolation of a symbol literal with space in %W[] 185s accepts interpolation of a string literal with space in %W[] 185s accepts interpolation of an array literal containing a symbol with space in %W[] 185s removes interpolation of an array containing a symbol literal without space in %W[] 185s removes interpolation of an array containing a string literal without space in %W[] 185s removes interpolation of a string literal without space in %W[] 185s behaves like non-special string literal interpolation 185s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 185s behaves like literal interpolation 185s removes interpolation around 0o377 when there is more text 185s removes interpolation around multiple 0o377 185s registers an offense only for final 0o377 in interpolation 185s registers an offense for 0o377 in interpolation and removes interpolation around it 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around multiple 1_123 185s registers an offense for 1_123 in interpolation and removes interpolation around it 185s removes interpolation around 1_123 when there is more text 185s registers an offense only for final 1_123 in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 185s removes interpolation around multiple ["a", "b"] 185s registers an offense only for final ["a", "b"] in interpolation 185s removes interpolation around ["a", "b"] when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 185s removes interpolation around %w[v1 v2] when there is more text 185s registers an offense only for final %w[v1 v2] in interpolation 185s removes interpolation around multiple %w[v1 v2] 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 185s registers an offense only for final 1.2e-3 in interpolation 185s removes interpolation around 1.2e-3 when there is more text 185s removes interpolation around multiple 1.2e-3 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for %w[] in interpolation and removes interpolation around it 185s removes interpolation around %w[] when there is more text 185s removes interpolation around multiple %w[] 185s registers an offense only for final %w[] in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around %I[s1 s2] when there is more text 185s removes interpolation around multiple %I[s1 s2] 185s registers an offense only for final %I[s1 s2] in interpolation 185s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like special keywords 185s accepts strings like __LINE__ 185s registers an offense and autocorrects interpolation after __LINE__ 185s behaves like literal interpolation 185s removes interpolation around {"a" => "b"} when there is more text 185s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 185s registers an offense only for final {"a" => "b"} in interpolation 185s removes interpolation around multiple {"a" => "b"} 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around true when there is more text 185s registers an offense for true in interpolation and removes interpolation around it 185s removes interpolation around multiple true 185s registers an offense only for final true in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for [] in interpolation and removes interpolation around it 185s registers an offense only for final [] in interpolation 185s removes interpolation around multiple [] 185s removes interpolation around [] when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like special keywords 185s registers an offense and autocorrects interpolation after __FILE__ 185s accepts strings like __FILE__ 185s behaves like literal interpolation 185s removes interpolation around multiple %i[s1 s2] 185s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 185s registers an offense only for final %i[s1 s2] in interpolation 185s removes interpolation around %i[s1 s2] when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for nil in interpolation and removes interpolation around it 185s registers an offense only for final nil in interpolation 185s removes interpolation around multiple nil 185s removes interpolation around nil when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s in string-like contexts 185s removes interpolation in regular expressions 185s removes interpolation in backticks 185s removes interpolation in symbols 185s behaves like literal interpolation 185s registers an offense for :"symbol" in interpolation and removes interpolation around it 185s removes interpolation around multiple :"symbol" 185s registers an offense only for final :"symbol" in interpolation 185s removes interpolation around :"symbol" when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for 1 in interpolation and removes interpolation around it 185s removes interpolation around multiple 1 185s registers an offense only for final 1 in interpolation 185s removes interpolation around 1 when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for :symbol in interpolation and removes interpolation around it 185s removes interpolation around multiple :symbol 185s registers an offense only for final :symbol in interpolation 185s removes interpolation around :symbol when there is more text 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense only for final 123_456_789_123_456_789 in interpolation 185s removes interpolation around multiple 123_456_789_123_456_789 185s removes interpolation around 123_456_789_123_456_789 when there is more text 185s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around multiple 0xaabb 185s registers an offense for 0xaabb in interpolation and removes interpolation around it 185s removes interpolation around 0xaabb when there is more text 185s registers an offense only for final 0xaabb in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s removes interpolation around multiple -1 185s removes interpolation around -1 when there is more text 185s registers an offense for -1 in interpolation and removes interpolation around it 185s registers an offense only for final -1 in interpolation 185s when there is non-literal and literal interpolation 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense for 2.0 in interpolation and removes interpolation around it 185s removes interpolation around 2.0 when there is more text 185s registers an offense only for final 2.0 in interpolation 185s removes interpolation around multiple 2.0 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s behaves like literal interpolation 185s registers an offense only for final 1...2 in interpolation 185s removes interpolation around 1...2 when there is more text 185s removes interpolation around multiple 1...2 185s registers an offense for 1...2 in interpolation and removes interpolation around it 185s when there is non-literal and literal interpolation 185s when literal interpolation is after non-literal 185s only removes interpolation around literal 185s when literal interpolation is before non-literal 185s only removes interpolation around literal 185s 185s RuboCop::Cop::Metrics::ModuleLength 185s does not count blank lines 185s accepts a module with less than 5 lines 185s accepts a module with 5 lines 185s reports the correct beginning and end lines 185s rejects a module with more than 5 lines 185s accepts empty modules 185s when `CountAsOne` is not empty 185s folds array into one line 185s when a module has inner modules 185s rejects a module with 6 lines that belong to the module directly 185s does not count lines of inner modules 185s when inspecting a class defined with ::Module.new 185s registers an offense 185s when using numbered parameter 185s when inspecting a class defined with Module.new 185s registers an offense 185s when inspecting a class defined with ::Module.new 185s registers an offense 185s when inspecting a class defined with Module.new 185s registers an offense 185s when a module has inner classes 185s rejects a module with 6 lines that belong to the module directly 185s does not count lines of inner classes 185s when CountComments is enabled 185s also counts commented lines 185s 185s RuboCop::Cop::Lint::ToEnumArguments 185s registers an offense when enumerator is created for another method 185s registers an offense when required arg is missing 185s ignores the block argument 185s does not register an offense when not inside method definition 185s does not register an offense when method call has a receiver other than `self` 185s registers an offense when optional arg is missing 185s registers an offense when splat keyword arg is missing 185s registers an offense when required keyword arg is missing 185s registers an offense when enumerator is created for `__method__` with missing arguments 185s registers an offense when optional keyword arg is missing 185s does not register an offense when enumerator is created with `__callee__` and the correct arguments 185s registers an offense when method is called on `self` 185s registers an offense when splat arg is missing 185s does not register an offense when enumerator is created with `:m` and the correct arguments 185s registers an offense when arguments are swapped 185s registers an offense when other values are passed for keyword arguments 185s does not register an offense when enumerator is created with `__method__` and the correct arguments 185s arguments forwarding 185s registers an offense when enumerator is created with non matching arguments 185s does not register an offense when enumerator is created with the correct arguments 185s 185s RuboCop::Cop::Style::Strip 185s registers an offense for str.lstrip.rstrip 185s registers an offense for str.rstrip.lstrip 185s 185s RuboCop::Cop::Style::RedundantFileExtensionInRequire 185s does not register an offense when requiring filename without an extension 185s does not register an offense when requiring variable as a filename 185s does not register an offense when requiring filename ending with `.so` 185s registers an offense and corrects when requiring filename ending with `.rb` 185s 185s RuboCop::Cop::Style::TrailingCommaInArguments 185s with a single argument spanning multiple lines 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts a single argument with no trailing comma 185s with a single argument of anonymous function spanning multiple lines 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts a single argument with no trailing comma 185s with single line list of values 185s when EnforcedStyleForMultiline is comma 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s accepts heredoc without trailing comma 185s accepts method call without trailing comma when a line break before a method call 185s registers an offense for trailing comma preceded by whitespace in a method call 185s registers an offense for trailing comma in a method call 185s accepts method call without trailing comma 185s accepts method call without trailing comma with single element hash parameters at the end 185s accepts method call without parameters 185s accepts chained single-line method calls 185s when using safe navigation operator 185s registers an offense for trailing comma in a method call 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts method call without trailing comma with single element hash parameters at the end 185s accepts heredoc without trailing comma 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s registers an offense for trailing comma in a method call 185s accepts method call without trailing comma when a line break before a method call 185s accepts method call without trailing comma 185s accepts method call without parameters 185s accepts chained single-line method calls 185s registers an offense for trailing comma preceded by whitespace in a method call 185s when using safe navigation operator 185s registers an offense for trailing comma in a method call 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s when EnforcedStyleForMultiline is no_comma 185s accepts method call without trailing comma with single element hash parameters at the end 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s accepts heredoc without trailing comma 185s accepts method call without trailing comma 185s registers an offense for trailing comma preceded by whitespace in a method call 185s accepts method call without trailing comma when a line break before a method call 185s registers an offense for trailing comma in a method call 185s accepts chained single-line method calls 185s accepts method call without parameters 185s when using safe navigation operator 185s registers an offense for trailing comma in a method call 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s with multi-line list of values 185s when EnforcedStyleForMultiline is comma 185s registers an offense for no trailing comma in a method call with hash parameters at the end 185s accepts a multiline call with a single argument and trailing comma 185s accepts an empty hash being passed as a method argument 185s accepts missing comma after heredoc with comments 185s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 185s accepts a method call with two parameters on the same line 185s does not break when a method call is chained on the offending one 185s does not break when a safe method call is chained on the offending more complex one 185s accepts trailing comma in a method call with hash parameters at the end 185s accepts a trailing comma in a method call with single line hashes 185s does not break when a safe method call is chained on the offending simple one 185s when closing bracket is on same line as last value 185s accepts a method call with Hash as last parameter split on multiple lines 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts a multiline call with a single argument and trailing comma 185s accepts trailing comma in a method call with hash parameters at the end 185s accepts a trailing comma in a method call with a single hash parameter to a receiver object 185s accepts a multiline call with single argument on multiple lines 185s accepts a trailing comma in a method call with a single hash parameter 185s registers an offense for no trailing comma in a method call with hash parameters at the end 185s accepts no trailing comma in a method call with a block parameter at the end 185s accepts a trailing comma in a method call with single line hashes 185s accepts a multiline call with arguments on a single line and trailing comma 185s autocorrects missing comma after a heredoc 185s registers an offense for no trailing comma in a method call withtwo parameters on the same line 185s when closing bracket is on same line as last value 185s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 185s when EnforcedStyleForMultiline is no_comma 185s accepts comma inside a heredoc in brackets 185s registers an offense for trailing comma in a method call with hash parameters at the end 185s accepts a method call with hash parameters at the end and no trailing comma 185s accepts comma inside a heredoc parameter at the end 185s accepts comma inside a heredoc with comments inside 185s accepts comma inside a heredoc with method and comments inside 185s accepts comma inside a modified heredoc parameter 185s autocorrects unwanted comma after modified heredoc parameter 185s when there is string interpolation inside heredoc parameter 185s accepts comma inside a heredoc parameter when on a single line 185s accepts comma inside a heredoc parameter 185s autocorrects unwanted comma inside string interpolation 185s 185s RuboCop::Cop::Style::TrailingCommaInHashLiteral 185s with multi-line list of values 185s when EnforcedStyleForMultiline is comma 185s accepts trailing comma 185s registers an offense for no trailing comma 185s registers an offense for trailing comma in a comment 185s accepts a multiline hash with a single pair and trailing comma 185s accepts trailing comma after a heredoc 185s when closing bracket is on same line as last value 185s accepts literal with no trailing comma 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts trailing comma 185s registers an offense for no trailing comma 185s accepts trailing comma after a heredoc 185s accepts a multiline hash with a single pair and trailing comma 185s accepts a multiline hash with pairs on a single line andtrailing comma 185s when closing bracket is on same line as last value 185s registers an offense for literal with no trailing comma 185s when EnforcedStyleForMultiline is no_comma 185s accepts comma inside a heredoc parameters at the end 185s accepts comma in comment after last value item 185s accepts literal with no trailing comma 185s registers an offense for trailing comma in literal 185s with single line list of values 185s when EnforcedStyleForMultiline is consistent_comma 185s accepts single element literal without trailing comma 185s accepts empty literal 185s accepts literal without trailing comma 185s registers an offense for trailing comma in a literal 185s when EnforcedStyleForMultiline is no_comma 185s registers an offense for trailing comma in a literal 185s accepts literal without trailing comma 185s accepts empty literal 185s accepts single element literal without trailing comma 185s when EnforcedStyleForMultiline is comma 185s registers an offense for trailing comma in a literal 185s accepts literal without trailing comma 185s accepts single element literal without trailing comma 185s accepts empty literal 185s 185s RuboCop::Cop::Layout::SpaceAfterColon 185s registers an offense and corrects a keyword optional argument without a space 185s accepts hashes with a space after colons 185s accepts colon in ternary followed by space 185s registers an offense and corrects colon without space after it 185s accepts required keyword arguments 185s accepts hash rockets 185s accepts if 185s accepts colons in strings 185s accepts colons denoting required keyword argument 185s accepts colons in symbols 185s Ruby >= 3.1 185s does not register an offense colon without space after it when using hash value omission 185s accepts colons denoting hash value omission argument 185s 185s RuboCop::Cop::Style::SignalException 185s when enforced style is `semantic` 185s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 185s registers an offense for raise in def body 185s registers an offense for raise not in a begin/rescue/end 185s accepts raise in rescue section 185s registers an offense for fail in def rescue section 185s accepts `raise` and `fail` with explicit receiver 185s registers an offense for fail in second rescue 185s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 185s registers only offense for one raise that should be fail 185s registers one offense for each raise 185s accepts raise in def rescue section 185s registers an offense for fail in rescue section 185s is not confused by nested begin/rescue 185s accepts raise in def with multiple rescues 185s registers an offense for raise in begin section 185s when enforced style is `raise` 185s accepts `fail` if a custom `fail` instance method is defined 185s registers an offense for fail in begin section 185s accepts `fail` if a custom `fail` singleton method is defined 185s registers an offense for `fail` with `Kernel` as explicit receiver 185s accepts `fail` with explicit receiver 185s registers an offense for fail in rescue section 185s registers an offense for fail in def body 185s when enforced style is `fail` 185s registers an offense for raise in begin section 185s registers an offense for `raise` with `Kernel` as explicit receiver 185s accepts `raise` with explicit receiver 185s registers an offense for raise in def body 185s registers an offense for raise in rescue section 185s 185s RuboCop::Formatter::DisabledConfigFormatter 185s when exclude_limit option is passed 185s respects the file exclusion list limit 185s when no files are inspected 185s creates a .rubocop_todo.yml even in such case 185s when exclude_limit option is omitted 185s disables the cop with 15 offending files 185s when there's .rubocop.yml 185s merges in excludes from .rubocop.yml 185s with autocorrect supported cop 185s adds a comment about --autocorrect option 185s when any offenses are detected 185s displays YAML configuration disabling all cops with offenses 185s 185s RuboCop::Cop::Style::ClassMethods 185s registers an offense for methods using a class name 185s does not register an offense for other top-level singleton methods 185s does not register an offense for methods using self 185s registers an offense for methods using a module name 185s does not register an offense outside class/module bodies 185s 185s RuboCop::Cop::Bundler::GemVersion 185s when EnforcedStyle is set to forbidden 185s flags gems that specify a gem version 185s does not flag gems without a specified version 185s does not flag gems included in AllowedGems metadata 185s when EnforcedStyle is set to required (default) 185s flags gems that do not specify a version 185s does not flag gems included in AllowedGems metadata 185s does not flag gems with a specified version 185s 185s RuboCop::StringInterpreter 185s .interpret 185s handles unicode 185s handles extended unicode 185s handles hex 185s handles octal 185s behaves like simple escape 185s handles \\r 185s behaves like simple escape 185s handles \\b 185s behaves like simple escape 185s handles \\n 185s behaves like simple escape 185s handles \\t 185s behaves like simple escape 185s handles \\a 185s behaves like simple escape 185s handles \\e 185s behaves like simple escape 185s handles \\s 185s behaves like simple escape 185s handles \\v 185s behaves like simple escape 185s handles \\f 185s 185s RuboCop::ResultCache 185s #save 185s when the default internal encoding is UTF-8 185s writes non UTF-8 encodable data to file with no exception 185s when the @path is not writable 185s behaves like invalid cache location 185s doesn't raise an exception 185s behaves like invalid cache location 185s doesn't raise an exception 185s the cache path 185s when CacheRootDirectory is set 185s contains the given root 185s and RUBOCOP_CACHE_ROOT is set 185s contains the root from RUBOCOP_CACHE_ROOT 185s when CacheRootDirectory not set 185s and XDG_CACHE_HOME is set 185s contains the given path and UID 185s and XDG_CACHE_HOME is not set 185s contains $HOME/.cache 185s cached result that was saved with no command line option 185s when offenses are saved 185s an offense with status corrected 185s serializes them with uncorrected status 185s an offense with status new_status 185s serializes them with new_status status 185s an offense with status unsupported 185s serializes them with unsupported status 185s an offense with status corrected_with_todo 185s serializes them with uncorrected status 185s an offense with status uncorrected 185s serializes them with uncorrected status 185s when a cache source is read 185s has utf8 encoding 185s when --format is given 185s is valid and can be loaded 185s when --only is given 185s is invalid 185s when --cache-root is given 185s takes the cache_root from the options 185s when no option is given 185s is valid and can be loaded 185s when file permission have changed 185s is invalid 185s when end of line characters have changed 185s is invalid 185s when team external_dependency_checksum changes 185s is invalid 185s when file contents have changed 185s is invalid 185s when a symlink is present in the cache location 185s and symlink attack protection is enabled 185s prevents caching and prints a warning 185s and symlink attack protection is disabled 185s permits caching and prints no warning 185s when team external_dependency_checksum is the same 185s is valid 185s when --display-cop-names is given 185s is invalid 185s .cleanup 185s removes the oldest files in the cache if needed 185s 185s RuboCop::Formatter::WorstOffendersFormatter 185s #finished 185s when there are many offenses 185s sorts by offense count first and then by cop name 185s 185s RuboCop::Cop::Layout::ExtraSpacing 185s when AllowForAlignment is false 185s registers an offense and corrects alignment with token not preceded by space 185s ignores whitespace inside a string 185s registers an offense and corrects extra space before a float 185s registers an offense and corrects extra spacing before a unary plus in an argument list 185s registers an offense and corrects double extra spacing in variable assignment 185s accepts space between key and value in a hash with hash rockets 185s accepts aligned values of an implicit hash literal 185s registers an offense and corrects extra spacing in class inheritance 185s ignores whitespace at the beginning of the line 185s ignores trailing whitespace 185s when spaces are present in a single-line hash literal 185s registers an offense and corrects hashes with symbol keys 185s registers an offense and corrects hashes with hash rockets 185s with extra spacing for alignment purposes 185s such as aligning comments on non-adjacent lines 185s registers offense(s) 185s such as lining up different kinds of assignments 185s registers offense(s) 185s such as lining up assignments with empty lines and comments in between 185s registers offense(s) 185s such as aligning long assignment expressions that include line breaks 185s registers offense(s) 185s such as aligning trailing comments 185s registers offense(s) 185s such as aligning with the same character 185s registers offense(s) 185s such as lining up assignments 185s registers offense(s) 185s such as aligning tokens with empty line between 185s registers offense(s) 185s such as aligning = on lines where there are trailing comments 185s registers offense(s) 185s when ForceEqualSignAlignment is true 185s does not register an offense if assignments are aligned 185s does not register an offense when optarg equals is not aligned with assignment equals sign 185s register offenses and correct consecutive attribute assignments which are not aligned 185s aligns the first assignment with the following assignment 185s registers an offense and corrects consecutive aref assignments which are not aligned 185s does not register offenses for multiple complex nested assignments 185s register offenses and correct complex nested assignments 185s does not register an offense if assignments are separated by blanks 185s register offenses and correct consecutive operator assignments which are not aligned 185s does not register alignment errors on outdented lines 185s registers an offense and corrects consecutive assignments that are not aligned 185s when AllowBeforeTrailingComments is 185s true 185s allows it 185s doesn't interfere with AllowForAlignment 185s being false 185s such as lining up assignments 185s registers offense(s) 185s such as aligning long assignment expressions that include line breaks 185s registers offense(s) 185s such as aligning comments on non-adjacent lines 185s registers offense(s) 185s such as aligning = on lines where there are trailing comments 185s registers offense(s) 185s such as lining up assignments with empty lines and comments in between 185s registers offense(s) 185s such as aligning with the same character 185s registers offense(s) 185s such as lining up different kinds of assignments 185s registers offense(s) 185s such as aligning trailing comments 185s does not register an offense 185s such as aligning tokens with empty line between 185s does not register an offense 185s being true 185s such as aligning tokens with empty line between 185s allows it 185s such as aligning long assignment expressions that include line breaks 185s allows it 185s such as lining up assignments with empty lines and comments in between 185s allows it 185s such as lining up assignments 185s allows it 185s such as aligning trailing comments 185s allows it 185s such as aligning with the same character 185s allows it 185s such as lining up different kinds of assignments 185s allows it 185s such as aligning = on lines where there are trailing comments 185s allows it 185s such as aligning comments on non-adjacent lines 185s allows it 185s false 185s regsiters offense 185s does not trigger on only one space before comment 185s when AllowForAlignment is true 185s registers an offense and corrects double extra spacing in variable assignment 185s ignores trailing whitespace 185s registers an offense and corrects extra spacing before a unary plus in an argument list 185s ignores whitespace inside a string 185s registers an offense and corrects extra space before a float 185s accepts space between key and value in a hash with hash rockets 185s registers an offense and corrects extra spacing in class inheritance 185s registers an offense and corrects alignment with token not preceded by space 185s ignores whitespace at the beginning of the line 185s accepts aligned values of an implicit hash literal 185s when spaces are present in a single-line hash literal 185s registers an offense and corrects hashes with hash rockets 185s registers an offense and corrects hashes with symbol keys 185s with extra spacing for alignment purposes 185s such as aligning = on lines where there are trailing comments 185s allows it 185s such as aligning trailing comments 185s allows it 185s such as lining up different kinds of assignments 185s allows it 185s such as aligning with the same character 185s allows it 185s such as lining up assignments 185s allows it 185s such as aligning comments on non-adjacent lines 185s allows it 185s such as lining up assignments with empty lines and comments in between 185s allows it 185s such as aligning long assignment expressions that include line breaks 185s allows it 185s such as aligning tokens with empty line between 185s allows it 185s 185s RuboCop::Cop::Style::HashConversion 185s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 185s reports different offense for Hash[(a || b)] 185s wraps complex statements in parens if needed 185s reports different offense for empty Hash[] 185s reports different offense for hash argument Hash[] as a method argument with parentheses 185s registers and corrects an offense when using `zip` with argument in `Hash[]` 185s reports different offense for Hash[a && b] 185s reports different offense for multi-argument Hash[] 185s reports different offense for Hash[(a && b)] 185s reports different offense for hash argument Hash[] 185s reports different offense for Hash[a || b] 185s does not try to correct multi-argument Hash with odd number of arguments 185s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 185s reports an offense for single-argument Hash[] 185s reports different offense for hash argument Hash[] as a method argument without parentheses 185s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 185s AllowSplatArgument: false 185s reports uncorrectable offense for unpacked array 185s AllowSplatArgument: true 185s does not register an offense for unpacked array 185s 185s RuboCop::Cop::Layout::IndentationWidth 185s with Width set to 4 185s registers and corrects offense for bad indentation 185s with ignored patterns set 185s accepts unindented lines for those keywords 185s with if statement 185s registers an offense for bad indentation of an if body 185s for a file with byte order mark 185s accepts correctly indented method definition 185s with Width set to 2 185s with case 185s accepts aligned values in when clause 185s accepts case/when/else laid out as a table 185s registers an offense for bad indentation in a case/when body 185s accepts case/when/else with then beginning a line 185s accepts indented when/else plus indented body 185s registers an offense for bad indentation in a case/else body 185s accepts correctly indented case/when/else 185s with case match 185s accepts indented in/else plus indented body 185s accepts case/in/else with then beginning a line 185s registers an offense for bad indentation in a case/in body 185s accepts aligned values in `in` clause 185s accepts case/in/else laid out as a table 185s accepts correctly indented case/in/else 185s registers an offense for bad indentation in a case/else body 185s accepts aligned value in `in` clause and `else` is empty 185s with module 185s leaves body unchanged if the first body line is on the same line with module keyword 185s when consistency style is normal 185s accepts an empty module body 185s registers an offense for bad indentation of a module body 185s when consistency style is indented_internal_methods 185s registers an offense for bad indentation of a module body 185s accepts normal non-indented internal methods of module functions 185s with def/rescue/end 185s registers an offense for bad indent of defs bodies with a modifier 185s registers an offense for bad indentation of bodies 185s with for 185s accepts an empty for 185s registers an offense for bad indentation of a for body 185s with block 185s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 185s registers an offense for bad indentation of a {} body 185s registers an offense for bad indentation of a do/end body 185s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 185s accepts badly indented code if block end is not on separate line 185s accepts an empty block body 185s accepts a correctly indented block body 185s Ruby 2.7 185s registers an offense for bad indentation of a {} body 185s registers an offense for bad indentation of a do-end body 185s when using safe navigation operator 185s registers an offense for bad indentation of a {} body 185s registers an offense for an if with setter 185s when consistency style is indented_internal_methods 185s registers an offense for bad indentation in a do/end body 185s with def/defs 185s when end is aligned with def 185s registers an offense for bad indentation of a defs body 185s registers an offense for bad indentation of a def body 185s accepts an empty def body 185s accepts an empty defs body 186s with an assignment 186s when modifier and def are on the same line 186s accepts a correctly aligned body 186s registers an offense for bad indentation of a defs body 186s registers an offense for bad indentation of a def body 186s when end is aligned with start of line 186s accepts an empty defs body 186s accepts an empty def body 186s registers an offense for bad indentation of a defs body 186s registers an offense for bad indentation of a def body 186s with an assignment 186s when multiple modifiers and def are on the same line 186s registers an offense for bad indentation of a defs body 186s registers an offense for bad indentation of a def body 186s accepts a correctly aligned body 186s when multiple modifiers are used in a block anda method call is made at end of the block 186s accepts a correctly aligned body 186s registers an offense for bad indentation of a def body 186s registers an offense for bad indentation of a def 186s when modifier and def are on the same line 186s accepts a correctly aligned body 186s registers an offense for bad indentation of a def body 186s registers an offense for bad indentation of a defs body 186s with while/until 186s registers an offense for bad indentation of a while body 186s registers an offense for bad indentation of an until body 186s registers an offense for bad indentation of begin/end/while 186s accepts an empty while 186s with unless 186s accepts an empty unless 186s registers an offense for bad indentation of an unless body 186s with if statement 186s accepts a correctly aligned if/elsif/else/end 186s accepts `ensure` after an empty def 186s indents parenthesized expressions 186s accepts `rescue`/`ensure` after an empty def 186s accepts an empty if 186s registers and corrects on offense for bad indentation 186s leaves block unchanged if block end is not on its own line 186s does not raise any error with empty braces 186s accepts `rescue` after an empty body 186s accepts if/then/else/end laid out as another table 186s handles lines with only whitespace 186s registers an offense for bad indentation of an else body 186s accepts a one line if statement 186s registers an offense for bad indentation of an if body 186s registers offense for bad indentation of ternary inside else 186s registers an offense for bad indentation of an else body when if body contains no code 186s accepts `rescue`/`ensure` after an empty body 186s accepts if/elsif/else/end laid out as a table 186s accepts `rescue` after an empty def 186s accepts indentation after if on new line after assignment 186s accepts `ensure` after an empty body 186s registers an offense for bad indentation of an else body when if and elsif body contains no code 186s does not indent heredoc strings 186s accepts an if/else branches with rescue clauses 186s leaves rescue ; end unchanged 186s registers an offense for bad indentation of an elsif body 186s does not correct in scopes that contain block comments 186s accepts a correctly aligned if/elsif/else/end as a method argument 186s registers offense for bad indentation of modifier if in else 186s with assignment 186s when alignment style is keyword 186s and end is aligned with variable 186s registers an offense for a while 186s registers and corrects bad indentation 186s registers an offense for an if 186s and end is aligned with keyword 186s accepts an if/else in assignment on next line 186s accepts an if/else in assignment 186s accepts an until in assignment 186s accepts an if in assignment 186s accepts a while in assignment 186s when alignment style is start_of_line 186s and end is aligned with variable 186s accepts an if with end aligned with element assignment 186s accepts an if/else with chaining with a block after the end 186s accepts an if with end aligned with variable 186s accepts an if/else 186s accepts an if/else with chaining after the end 186s accepts an if with end aligned with setter 186s and end is aligned randomly 186s registers an offense for an if 186s registers an offense for a while 186s registers an offense for an until 186s and end is aligned with keyword 186s registers an offense for an if with element assignment 186s accepts an if/else in assignment on next line 186s registers an offense for an if 186s registers an offense for an if with setter 186s registers an offense for a while 186s registers an offense for an until 186s when alignment style is variable 186s and end is aligned with keyword 186s registers an offense for an if with setter 186s registers an offense for an if 186s registers an offense for an if with element assignment 186s accepts an if/else in assignment on next line 186s registers an offense for a while 186s registers an offense for an until 186s and end is aligned randomly 186s registers an offense for an until 186s registers an offense for an if 186s registers an offense for a while 186s and end is aligned with variable 186s accepts an if/else with chaining after the end 186s accepts an if with end aligned with variable 186s accepts an if with end aligned with setter 186s accepts an if/else 186s accepts an if/else with chaining with a block after the end 186s accepts an if with end aligned with element assignment 186s with begin/rescue/else/ensure/end 186s registers an offense for bad indentation of bodies 186s with class 186s registers an offense for bad indentation of a class body 186s leaves body unchanged if the first body line is on the same line with class keyword 186s leaves body unchanged if the first body line is on the same line with an opening of singleton class 186s accepts an empty class body 186s when consistency style is normal 186s accepts indented public, protected, and private 186s registers offenses for indented_internal_methods indentation 186s with access modifier 186s registers an offense and corrects for bad modifier indentation before good method definition 186s registers an offense for bad indentation of sections 186s when consistency style is indented_internal_methods 186s registers an offense for normal non-indented internal methods indentation 186s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 186s when consistency style is outdent 186s accepts access modifier is outdent 186s 186s RuboCop::Cop::Style::FloatDivision 186s EnforcedStyle is right_coerce 186s does not register offense for right coerce 186s registers offense and corrects for both coerce 186s registers offense and corrects for left coerce with calculations 186s registers offense and corrects for left coerce 186s EnforcedStyle is left_coerce 186s registers offense and corrects for right coerce with calculations 186s does not register offense for left coerce 186s registers offense and corrects for both coerce 186s registers offense and corrects for right coerce 186s EnforcedStyle is fdiv 186s registers offense and corrects for left coerce 186s registers offense and corrects for left coerce with calculations 186s registers offense and corrects for both coerce 186s registers offense and corrects for right coerce 186s does not register offense on usage of fdiv 186s EnforcedStyle is single_coerce 186s registers offense and corrects for both coerce 186s registers offense and corrects for left coerce with calculations 186s does not register offense for right coerce only 186s does not register offense for left coerce only 186s 186s RuboCop::Cop::Style::OrAssignment 186s when using var = var ? var : something 186s registers an offense with global variables 186s registers an offense with normal variables 186s registers an offense with class variables 186s registers an offense with instance variables 186s does not register an offense if any of the variables are different 186s when using `elsif` statement 186s does not register an offense 186s when using var = something unless var 186s registers an offense for global variables 186s registers an offense for class variables 186s registers an offense for instance variables 186s does not register an offense if any of the variables are different 186s registers an offense for normal variables 186s when using var = if var; var; else; something; end 186s does not register an offense if any of the variables are different 186s registers an offense with class variables 186s registers an offense with normal variables 186s registers an offense with instance variables 186s registers an offense with global variables 186s when `then` branch body is empty 186s registers an offense 186s when using unless var; var = something; end 186s does not register an offense if any of the variables are different 186s registers an offense for normal variables 186s registers an offense for instance variables 186s registers an offense for global variables 186s registers an offense for class variables 186s 186s RuboCop::Formatter::TapFormatter 186s #report_file 186s when the source contains multibyte characters 186s displays text containing the offending source line 186s #finished 186s when any offenses are detected 186s reports all detected offenses for all failed files 186s when no offenses are detected 186s does not report offenses 186s #file_finished 186s when no offenses are detected 186s prints "ok" 186s when any offenses are detected 186s prints "not ok" 186s 186s RuboCop::Cop::Layout::SpaceBeforeSemicolon 186s registers an offense and corrects space before semicolon 186s does not register an offense for no space before semicolons 186s registers an offense and corrects more than one space before a semicolon 186s inside block braces 186s when EnforcedStyle for SpaceInsideBlockBraces is no_space 186s registers an offense and corrects a space between an opening brace and a semicolon 186s behaves like common behavior 186s accepts no space between an opening brace and a semicolon 186s when EnforcedStyle for SpaceInsideBlockBraces is space 186s accepts a space between an opening brace and a semicolon 186s behaves like common behavior 186s accepts no space between an opening brace and a semicolon 186s heredocs 186s registers an offense and corrects 186s 186s RuboCop::Cop::Lint::MultipleComparison 186s registers an offense for x >= y < z 186s registers an offense for x > y > z 186s registers an offense for x < y <= z 186s registers an offense for x >= y >= z 186s registers an offense for x <= y < z 186s registers an offense for x <= y > z 186s accepts to use `|` operator 186s accepts to use one compare operator 186s registers an offense for x < y > z 186s registers an offense for x <= y <= z 186s accepts to use `&` operator 186s registers an offense for x <= y >= z 186s accepts to use `^` operator 186s registers an offense for x > y >= z 186s registers an offense for x > y < z 186s registers an offense for x < y < z 186s registers an offense for x >= y <= z 186s registers an offense for x > y <= z 186s registers an offense for x >= y > z 186s registers an offense for x < y >= z 186s 186s RuboCop::Cop::Style::NumericPredicate 186s when configured to enforce numeric predicate methods 186s when checking if a number is negative 186s when target ruby version is 2.3 or higher 186s registers an offense in yoda condition 186s registers an offense 186s with a complex expression 186s registers an offense 186s registers an offense in yoda condition 186s when target ruby version is 2.2 or lower 186s does not register an offense 186s when checking if a number is zero 186s registers an offense with a complex expression 186s registers an offense 186s allows comparing against a global variable 186s when comparing against a method argument variable 186s registers an offense with complex expression 186s registers an offense 186s when checking if a number is positive 186s when target ruby version is 2.2 or lower 186s does not register an offense 186s when target ruby version is 2.3 or higher 186s registers an offense in yoda condition 186s registers an offense 186s with a complex expression 186s registers an offense in yoda condition 186s registers an offense 186s with checking if a number is not zero 186s allows comparing against a global variable 186s allows comparing against a variable 186s allows comparing against a complex expression 186s when there are allowed methods 186s in block 186s not ignored method 186s registers an offense for checking if a number is negative 186s registers an offense for checking if a number is positive 186s ignored method 186s with a string 186s allows checking if a number is negative 186s allows checking if a number is positive 186s with a regex 186s allows checking if a number is negative 186s allows checking if a number is positive 186s simple method call 186s `EnforcedStyle` is `predicate` 186s allows checking if a number is zero 186s `EnforcedStyle` is `comparison` 186s allows checking if a number is zero 186s in argument 186s ignored method 186s with a regex 186s allows checking if a number is positive 186s allows checking if a number is negative 186s with a string 186s allows checking if a number is negative 186s allows checking if a number is positive 186s not ignored method 186s when checking if a number is positive 186s when target ruby version is 2.2 or lower 186s does not register an offense 186s when target ruby version is 2.3 or higher 186s registers an offense 186s when checking if a number is negative 186s when target ruby version is 2.2 or lower 186s does not register an offense 186s when target ruby version is 2.3 or higher 186s registers an offense 186s when configured to enforce numeric comparison methods 186s registers an offense for checking if a number is negative 186s allows checking if a number is not zero 186s registers an offense for checking if a number is zero 186s registers an offense for checking if a number is positive 186s 186s RuboCop::Cop::Style::AsciiComments 186s registers an offense for comments with mixed chars 186s registers an offense for a comment with non-ascii chars 186s accepts comments with only ascii chars 186s when certain non-ascii chars are allowed 186s registers an offense for comments with non-allowed non-ascii chars 186s accepts comment with allowed non-ascii chars 186s 186s RuboCop::Cop::Style::CombinableLoops 186s when looping method 186s does not register an offense when each branch contains the same single loop over the same collection 186s does not register an offense for when the same method with different arguments 186s does not register an offense when the same loop method is used over different collections 186s does not register an offense when the same loops are interleaved with some code 186s does not register an offense for when the same method with different arguments and safe navigation 186s registers an offense when looping over the same data as previous loop 186s does not register an offense when different loop methods are used over the same collection 186s Ruby 2.7 186s registers an offense when looping over the same data as previous loop in numblocks 186s when for loop 186s does not register an offense when the same loops are interleaved with some code 186s does not register an offense when the same loop method is used over different collections 186s registers an offense when looping over the same data as previous loop 186s does not register an offense when each branch contains the same single loop over the same collection 186s 186s RuboCop::Cop::Style::MultilineMethodSignature 186s when arguments span a single line 186s when defining an instance method 186s registers an offense and corrects when closing paren is on the following line 186s registers an offense and corrects when line break after opening parenthesis 186s when method signature is on a single line 186s does not register an offense for parameterized method 186s does not register an offense for unparameterized method 186s when defining an class method 186s when method signature is on a single line 186s does not register an offense for parameterized method 186s does not register an offense for unparameterized method 186s when arguments span a single line 186s registers an offense and corrects when closing paren is on the following line 186s when arguments span multiple lines 186s when correction would not exceed maximum line length 186s registers an offense and corrects 186s when defining an instance method 186s registers an offense and corrects when `end` is on the same line with last argument 186s registers an offense and corrects when `end` is on the same line with only closing parentheses 186s registers an offense and corrects when `end` is on the following line 186s when correction would exceed maximum line length 186s does not register an offense 186s when defining an class method 186s registers an offense and corrects when `end` is on the following line 186s registers an offense and corrects when `end` is on the same line with only closing parentheses 186s registers an offense and corrects when `end` is on the same line 186s 186s RuboCop::Cop::Style::CaseEquality 186s when AllowOnSelfClass is false 186s does not fail when the receiver is implicit 186s registers an offense and corrects for === when the receiver is a regexp 186s registers an offense and corrects for === when the receiver is a range 186s registers an offense and does not correct for === when receiver is of some other type 186s registers an offense and corrects for === when the receiver is self.class 186s does not register an offense for === when the receiver is not a camel cased constant 186s when AllowOnSelfClass is true 186s does not fail when the receiver is implicit 186s registers an offense and corrects for === when the receiver is self.klass 186s registers an offense and does not correct for === when receiver is of some other type 186s registers an offense and corrects for === when the receiver is a regexp 186s does not register an offense for === when the receiver is self.class 186s registers an offense and corrects for === when the receiver is a range 186s does not register an offense for === when the receiver is not a camel cased constant 186s when AllowOnConstant is true 186s registers an offense and corrects for === when the receiver is a range 186s registers an offense and corrects for === when the receiver is a regexp 186s does not register an offense for === when the receiver is a constant 186s registers an offense and does not correct for === when receiver is of some other type 186s does not register an offense for === when the receiver is not a camel cased constant 186s does not fail when the receiver is implicit 186s when AllowOnConstant is false 186s registers an offense and corrects for === when the receiver is a regexp 186s does not fail when the receiver is implicit 186s registers an offense and corrects for === when the receiver is a constant 186s registers an offense and corrects for === when the receiver is a range 186s registers an offense and does not correct for === when receiver is of some other type 186s does not register an offense for === when the receiver is not a camel cased constant 186s 186s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 186s does not register offense for any kind of reference brackets 186s when EnforcedStyle is space 186s does not register offense for valid 2-dimensional array 186s behaves like space inside arrays 186s accepts square brackets as method name 186s does not register offense for arrays with spaces 186s registers an offense and corrects array brackets with no trailing whitespace 186s does not register offense for array when brackets get their own line 186s register an offense and corrects when 2 arrays are on one line 186s registers an offense and corrects multiline array on end bracket with trailing method 186s registers an offense and corrects an array missing whitespace when there is more than one array on a line 186s registers an offense and corrects array brackets with no leading whitespace 186s does not register offense when bottom bracket gets its own line & has trailing method 186s accepts space inside array brackets with comment 186s registers an offense and corrects multiline array on end bracket 186s accepts square brackets called with method call syntax 186s does not register offense for valid multiline array 186s does not register offense when 2 arrays on one line 186s does not register offense for arrays using ref brackets 186s does not register offense for indented array when bottom bracket gets its own line & is misaligned 186s when EnforcedStyle is compact 186s does not register offense for valid 3-dimensional array 186s registers an offense and corrects space between 2 opening brackets 186s does not register offense for valid 4-dimensional array 186s registers an offense and corrects 2-dimensional array with extra spaces 186s does not register offense for valid 2-dimensional array 186s accepts multiline array 186s registers an offense and corrects 3-dimensional array with extra spaces 186s registers an offense and corrects space between 2 closing brackets 186s multiline, 2-dimensional array with newlines 186s registers an offense and corrects at the beginning of array 186s registers an offense and corrects at the end of array 186s behaves like space inside arrays 186s does not register offense when bottom bracket gets its own line & has trailing method 186s accepts square brackets called with method call syntax 186s registers an offense and corrects array brackets with no leading whitespace 186s does not register offense for valid multiline array 186s registers an offense and corrects multiline array on end bracket with trailing method 186s does not register offense for arrays using ref brackets 186s registers an offense and corrects multiline array on end bracket 186s does not register offense for arrays with spaces 186s does not register offense when 2 arrays on one line 186s registers an offense and corrects array brackets with no trailing whitespace 186s accepts square brackets as method name 186s does not register offense for array when brackets get their own line 186s does not register offense for indented array when bottom bracket gets its own line & is misaligned 186s registers an offense and corrects an array missing whitespace when there is more than one array on a line 186s accepts space inside array brackets with comment 186s register an offense and corrects when 2 arrays are on one line 186s multiline, 2-dimensional array with spaces 186s registers an offense and corrects at the end of array 186s registers an offense and corrects at the beginning of array 186s with space inside empty braces allowed 186s accepts empty brackets with space inside 186s registers an offense and corrects empty brackets with more than one space inside 186s registers an offense and corrects empty brackets with no space inside 186s with space inside empty brackets not allowed 186s accepts empty brackets with no space inside 186s registers an offense and corrects empty brackets with multiple spaces inside 186s registers an offense and corrects empty brackets with 1 space inside 186s registers an offense and corrects multiline spaces 186s when EnforcedStyle is no_space 186s does not register offense when bottom bracket gets its own line indented with tabs 186s does not register offense for array when brackets get own line 186s does not register offense for indented array when bottom bracket gets its own line & is misaligned 186s does not register offense when 2 arrays on one line 186s accepts square brackets as method name 186s registers an offense and corrects array brackets with trailing whitespace 186s accepts square brackets called with method call syntax 186s does not register offense for valid 2-dimensional array 186s registers an offense and corrects array brackets with leading whitespace 186s does not register offense when bottom bracket gets its own line & has trailing method 186s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 186s registers an offense and corrects multiline array on end bracket with trailing method 186s accepts space inside array brackets if with comment 186s accepts a multiline array with whitespace before end bracket 186s does not register offense for arrays with no spaces 186s does not register offense when contains an array literal as an argument after a heredoc is started 186s registers an offense and corrects an array when two on one line 186s does not register offense for arrays using ref brackets 186s registers an offense and corrects multiline array on end bracket 186s registers an offense and corrects 2 arrays on one line 186s does not register offense for valid multiline array 186s 186s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 186s provides a good error message 186s nested conditionals 186s accepts 186s `unless` / `else` with modifier 186s registers an offense and corrects 186s conditional with modifier in body 186s accepts 186s ternary with modifier 186s registers an offense and corrects 186s conditional with modifier 186s registers an offense and corrects 186s 186s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 186s when location argument is passed 186s when location argument does not equal to :expression 186s does not register an offense 186s when location argument is :expression 186s registers an offense 186s removes default `location` when preceded by another keyword 186s removes default `location` surrounded by other keywords 186s when there is a message argument 186s registers an offense 186s when location argument is not passed 186s does not register an offense 186s 186s RuboCop::Cop::Style::HashTransformKeys 186s below Ruby 2.5 186s does not flag even if transform_keys could be used 186s when using Ruby 2.5 or newer 186s does not flag each_with_object when both key & value are transformed 186s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 186s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 186s does not flag _.map{...}.to_h when both key & value are transformed 186s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 186s does not flag `each_with_object` when its receiver is `with_index` 186s does not flag key transformation when receiver is array literal 186s does not flag `Hash[_.map{...}]` when its receiver is `zip` 186s flags _.map{...}.to_h when transform_keys could be used 186s does not flag each_with_object when its argument is not modified 186s correctly autocorrects _.map{...}.to_h with block 186s does not flag `each_with_object` when its receiver is `zip` 186s correctly autocorrects _.map{...}.to_h without block 186s does not flag `each_with_object` when its argument is used in the key 186s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 186s does not flag `each_with_object` when its receiver is `each_with_index` 186s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 186s does not flag `_.map{...}.to_h` when its receiver is `with_index` 186s flags Hash[_.map{...}] when transform_keys could be used 186s does not flag each_with_object when its receiver is array literal 186s does not flag _.map {...}.to_h when key block argument is unused 186s correctly autocorrects Hash[_.map{...}] 186s does not flag each_with_object when key transformation uses value 186s does not flag `_.map{...}.to_h` when its receiver is `zip` 186s does not flag `Hash[_.map{...}]` when its receiver is an array literal 186s does not flag each_with_object when no transformation occurs 186s does not flag Hash[_.map{...}] when both key & value are transformed 186s does not flag key transformation in the absence of to_h 186s with multiline block 186s flags each_with_object when transform_keys could be used 186s with inline block 186s flags each_with_object when transform_keys could be used 186s with safe navigation operator 186s flags each_with_object when transform_keys could be used 186s when using Ruby 2.6 or newer 186s does not flag _.to_h {...} when key block argument is unused 186s flags _.to_h{...} when transform_keys could be used 186s does not flag `_.to_h{...}` when its receiver is `zip` 186s does not flag `_.to_h{...}` when its receiver is `with_index` 186s does not flag `_.to_h{...}` when its receiver is an array literal 186s does not flag `_.to_h{...}` when both key & value are transformed 186s does not flag `_.to_h{...}` when its receiver is `each_with_index` 186s below Ruby 2.6 186s does not flag _.to_h{...} 186s 186s RuboCop::Formatter::AutoGenConfigFormatter 186s #report_file_as_mark 186s when different severity offenses are detected 186s prints highest level mark 186s when a refactor severity offense is detected 186s prints "R" 186s when no offenses are detected 186s prints "." 186s when a refactor convention offense is detected 186s prints "C" 186s #finished 186s calls #report_summary 186s when no offenses are detected 186s does not report offenses 186s when any offenses are detected 186s does not report offenses 186s outputs report summary 186s 186s RuboCop::Cop::Style::NumericLiteralPrefix 186s decimal literals 186s registers an offense for prefixes 186s does not register offense for no prefix 186s hex literals 186s registers an offense for uppercase prefix 186s does not register offense for lowercase prefix 186s octal literals 186s when config is zero_only 186s registers an offense for prefix `0O` and `0o` 186s does not register offense for prefix `0` 186s when config is zero_with_o 186s registers an offense for prefixes `0` and `0O` 186s does not register offense for lowercase prefix 186s binary literals 186s does not register offense for lowercase prefix 186s registers an offense for uppercase prefix 186s 186s RuboCop::Cop::Lint::ImplicitStringConcatenation 186s on a string with interpolations 186s does register an offense 186s when inside an array 186s notes that the strings could be separated by a comma instead 186s when the string literals contain newlines 186s registers an offense 186s does not register an offense for a single string 186s on a single string literal 186s does not register an offense 186s on adjacent string literals on the same line 186s registers an offense 186s when in a method call's argument list 186s notes that the strings could be separated by a comma instead 186s on adjacent string literals on different lines 186s does not register an offense 186s 186s RuboCop::Cop::Style::FrozenStringLiteralComment 186s never 186s accepts not having a frozen string literal comment on the top line 186s registers an offense for a frozen string literal comment below shebang above an encoding comments 186s registers an offense for a disabled frozen string literal below an encoding comment 186s registers an offense for a frozen string literal comment below a shebang comment 186s registers an offense for a frozen string literal comment below an encoding comment 186s registers an offense for having a frozen string literal comment after other comments 186s allows not having a frozen string literal comment under a shebang and an encoding comment 186s accepts a source with no tokens 186s accepts an empty source 186s accepts not having not having a frozen string literal comment under a shebang 186s registers an offense for a disabled frozen string literal comment on the top line 186s registers an offense for a frozen string literal comment on the top line 186s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 186s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 186s accepts a frozen string literal comment under ruby code 186s registers an offense for a disabled frozen string literal below a shebang comment 186s registers an offense for a frozen string literal comment below shebang and encoding comments 186s allows not having a frozen string literal comment under an encoding comment 186s always 186s accepts an empty source 186s registers an offense for having a frozen string literal comment under ruby code 186s accepts a disabled frozen string literal comment below shebang and encoding comments 186s registers an offense for not having a frozen string literal comment under an encoding comment 186s registers an offense for an extra first empty line 186s accepts a disabled frozen string literal below a shebang comment 186s registers an offense with an empty line between magic comments and the code 186s registers an offense for not having a frozen string literal comment when there is only a shebang 186s accepts a source with no tokens 186s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 186s accepts an emacs style combined magic comment 186s accepts a frozen string literal below a shebang comment 186s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 186s registers an offense for not having a frozen string literal comment on the top line 186s accepts a frozen string literal comment below shebang and encoding comments 186s accepts a frozen string literal on the top line 186s accepts a disabled frozen string literal below an encoding comment 186s accepts a frozen string literal comment after other comments 186s registers an offense for not having a frozen string literal comment under a shebang 186s registers an offense for arbitrary tokens 186s accepts a disabled frozen string literal comment below shebang above an encoding comments 186s accepts a frozen string literal comment below newline-separated magic comments 186s accepts a frozen string literal comment below shebang above an encoding comments 186s accepts a frozen string literal below an encoding comment 186s accepts a disabled frozen string literal on the top line 186s always_true 186s registers an offense for a disabled frozen string literal above an empty line 186s accepts a frozen string literal comment below shebang above an encoding comments 186s registers an offense for a disabled frozen string literal 186s registers an offense for not having a frozen string literal comment under shebang with no other code 186s accepts a frozen string literal below a shebang comment 186s accepts a frozen string literal comment below shebang and encoding comments 186s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 186s registers an offense for not having a frozen string literal comment under an encoding comment 186s registers an offense for a disabled frozen string literal on the top line 186s accepts an emacs style combined magic comment 186s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 186s accepts a frozen string literal on the top line 186s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 186s accepts a frozen string literal comment after other comments 186s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 186s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 186s registers an offense for arbitrary tokens above an empty line 186s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 186s registers an offense for arbitrary tokens 186s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 186s registers an offense for having a frozen string literal comment under ruby code 186s accepts a frozen string literal below an encoding comment 186s accepts an empty source 186s registers an offense for arbitrary tokens below an encoding comment 186s accepts a source with no tokens 186s registers an offense for a disabled frozen string literal comment under shebang with no other code 186s registers an offense for arbitrary tokens below shebang and encoding comments 186s registers an offense for arbitrary tokens under shebang with no other code 186s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 186s registers an offense for arbitrary tokens below shebang above an encoding comments 186s registers an offense for arbitrary tokens below an encoding comment and extra space 186s registers an offense for an extra first empty line 186s registers an offense for a disabled frozen string literal below an encoding comment 186s registers an offense for arbitrary tokens below a shebang comment 186s registers an offense for a disabled frozen string literal below a shebang comment 186s registers an offense for a disabled frozen string literal comment after other comments 186s accepts a frozen string literal comment below an encoding comment and extra space 186s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 186s registers an offense for not having a frozen string literal comment on the top line 186s accepts a frozen string literal comment under shebang with no other code 186s target_ruby_version < 2.3 186s accepts calling << on a string with interpolation 186s accepts calling << on a string 186s accepts freezing a string 186s accepts freezing a string with interpolation 186s 186s RuboCop::PathUtil 186s #match_path? 186s matches strings to the full path 186s matches regexps 186s matches dir/** for hidden file 186s does not match invalid UTF-8 paths 186s does not match file in a subdirectory 186s matches glob expressions 186s does not match dir/** for file in hidden dir 186s #absolute? 186s returns a falsey value for a path beginning with a directory name 186s returns a truthy value for a path beginning with slash 186s #relative_path 186s supports custom base paths 186s builds paths relative to PWD by default as a stop-gap 186s 186s RuboCop::Cop::Layout::EmptyLinesAroundClassBody 186s when EnforcedStyle is empty_lines_special 186s class with constant and child class 186s registers and autocorrects the offenses 186s when first child is an access modifier 186s with blank lines at the beginning and ending of class body 186s registers no offense 186s with no blank lines at the beginning and ending of class body 186s registers and corrects an offense 186s when namespace has multiple children 186s requires empty lines for namespace 186s class with empty body 186s with empty line 186s does NOT register offenses 186s without empty line 186s does NOT register offenses 186s when first child is a method 186s requires blank line at the beginning and ending of class body 186s when class has a namespace 186s requires no empty lines for namespace but requires blank line at the beginning and ending of class body 186s source without blank lines 186s registers and autocorrects the offenses 186s source with blank lines 186s autocorrects the offenses 186s source without blank lines 186s registers an offense for class not beginning and ending with a blank line 186s when first child is NOT a method 186s 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 186s source without blank lines 186s registers an offense for class not ending with a blank line 186s source with comment before method definition 186s registers an offense for class beginning with a blank line 186s when class has a namespace 186s 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 186s source with constants 186s registers and autocorrects the offenses 186s source with blank lines 186s registers and autocorrects the offenses 186s source without blank lines 186s registers and autocorrects the offenses 186s source with blank lines 186s registers an offense for class beginning with a blank line 186s class with only constants 186s registers and autocorrects the offenses 186s when EnforcedStyle is no_empty_lines 186s registers an offense for class body ending with a blank 186s autocorrects singleton class body containing only a blank 186s registers an offense for singleton class body ending with a blank 186s registers an offense for class body starting with a blank 186s when EnforcedStyle is empty_lines 186s accepts classes with an empty body 186s does not register offenses when specifying a superclass that breaks the line 186s registers an offense for class body not starting or ending with a blank 186s does not register offenses 186s accepts singleton classes with an empty body 187s registers an offense for singleton class body not starting or ending with a blank 187s when EnforcedStyle is ending_only 187s ignores empty lines at the beginning of a class 187s registers an offense for an empty line at the end of a class 187s when EnforcedStyle is beginning_only 187s ignores empty lines at the beginning of a class 187s registers an offense for an empty line at the end of a class 187s when EnforcedStyle is empty_lines_except_namespace 187s when only child is module 187s registers offense for namespace body ending with a blank 187s requires no empty lines for namespace 187s registers offense for namespace body starting with a blank 187s when has multiple child classes 187s registers offenses for namespace body starting and ending without a blank 187s requires empty lines for namespace 187s when only child is class 187s autocorrects beginning and end 187s registers offense for namespace body starting with a blank 187s registers offenses for namespaced class body not ending with a blank 187s registers offenses for namespaced class body not starting with a blank 187s requires no empty lines for namespace 187s registers offense for namespace body ending with a blank 187s 187s RuboCop::Cop::Bundler::InsecureProtocolSource 187s does not register an offense when using `source 'https://rubygems.org'` 187s registers an offense when using `source :rubygems` 187s registers an offense when using `source :rubyforge` 187s registers an offense when using `source :gemcutter` 187s when `AllowHttpProtocol: true` 187s does not register an offense when using `source 'http://rubygems.org'` 187s when `AllowHttpProtocol: false` 187s registers an offense when using `source 'http://rubygems.org'` 187s 187s RuboCop::Cop::Layout::SpaceInLambdaLiteral 187s when configured to enforce spaces 187s does not register an offense for multi-line lambdas 187s registers an offense and corrects no space in both lambdas when nested 187s does not register an offense for a space between -> and ( 187s registers an offense and corrects no space in the inner nested lambda 187s does not register an offense for no space between -> and { 187s registers an offense and corrects no space in the outer nested lambda 187s registers an offense and corrects no space between -> and ( 187s when configured to enforce no space 187s registers an offense and corrects spaces between -> and ( 187s register offenses and correct spaces in both lambdas when nested 187s registers an offense and corrects a space in the outer nested lambda 187s registers an offense and corrects a space in the inner nested lambda 187s does not register an offense for no space between -> and ( 187s does not register an offense for multi-line lambdas 187s does not register an offense for a space between -> and { 187s registers an offense and corrects a space between -> and ( 187s 187s RuboCop::Cop::Style::Dir 187s when using `#expand_path` and `#dirname` 187s registers an offense with ::File 187s registers an offense 187s when using `#dirname` and `#realpath` 187s registers an offense 187s registers an offense with ::File 187s 187s RuboCop::Cop::Style::MixinUsage 187s does not register an offense when using inside nested module 187s include 187s registers an offense when using outside class (used above) 187s does not register an offense when using inside block 187s does not register an offense when using `include` in method definition inside class 187s doesn't register an offense when `include` call is a method argument 187s registers an offense when using `include` in method definition outside class or module 187s registers an offense when using only `include` statement 187s does not register an offense when using inside block and `if` condition is after `include` 187s does not register an offense when using outside class 187s registers an offense when using outside class (used below) 187s does not register an offense when using inside class 187s does not register an offense when using `include` in method definition inside module 187s Multiple definition classes in one 187s does not register an offense when using inside class 187s Nested module 187s registers an offense when using outside class 187s prepend 187s registers an offense when using outside class 187s does not register an offense when using inside class 187s extend 187s registers an offense when using outside class 187s does not register an offense when using inside class 187s 187s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 187s #calculate 187s raises when unknown foldable type is passed 187s when method 187s counts single line hash as the one of method args if asked folding 187s counts single line hash with other args correctly if asked folding 187s does not count blank lines 187s folds hashes as method kwargs if asked 187s counts single line hash as the one of method args with safe navigation operator if asked folding 187s folds multiline hashes with line break before it as method args if asked 187s counts single line correctly if asked folding 187s folds hashes if asked 187s calculates method length 187s counts single line without parentheses correctly if asked folding 187s folds arrays if asked 187s folds hashes as method args if asked 187s folds multiline hashes with line break after it as method args if asked 187s counts comments if asked 187s folds heredocs if asked 187s folds hashes without braces as the one of method args if asked 187s folds multiline hashes without braces as method args if asked 187s folds hashes with comment if asked 187s counts single line hash with line breaks correctly if asked folding 187s when class 187s folds arrays if asked 187s folds hashes if asked 187s counts comments if asked 187s does not count lines of inner classes 187s folds heredocs if asked 187s calculates class length 187s does not count blank lines 187s 187s RuboCop::Cop::Layout::FirstParameterIndentation 187s consistent style 187s valid indentation on multi-line defs 187s accepts correctly indented first element 187s accepts correctly indented first element hash 187s invalid indentation on multi-line defs 187s normal arguments 187s registers an offense and corrects incorrectly indented first element 187s hash arguments static method def 187s registers an offense and corrects incorrectly indented first element 187s hash arguments 187s registers an offense and corrects incorrectly indented first element 187s valid indentation on static multi-line defs 187s accepts correctly indented first element 187s accepts correctly indented first element hash 187s no paren method defs 187s ignores with hash args 187s ignores 187s single line method defs 187s ignores with hash args 187s ignores 187s align_parentheses style 187s invalid indentation on multi-line defs 187s normal arguments 187s registers an offense and corrects incorrectly indented first element 187s hash arguments static def 187s registers an offense and corrects incorrectly indented first element 187s hash arguments 187s registers an offense and corrects incorrectly indented first element 187s valid indentation on multi-line defs 187s accepts correctly indented first element 187s accepts correctly indented first element hash 187s single line method defs 187s ignores 187s ignores with hash args 187s no paren method defs 187s ignores with hash args 187s ignores 187s 187s RuboCop::Cop::Style::NestedTernaryOperator 187s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 187s registers an offense and corrects for a nested ternary operator expression 187s accepts a non-nested ternary operator within an if 187s can handle multiple nested ternaries 187s registers an offense and corrects for a nested ternary operator expression with block 187s 187s RuboCop::Cop::Style::IfInsideElse 187s isn't offended if there is a statement following the if node 187s catches an if node nested inside an else 187s ignores ternary inside if..else 187s catches an if..elsif..else nested inside an else 187s handles a nested multiline `if...then...elsif...else...end` 187s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 187s handles a nested `if...then...elsif...else...end` 187s ignores if inside unless 187s isn't offended by if..elsif..else 187s handles a nested `if...then...elsif...end` 187s ignores nested ternary expressions 187s catches a modifier if nested inside an else after elsif 187s handles a nested `if...then...else...end` 187s isn't offended if there is a statement preceding the if node 187s handles a nested `if...then...end` 187s catches an if..else nested inside an else 187s ignores unless inside else 187s when AllowIfModifier is false 187s catches a modifier if nested inside an else 187s when AllowIfModifier is true 187s accepts a modifier if nested inside an else 187s 187s RuboCop::Cop::Lint::RedundantStringCoercion 187s registers an offense and corrects `to_s` in an interpolation with several expressions 187s accepts interpolation without #to_s 187s does not explode on empty interpolation 187s registers an offense and corrects an implicit receiver 187s registers an offense and corrects `to_s` in interpolation 187s accepts #to_s with arguments in an interpolation 187s 187s RuboCop::Cop::Style::Proc 187s accepts the ::Proc.new call without block 187s accepts the Proc.new call without block 187s registers an offense for a Proc.new call 187s registers an offense for ::Proc.new 187s Ruby 2.7 187s registers an offense for a Proc.new call 187s 187s RuboCop::Cop::Lint::SendWithMixinArgument 187s does not register an offense when not using a mixin method 187s registers an offense when using `send` with `prepend` 187s registers an offense when using `public_send` method 187s registers an offense when using `send` with `extend` 187s registers an offense when using `__send__` method 187s does not register an offense when using `extend` 187s registers an offense when using `send` with `include` 187s does not register an offense when using `include` 187s does not register an offense when using `prepend` 187s when using namespace for module 187s registers an offense when using `send` with `include` 187s when specifying a mixin method as a string 187s registers an offense when using `send` with `prepend` 187s registers an offense when using `send` with `extend` 187s registers an offense when using `send` with `include` 187s 187s RuboCop::Cop::Naming::AsciiIdentifiers 187s when AsciiConstants is false 187s registers an offense for a variable name with mixed chars 187s accepts identifiers with only ascii chars 187s does not get confused by a byte order mark 187s does not get confused by an empty file 187s registers an offense for a variable name with non-ascii chars 187s accepts constants with only ascii chars 187s when AsciiConstants is true 187s does not get confused by an empty file 187s registers an offense for a variable name with non-ascii chars 187s accepts identifiers with only ascii chars 187s registers an offense for a constant name with non-ascii chars 187s registers an offense for a variable name with mixed chars 187s does not get confused by a byte order mark 187s 187s RuboCop::Cop::Lint::MissingCopEnableDirective 187s when the maximum range size is infinite 187s does not register an offense when the disable cop is re-enabled 187s does not register an offense when the disable department is re-enabled 187s registers an offense when a department is disabled and never re-enabled 187s registers an offense when a cop is disabled and never re-enabled 187s when the maximum range size is finite 187s registers an offense when a department is disabled for too many lines 187s registers an offense when a cop is disabled and never re-enabled 187s registers an offense when a cop is disabled for too many lines 187s does not register an offense when the disable cop is re-enabled within the limit 187s registers an offense when a department is disabled and never re-enabled 187s does not register an offense when the disable department is re-enabled within the limit 187s when the cop is disabled in the config 187s reports no offense when re-disabling it until EOF 187s 187s RuboCop::Cop::Layout::MultilineMethodCallIndentation 187s when EnforcedStyle is aligned 187s accepts aligned methods in a begin..end block 187s accepts indented methods in ordinary statement 187s registers an offense and corrects misaligned methods in if condition 187s registers an offense and corrects proc call without a selector 187s accepts even indentation of consecutive lines in typical RSpec code 187s accepts an expression where the first method spans multiple lines 187s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 187s does not check binary operations when string wrapped with backslash 187s accepts alignment inside a grouped expression 187s registers an offense and corrects misaligned methods in while condition 187s registers an offense and corrects extra indentation of third line 187s registers an offense and corrects one space indentation of 3rd line 187s accepts aligned method in return 187s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 187s registers an offense and corrects 3 spaces indentation of 2nd line 187s registers an offense and corrects unaligned methods in assignment 187s accepts indented methods in LHS of []= assignment 187s registers an offense and corrects misaligned methods in local variable assignment 187s accepts indented and aligned methods in binary operation 187s accepts aligned methods in operator assignment 187s doesn't fail on unary operators 187s registers an offense and corrects misaligned method in []= call 187s accepts aligned method in assignment + block + assignment 187s accepts aligned methods in assignment 187s accepts aligned methods in constant assignment 187s registers an offense and corrects misaligned methods in unless condition 187s accepts indented method when there is nothing to align with 187s accepts indented methods inside and outside a block 187s accepts alignment of method with assignment and operator-like method 187s doesn't crash on unaligned multiline lambdas 187s accepts aligned methods in if condition 187s accepts indented methods in for body 187s accepts aligned methods in if + assignment 187s accepts correctly aligned methods in assignment 187s accepts correctly aligned methods in operands 187s accepts indentation relative to first receiver 187s accepts no extra indentation of third line 187s registers an offense and corrects no indentation of second line 187s registers an offense and corrects misaligned methods in until condition 187s does not check binary operations when string wrapped with + 187s registers an offense and corrects one space indentation of 2nd line 187s accepts any indentation of parameters to #[] 187s for semantic alignment 187s accepts methods being aligned with method that is an argument in assignment 187s accepts method being aligned with method 187s accepts aligned method even when an aref is in the chain 187s accepts aligned method with blocks in operation assignment 187s doesn't fail on a chain of aref calls 187s accepts method being aligned with method in assignment 187s accepts aligned method even when an aref is first in the chain 187s accepts 3 aligned methods 187s registers an offense and corrects unaligned method in block body 187s accepts key access to hash 187s registers an offense and corrects unaligned methods 187s accepts nested method calls 187s accepts methods being aligned with method that is an argument 187s >= Ruby 2.7 187s accepts methods being aligned with method that is an argumentwhen using numbered parameter 187s when EnforcedStyle is indented_relative_to_receiver 187s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 187s accepts indentation relative to first receiver 187s registers an offense and corrects 3 spaces indentation of second line 187s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 187s accepts no extra indentation of third line 187s doesn't crash on unaligned multiline lambdas 187s accepts indented methods in for body 187s registers an offense and corrects extra indentation of 3rd line 187s accepts indentation of consecutive lines in typical RSpec code 187s accepts any indentation of parameters to #[] 187s registers an offense and corrects one space indentation of 2nd line 187s accepts an expression where the first method spans multiple lines 187s accepts alignment of method with assignment and operator-like method 187s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 187s registers an offense and corrects no indentation of second line 187s accepts alignment inside a grouped expression 187s accepts correctly indented methods in operation 187s registers an offense and corrects proc call without a selector 187s accepts indented methods inside and outside a block 187s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 187s accepts indented methods in ordinary statement 187s accepts indented methods in LHS of []= assignment 187s doesn't fail on unary operators 187s for possible semantic alignment 187s accepts indented methods 187s when EnforcedStyle is indented 187s accepts indented methods inside and outside a block 187s accepts indented methods in while body 187s accepts double indentation of unless condition 187s accepts indented methods in LHS of []= assignment 187s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 187s accepts indented methods in if condition 187s registers an offense and corrects aligned operators in assignment 187s registers an offense and corrects 1 space indentation of 3rd line 187s accepts indentation relative to first receiver 187s accepts double indentation of if condition 187s accepts special indentation of return unless condition 187s accepts alignment of method with assignment and operator-like method 187s accepts even indentation of consecutive lines in typical RSpec code 187s accepts special indentation of return if condition 187s accepts indentation of assignment to a with newline after = 187s accepts indentation of assignment to a with rhs on same line 187s registers an offense for a 2 space indentation of while condition 187s accepts indented methods in for body 187s registers an offense for a 2 space indentation of until condition 187s registers an offense and corrects correct + unrecognized style 187s accepts alignment inside a grouped expression 187s accepts double indentation of while condition 187s accepts indentation of assignment to obj.a with newline after = 187s accepts indented methods in ordinary statement 187s registers an offense and corrects extra indentation of third line 187s accepts special indentation of for expression 187s registers an offense and corrects proc call without a selector 187s registers an offense for a 2 space indentation of if condition 187s accepts indentation of assignment to a[:key] with rhs on same line 187s doesn't fail on unary operators 187s accepts no extra indentation of third line 187s accepts double indentation of until condition 187s registers an offense and corrects 3 spaces indentation of 2nd line 187s accepts indentation of assignment to obj.a[:key] with newline after = 187s accepts normal indentation of method parameters 187s registers an offense and corrects wrong indentation of for expression 187s registers an offense and corrects 0 space indentation inside square brackets 187s registers an offense and corrects no indentation of second line 187s accepts normal indentation inside grouped expression 187s registers an offense and corrects one space indentation of 2nd line 187s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 187s accepts indented methods in unless body 187s accepts correctly indented methods in operation 187s accepts any indentation of method parameters 187s accepts any indentation of parameters to #[] 187s registers an offense and corrects aligned methods in if condition 187s accepts indented methods in if body 187s accepts indented methods in until body 187s doesn't crash on unaligned multiline lambdas 187s accepts an expression where the first method spans multiple lines 187s accepts indentation of assignment to a[:key] with newline after = 187s registers an offense for a 2 space indentation of unless condition 187s when indentation width is overridden for this cop 187s accepts indented methods in if body 187s registers an offense for a 4 space indentation of unless condition 187s accepts correctly indented methods in operation 187s registers an offense for a 4 space indentation of until condition 187s accepts indented methods in unless body 187s accepts indentation of while condition which is offset by a single normal indentation step 187s accepts indented methods in until body 187s accepts indentation of unless condition which is offset by a single normal indentation step 187s accepts indented methods 187s accepts indentation of if condition which is offset by a single normal indentation step 187s registers an offense for a 4 space indentation of if condition 187s accepts indented methods in if condition 187s accepts indentation of assignment 187s accepts indentation of until condition which is offset by a single normal indentation step 187s accepts indented methods in while body 187s registers an offense for a 4 space indentation of while condition 187s for possible semantic alignment 187s accepts indented methods 187s 187s RuboCop::Cop::Lint::SafeNavigationConsistency 187s registers an offense but does not correct non dot method calls 187s registers an offense and corrects unsafe navigation that appears before safe navigation 187s registers an offense and corrects when there is code before or after the condition 187s registers an offense and corrects using unsafe navigation with both && and || 187s allows safe navigation when different variables are used 187s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 187s registers an offense and corrects using safe navigation inside of separated conditions 187s registers and corrects multiple offenses 187s registers a single offense and corrects when safe navigation is used multiple times 187s allows || without safe navigation 187s registers an offense and corrects using unsafe navigation with grouped conditions 187s registers an offense and corrects using safe navigation on the right of && 187s registers an offense and corrects using safe navigation on the right of || 187s allows && without safe navigation 187s registers an offense and corrects assignment 187s registers an offense and corrects using safe navigation on the left of || 187s registers an offense and corrects using safe navigation in conditions on the right hand side 187s registers an offense and corrects using safe navigation on the left of && 187s allows calls to methods that nil responds to 187s 187s RuboCop::Cop::Naming::FileName 187s with non-ascii characters in filename 187s does not register an offense 187s with snake_case names which use + 187s does not register an offense 187s with acronym namespace 187s does not register an offense 187s when CheckDefinitionPathHierarchy is false 187s on a file with a non-matching class 187s registers an offense 187s in a non-matching directory, but with a matching class 187s does not register an offense 187s with a matching module containing a non-matching class 187s does not register an offense 187s on an empty file 187s registers an offense 187s with a matching module containing a non-matching struct 187s does not register an offense 187s on a file with a matching struct 187s does not register an offense 187s with a non-matching module containing a matching struct 187s does not register an offense 187s on a file with a non-matching struct 187s registers an offense 187s on a file with a matching class 187s does not register an offense 187s with a non-matching module containing a matching class 187s does not register an offense 187s when ExpectMatchingDefinition is true 187s on a file which defines a nested module 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a non-matching directory under test 187s registers an offense 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a matching directory under spec 187s does not register an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s in a non-matching directory under src 187s registers an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s in a matching directory under lib 187s does not register an offense 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a matching directory under test 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a matching directory under src 187s does not register an offense 187s in a non-matching directory under lib 187s registers an offense 187s on a file which defines a Struct without a block 187s in a non-matching directory under src 187s registers an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s in a matching directory under test 187s does not register an offense 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a matching directory under src 187s does not register an offense 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a non-matching directory under lib 187s registers an offense 187s in a matching directory under lib 187s does not register an offense 187s in a matching directory under spec 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a non-matching directory under test 187s registers an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s on a file which defines a Struct with a block 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a matching directory under test 187s does not register an offense 187s in a non-matching directory under lib 187s registers an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s in a non-matching directory under src 187s registers an offense 187s in a matching directory under src 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a matching directory under lib 187s does not register an offense 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a matching directory under spec 187s does not register an offense 187s in a non-matching directory under test 187s registers an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s on an empty file 187s registers an offense 187s on a file which uses Name::Spaced::Module syntax 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a matching directory under src 187s does not register an offense 187s in a matching directory under spec 187s does not register an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a non-matching directory under src 187s registers an offense 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a non-matching directory under lib 187s registers an offense 187s in a matching directory under lib 187s does not register an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s in a non-matching directory under test 187s registers an offense 187s in a matching directory under test 187s does not register an offense 187s on a file which defines no class or module at all 187s under lib 187s registers an offense 187s under src 187s registers an offense 187s under test 187s registers an offense 187s under some other random directory 187s registers an offense 187s under spec 187s registers an offense 187s under lib when not added to root 187s registers an offense 187s on a file which defines a nested class 187s in a non-matching directory under src 187s registers an offense 187s in a matching directory under lib 187s does not register an offense 187s in a matching directory under test 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a non-matching directory under test 187s registers an offense 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a matching directory under spec 187s does not register an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s in a non-matching directory under lib 187s registers an offense 187s in a matching directory under src 187s does not register an offense 187s on a file which defines multiple classes 187s in a non-matching directory under lib 187s registers an offense 187s in a matching directory under lib 187s does not register an offense 187s in a directory with multiple instances of lib 187s does not register an offense 187s in a directory elsewhere which only matches the module name 187s does not register an offense 187s in a directory with multiple instances of src 187s does not register an offense 187s in a matching directory under spec 187s does not register an offense 187s in a directory with multiple instances of spec 187s does not register an offense 187s in a matching directory under src 187s does not register an offense 187s in a directory elsewhere which does not match the module name 187s registers an offense 187s in a non-matching directory under test 187s registers an offense 187s in a non-matching directory under src 187s registers an offense 187s in a directory with multiple instances of test 187s does not register an offense 187s in a non-matching directory under spec 187s registers an offense 187s in a matching directory under test 187s does not register an offense 187s on an empty file with a space in its filename 187s registers an offense 187s with camelCase file names without file extension 187s registers an offense 187s with snake_case file names ending in .rb 187s does not register an offense 187s with camelCase file names ending in .rb 187s registers an offense 187s with snake_case file names with multiple extensions 187s does not register an offense 187s with include acronym name 187s does not register an offense 187s with snake_case names which use ? and ! 187s does not register an offense 187s with dotfiles 187s does not register an offense 187s when Regex is set 187s with a non-matching name 187s registers an offense 187s with a matching name 187s does not register an offense 187s with snake_case file names without file extension 187s does not register an offense 187s with acronym class name 187s does not register an offense 187s with non-snake-case file names with a shebang 187s does not register an offense 187s when IgnoreExecutableScripts is disabled 187s registers an offense 187s when the file is specified in AllCops/Include 187s with a non-snake_case file name 187s does not register an offense 187s with snake_case file names with non-rb extension 187s does not register an offense 187s 187s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 187s Ruby >= 3.0 187s with `match_with_lvasgn` node 187s with different parentheses 187s does not register an offense 187s with parentheses 187s does not register an offense 187s without parentheses 187s registers an offense and corrects 187s with parentheses 187s accepts 187s without parentheses 187s registers an offense and corrects when nesting 187s registers an offense and corrects when sending method to regexp with argument 187s registers an offense and corrects when sending method without receiver takes a regexp argument 187s registers an offense and corrects when using regexp without method call in a nested structure 187s registers an offense and corrects when multiple arguments 187s registers an offense and corrects when using block argument 187s registers an offense and corrects when using nested method arguments without parentheses 187s registers an offense and corrects when sending method to regexp without argument 187s registers an offense and corrects when sending method chain to regexp 187s registers an offense and corrects when single argument 187s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 187s Ruby <= 2.7 187s with parentheses 187s accepts 187s without parentheses 187s registers an offense and corrects when sending method without receiver takes a regexp argument 187s registers an offense and corrects when sending method chain to regexp 187s registers an offense and corrects when single argument 187s registers an offense and corrects when using nested method arguments without parentheses 187s registers an offense and corrects when multiple arguments 187s registers an offense and corrects when nesting 187s registers an offense and corrects when sending method to regexp without argument 187s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 187s registers an offense and corrects when using regexp without method call in a nested structure 187s registers an offense and corrects when using block argument 187s registers an offense and corrects when sending method to regexp with argument 187s with `match_with_lvasgn` node 187s without parentheses 187s registers an offense and corrects 187s with different parentheses 187s does not register an offense 187s with parentheses 187s does not register an offense 187s 187s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 187s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 187s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 187s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 187s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 187s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 187s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 187s does not register an offense when using only `expect_offense` 187s 187s RuboCop::Cop::Style::WordArray 187s when EnforcedStyle is array 187s autocorrects a %w() array which uses string with hyphen 187s does not register an offense for arrays of strings with spaces 187s does not register an offense for arrays of strings with hyphens 187s autocorrects a %w() array which uses single quotes 187s doesn't fail with `encoding: binary 187s autocorrects a %W() array which uses escapes 187s does not register an offense for arrays of double quoted strings 187s registers an offense for a %w() array 187s doesn't fail on strings which are not valid UTF-8 187s registers an offense for an empty %w() array 187s autocorrects a %W() array which uses string interpolation 187s does not register an offense for arrays of single quoted strings 187s autocorrects multiline %w() array 187s autocorrects a %W() array which uses string with hyphen 187s with a custom WordRegex configuration 187s registers an offense for arrays of email addresses 187s when the WordRegex configuration is not a Regexp 187s still parses the code without raising an error 187s when EnforcedStyle is percent 187s does not register offense for array with allowed number of strings 187s uses %W when autocorrecting strings with embedded newlines and tabs 187s does not register an offense for array containing non-string 187s autocorrects an array of words in multiple lines 187s does not register an offense for a %w() array containing non word characters 187s autocorrects an array of words using partial newlines 187s does not register an offense for an array with comments in it 187s corrects properly when there is an extra trailing comma 187s doesn't fail in wacky ways when multiple cop instances are used 187s autocorrects an array of words and character constants 187s keeps the line breaks in place after autocorrect 187s does not register an offense for array with empty strings 187s registers an offense for an array with comments outside of it 187s autocorrects an array of words 187s registers an offense for arrays of strings containing hyphens 187s does not register an offense on non-word strings 187s registers an offense for strings with newline and tab escapes 187s autocorrects an array with one element 187s does not register an offense for array starting with %w 187s registers an offense for arrays of double quoted strings 187s does not register an offense for array of non-words 187s registers an offense for arrays of single quoted strings 187s detects when the cop must be disabled to avoid offenses 187s registers an offense for a %w() array containing spaces 187s detects right value of MinSize to use for --auto-gen-config 187s registers an offense for arrays with character constants 187s registers an offense in a non-ambiguous block context 187s when the default external encoding is UTF-8 187s registers an offense for arrays of unicode word characters 187s when the default external encoding is US-ASCII 187s registers an offense for arrays of unicode word characters 187s with a WordRegex configuration which accepts almost anything 187s uses %w for strings which only appear to have an escape 187s uses %W when autocorrecting strings with non-printable chars 187s with a treacherous WordRegex configuration 187s doesn't break when words contain whitespace 187s doesn't break when words contain delimiters 187s when PreferredDelimiters is specified 187s autocorrects an array with delimiters 187s with non-default MinSize 187s does not autocorrect arrays of one symbol if MinSize > 1 187s 187s RuboCop::Cop::Style::RedundantRegexpEscape 187s with a single-line %r@@ regexp 187s with escaped delimiters inside a character-class 187s does not register an offense 187s with escaped delimiters and regexp options 187s does not register an offense 187s without escapes 187s does not register an offense 187s with escaped delimiters outside a character-class 187s does not register an offense 187s with a single-line %r!! regexp 187s with escaped delimiters inside a character-class 187s does not register an offense 187s with escaped delimiters and regexp options 187s does not register an offense 187s without escapes 187s does not register an offense 187s with escaped delimiters outside a character-class 187s does not register an offense 187s with a single-line %r~~ regexp 187s with escaped delimiters inside a character-class 187s does not register an offense 187s with escaped delimiters outside a character-class 187s does not register an offense 187s without escapes 187s does not register an offense 187s with escaped delimiters and regexp options 187s does not register an offense 187s with a multi-line %r// regexp 187s with escaped slashes 187s does not register an offense 187s without escapes 187s does not register an offense 187s with a single-line %r() regexp 187s with escaped delimiters and regexp options 187s does not register an offense 187s without escapes 187s does not register an offense 187s with escaped delimiters inside a character-class 187s does not register an offense 187s with escaped delimiters outside a character-class 187s does not register an offense 187s with a multi-line %r{} regexp 187s with redundantly-escaped slashes 187s registers an offense and corrects 187s with a redundant escape after a line with comment 187s registers an offense and corrects 187s without escapes 187s does not register an offense 187s with a # inside a character class 188s does not register an offense 188s with multibyte characters 188s removes the escape character at the right position 188s with a single-line %r{} regexp 188s without escapes 188s does not register an offense 188s with redundantly-escaped slashes 188s registers an offense and corrects 188s with an escaped { or } inside a character class 188s does not register an offense 188s with an escaped { or } outside a character class 188s does not register an offense 188s with a single-line %r// regexp 188s with escaped slashes 188s does not register an offense 188s without escapes 188s does not register an offense 188s with a single-line %r<> regexp 188s with escaped delimiters outside a character-class 188s does not register an offense 188s with escaped delimiters and regexp options 188s does not register an offense 188s with escaped delimiters inside a character-class 188s does not register an offense 188s without escapes 188s does not register an offense 188s with a single-line %r__ regexp 188s without escapes 188s does not register an offense 188s with escaped delimiters and regexp options 188s does not register an offense 188s with escaped delimiters inside a character-class 188s does not register an offense 188s with escaped delimiters outside a character-class 188s does not register an offense 188s with a single-line `//` regexp 188s with an escaped '(' inside a character class 188s registers an offense and corrects 188s with an escaped 'n101' inside a character class 188s does not register an offense 188s with an escaped '{' inside a character class 188s registers an offense and corrects 188s with an escaped 'e' inside a character class 188s does not register an offense 188s with an escaped 'a' outside a character class 188s does not register an offense 188s with an escaped 'cc' outside a character class 188s does not register an offense 188s with an escaped '}' outside a character class 188s does not register an offense 188s with an escaped 'a' inside a character class 188s does not register an offense 188s with an escaped 'u{0041}' inside a character class 188s does not register an offense 188s with an escaped 'H' outside a character class 188s does not register an offense 188s with an escaped interpolation outside a character class 188s does not register an offense 188s with an escaped ' ' outside a character class 188s does not register an offense 188s with an escaped ' 188s ' outside a character class 188s does not register an offense 188s with an escaped 'V' outside a character class 188s does not register an offense 188s with an escaped '(' outside a character class 188s does not register an offense 188s with an interpolation followed by redundant escapes 188s registers offenses and corrects 188s with a character class and following escaped char 188s does not register an offense 188s with escaped slashes 188s does not register an offense 188s with an escaped 'm' inside a character class 188s does not register an offense 188s with an escaped 'K' inside a character class 188s does not register an offense 188s with an escaped 'v' inside a character class 188s does not register an offense 188s with an escaped 'f' inside a character class 188s does not register an offense 188s with a line continuation 188s does not register an offense 188s with an escaped 'z' inside a character class 188s does not register an offense 188s with an escaped 'u0041' inside a character class 188s does not register an offense 188s with an escaped 'X' inside a character class 188s does not register an offense 188s with an escaped '*' inside a character class 188s registers an offense and corrects 188s with an escaped 'G' inside a character class 188s does not register an offense 188s with an escaped '$' outside a character class 188s does not register an offense 188s with an escaped 'R' outside a character class 188s does not register an offense 188s with an escaped 'C-c' inside a character class 188s does not register an offense 188s with an escaped 'o' inside a character class 188s does not register an offense 188s with an escaped 'J' outside a character class 188s does not register an offense 188s with a POSIX character class then disallowed escape inside a character class 188s registers an offense and corrects 188s with regexp options and a redundant escape 188s registers offenses and corrects 188s with an escaped '^' outside a character class 188s does not register an offense 188s with an escaped 'e' outside a character class 188s does not register an offense 188s with an escaped '*' outside a character class 188s does not register an offense 188s with an escaped 'T' outside a character class 188s does not register an offense 188s with an escaped ')' inside a character class 188s registers an offense and corrects 188s with an escaped character class and following escaped char 188s does not register an offense 188s with a free-spaced mode regex 188s with a commented redundant escape on a single line 188s does not register an offense 188s with a commented redundant escape 188s does not register an offense 188s with redundant escape preceded by an escaped comment 188s registers offenses and corrects 188s with a commented [ and ] 188s does not register an offense 188s with an escaped 'x41' outside a character class 188s does not register an offense 188s with an escaped 'S' outside a character class 188s does not register an offense 188s with a nested character class then allowed escape 188s does not register an offense 188s with an interpolated unnecessary-escape regexp 188s registers an offense and corrects 188s with an escape inside an interpolated string 188s does not register an offense 188s with an escaped 'Q' inside a character class 188s does not register an offense 188s with an escaped ']' outside a character class 188s does not register an offense 188s with an escaped 'W' inside a character class 188s does not register an offense 188s with an escaped '\' outside a character class 188s does not register an offense 188s with an escaped 'H' inside a character class 188s does not register an offense 188s with an escaped 'o' outside a character class 188s does not register an offense 188s with an escaped 'J' inside a character class 188s does not register an offense 188s with an escaped 'F' inside a character class 188s does not register an offense 188s with an escaped '[' outside a character class 188s does not register an offense 188s with an escaped 'd' inside a character class 188s does not register an offense 188s with an escaped 'K' outside a character class 188s does not register an offense 188s with an escaped 'M-a' inside a character class 188s does not register an offense 188s with an escaped 'L' inside a character class 188s does not register an offense 188s with an escaped 'P{alpha}' outside a character class 188s does not register an offense 188s with an uppercase metacharacter outside a character class 188s does not register an offense 188s with an escaped 'D' outside a character class 188s does not register an offense 188s with an escaped 'M-a' outside a character class 188s does not register an offense 188s with an escaped 'G' outside a character class 188s does not register an offense 188s with an escaped 'u0041' outside a character class 188s does not register an offense 188s with an escaped '}' inside a character class 188s registers an offense and corrects 188s with an escaped 'j' inside a character class 188s does not register an offense 188s with an escaped interpolation inside a character class 188s does not register an offense 188s with an escaped 'B' outside a character class 188s does not register an offense 188s with a line continuation within a character class 188s does not register an offense 188s with an escaped 'n101' outside a character class 188s does not register an offense 188s with an escaped 'l' outside a character class 188s does not register an offense 188s with an escaped '+' outside a character class 188s does not register an offense 188s with an escaped 'U' inside a character class 188s does not register an offense 188s with an escaped 'C-c' outside a character class 188s does not register an offense 188s with an escaped 'S' inside a character class 188s does not register an offense 188s with an escaped '|' inside a character class 188s registers an offense and corrects 188s with an escaped '?' outside a character class 188s does not register an offense 188s with an escaped 'f' outside a character class 188s does not register an offense 188s with an escaped '$' inside a character class 188s registers an offense and corrects 188s with an escaped 'd' outside a character class 188s does not register an offense 188s with an uppercase metacharacter inside a character class 188s does not register an offense 188s with an escaped 'E' outside a character class 188s does not register an offense 188s with an escaped '.' inside a character class 188s registers an offense and corrects 188s with an escaped '[' inside a character class 188s does not register an offense 188s with an escaped 's' outside a character class 188s does not register an offense 188s with an escaped '.' outside a character class 188s does not register an offense 188s with an escaped 'L' outside a character class 188s does not register an offense 188s with an escaped 'q' outside a character class 188s does not register an offense 188s with an escaped 'A' outside a character class 188s does not register an offense 188s with an escaped ']' inside a character class 188s does not register an offense 188s with an escaped 'h' outside a character class 188s does not register an offense 188s with an escaped 'j' outside a character class 188s does not register an offense 188s with an escaped ' ' inside a character class 188s does not register an offense 188s with an escaped '{' outside a character class 188s does not register an offense 188s with an escaped 'V' inside a character class 188s does not register an offense 188s with an escaped 'R' inside a character class 188s does not register an offense 188s with an escaped 'v' outside a character class 188s does not register an offense 188s with an escaped 'I' inside a character class 188s does not register an offense 188s with an escaped 'q' inside a character class 188s does not register an offense 188s with an escaped ')' outside a character class 188s does not register an offense 188s with an escaped '#' inside a character class 188s does not register an offense 188s with an escaped 'h' inside a character class 188s does not register an offense 188s with an escaped 'p{alpha}' inside a character class 188s does not register an offense 188s with an escaped 'w' outside a character class 188s does not register an offense 188s with an escaped 'Q' outside a character class 188s does not register an offense 188s with an escaped 'l' inside a character class 188s does not register an offense 188s with an escaped 'y' inside a character class 188s does not register an offense 188s with an escaped 'Y' outside a character class 188s does not register an offense 188s with a POSIX character class then allowed escape inside a character class 188s does not register an offense 188s with an invalid g escape 188s does not register an offense 188s with an escaped 'z' outside a character class 188s does not register an offense 188s with an escaped 'P{alpha}' inside a character class 188s does not register an offense 188s with an escaped '-' character being the first character inside a character class 188s registers an offense and corrects 188s with an escaped 'E' inside a character class 188s does not register an offense 188s with an escaped '+' inside a character class 188s registers an offense and corrects 188s with an escaped 'T' inside a character class 188s does not register an offense 188s with an escaped 'O' outside a character class 188s does not register an offense 188s with an escaped 'F' outside a character class 188s does not register an offense 188s with an escaped 'r' outside a character class 188s does not register an offense 188s with an escaped '-' inside a character class 188s registers an offense and corrects 188s with an escaped 'b' outside a character class 188s does not register an offense 188s with an escaped '+' inside a character class inside a group 188s registers an offense and corrects 188s with an escaped 'i' inside a character class 188s does not register an offense 188s with an escaped '\' inside a character class 188s does not register an offense 188s with an escaped 'i' outside a character class 188s does not register an offense 188s with an escaped 'p{alpha}' outside a character class 188s does not register an offense 188s with an escaped . inside a character class beginning with : 188s registers an offense and corrects 188s with an escaped 'N' inside a character class 188s does not register an offense 188s with an escaped 'Z' inside a character class 188s does not register an offense 188s with an escaped 'm' outside a character class 188s does not register an offense 188s with an escaped '^' inside a character class 188s does not register an offense 188s with an escaped 'Z' outside a character class 188s does not register an offense 188s with an escaped '|' outside a character class 188s does not register an offense 188s with an escaped 'X' outside a character class 188s does not register an offense 188s with an escaped '-' outside a character class 188s registers an offense and corrects 188s with multiple escaped metachars inside a character class 188s registers offenses and corrects 188s with an escaped 'N' outside a character class 188s does not register an offense 188s with an escaped 'w' inside a character class 188s does not register an offense 188s with an escaped 'cc' inside a character class 188s does not register an offense 188s with an escaped 'b' inside a character class 188s does not register an offense 188s with an escaped 'u{0041}' outside a character class 188s does not register an offense 188s with a backreference 188s does not register an offense 188s with an escaped 's' inside a character class 188s does not register an offense 188s with an escaped 't' inside a character class 188s does not register an offense 188s with an escaped 'D' inside a character class 188s does not register an offense 188s with an escaped 'B' inside a character class 188s does not register an offense 188s with an escaped 'I' outside a character class 188s does not register an offense 188s with an escaped '-' character being the last character inside a character class 188s registers an offense and corrects 188s with an escaped '#' outside a character class 188s does not register an offense 188s with an escaped 'A' inside a character class 188s does not register an offense 188s with an escaped 'W' outside a character class 188s does not register an offense 188s with an escaped 'O' inside a character class 188s does not register an offense 188s with an escaped '?' inside a character class 188s registers an offense and corrects 188s with an escaped 'x41' inside a character class 188s does not register an offense 188s with an escaped 't' outside a character class 188s does not register an offense 188s without escapes 188s does not register an offense 188s with an escaped 'y' outside a character class 188s does not register an offense 188s with a nested character class containing redundant escape 188s registers an offense and corrects 188s with an escaped 'Y' inside a character class 188s does not register an offense 188s with an escaped 'U' outside a character class 188s does not register an offense 188s with an escaped 'r' inside a character class 188s does not register an offense 188s with a single-line %r^^ regexp 188s with escaped delimiters and regexp options 188s does not register an offense 188s with escaped delimiters outside a character-class 188s does not register an offense 188s with escaped delimiters inside a character-class 188s does not register an offense 188s without escapes 188s does not register an offense 188s 188s RuboCop::Cop::Style::ClassAndModuleChildren 188s compact style 188s registers an offense for modules with partially nested children 188s correctly indents heavily nested children 188s accepts nesting for classes/modules with more than one child 188s registers a offense for modules with nested children 188s registers a offense for classes with nested children 188s accepts nesting for classes with an explicit superclass 188s preserves comments between classes 188s accepts compact style for classes/modules 188s registers and offense for deeply nested children 188s registers an offense for classes with partially nested children 188s accepts class/module with single method 188s registers a offense for classes with nested one-liner children 188s nested style 188s accepts :: in parent class on inheritance 188s registers an offense for not nested modules 188s registers an offense for not nested classes with explicit superclass 188s registers an offense for not nested classes when namespace is defined as a module 188s accepts cbase class name 188s registers an offense for not nested classes 188s registers an offense for not nested classes when namespace is defined as a class 188s registers an offense for partially nested modules 188s preserves comments 188s accepts nested children 188s registers an offense for partially nested classes 188s accepts cbase module name 188s 188s RuboCop::Server::CLI 188s when not using any server options 188s returns exit status 0 188s when using exclusive `--stop-server` option 188s returns exit status 2 and display an error message 188s when using server option with `--cache-root=path` option 188s returns exit status 0 and display an information message 188s when using `--server` option 188s returns exit status 0 and display an information message 188s when using server option with `--cache-root path` option 188s returns exit status 0 and display an error message 188s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 188s returns exit status 0 and display an information message 188s when using `--stop-server` option 188s returns exit status 0 and display a warning message 188s when using `--server-status` option 188s returns exit status 0 and display an information message 188s when using `--no-server` option 188s returns exit status 0 188s when using `--start-server` option 188s returns exit status 0 and display an information message 188s when using exclusive `--server-status` option 188s returns exit status 2 and display an error message 188s when using multiple server options 188s returns exit status 2 and display an error message 188s when not using any server options and specifying `--server` in .rubocop file 188s returns exit status 0 and display an information message 188s when using exclusive `--restart-server` option 188s returns exit status 2 and display an error message 188s when using exclusive `--start-server` option 188s returns exit status 2 and display an error message 188s when using `--restart-server` option 189s returns exit status 0 and display an information and a warning messages 189s 189s RuboCop::Cop::Lint::FormatParameterMismatch 189s accepts an extra argument for dynamic width 189s registers an offense when calling Kernel.format and the fields do not match 189s does not register an offense when single argument is not an array 189s constants do not register offenses 189s finds faults even when the string looks like a HEREDOC 189s registers an offense when calling Kernel.sprintf and the fields do not match 189s correctly parses different sprintf formats 189s does not register an offense when using named parameters with escaped `%` 189s does not register an offense argument is the result of a message send 189s correctly ignores double percent 189s registers an offense for String#% 189s ignores percent right next to format string 189s registers an offense if extra argument for dynamic width not given 189s identifies correctly digits for spacing in format 189s does not register an offense when arguments and fields match 189s does not register an offense when single argument is a hash 189s does not register an offense for format with splat argument 189s does not register offense for `String#%` when arguments, fields match 189s accepts an extra arg for dynamic width with other preceding flags 189s registers an offense when there are more arguments than expected 189s registers offense with sprintf 189s does not register an offense when using named parameters 189s registers an offense when there are less arguments than expected 189s does not register an offense for sprintf with splat argument 189s behaves like variables 189s does not register an offense for % called on a variable 189s does not register an offense for format called on a variable 189s does not register an offense for format called on a variable 189s behaves like variables 189s does not register an offense for % called on a variable 189s does not register an offense for format called on a variable 189s does not register an offense for format called on a variable 189s behaves like variables 189s does not register an offense for format called on a variable 189s does not register an offense for % called on a variable 189s does not register an offense for format called on a variable 189s behaves like variables 189s does not register an offense for format called on a variable 189s does not register an offense for format called on a variable 189s does not register an offense for % called on a variable 189s when multiple arguments are called for 189s and a single send node is passed 189s does not register an offense 189s and a single variable argument is passed 189s does not register an offense 189s when using (digit)$ flag 189s does not register an offense 189s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 189s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 189s behaves like variables 189s does not register an offense for format called on a variable 189s does not register an offense for % called on a variable 189s does not register an offense for format called on a variable 189s when argument itself contains format characters and formats in format string and argument are not equal 189s ignores argument formatting 189s when passed an empty array 189s does not register an offense 189s when format is invalid 189s registers an offense 189s on format with %<> interpolations 189s and multiple arguments 189s registers an offense 189s and 1 argument 189s does not register an offense 189s when splat argument is present 189s does not register an offense when args count is less than expected 189s when args count is more than expected 189s does not register an offense for `#sprintf` 189s does not register an offense for `#format` 189s registers an offense for `#%` 189s with wildcard 189s does not register an offense for multiple wildcards 189s does not register an offense for width and precision 189s does not register an offense for width 189s does not register an offense for precision 189s when format is not a string literal 189s does not register an offense 189s on format with %{} interpolations 189s and multiple arguments 189s registers an offense 189s and 1 argument 189s does not register an offense 189s 189s RuboCop::Cop::Style::MapCompactWithConditionalBlock 189s With single line block 189s registers an offense and corrects to `reject` with modifier form of `unless` condition 189s does not register offenses if `compact` is not chained to `map` 189s registers an offense and corrects to `select` with modifier form of `if` condition 189s registers an offense and corrects to `select` with ternary expression 189s registers an offense and corrects to `reject` with ternary expression 189s With multiline block 189s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 189s registers an offense and corrects to `reject` with `unless` condition 189s does not register offenses if condition has elsif branch 189s registers an offense and corrects to `reject` with `if` condition 189s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 189s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 189s registers an offense and corrects to `select` with modifier form of `if` condition 189s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 189s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 189s does not register offenses if return value is not same as block argument 189s registers an offense and corrects to `select` with multi-line `if` condition 189s registers an offense and corrects to `select` with guard clause of `if` 189s does not register offenses if `compact` is not chained to `map` 189s registers an offense and corrects to `select` with ternary expression 189s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 189s registers an offense and corrects to `reject` with guard clause of `unless` 189s registers an offense and corrects to `reject` with ternary expression 189s registers an offense and corrects to `select` with `if` condition 189s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 189s does not register offenses if there are multiple guard clauses 189s registers an offense and corrects to `reject` with modifier form of `unless` condition 189s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 189s registers an offense and corrects to `select` if condition has not else branch 189s 189s RuboCop::Server::Cache 189s .pid_running? 189s works properly when concurrency with server stopping and cleaning cache dir 189s .cache_path 189s when `RUBOCOP_CACHE_ROOT` environment variable is set 189s when cache root path is specified path 189s contains the root from cache root path 189s when cache root path is not specified path 189s contains the root from `RUBOCOP_CACHE_ROOT` 189s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 189s contains the root from `RUBOCOP_CACHE_ROOT` 189s when ERB pre-processing of the configuration file 189s when cache root path is not specified path 189s does not raise an error 189s when `CacheRootDirectory` configure value is set 189s when cache root path is specified path 189s contains the root from cache root path 189s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 189s contains the root from `CacheRootDirectory` configure value 189s when cache root path is not specified path 189s contains the root from `CacheRootDirectory` configure value 189s when `XDG_CACHE_HOME` environment variable is set 189s when cache root path is specified path 189s contains the root from cache root path 189s when cache root path is not specified path 189s contains the root from `XDG_CACHE_HOME` 189s when cache root path is not specified as default 189s is the default path 189s when cache root path is specified path 189s is the specified path 189s when .rubocop.yml is empty 189s when cache root path is not specified path 189s does not raise an error 189s 189s RuboCop::Cop::Style::StderrPuts 189s registers no offense when using `STDERR.puts` with no arguments 189s registers no offense when using `$stderr.puts` with no arguments 189s registers an offense when using `$stderr.puts('hello')` 189s registers an offense when using `STDERR.puts('hello')` 189s registers an offense when using `::STDERR.puts('hello')` 189s 189s RuboCop::Cop::Style::NumberedParameters 189s >= Ruby 2.7 189s EnforcedStyle: disallow 189s does an offense when using numbered parameters even with single-line blocks 189s EnforcedStyle: allow_single_line 189s does not register an offense when using numbered parameters with single-line blocks 189s registers an offense when using numbered parameters with multi-line blocks 189s 189s RuboCop::Cop::Metrics::BlockNesting 189s accepts `Max` levels of nesting 189s accepts if/elsif 189s when CountBlocks is false 189s accepts nested inline blocks 189s accepts nested multiline blocks 189s nested modifier `until` 189s registers an offense 189s nested `until` 189s registers an offense 189s nested modifier `while` 189s registers an offense 189s `Max + 2` levels of `if` nesting 189s registers an offense 189s when CountBlocks is true 189s nested inline block 189s registers an offense 189s nested multiline block 189s registers an offense 189s nested `rescue` 189s registers an offense 189s Multiple nested `ifs` at same level 189s registers 2 offenses 189s `Max + 1` levels of `if` nesting 189s registers an offense 189s nested `for` 189s registers an offense 189s nested `while` 189s registers an offense 189s nested `case` 189s registers an offense 189s 189s RuboCop::Cop::Lint::UnusedMethodArgument 189s when IgnoreEmptyMethods config parameter is set 189s accepts an empty method with a single unused parameter 189s accepts an empty method with multiple unused parameters 189s registers an offense for a non-empty method with a single unused parameter 189s registers an offense for a non-empty method with multiple unused parameters 189s accepts an empty singleton method with a single unused parameter 189s when IgnoreNotImplementedMethods config parameter is set 189s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 189s accepts a method with a single unused parameter & fails without message 189s accepts a method with a single unused parameter & raises NotImplementedError, message 189s registers an offense for a non-empty method with a single unused parameter 189s accepts a method with a single unused parameter & raises ::NotImplementedError 189s accepts a method with a single unused parameter & raises NotImplementedError 189s registers an offense for a non-empty method with multiple unused parameters 189s accepts a method with a single unused parameter & fails with message 189s accepts an empty method with multiple unused parameters 189s inspection 189s in a method calling `binding` with arguments 189s when a method argument is unused 189s registers an offense 189s when a method takes multiple arguments 189s and an argument is unused 189s registers an offense and adds underscore-prefix 189s and one argument is assigned to another, whilst other's value is not used 189s registers an offense 189s and there is some whitespace around the unused argument 189s registers an offense and preserves whitespace 189s and arguments are swap-assigned 189s accepts 189s and all the arguments are unused 189s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 189s when a required keyword argument is unused 189s when a required keyword argument is unused 189s registers an offense but does not suggest underscore-prefix 189s in a method calling `super` without arguments 189s when a method argument is not used explicitly 189s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 189s when a trailing block argument is unused 189s registers an offense and removes the unused block arg 189s when a variable is unused 189s does not care 189s when an underscore-prefixed method argument is unused 189s accepts 189s when an optional keyword argument is unused 189s registers an offense but does not suggest underscore-prefix 189s and AllowUnusedKeywordArguments set 189s does not care 189s in a method calling `binding` without arguments 189s accepts all arguments 189s inside another method definition 189s registers offenses 189s when a block argument is unused 189s does not care 189s in a method calling `super` with arguments 189s when a method argument is unused 189s registers an offense 189s when a method argument is used 189s accepts 189s when an argument with a default value is unused 189s registers an offense and preserves the default value 189s when a splat argument is unused 189s registers an offense and preserves the splat 189s when a singleton method argument is unused 189s registers an offense 189s 189s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 189s does not register an offense when boolean expressions are wrapped in parens 189s corrects a super long expression in precedence order 189s does not register an offense when expressions are wrapped in parentheses by precedence 189s does not register an offense when all operators in the expression have the same precedence 189s allows an operator with `and` 189s registers an offense for expressions containing booleans and operators 189s registers an offense when the entire expression is wrapped in parentheses 189s corrects a super long expression in reverse precedence order 189s registers an offense when an expression with mixed precedence has no parens 189s registers an offense when an expression with mixed boolean operators has no parens 189s does not register an offense when expressions are wrapped in parentheses by reverse precedence 189s allows an operator with `or` 189s does not register an offense when there is only one operator in the expression 189s 189s RuboCop::Cop::Style::RedundantArgument 189s does not register an offense when method called with different argument 189s works with double-quoted strings when configuration is single-quotes 189s does not register an offense when method called with more than one arguments 189s registers an offense and corrects when method called on literals 189s does not register an offense when method called with no receiver 189s registers an offense and corrects when method called without parenthesis on variable 189s registers an offense and corrects when method called on variable 189s does not register an offense when method called with no arguments 189s registers an offense and corrects when method called without parenthesis on literals 189s non-builtin method 189s registers an offense and corrects with configured argument 189s does not register an offense with other argument 189s 189s RuboCop::Cop::Style::TernaryParentheses 189s configured for parentheses on complex and there are no parens 189s with an assignment condition 189s registers an offense for equality check 189s accepts safe assignment 189s with complex condition 189s registers an offense for comparison with multiplication 189s registers an offense for boolean expression with inner parens 189s registers an offense for subtraction expression 189s registers an offense for comparison 189s registers an offense for arithmetic and equality check 189s registers an offense for compound boolean expression 189s registers an offense for comparison with method call on receiver 189s registers an offense comparison with exponentiation 189s registers an offense for addition expression 189s registers an offense for boolean expression 189s when configured to enforce parentheses inclusion 189s with a complex condition 189s registers an offense for defined? with variable in condition 189s registers an offense for equality check 189s registers an offense for boolean expression containing parens 189s registers an offense for defined? with class method in condition 189s registers an offense for negated condition 189s registers an offense for boolean expression using keyword 189s registers an offense for defined? with method chain in condition 189s registers an offense for arithmetic condition 189s registers an offense for defined? with nested constant in condition 189s registers an offense when calling method on a receiver 189s registers an offense for boolean expression 189s with a simple condition 189s registers an offense for accessor in condition 189s registers an offense for yield in condition 189s registers an offense for query method in condition 189s with an assignment condition 189s accepts safe assignment in condition 189s registers an offense for double assignment 189s registers an offense for triple assignment 189s registers an offense for double assignment with equality check in condition 189s when configured to enforce parentheses omission 189s accepts condition including a range 189s with a complex condition 189s registers an offense for equality check 189s registers an offense for defined with variable in condition 189s registers an offense for arithmetic expression 189s registers an offense for defined with class method in condition 189s registers an offense for defined with method chain in condition 189s registers an offense for negated condition 189s registers an offense for defined with nested constant in condition 189s accepts parens around inner boolean expression 189s registers an offense for query method on object 189s registers an offense for boolean expression 189s registers an offense for boolean expression using keyword 189s with an unparenthesized method call condition 189s registers an offense when calling method with a parameter 189s registers an offense for defined check 189s when calling method on a constant receiver 189s registers an offense 189s when calling method on a receiver 189s registers an offense 189s when calling method on a literal receiver 189s registers an offense 189s when calling method with multiple arguments 189s registers an offense 189s with a simple condition 189s registers an offense for multi-line boolean expression 189s registers an offense for yield in condition 189s accepts multi-line boolean expression starting on following line 189s registers an offense for query method in condition 189s registers an offense for accessor in condition 189s with no space between the parentheses and question mark 189s registers an offense 189s with one line pattern matching 189s does not register an offense 189s with an assignment condition 189s accepts double safe assignment 189s registers an offense for equality check 189s accepts safe assignment 189s accepts safe assignment as part of multiple assignment 189s behaves like safe assignment disabled 189s registers an offense for parens around assignment 189s registers an offense for parens around outer assignment 189s registers an offense for parens around inner assignment 189s with one line pattern matching 189s does not register an offense 189s configured for parentheses on complex and there are parens 189s accepts condition including a range 189s with a simple condition 189s registers an offense for accessor in condition 189s registers an offense for yield in condition 189s registers an offense with preceding boolean keyword expression 189s registers an offense for query method in condition 189s registers an offense for save navigation 189s with method call condition 189s registers an offense for defined check 189s registers an offense when calling method on a receiver 189s registers an offense when calling method with a parameter 189s without accessor in method call parameters 189s registers an offense for array include? without parens 189s registers an offense for array include? with parens 189s with accessor in method call parameters 189s registers an offense for array include? without parens 189s registers an offense for array include? with multiple parameters without parens 189s registers an offense for array include? with multiple parameters with parens 189s with a complex condition 189s accepts boolean expression using keywords 189s registers an offense when calling method on a receiver 189s registers an offense for defined with variable in condition 189s registers an offense for defined with class method in condition 189s registers an offense for defined with nested constant in condition 189s accepts boolean expression 189s registers an offense for defined with method chain in condition 189s with an assignment condition 189s accepts safe assignment as part of multiple assignment 189s accepts accepts safe multiple assignment 189s accepts equality check 189s accepts safe assignment 189s behaves like safe assignment disabled 189s registers an offense for parens around inner assignment 189s registers an offense for parens around assignment 189s registers an offense for parens around outer assignment 189s 189s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 189s when a method argument has same name as an outer scope variable 189s does not register an offense 189s when a block argument has same name "_" as outer scope variable "_" 189s does not register an offense 189s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 189s registers an offense 189s when a block argument has different name with outer scope variables 189s does not register an offense 189s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 189s registers an offense 189s when a block argument has same name as an outer scope variable 189s registers an offense 189s when a block local variable has same name as an outer scope variable 189s registers an offense 189s when a block block argument has same name as an outer scope variable 189s registers an offense 189s when a splat block argument has same name as an outer scope variable 189s registers an offense 189s 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 189s registers an offense 189s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 189s does not register an offense 189s when a block argument has a same name starts with "_" as an outer scope variable 189s does not register an offense 189s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 189s registers an offense 189s when the same variable name as a block variable is used in return value assignment of `if` 189s does not register an offense 189s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 189s does not register an offense 189s with Ractor.new 189s does not register an offense 189s when an outer scope variable is referenced in a block 189s does not register an offense 189s when multiple block arguments have a same name starts with "_" 189s does not register an offense 189s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 189s registers an offense 189s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 189s does not register an offense 189s when an outer scope variable is reassigned in a block 189s does not register an offense 189s when multiple block arguments have same name "_" 189s does not register an offense 189s 189s RuboCop::Cop::Lint::TopLevelReturnWithArgument 189s Code segment with inline if along with top-level return 189s expects no offense from the return without arguments 189s expects multiple offense from the return with arguments 189s Code segment with only top-level return statement 189s expects offense from the return with arguments 189s expects no offense from the return without arguments 189s expects multiple offenses from the return with arguments statements 189s Code segment containing semi-colon separated statements 189s expects no offense from the return with arguments and multi-line code 189s expects an offense from the return with arguments and multi-line code 189s Code segment with block level returns other than the top-level return 189s expects no offense from the return without arguments 189s expects offense from the return with arguments 189s Code segment with method-level return statements 189s expects offense when method-level & top-level return co-exist 189s 189s RuboCop::Cop::Style::StringLiterals 189s when configured with a bad value 189s fails 189s when ConsistentQuotesInMultiline is true 189s and EnforcedStyle is double_quotes 189s registers an offense for mixed quote styles in a continued string 189s accepts continued strings using all double quotes 189s registers an offense for unneeded single quotes in continuation 189s doesn't register offense for single quotes with embedded double 189s and EnforcedStyle is single_quotes 189s registers an offense for unneeded double quotes in continuation 189s registers an offense for strings with line breaks in them 189s doesn't register offense for double quotes with interpolation 189s accepts for double quotes with an escaped normal character 189s doesn't choke on heredocs with inconsistent indentation 189s accepts continued strings using all single quotes 189s doesn't register offense for double quotes with embedded single 189s registers an offense for mixed quote styles in a continued string 189s accepts for double quotes with an escaped special character 189s configured with double quotes preferred 189s accepts single quotes in string with escaped non-' character 189s registers offense for opposite + correct 189s accepts ' in a %w 189s accepts heredocs 189s accepts single quoted string with backslash 189s accepts single quotes in interpolation 189s accepts %q and %Q quotes 189s flags single quotes with plain # (not #@var or #{interpolation} or #$global 189s accepts % quotes 189s accepts single quotes when they are needed 189s accepts escaped single quote in string with escaped non-' character 189s can handle a built-in constant parsed as string 189s registers offense for escaped single quote in single quotes 189s accepts single quotes at the start of regexp literals 189s registers offense for single quotes when double quotes would be equivalent 189s accepts double quotes 189s does not accept multiple escaped single quotes in single quotes 189s configured with single quotes preferred 189s detects unneeded double quotes within concatenated string 189s accepts heredocs 189s accepts double quotes when unicode control sequence is used 189s accepts double quotes when single quotes are used 189s accepts %q and %Q quotes 189s accepts single quotes in interpolation 189s registers an offense for words with non-ascii chars 189s can handle character literals 189s accepts single quotes 189s accepts double quotes when interpolating an instance variable 189s registers offense for correct + opposite 189s accepts " in a %w 189s can handle a built-in constant parsed as string 189s accepts double quotes with some other special symbols 189s accepts double quotes when control characters are used 189s accepts % quotes 189s accepts \\\n in a string 189s registers an offense for "\" 189s accepts double quotes at the start of regexp literals 189s accepts double quotes in interpolation 189s accepts double quotes when interpolating a class variable 189s accepts double quotes when new line is used 189s registers an offense for "\"" 189s registers offense for double quotes when single quotes suffice 189s does not register an offense for words with non-ascii chars and other control sequences 189s accepts double quotes when interpolating & quotes in multiple lines 189s accepts double quotes when interpolating a global variable 189s 189s RuboCop::Cop::Style::StringMethods 189s registers an offense 189s when using safe navigation operator 189s registers an offense 189s 189s RuboCop::Cop::Style::NestedFileDirname 189s Ruby >= 3.1 189s registers and corrects an offense when using `File.dirname(path)` nested three times 189s does not register an offense when using non nested `File.dirname(path)` 189s does not register an offense when using `File.dirname(path, 2)` 189s registers and corrects an offense when using `File.dirname(path)` nested two times 189s Ruby <= 3.0 189s does not register an offense when using `File.dirname(path)` nested two times 189s 189s RuboCop::Cop::Naming::MemoizedInstanceVariableName 189s does not register an offense when or-assignment-based memoization is used outside a method definition 189s EnforcedStyleForLeadingUnderscores: optional 189s when or-assignment-based memoization is used 189s memoized variable matches method name 189s does not register an offense without a leading underscore 189s does not register an offense with a leading underscore 189s does not register an offense with a leading `_` for method name 189s does not register an offense with a leading `_` for both names 189s when defined?-based memoization is used 189s memoized variable matches method name 189s does not register an offense with a leading underscore 189s does not register an offense with a leading `_` for method name 189s does not register an offense with a leading `_` for both names 189s does not register an offense without a leading underscore 189s with default EnforcedStyleForLeadingUnderscores => disallowed 189s when or-assignment-based memoization is used 189s memoized variable does not match method name 189s registers an offense 189s memoized variable does not match method name for block 189s registers an offense 189s memoized variable matches method name 189s does not register an offense when method has leading `_` 189s does not register an offense with a leading `_` for both names 189s does not register an offense 189s memoized variable matches method name for block 189s does not register an offense 189s code follows memoized variable assignment 189s does not register an offense 189s instance variables in initialize methods 189s does not register an offense 189s memoized variable after other code 189s does not register an offense 189s memoized variable matches bang method name 189s does not register an offense 189s non-memoized variable does not match method name 189s does not register an offense 189s memoized variable matches predicate method name 189s does not register an offense 189s memoized variable matches method name during assignment 189s does not register an offense 189s memoized variable does not match class method name 189s registers an offense 189s memoized variable after other code does not match method name 189s registers an offense 189s registers an offense for a predicate method 189s registers an offense for a bang method 189s with dynamically defined methods 189s when a method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when the variable name does not match the method name 189s registers an offense 189s when a singleton method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when the variable name matches the method name 189s does not register an offense 189s memoized variable does not match method name during assignment 189s registers an offense 189s when defined?-based memoization is used 189s does not register an offense when some code after assignment 189s does not register an offense when some code before defined 189s registers an offense when memoized variable does not match class method name 189s does not register an offense when there is no assignment 189s registers an offense when memoized variable does not match method name 189s with dynamically defined methods 189s when a method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when the variable name does not match the method name 189s registers an offense 189s when the variable name matches the method name 189s does not register an offense 189s when a singleton method is defined inside a module callback 189s when the method matches 189s does not register an offense 189s when the method does not match 189s registers an offense 189s memoized variable matches method name 189s does not register an offense when memoized variable matches predicate method name 189s does not register an offense with a leading `_` for both names 189s does not register an offense when memoized variable matches bang method name 189s does not register an offense when method has leading `_` 189s does not register an offense 189s non-memoized variable does not match method name 189s does not register an offense 189s EnforcedStyleForLeadingUnderscores: required 189s when or-assignment-based memoization is used 189s does not register an offense with a leading `_` for both names 189s registers an offense when names match but missing a leading _ 189s registers an offense when it has leading `_` but names do not match 189s with dynamically defined methods 189s when the variable name matches the method name 189s does not register an offense 189s when the variable name does not match the method name 189s registers an offense 189s when a singleton method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when a method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when defined?-based memoization is used 189s does not register an offense with a leading `_` for both names 189s registers an offense when names match but missing a leading _ 189s registers an offense when it has leading `_` but names do not match 189s with dynamically defined methods 189s when the variable name does not match the method name 189s registers an offense 189s when the variable name matches the method name 189s does not register an offense 189s when a singleton method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s when a method is defined inside a module callback 189s when the method does not match 189s registers an offense 189s when the method matches 189s does not register an offense 189s 189s RuboCop::Cop::Style::RedundantException 189s reports an offense for a raise with ::RuntimeError and () 189s accepts rescue w/ non redundant error 189s reports an offense for a fail with RuntimeError.new 189s reports an offense for a fail with RuntimeError 189s reports an offense for a raise with ::RuntimeError 189s accepts a fail with RuntimeError if it does not have 2 args 189s accepts rescue w/ non redundant error 189s reports an offense for a fail with RuntimeError and () 189s reports an offense for a fail with ::RuntimeError.new 189s reports an offense for a raise with RuntimeError 189s accepts rescue w/ non redundant error 189s accepts a fail with ::RuntimeError if it does not have 2 args 189s reports an offense for a raise with ::RuntimeError.new 189s accepts a raise with RuntimeError if it does not have 2 args 189s reports an offense for a raise with ::RuntimeError.new 189s reports an offense for a raise with RuntimeError.new 189s reports an offense for a raise with RuntimeError.new 189s accepts a raise with ::RuntimeError if it does not have 2 args 189s reports an offense for a fail with ::RuntimeError 189s accepts rescue w/ non redundant error 189s reports an offense for a fail with RuntimeError.new 189s reports an offense for a fail with ::RuntimeError.new 189s reports an offense for a raise with RuntimeError and () 189s reports an offense for a fail with ::RuntimeError and () 189s 189s RuboCop::Cop::Style::RedundantFetchBlock 189s with SafeForConstants: false 189s does not register an offense when using `#fetch` with constant in the block 189s with SafeForConstants: true 189s does not register an offense when using `#fetch` with argument fallback 189s does not register an offense when using `#fetch` with `Rails.cache` 189s registers an offense and corrects when using `#fetch` with Integer in the block 189s registers an offense and corrects when using `#fetch` with Symbol in the block 189s registers an offense and corrects when using `#fetch` with Rational in the block 189s does not register an offense when using `#fetch` with an argument in the block 189s registers an offense and corrects when using `#fetch` with Float in the block 189s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 189s does not register an offense when using `#fetch` with String in the block and strings are not frozen 189s registers an offense and corrects when using `#fetch` with empty block 189s registers an offense and corrects when using `#fetch` with Complex in the block 189s registers an offense and corrects when using `#fetch` with constant in the block 189s does not register an offense when using `#fetch` with interpolated Symbol in the block 189s 189s RuboCop::Cop::Layout::BlockAlignment 189s registers an offense for mismatched block end with an op-asgn (+=, -=) 189s accepts end aligned with a global variable 189s accepts a block end that does not begin its line 189s accepts end aligned with the block when the block is a method argument 189s registers an offense for mismatched block end with a class variable 189s accepts end aligned with a variable 189s accepts end aligned with a mass assignment 189s does not raise an error for nested block in a method call 189s registers an offense for mismatched end with a method call with arguments 189s accepts end aligned with a method call with arguments 189s accepts end aligned with a class variable 189s registers an offense for mismatched block end with a variable 189s registers an offense for mismatched block end with an instance variable 189s registers an offense for mismatched block end with a mass assignment 189s accepts end aligned with a method call 189s accepts end aligned with an op-asgn (+=, -=) 189s accepts end aligned with an instance variable 189s registers an offense for mismatched block end with an and-asgn (&&=) 189s accepts end aligned with an or-asgn (||=) 189s accepts end aligned with an and-asgn (&&=) 189s registers an offense for mismatched block end with an or-asgn (||=) 189s registers an offense for mismatched block end with a global variable 189s registers an offense for mismatched block end with a constant 189s accepts end aligned with a constant 189s registers an offense for mismatched block end with a method call 189s registers an offense for mismatched end not aligned with the block that is an argument 189s accepts end aligned with a call chain left hand side 189s on a splatted method call 189s registers an offense and corrects misaligned end braces 189s aligns end with the splat operator 189s when the method part is a call chain that spans several lines 189s accepts two kinds of end alignment 189s accepts pretty alignment style 189s registers offenses for misaligned ends 189s accepts end indented as the start of the block 189s when the block is defined on the next line 189s accepts end aligned with the block expression 189s registers an offenses for mismatched end alignment 189s when the block is a logical operand 189s accepts a correctly aligned block end 189s on an arithmetically negated method call 189s aligns end with the - operator 189s registers an offense and corrects 189s when there is an assignment chain 189s registers an offense for an end aligned with the 2nd variable 189s accepts end aligned with the first variable 189s when the block is terminated by } 189s mentions } (not end) in the message 189s when configured to align with start_of_line 189s errors when do aligned 189s allows when start_of_line aligned 189s on a logically negated method call 189s registers an offense and corrects 189s aligns end with the ! operator 189s and the block is an operand 189s accepts end aligned with a variable 189s when multiple similar-looking blocks have misaligned ends 189s registers an offense for each of them 189s when variables of a mass assignment spans several lines 190s accepts end aligned with the variables 190s registers an offense for end aligned with the block 190s on a bit-flipped method call 190s aligns end with the ~ operator 190s registers an offense and corrects misaligned end brace 190s when the block has arguments 190s registers an offense for mismatched block end 190s when configured to align with do 190s allows when do aligned 190s errors when start_of_line aligned 190s when the block has no arguments 190s registers an offense for mismatched block end 190s Ruby 2.7 190s accepts end aligned with a call chain left hand side 190s registers an offense for mismatched block end with a mass assignment 190s 190s RuboCop::Cop::Style::EmptyHeredoc 190s registers an offense when using empty heredoc argument with other argument 190s registers an offense when using empty `<= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to keyword 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s corrects comparison methods in case when 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s behaves like comparison methods 190s registers an offense for comparison methods in ternary operations 190s with end alignment to keyword 190s corrects comparison methods in if elsif else 190s corrects comparison methods in unless else 190s corrects comparison methods in case when 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to start_of_line 190s corrects comparison methods in case when 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s IncludeTernaryExpressions false 190s allows assignment in ternary operation 190s behaves like all variable types 190s allows assignment to the return of case when 190s registers an offense assigning any variable type in case when 190s allows assignment to the return of if else 190s registers an offense assigning any variable type in ternary 190s allows assignment to the return of a ternary 190s registers an offense assigning any variable type in if else 190s behaves like all assignment types 190s for a instance variable lval 190s registers an offense for assignment using &= in ternary 190s for a global variable lval 190s registers an offense for assignment using &= in ternary 190s for a local variable lval 190s registers an offense for assignment using &= in ternary 190s with end alignment to keyword 190s for a instance variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a class variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a constant lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a global variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a local variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a constant lval 190s registers an offense for assignment using &= in ternary 190s for a class variable lval 190s registers an offense for assignment using &= in ternary 190s with end alignment to start_of_line 190s for a local variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a class variable lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a instance variable lval 190s registers an offense for assignment using &= in if else 190s registers an offense for assignment using &= in case when 190s for a constant lval 190s registers an offense for assignment using &= in case when 190s registers an offense for assignment using &= in if else 190s for a global variable lval 190s registers an offense for assignment using &= in if else 190s registers an offense for assignment using &= in case when 190s behaves like comparison methods 190s registers an offense for comparison methods in ternary operations 190s with end alignment to keyword 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s corrects comparison methods in case when 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to start_of_line 190s corrects comparison methods in case when 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s EndAlignment configured to start_of_line 190s autocorrect 190s uses proper end alignment in unless 190s uses proper end alignment in case 190s uses proper end alignment in if 190s behaves like all assignment types 190s for a local variable lval 190s registers an offense for assignment using += in ternary 190s for a global variable lval 190s registers an offense for assignment using += in ternary 190s for a class variable lval 190s registers an offense for assignment using += in ternary 190s with end alignment to keyword 190s for a global variable lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a class variable lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a instance variable lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a local variable lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a constant lval 190s registers an offense for assignment using += in if else 190s registers an offense for assignment using += in case when 190s with end alignment to start_of_line 190s for a constant lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a local variable lval 190s registers an offense for assignment using += in if else 190s registers an offense for assignment using += in case when 190s for a instance variable lval 190s registers an offense for assignment using += in if else 190s registers an offense for assignment using += in case when 190s for a class variable lval 190s registers an offense for assignment using += in case when 190s registers an offense for assignment using += in if else 190s for a global variable lval 190s registers an offense for assignment using += in if else 190s registers an offense for assignment using += in case when 190s for a instance variable lval 190s registers an offense for assignment using += in ternary 190s for a constant lval 190s registers an offense for assignment using += in ternary 190s assignment as the last statement 190s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 190s allows multiple assignment in if elsif else 190s allows variable assignment in case when else with more than variable assignment 190s allows variable assignment in unless else with more than variable assignment 190s allows multiple assignments in case when if there are uniq variables in the when branches 190s allows more than variable assignment in if elsif else 190s allows multiple assignments in case when with multiple whens 190s allows multiple assignment in unless else 190s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 190s allows more than variable assignment in if else 190s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 190s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 190s allows multiple assignments in case when with only one when 190s allows multiple assignment in if elsif elsif else 190s allows multiple assignment in if else 190s behaves like allows out of order multiple assignment in if elsif else 190s allows out of order multiple assignment in if elsif else 190s multiple assignment in only one branch 190s allows multiple assignment is in if 190s does not register an offense when multiple assignment is in else 190s allows multiple assignment is in elsif 190s behaves like all variable types 190s registers an offense assigning any variable type in if else 190s registers an offense assigning any variable type in ternary 190s allows assignment to the return of case when 190s allows assignment to the return of a ternary 190s registers an offense assigning any variable type in case when 190s allows assignment to the return of if else 190s autocorrect 190s corrects =~ in ternary operations 190s preserves comments during correction in if else 190s corrects assignment to unbracketed array in if else 190s preserves comments during correction in case when else 190s multiple assignment 190s does not register an offense in case when 190s does not register an offense in if else 190s self.attribute= assignment 190s corrects if..else 190s with different receivers 190s doesn't register an offense 190s assignment from a method 190s corrects case when 190s corrects unless else 190s corrects if else 190s constant assignment 190s corrects if..else with top-level constant 190s corrects if..else with namespaced constant 190s aref assignment 190s corrects if..else 190s with different indices 190s doesn't register an offense 190s behaves like all variable types 190s allows assignment to the return of case when 190s registers an offense assigning any variable type in case when 190s allows assignment to the return of if else 190s registers an offense assigning any variable type in ternary 190s registers an offense assigning any variable type in if else 190s allows assignment to the return of a ternary 190s correction would exceed max line length 190s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 190s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 190s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 190s behaves like all variable types 190s registers an offense assigning any variable type in if else 190s allows assignment to the return of a ternary 190s allows assignment to the return of if else 190s registers an offense assigning any variable type in case when 190s registers an offense assigning any variable type in ternary 190s allows assignment to the return of case when 190s behaves like comparison methods 190s registers an offense for comparison methods in ternary operations 190s with end alignment to keyword 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s corrects comparison methods in case when 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to start_of_line 190s corrects comparison methods in unless else 190s corrects comparison methods in case when 190s corrects comparison methods in if elsif else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s behaves like all variable types 190s allows assignment to the return of a ternary 190s allows assignment to the return of case when 190s allows assignment to the return of if else 190s registers an offense assigning any variable type in case when 190s registers an offense assigning any variable type in ternary 190s registers an offense assigning any variable type in if else 190s behaves like all variable types 190s allows assignment to the return of a ternary 190s registers an offense assigning any variable type in case when 190s allows assignment to the return of case when 190s allows assignment to the return of if else 190s registers an offense assigning any variable type in ternary 190s registers an offense assigning any variable type in if else 190s behaves like all assignment types 190s for a constant lval 190s registers an offense for assignment using ^= in ternary 190s for a local variable lval 190s registers an offense for assignment using ^= in ternary 190s with end alignment to keyword 190s for a constant lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s for a global variable lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s for a local variable lval 190s registers an offense for assignment using ^= in case when 190s registers an offense for assignment using ^= in if else 190s for a class variable lval 190s registers an offense for assignment using ^= in case when 190s registers an offense for assignment using ^= in if else 190s for a instance variable lval 190s registers an offense for assignment using ^= in case when 190s registers an offense for assignment using ^= in if else 190s for a class variable lval 190s registers an offense for assignment using ^= in ternary 190s for a instance variable lval 190s registers an offense for assignment using ^= in ternary 190s for a global variable lval 190s registers an offense for assignment using ^= in ternary 190s with end alignment to start_of_line 190s for a constant lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s for a local variable lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s for a class variable lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s for a instance variable lval 190s registers an offense for assignment using ^= in case when 190s registers an offense for assignment using ^= in if else 190s for a global variable lval 190s registers an offense for assignment using ^= in if else 190s registers an offense for assignment using ^= in case when 190s behaves like all assignment types 190s for a class variable lval 190s registers an offense for assignment using = in ternary 190s for a constant lval 190s registers an offense for assignment using = in ternary 190s with end alignment to start_of_line 190s for a constant lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a instance variable lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a class variable lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a global variable lval 190s registers an offense for assignment using = in case when 190s registers an offense for assignment using = in if else 190s for a local variable lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a instance variable lval 190s registers an offense for assignment using = in ternary 190s for a global variable lval 190s registers an offense for assignment using = in ternary 190s with end alignment to keyword 190s for a local variable lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a global variable lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a class variable lval 190s registers an offense for assignment using = in case when 190s registers an offense for assignment using = in if else 190s for a constant lval 190s registers an offense for assignment using = in if else 190s registers an offense for assignment using = in case when 190s for a instance variable lval 190s registers an offense for assignment using = in case when 190s registers an offense for assignment using = in if else 190s for a local variable lval 190s registers an offense for assignment using = in ternary 190s behaves like comparison methods 190s registers an offense for comparison methods in ternary operations 190s with end alignment to keyword 190s corrects comparison methods in case when 190s corrects comparison methods in unless else 190s corrects comparison methods in if elsif else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to start_of_line 190s corrects comparison methods in if elsif else 190s corrects comparison methods in case when 190s corrects comparison methods in unless else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s behaves like all variable types 190s allows assignment to the return of a ternary 190s registers an offense assigning any variable type in ternary 190s registers an offense assigning any variable type in if else 190s allows assignment to the return of if else 190s allows assignment to the return of case when 190s registers an offense assigning any variable type in case when 190s behaves like all assignment types 190s with end alignment to keyword 190s for a global variable lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a local variable lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a constant lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a instance variable lval 190s registers an offense for assignment using <<= in case when 190s registers an offense for assignment using <<= in if else 190s for a class variable lval 190s registers an offense for assignment using <<= in case when 190s registers an offense for assignment using <<= in if else 190s for a instance variable lval 190s registers an offense for assignment using <<= in ternary 190s with end alignment to start_of_line 190s for a local variable lval 190s registers an offense for assignment using <<= in case when 190s registers an offense for assignment using <<= in if else 190s for a global variable lval 190s registers an offense for assignment using <<= in case when 190s registers an offense for assignment using <<= in if else 190s for a class variable lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a instance variable lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a constant lval 190s registers an offense for assignment using <<= in if else 190s registers an offense for assignment using <<= in case when 190s for a global variable lval 190s registers an offense for assignment using <<= in ternary 190s for a class variable lval 190s registers an offense for assignment using <<= in ternary 190s for a local variable lval 190s registers an offense for assignment using <<= in ternary 190s for a constant lval 190s registers an offense for assignment using <<= in ternary 190s behaves like all assignment types 190s for a global variable lval 190s registers an offense for assignment using |= in ternary 190s for a instance variable lval 190s registers an offense for assignment using |= in ternary 190s with end alignment to keyword 190s for a global variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a constant lval 190s registers an offense for assignment using |= in case when 190s registers an offense for assignment using |= in if else 190s for a class variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a local variable lval 190s registers an offense for assignment using |= in case when 190s registers an offense for assignment using |= in if else 190s for a instance variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a constant lval 190s registers an offense for assignment using |= in ternary 190s for a class variable lval 190s registers an offense for assignment using |= in ternary 190s with end alignment to start_of_line 190s for a constant lval 190s registers an offense for assignment using |= in case when 190s registers an offense for assignment using |= in if else 190s for a global variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a local variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a class variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a instance variable lval 190s registers an offense for assignment using |= in if else 190s registers an offense for assignment using |= in case when 190s for a local variable lval 190s registers an offense for assignment using |= in ternary 190s behaves like all assignment types 190s for a local variable lval 190s registers an offense for assignment using **= in ternary 190s for a class variable lval 190s registers an offense for assignment using **= in ternary 190s with end alignment to keyword 190s for a instance variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s for a constant lval 190s registers an offense for assignment using **= in case when 190s registers an offense for assignment using **= in if else 190s for a global variable lval 190s registers an offense for assignment using **= in case when 190s registers an offense for assignment using **= in if else 190s for a local variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s for a class variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s for a global variable lval 190s registers an offense for assignment using **= in ternary 190s for a instance variable lval 190s registers an offense for assignment using **= in ternary 190s for a constant lval 190s registers an offense for assignment using **= in ternary 190s with end alignment to start_of_line 190s for a class variable lval 190s registers an offense for assignment using **= in case when 190s registers an offense for assignment using **= in if else 190s for a instance variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s for a global variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s for a constant lval 190s registers an offense for assignment using **= in case when 190s registers an offense for assignment using **= in if else 190s for a local variable lval 190s registers an offense for assignment using **= in if else 190s registers an offense for assignment using **= in case when 190s behaves like comparison methods 190s registers an offense for comparison methods in ternary operations 190s with end alignment to keyword 190s corrects comparison methods in unless else 190s corrects comparison methods in case when 190s corrects comparison methods in if elsif else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s with end alignment to start_of_line 190s corrects comparison methods in case when 190s corrects comparison methods in if elsif else 190s corrects comparison methods in unless else 190s >= Ruby 2.7 190s corrects comparison methods in case in 190s empty branch 190s allows assignment in case when without an else 190s allows case with an empty else 190s allows assignment in if without an else 191s allows an empty if statement 191s allows an empty when branch with an else 191s allows if elsif without else 191s allows an empty elsif statement 191s allows assignment in unless without an else 191s behaves like else followed by new conditional without else 191s allows if elsif else if 191s behaves like all assignment types 191s with end alignment to start_of_line 191s for a local variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a global variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a class variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a constant lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a instance variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a local variable lval 191s registers an offense for assignment using /= in ternary 191s for a class variable lval 191s registers an offense for assignment using /= in ternary 191s with end alignment to keyword 191s for a class variable lval 191s registers an offense for assignment using /= in if else 191s registers an offense for assignment using /= in case when 191s for a instance variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a constant lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a global variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a local variable lval 191s registers an offense for assignment using /= in case when 191s registers an offense for assignment using /= in if else 191s for a instance variable lval 191s registers an offense for assignment using /= in ternary 191s for a constant lval 191s registers an offense for assignment using /= in ternary 191s for a global variable lval 191s registers an offense for assignment using /= in ternary 191s behaves like comparison methods 191s registers an offense for comparison methods in ternary operations 191s with end alignment to keyword 191s corrects comparison methods in if elsif else 191s corrects comparison methods in case when 191s corrects comparison methods in unless else 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s with end alignment to start_of_line 191s corrects comparison methods in unless else 191s corrects comparison methods in if elsif else 191s corrects comparison methods in case when 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s behaves like all assignment types 191s for a global variable lval 191s registers an offense for assignment using *= in ternary 191s for a local variable lval 191s registers an offense for assignment using *= in ternary 191s with end alignment to start_of_line 191s for a local variable lval 191s registers an offense for assignment using *= in if else 191s registers an offense for assignment using *= in case when 191s for a constant lval 191s registers an offense for assignment using *= in if else 191s registers an offense for assignment using *= in case when 191s for a global variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a instance variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a class variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a class variable lval 191s registers an offense for assignment using *= in ternary 191s for a instance variable lval 191s registers an offense for assignment using *= in ternary 191s for a constant lval 191s registers an offense for assignment using *= in ternary 191s with end alignment to keyword 191s for a local variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a constant lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a instance variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a global variable lval 191s registers an offense for assignment using *= in case when 191s registers an offense for assignment using *= in if else 191s for a class variable lval 191s registers an offense for assignment using *= in if else 191s registers an offense for assignment using *= in case when 191s behaves like else followed by new conditional without else 191s allows if elsif else unless 191s behaves like comparison methods 191s registers an offense for comparison methods in ternary operations 191s with end alignment to start_of_line 191s corrects comparison methods in if elsif else 191s corrects comparison methods in unless else 191s corrects comparison methods in case when 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s with end alignment to keyword 191s corrects comparison methods in unless else 191s corrects comparison methods in case when 191s corrects comparison methods in if elsif else 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s behaves like all assignment types 191s for a class variable lval 191s registers an offense for assignment using >>= in ternary 191s for a local variable lval 191s registers an offense for assignment using >>= in ternary 191s for a instance variable lval 191s registers an offense for assignment using >>= in ternary 191s with end alignment to keyword 191s for a local variable lval 191s registers an offense for assignment using >>= in if else 191s registers an offense for assignment using >>= in case when 191s for a class variable lval 191s registers an offense for assignment using >>= in case when 191s registers an offense for assignment using >>= in if else 191s for a global variable lval 191s registers an offense for assignment using >>= in if else 191s registers an offense for assignment using >>= in case when 191s for a instance variable lval 191s registers an offense for assignment using >>= in case when 191s registers an offense for assignment using >>= in if else 191s for a constant lval 191s registers an offense for assignment using >>= in case when 191s registers an offense for assignment using >>= in if else 191s for a constant lval 191s registers an offense for assignment using >>= in ternary 191s with end alignment to start_of_line 191s for a global variable lval 191s registers an offense for assignment using >>= in case when 191s registers an offense for assignment using >>= in if else 191s for a class variable lval 191s registers an offense for assignment using >>= in if else 191s registers an offense for assignment using >>= in case when 191s for a instance variable lval 191s registers an offense for assignment using >>= in if else 191s registers an offense for assignment using >>= in case when 191s for a local variable lval 191s registers an offense for assignment using >>= in if else 191s registers an offense for assignment using >>= in case when 191s for a constant lval 191s registers an offense for assignment using >>= in case when 191s registers an offense for assignment using >>= in if else 191s for a global variable lval 191s registers an offense for assignment using >>= in ternary 191s behaves like all assignment types 191s for a class variable lval 191s registers an offense for assignment using << in ternary 191s for a constant lval 191s registers an offense for assignment using << in ternary 191s with end alignment to keyword 191s for a local variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a class variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a instance variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a constant lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a global variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a instance variable lval 191s registers an offense for assignment using << in ternary 191s for a global variable lval 191s registers an offense for assignment using << in ternary 191s for a local variable lval 191s registers an offense for assignment using << in ternary 191s with end alignment to start_of_line 191s for a local variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a constant lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a instance variable lval 191s registers an offense for assignment using << in case when 191s registers an offense for assignment using << in if else 191s for a global variable lval 191s registers an offense for assignment using << in if else 191s registers an offense for assignment using << in case when 191s for a class variable lval 191s registers an offense for assignment using << in if else 191s registers an offense for assignment using << in case when 191s behaves like comparison methods 191s registers an offense for comparison methods in ternary operations 191s with end alignment to start_of_line 191s corrects comparison methods in unless else 191s corrects comparison methods in case when 191s corrects comparison methods in if elsif else 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s with end alignment to keyword 191s corrects comparison methods in unless else 191s corrects comparison methods in if elsif else 191s corrects comparison methods in case when 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s configured to check conditions with multiple statements 191s allows assignment in multiple branches when it is wrapped in a modifier 191s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 191s autocorrect 191s corrects multiple assignment in unless else 191s corrects multiple assignment in if elsif else with multiple elsifs 191s corrects multiple assignment in case when 191s corrects multiple assignment in if else 191s corrects multiple assignment in case when with multiple whens 191s corrects multiple assignment in if elsif else 191s corrects assignment in an if statement that is nested in unless else 191s assignment as the last statement 191s registers offense for multiple assignment in unless else 191s registers an offense for multiple assignment in if elsif else 191s registers offense for multiple assignments in case when with multiple whens 191s registers offense for multiple assignment in if elsif elsif else 191s registers an offense in if else with more than variable assignment 191s register an offense for multiple assignment in if else 191s registers an offense in if elsif else with more than variable assignment 191s registers an offense in unless else with more than variable assignment 191s registers offense for multiple assignments in case when with only one when 191s registers an offense in case when else with more than variable assignment 191s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 191s multiple assignment in only one branch 191s registers an offense when multiple assignment is in elsif 191s registers an offense when multiple assignment is in if 191s registers an offense when multiple assignment is in else 191s behaves like allows out of order multiple assignment in if elsif else 191s allows out of order multiple assignment in if elsif else 191s behaves like all assignment types 191s with end alignment to keyword 191s for a local variable lval 191s registers an offense for assignment using &&= in case when 191s registers an offense for assignment using &&= in if else 191s for a class variable lval 191s registers an offense for assignment using &&= in case when 191s registers an offense for assignment using &&= in if else 191s for a instance variable lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a constant lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a global variable lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a global variable lval 191s registers an offense for assignment using &&= in ternary 191s with end alignment to start_of_line 191s for a class variable lval 191s registers an offense for assignment using &&= in case when 191s registers an offense for assignment using &&= in if else 191s for a local variable lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a global variable lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a instance variable lval 191s registers an offense for assignment using &&= in case when 191s registers an offense for assignment using &&= in if else 191s for a constant lval 191s registers an offense for assignment using &&= in if else 191s registers an offense for assignment using &&= in case when 191s for a local variable lval 191s registers an offense for assignment using &&= in ternary 191s for a instance variable lval 191s registers an offense for assignment using &&= in ternary 191s for a class variable lval 191s registers an offense for assignment using &&= in ternary 191s for a constant lval 191s registers an offense for assignment using &&= in ternary 191s for if elsif else if else 191s autocorrects the inner offense first 191s autocorrects the outer offense later 191s behaves like comparison methods 191s registers an offense for comparison methods in ternary operations 191s with end alignment to keyword 191s corrects comparison methods in unless else 191s corrects comparison methods in if elsif else 191s corrects comparison methods in case when 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s with end alignment to start_of_line 191s corrects comparison methods in if elsif else 191s corrects comparison methods in unless else 191s corrects comparison methods in case when 191s >= Ruby 2.7 191s corrects comparison methods in case in 191s behaves like all assignment types 191s for a local variable lval 191s registers an offense for assignment using %= in ternary 191s with end alignment to start_of_line 191s for a global variable lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s for a class variable lval 191s registers an offense for assignment using %= in case when 191s registers an offense for assignment using %= in if else 191s for a constant lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s for a local variable lval 191s registers an offense for assignment using %= in case when 191s registers an offense for assignment using %= in if else 191s for a instance variable lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s for a class variable lval 191s registers an offense for assignment using %= in ternary 191s for a instance variable lval 191s registers an offense for assignment using %= in ternary 191s for a global variable lval 191s registers an offense for assignment using %= in ternary 191s for a constant lval 191s registers an offense for assignment using %= in ternary 191s with end alignment to keyword 191s for a class variable lval 191s registers an offense for assignment using %= in case when 191s registers an offense for assignment using %= in if else 191s for a instance variable lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s for a global variable lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s for a constant lval 191s registers an offense for assignment using %= in case when 191s registers an offense for assignment using %= in if else 191s for a local variable lval 191s registers an offense for assignment using %= in if else 191s registers an offense for assignment using %= in case when 191s 191s RuboCop::Cop::Lint::EmptyInterpolation 191s finds interpolations in string-like contexts 191s registers an offense and corrects #{} in interpolation 191s accepts non-empty interpolation 191s registers an offense and corrects #{ } in interpolation 191s 191s RuboCop::Cop::Lint::RegexpAsCondition 191s registers an offense and corrects for a regexp literal in `if` condition 191s does not register an offense for a regexp literal outside conditions 191s does not register an offense for a regexp literal with `=~` operator 191s 191s RuboCop::Cop::Lint::ConstantDefinitionInBlock 191s does not register an offense for a top-level module followed by another statement 191s does not register an offense for a constant with an explicit top-level scope 191s does not register an offense for a constant with an explicit self scope 191s does not register an offense for a top-level module 191s does not register an offense for a constant with an explicit self scope followed by another statement 191s registers an offense for a module defined within a block followed by another statement 191s does not register an offense for a top-level class 191s does not register an offense for a top-level class followed by another statement 191s does not register an offense for a top-level constant 191s registers an offense for a constant defined within a block followed by another statement 191s registers an offense for a class defined within a block followed by another statement 191s does not register an offense for a top-level constant followed by another statement 191s registers an offense for a class defined within a block 191s registers an offense for a module defined within a block 191s does not register an offense for a constant with an explicit top-level scope followed by another statement 191s registers an offense for a constant defined within a block 191s when `AllowedMethods: [enums]` 191s does not register an offense for a module defined within a block of `enums` method 191s does not register an offense for a casign used within a block of `enums` method 191s does not register an offense for a class defined within a block of `enums` method 191s when `AllowedMethods: []` 191s registers an offense for a module defined within a block of `enums` method 191s registers an offense for a casign used within a block of `enums` method 191s registers an offense for a class defined within a block of `enums` method 191s 191s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 191s autocorrects calls that could be empty literals 191s registers an offense for `obj.method ||= func()` 191s registers an offense for parens in method call without args 191s registers an offense for `obj.method += func()` 191s accepts special lambda call syntax 191s registers an offense for `obj.method &&= func()` 191s accepts parens after not 191s accepts parens in method call with args 191s accepts parentheses for methods starting with an upcase letter 191s method call as argument 191s accepts without parens 191s registers an empty parens offense for multiple assignment 191s registers an offense with empty parens 191s when AllowedPatterns is enabled 191s ignores method listed in AllowedMethods 191s assignment to a variable with the same name 191s accepts parens in complex assignment 191s accepts parens in default argument assignment 191s accepts parens in local variable assignment 191s accepts parens in shorthand assignment 191s accepts parens in parallel assignment 191s when AllowedMethods is enabled 191s ignores method listed in AllowedMethods 191s 191s RuboCop::Cop::Layout::RedundantLineBreak 191s when InspectBlocks is false 191s for an expression that does not fit on a single line 191s accepts a method call on a multiple lines 191s with a longer max line length 191s accepts an assignment containing a heredoc 191s accepts a method call followed by binary operations that are too long taken together 191s accepts an assignment containing a method definition 191s accepts method call with a do keyword that would just surpass the max line length 191s accepts a complex method call on a multiple lines 191s registers an offense for a method call with a do keyword that is just under the max line length 191s for a block 191s accepts when it is difficult to convert to single line 191s for a block 191s accepts when the method call has parentheses 191s accepts when the method call has no arguments 191s when Layout/SingleLineBlockChain is disabled 191s accepts a multiline block without a chained method call 191s accepts a method call chained onto a multiline block 191s when Layout/SingleLineBlockChain is enabled 191s accepts a multiline block without a chained method call 191s when Layout/SingleLineBlockChain is disabled 191s reports an offense for a method call chained onto a single line block 191s when Layout/SingleLineBlockChain is enabled 191s accepts a method call chained onto a single line block 191s for an expression that fits on a single line 191s accepts an assignment containing a case expression 191s accepts a method call with a block 191s registers an offense for a method call with a double and single quoted split string 191s registers an offense for a method call on multiple lines inside a block 191s accepts an assignment containing an if expression 191s registers an offense for a method call with a double quoted split string in parentheses 191s accepts a binary expression containing an if expression 191s accepts a method call on a single line 191s registers an offense for a method call as right hand side of an assignment 191s accepts a method call on multiple lines if there are comments on them 191s registers an offense for a method call on multiple lines with backslash 191s registers an offense for a method call with a double quoted split string without parentheses 191s registers an offense for a method call with a single quoted split string 191s registers an offense for a method call with a split operation 191s registers an offense for a method call on multiple lines 191s accepts an assignment containing a begin-end expression 191s with LineLength Max 100 191s registers an offense for a method without parentheses on multiple lines 191s method chains 191s registers an offense and corrects with a string argument on multiple lines 191s registers an offense and corrects with a arguments on multiple lines 191s does not register an offense with a heredoc argument 191s properly corrects a method chain on multiple lines 191s when InspectBlocks is true 191s for a block 191s registers an offense when the method call has no arguments 191s registers an offense when the method call has parentheses 191s when Layout/SingleLineBlockChain is disabled 191s reports an offense for a multiline block without a chained method call 191s reports an offense for a method call chained onto a multiline block 191s when Layout/SingleLineBlockChain is enabled 191s reports an offense for a multiline block without a chained method call 191s for an expression that does not fit on a single line 191s accepts a method call on a multiple lines 191s with a longer max line length 191s accepts an assignment containing a method definition 191s accepts method call with a do keyword that would just surpass the max line length 191s accepts an assignment containing a heredoc 191s registers an offense for a method call with a do keyword that is just under the max line length 191s accepts a method call followed by binary operations that are too long taken together 191s accepts a complex method call on a multiple lines 191s for a block 191s accepts when it is difficult to convert to single line 191s when Layout/SingleLineBlockChain is enabled 191s accepts a method call chained onto a single line block 191s when Layout/SingleLineBlockChain is disabled 191s reports an offense for a method call chained onto a single line block 191s for an expression that fits on a single line 191s registers an offense for a method call with a double quoted split string without parentheses 191s accepts a method call on a single line 191s registers an offense for a method call on multiple lines 191s registers an offense for a method call on multiple lines with backslash 191s registers an offense for a method call as right hand side of an assignment 191s accepts an assignment containing a begin-end expression 191s accepts an assignment containing an if expression 191s registers an offense for a method call on multiple lines inside a block 191s registers an offense for a method call with a single quoted split string 191s registers an offense for a method call with a split operation 191s registers an offense for a method call with a double quoted split string in parentheses 191s accepts a method call with a block 191s accepts a binary expression containing an if expression 191s accepts a method call on multiple lines if there are comments on them 191s registers an offense for a method call with a double and single quoted split string 191s accepts an assignment containing a case expression 191s method chains 191s registers an offense and corrects with a arguments on multiple lines 191s properly corrects a method chain on multiple lines 191s does not register an offense with a heredoc argument 191s registers an offense and corrects with a string argument on multiple lines 191s with LineLength Max 100 191s registers an offense for a method without parentheses on multiple lines 191s 191s RuboCop::Cop::Severity 191s redefines == to compare severities 191s overrides #to_s 191s is frozen 191s has a few required attributes 191s #level 191s refactor 191s is expected to eq 2 191s info 191s is expected to eq 1 191s error 191s is expected to eq 5 191s fatal 191s is expected to eq 6 191s warning 191s is expected to eq 4 191s convention 191s is expected to eq 3 191s #code 191s refactor 191s is expected to eq "R" 191s error 191s is expected to eq "E" 191s warning 191s is expected to eq "W" 191s fatal 191s is expected to eq "F" 191s info 191s is expected to eq "I" 191s convention 191s is expected to eq "C" 191s Comparable 191s info 191s is expected to be < refactor 191s error 191s is expected to be < fatal 191s refactor 191s is expected to be < convention 191s warning 191s is expected to be < error 191s convention 191s is expected to be < warning 191s constructs from code 191s I 191s is expected to eq # 191s R 191s is expected to eq # 191s E 191s is expected to eq # 191s F 191s is expected to eq # 191s C 191s is expected to eq # 191s W 191s is expected to eq # 191s 191s RuboCop::Cop::Style::ClassVars 191s registers an offense for class variable set on class receiver 191s does not register an offense for class variable usage 191s registers an offense for class variable declaration 191s registers an offense for class variable set in class 191s 191s RuboCop::Cop::Lint::DuplicateRescueException 191s registers an offense when multiple duplicate exceptions exist 191s registers an offense when duplicate exception splat exists 191s does not register an offense when there are no duplicate exceptions 191s registers an offense when duplicate exception exists within rescues with `else` branch 191s registers an offense when duplicate exception exists 191s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 191s 191s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 191s does not register offense to a regexp with named capture only 191s does not register offense to a regexp with numbered capture only 191s registers an offense when both of named and numbered captures are used 191s does not register offense to a regexp with named capture and non-capturing group 191s does not register offense when using a Regexp cannot be processed by regexp_parser gem 191s when containing a non-regexp literal 191s does not register an offense when containing a method 191s does not register an offense when containing a lvar 191s does not register an offense when containing a gvar 191s does not register an offense when containing a cvar 191s does not register an offense when containing a constant 191s does not register an offense when containing a ivar 191s 191s RuboCop::Cop::Naming::AccessorMethodName 191s registers an offense for singleton method set_something with one args 191s accepts method get_something with args 191s accepts method set_something with kwarg 191s registers an offense for method get_something with no args 191s registers an offense for method set_something with one arg 191s accepts method set_something with kwoptarg 191s accepts method set_something with blockarg 191s accepts singleton method set_something with no args 191s registers an offense for singleton method get_something with no args 191s accepts method set_something with two args 191s accepts singleton method get_something with args 191s accepts method set_something with optarg 191s accepts method set_something with kwrestarg 191s accepts method set_something with no args 191s accepts method set_something with restarg 191s accepts singleton method set_something with two args 191s >= Ruby 2.7 191s accepts method set_something with arguments forwarding 191s 191s RuboCop::Cop::Style::ClassMethodsDefinitions 191s when EnforcedStyle is def_self 191s removes empty class << self when correcting 191s registers and corrects an offense when defining class methods with `class << self` with inline comment 191s does not register an offense when class << self contains only class methods 191s correctly handles def self.x within class << self 191s does not register an offense when defining class methods with `def self.method` 191s correctly handles methods with annotation comments 191s correctly handles class << self containing multiple methods 191s does not register an offense when class << self does not contain methods 191s registers an offense and corrects when defining class methods with `class << self` 191s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 191s does not register an offense when defining singleton methods using `self << object` 191s registers and corrects an offense when defining class methods with `class << self` with comment only body 191s does not register an offense when `class << self` contains non public methods 191s when EnforcedStyle is self_class 191s registers an offense when defining class methods with `def self.method` 191s does not register an offense when defining class methods with `class << self` 191s does not register an offense when defining singleton methods not on self 191s 191s RuboCop::Cop::InternalAffairs::CreateEmptyFile 191s does not register an offense when using `create_file(path, ['foo', 'bar'])` 191s does not register an offense when using `create_file(path)` 191s does not register an offense when using `receiver.create_file(path, '')` 191s registers an offense when using `create_file(path, "") 191s does not register an offense when using `create_file(path, 'hello')` 191s registers an offense when using `create_file(path, '') 191s 191s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 191s when bracket hash assignment on multiple lines 191s does not add any offenses 191s when one argument on same line 191s does not add any offenses 191s when many arguments are on multiple lines, two on same line 191s registers an offense and corrects 191s when bracket hash assignment key on multiple lines 191s does not add any offenses 191s when second argument starts on same line as end of first 191s registers an offense and corrects 191s when there are multiple arguments on the first line 191s registers an offense and corrects starting from the 2nd argument 191s when many arguments are on multiple lines, three on same line 191s registers an offense and corrects 191s when many arguments including hash are on multiple lines, three on same line 191s registers an offense and corrects 191s when argument starts on same line but ends on different line 191s registers an offense and corrects 191s when two arguments are on next line 191s does not add any offenses 191s 191s RuboCop::Cop::Lint::AmbiguousRange 191s for an erange 191s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 191s does not register an offense for a constant 191s registers an offense and corrects when not parenthesized 191s can handle an endless range 191s does not register an offense if the range is parenthesized 191s does not register an offense for a variable 191s does not register an offense if the range is composed of literals 191s does not register an offense for `self` 191s can handle a beginningless range 191s registers an offense and corrects when one side is parenthesized but the other is not 191s registers an offense and corrects when there are clauses on both sides 191s method calls 191s with RequireParenthesesForMethodChains: true 191s does not register an offense for a chained method call with parens 191s registers an offense for a chained method call without parens 191s behaves like common behavior 191s does not register an offense for a unary + 191s does not register an offense for a non-chained method call 191s does not register an offense for a unary - 191s requires parens when calling a method on a basic literal 191s with RequireParenthesesForMethodChains: false 191s does not register an offense for a chained method call with parens 191s does not register an offense for a chained method call without parens 191s behaves like common behavior 191s does not register an offense for a unary - 191s requires parens when calling a method on a basic literal 191s does not register an offense for a non-chained method call 191s does not register an offense for a unary + 191s for an irange 191s does not register an offense for a variable 191s does not register an offense if the range is composed of literals 191s can handle a beginningless range 191s does not register an offense for a constant 191s can handle an endless range 191s does not register an offense for `self` 191s does not register an offense if the range is parenthesized 191s registers an offense and corrects when there are clauses on both sides 191s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 191s registers an offense and corrects when one side is parenthesized but the other is not 191s registers an offense and corrects when not parenthesized 191s method calls 191s with RequireParenthesesForMethodChains: true 191s registers an offense for a chained method call without parens 191s does not register an offense for a chained method call with parens 191s behaves like common behavior 191s does not register an offense for a non-chained method call 191s requires parens when calling a method on a basic literal 191s does not register an offense for a unary + 191s does not register an offense for a unary - 191s with RequireParenthesesForMethodChains: false 191s does not register an offense for a chained method call with parens 191s does not register an offense for a chained method call without parens 191s behaves like common behavior 191s does not register an offense for a unary + 191s does not register an offense for a non-chained method call 191s does not register an offense for a unary - 191s requires parens when calling a method on a basic literal 191s 191s RuboCop::Cop::Style::EmptyCaseCondition 191s given a case statement with an empty case 191s when using `return ... if` in `when` clause and assigning the return value of `case` 191s does not register an offense 191s with multiple when branches and an else 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s with first when branch including comma-delimited alternatives 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s with a single when branch and no else 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s when using `return` in `when` clause and assigning the return value of `case` 191s does not register an offense 191s when using `when ... then` in `case` in `return` 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s with multiple when branches and no else 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s with a single when branch and an else 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s when used as an argument of a method with comment 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s when using `return ... if` in `else` clause and assigning the return value of `case` 191s does not register an offense 191s with a when branch including comma-delimited alternatives 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s when used as an argument of a method without comment 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s when using `return` in `else` clause and assigning the return value of `case` 191s does not register an offense 191s with when branches using then 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s when using `when ... then` in `case` in a method call 191s behaves like detect/correct empty case, accept non-empty case 191s registers an offense and autocorrects 191s accepts the source with case 191s with multiple when branches and an `else` with code comments 191s behaves like detect/correct empty case, accept non-empty case 191s accepts the source with case 191s registers an offense and autocorrects 191s 191s RuboCop::Cop::InternalAffairs::NodeDestructuring 191s registers an offense when destructuring using a splat 191s does not register an offense when receiver is named `array` 191s when destructuring using `node.children` 191s registers an offense when receiver is named `node` 191s registers an offense when receiver is named `send_node` 191s 191s RuboCop::Cop::Layout::FirstArgumentIndentation 191s when EnforcedStyle is consistent_relative_to_receiver 191s when IndentationWidth:Width is 4 191s registers an offense and corrects an over-indented first argument 191s when indentation width is overridden for this cop only 191s accepts a correctly indented first argument 191s registers an offense and corrects an over-indented first argument 191s for method calls within method calls 191s without outer parentheses 191s accepts a first argument with special indentation 191s indents all relative to the receiver 191s with outer parentheses 191s indents all relative to the receiver 191s registers an offense and corrects an over-indented 1st argument 191s when IndentationWidth:Width is 2 191s accepts operator calls 191s does not register an offense when argument has expected indent width and the method is preceded by double splat 191s does not view chained call as an outer method call 191s registers an offense and corrects an over-indented first argument 191s accepts a first argument that is not preceded by a line break 191s does not register an offense when argument has expected indent width and the method is preceded by splat 191s accepts method calls with no arguments 191s does not view []= as an outer method call 191s registers an offense and corrects an under-indented first argument 191s registers an offense and corrects lines affected by other offenses 191s for assignment 191s register an offense and corrects a correctly indented first argument and does not care about the second argument 191s with line break 191s registers an offense and corrects an under-indented first argument 191s accepts a correctly indented first argument 191s when the receiver contains a line break 191s accepts a correctly indented first argument preceded by an empty line 191s accepts a correctly indented first argument 191s registers an offense and corrects an over-indented 1st argument 191s when preceded by a comment line 191s accepts a correctly indented first argument 191s registers an offense and corrects an under-indented first argument 191s when EnforcedStyle is consistent 191s when IndentationWidth:Width is 2 191s does not view []= as an outer method call 191s registers an offense and corrects an over-indented first argument of `super` 191s registers an offense and corrects an over-indented first argument 191s registers an offense and corrects an over-indented first argument on a plus sign method name 191s accepts method calls with no arguments 191s registers an offense and corrects an over-indented first argument on a pipe method name 191s accepts a first argument that is not preceded by a line break 191s registers an offense and corrects an under-indented first argument 191s registers an offense and corrects lines affected by another offense 191s does not view chained call as an outer method call 191s registers an offense and corrects an over-indented first argument on an alphanumeric method name 191s accepts operator calls 191s when using safe navigation operator 191s registers an offense and corrects an under-indented 1st argument 191s when the receiver contains a line break 191s accepts a correctly indented first argument 191s accepts a correctly indented first argument preceded by an empty line 191s registers an offense and corrects an over-indented first argument 191s when preceded by a comment line 191s registers an offense and corrects an under-indented first argument 191s accepts a correctly indented first argument 191s for assignment 191s accepts a correctly indented first argument and does not care about the second argument 191s with line break 191s registers an offense and corrects an under-indented first argument 191s accepts a correctly indented first argument 191s for a setter call 191s accepts an unindented value 191s when IndentationWidth:Width is 4 191s registers an offense and corrects an over-indented first argument 191s when indentation width is overridden for this cop only 191s accepts a correctly indented first argument 191s registers an offense and corrects an over-indented first argument 191s for method calls within method calls 191s accepts first argument indented relative to previous line 191s registers an offense and corrects an over-indented first argument 191s when EnforcedStyle is special_for_inner_method_call_in_parentheses 191s for method calls within method calls 191s without outer parentheses 191s accepts a first argument with consistent style indentation 191s with outer parentheses 191s registers an offense and corrects an under-indented first argument 191s registers an offense and corrects an over-indented first argument 191s accepts a correctly indented first argument with fullwidth characters 191s accepts a correctly indented first argument in interpolation 191s when IndentationWidth:Width is 2 191s registers an offense and corrects an over-indented first argument on a plus sign method name 191s registers an offense and corrects an over-indented first argument on a pipe method name 191s registers an offense and corrects an over-indented first argument of `super` 191s accepts operator calls 191s accepts a first argument that is not preceded by a line break 192s registers an offense and corrects an over-indented first argument on an alphanumeric method name 192s registers an offense and corrects an over-indented first argument 192s registers an offense and corrects lines affected by another offense 192s registers an offense and corrects an under-indented first argument 192s does not view []= as an outer method call 192s does not view chained call as an outer method call 192s accepts method calls with no arguments 192s when the receiver contains a line break 192s registers an offense and corrects an over-indented first argument 192s accepts a correctly indented first argument 192s accepts a correctly indented first argument preceded by an empty line 192s when preceded by a comment line 192s registers an offense and corrects an under-indented first argument 192s accepts a correctly indented first argument 192s when using safe navigation operator 192s registers an offense and corrects an under-indented 1st argument 192s for a setter call 192s accepts an unindented value 192s for assignment 192s accepts a correctly indented first argument and does not care about the second argument 192s with line break 192s registers an offense and corrects an under-indented first argument 192s accepts a correctly indented first argument 192s when IndentationWidth:Width is 4 192s registers an offense and corrects an over-indented first argument 192s when indentation width is overridden for this cop only 192s registers an offense and corrects an over-indented first argument 192s accepts a correctly indented first argument 192s when EnforcedStyle is special_for_inner_method_call 192s when indentation width is overridden for this cop only 192s registers an offense and corrects an over-indented first argument 192s accepts a correctly indented first argument 192s when IndentationWidth:Width is 2 192s registers an offense and corrects an under-indented first argument 192s accepts method calls with no arguments 192s registers an offense and corrects an over-indented first argument of `super` 192s accepts a first argument that is not preceded by a line break 192s does not view []= as an outer method call 192s registers an offense and corrects an over-indented first argument on an alphanumeric method name 192s registers an offense and corrects lines affected by another offense 192s does not view chained call as an outer method call 192s accepts operator calls 192s registers an offense and corrects an over-indented first argument on a pipe method name 192s registers an offense and corrects an over-indented first argument 192s registers an offense and corrects an over-indented first argument on a plus sign method name 192s when using safe navigation operator 192s registers an offense and corrects an under-indented 1st argument 192s for a setter call 192s accepts an unindented value 192s when the receiver contains a line break 192s accepts a correctly indented first argument preceded by an empty line 192s accepts a correctly indented first argument 192s registers an offense and corrects an over-indented first argument 192s when preceded by a comment line 192s accepts a correctly indented first argument 192s registers an offense and corrects an under-indented first argument 192s for assignment 192s accepts a correctly indented first argument and does not care about the second argument 192s with line break 192s accepts a correctly indented first argument 192s registers an offense and corrects an under-indented first argument 192s when IndentationWidth:Width is 4 192s registers an offense and corrects an over-indented first argument 192s for method calls within method calls 192s with outer parentheses 192s registers an offense and corrects an over-indented first argument 192s without outer parentheses 192s accepts a first argument with special indentation 192s 192s RuboCop::Cop::Style::FileRead 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 192s registers an offense for and corrects `File.open(filename, 'rb').read` 192s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 192s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 192s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 192s registers an offense for and corrects `File.open(filename, 'r').read` 192s registers an offense for and corrects `::File.open(filename).read` 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 192s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 192s registers an offense for and corrects `File.open(filename, 'r+b').read` 192s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 192s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 192s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 192s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 192s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 192s does not register an offense when not reading from the block variable 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 192s registers an offense for and corrects `File.open(filename, 'r+t').read` 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 192s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 192s registers an offense for and corrects `File.open(filename).read` 192s registers an offense for and corrects `File.open(filename, 'r+').read` 192s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 192s registers an offense for and corrects `File.open(filename, 'rt').read` 192s 192s RuboCop::Cop::Style::DoubleCopDisableDirective 192s registers an offense for duplicate todo directives 192s registers an offense for duplicate disable directives 192s does not register an offense for cops with single cop directive 192s 192s RuboCop::Cop::Style::GlobalStdStream 192s does not register an offense when assigning std stream const to std stream gvar 192s registers an offense and corrects when using std stream as const 192s does not register an offense when assigning other const to std stream gvar 192s does not register an offense when using non std stream const 192s 192s RuboCop::Cop::Lint::DeprecatedConstants 192s registers and corrects an offense when using `NIL` 192s registers and corrects an offense when using `::Triple::Nested::Constant` 192s does not register an offense when using `__ENCODING__ 192s registers and corrects an offense when using `TRUE` 192s registers and corrects an offense when using `FALSE` 192s does not register an offense when not using deprecated constant 192s registers and corrects an offense when using deprecated methods that have no deprecated version 192s registers and corrects an offense when using `::TRUE` 192s registers and corrects an offense when using `::NIL` 192s registers and corrects an offense when using deprecated methods that have no alternative 192s registers and corrects an offense when using `::FALSE` 192s Ruby >= 3.0 192s registers and corrects an offense when using `Random::DEFAULT` 192s registers and corrects an offense when using `::Random::DEFAULT` 192s Ruby <= 2.5 192s does not register an offense when using `Net::HTTPServerException` 192s Ruby >= 2.6 192s registers and corrects an offense when using `Net::HTTPServerException` 192s Ruby <= 2.7 192s does not register an offense when using `Random::DEFAULT` 192s 192s RuboCop::Cop::Commissioner 192s #investigate 192s stores all errors raised by the cops 192s traverses the AST and invoke cops specific callbacks 192s when a cop reports offenses 192s returns all offenses found by the cops 192s traverses the AST with on_send / on_csend 192s for unrestricted cops 192s calls on_send all method calls 192s for a restricted cop 192s calls on_send for the right method calls 192s on both csend and send 192s calls on_send for the right method calls 192s when given a source with parsing errors 192s only calls on_other_file 192s when passed :raise_cop_error option 192s re-raises the exception received while processing 192s when given a force 192s passes the input params to all cops/forces that implement their own #investigate method 192s when passed :raise_error option 192s re-raises the exception received while processing 192s 192s RuboCop::Cop::Style::HashEachMethods 192s when node matches a keys#each or values#each 192s when `AllowedReceivers: ['execute']` 192s does not register an offense when receiver is `execute` variable 192s registers an offense when receiver is not allowed name 192s does not register an offense when receiver is `execute` method 192s does not register an offense when receiver is `execute` method with a symbol proc argument 192s when receiver is a hash literal 192s does not register an offense for {}#each_value 192s does not register an offense for {}#each_key 192s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 192s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 192s registers offense, autocorrects {}#keys.each with {}#each_key 192s registers offense, autocorrects {}#values.each with {}#each_value 192s when receiver is implicit 192s does not register an offense for `values.each` 192s does not register an offense for `keys.each` with a symbol proc argument 192s does not register an offense for `values.each` with a symbol proc argument 192s does not register an offense for each_key 192s does not register an offense for `keys.each` 192s does not register an offense for each_value 192s when receiver is a send 192s registers offense, autocorrects foo#keys.each to foo#each_key 192s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 192s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 192s does not register an offense for foo#each_key 192s registers offense, autocorrects foo#values.each to foo#each_value 192s does not register an offense for Hash#each_value 192s Ruby 2.7 192s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 192s 192s RuboCop::Cop::Naming::BlockParameterName 192s registers offense when param is less than minimum length 192s registers offense when param ends in number 192s does not register offense for valid parameter names 192s can register multiple offenses in one block 192s registers offense when param with prefix is less than minimum length 192s does not register for brace block without parameters 192s registers offense when param contains uppercase characters 192s does not register for block without parameters 192s with AllowNamesEndingInNumbers 192s accept params that end in numbers 192s with ForbiddenNames 192s accepts param that uses a forbidden name's letters 192s registers offense for param listed as forbidden 192s with AllowedNames 192s registers unlisted offensive names 192s accepts specified block param names 192s 192s RuboCop::Cop::Layout::SpaceAfterSemicolon 192s registers an offense and corrects semicolon without space after it 192s does not crash if semicolon is the last character of the file 192s inside block braces 192s when EnforcedStyle for SpaceInsideBlockBraces is no_space 192s accepts no space between a semicolon and a closing brace 192s behaves like common behavior 192s accepts a space between a semicolon and a closing brace 192s when EnforcedStyle for SpaceInsideBlockBraces is space 192s registers an offense and corrects no space between a semicolon and a closing brace 192s behaves like common behavior 192s accepts a space between a semicolon and a closing brace 192s 192s RuboCop::Cop::Style::OptionalBooleanParameter 192s does not register an offense when defining method with keyword boolean arg 192s registers an offense when defining method with multiple optional boolean args 192s registers an offense when defining method with optional boolean arg that has no space 192s does not register an offense when defining method with optional non-boolean arg 192s registers an offense when defining class method with optional boolean arg 192s registers an offense when defining method with optional boolean arg 192s does not register an offense when defining method without args 192s when AllowedMethods is not empty 192s does not register an offense 192s 192s RuboCop::Cop::Lint::EmptyBlock 192s does not register an offense when block is not empty 192s registers an offense for an empty block given to a non-Kernel `proc` method 192s does not register an offense on an empty Proc.new 192s does not register an offense on an empty ::Proc.new 192s does not register an offense for empty block with inner comments 192s does not register an offense on an empty stabby lambda 192s does not register an offense on an empty proc 192s does not register an offense on an empty lambda 192s registers an offense for empty block within method call 192s does not register an offense for empty block with inline comments 192s when AllowComments is false 192s registers an offense for empty block with inner comments 192s registers an offense for empty block with inline comments 192s when AllowEmptyLambdas is false 192s registers an offense on an empty ::Proc.new 192s registers an offense on an empty Proc.new 192s registers an offense on an empty proc 192s registers an offense for an empty lambda 192s registers an offense for an empty stabby lambda 192s 192s RuboCop::CommentConfig 192s comment_only_line? 192s when line contains code and comment 192s returns false 192s when line contains only code 192s returns false 192s returns false 192s returns false 192s returns false 192s when line contains only comment 192s returns true 192s returns true 192s when line is empty 192s returns true 192s #cop_enabled_at_line? 192s does not confuse a comment directive embedded in a string literal with a real comment 192s supports disabling multiple lines with a pair of directive 192s supports disabling cops with multiple levels in department name 192s supports enabling/disabling multiple cops in a single directive 192s supports disabling single line with a directive at end of line 192s handles indented single line 192s supports enabling/disabling multiple cops along with a comment 192s supports enabling/disabling cops without a prefix 192s just ignores unpaired enabling directives 192s supports disabling all lines after a directive 193s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 193s supports disabling cops on a comment line with an EOL comment 193s supports disabling cops with multiple uppercase letters 193s supports disabling cops with numbers in their name 193s can handle double disable of one cop 193s does not confuse a cop name including "all" with all cops 193s #cop_disabled_line_ranges 193s collects line ranges by disabled cops 193s #extra_enabled_comments 193s has keys as instances of Parser::Source::Comment for extra enabled comments 193s has values as arrays of extra enabled cops 193s 193s RuboCop::Cop::Style::InlineComment 193s does not register an offense for a standalone comment 193s registers an offense for a trailing inline comment 193s does not register an offense for special rubocop inline comments 193s 193s RuboCop::Cop::Layout::MultilineBlockLayout 193s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 193s registers an offense and corrects a line break within destructured arguments 193s autocorrects nested parens correctly 193s registers offenses and corrects for lambdas 193s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 193s registers an offense for missing newline in do/end block w/o params 193s registers an offense and corrects for missing newline in do/end block with params 193s registers offenses and corrects for new lambda literal syntax 193s registers an offense and corrects line-break within arguments 193s does not register an offense for one-line do/end blocks 193s does not register an offense for one-line {} blocks 193s does not register offenses when there is a newline for do/end block 193s registers an offense and corrects a do/end block with a mult-line body 193s does not register offenses when there is a newline for {} block 193s does not remove a trailing comma when only one argument is present 193s registers an offense and corrects line-break before arguments 193s does not register offenses when there are too many parameters to fit on one line 193s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 193s registers an offense and corrects for missing newline in {} block w/o params 193s registers an offense and corrects line-break before arguments with empty block 193s considers the extra space required to join the lines together 193s registers an offense and corrects a line-break within arguments 193s registers an offense and corrects for missing newline in {} block with params 193s does not error out when the block is empty 193s registers offenses when there are not too many parameters to fit on one line 193s Ruby 2.7 193s registers an offense and corrects for missing newline in {} block w/o params 193s registers an offense and corrects for missing newline in do/end block with params 193s 193s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 193s registers offense when frozen_string_literal used with shareable_constant_value without empty line 193s registers an offense when multiple magic comments without empty line 193s registers an offense when code that immediately follows typed comment 193s accepts a source file with only a magic comment 193s accepts an empty source file 193s accepts magic comment followed by encoding 193s registers an offense for documentation immediately following comment 193s accepts magic comment with shareable_constant_value 193s registers an offense for code that immediately follows comment 193s accepts magic comment with typed 193s accepts code that separates the comment from the code with a newline 193s 193s RuboCop::Cop::VariableForce::Reference 193s .new 193s when non variable reference node is passed 193s raises error 193s 193s RuboCop::Cop::Lint::RedundantWithIndex 193s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 193s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 193s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 193s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 193s accepts an index is used as a block argument 193s Ruby 2.7 193s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 193s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 193s accepts an index is used as a numblock argument 193s 193s RuboCop::Cop::Layout::SingleLineBlockChain 193s does not register an offense for method call chained on the same line as a multiline block 193s does not register an offense for method call chained on a new line after a single line block with trailing dot 193s does not register an offense for method call chained on a new line after a single line block 193s does not register an offense for method call chained without a dot 193s registers an offense for no selector method call chained on the same line as a block 193s registers an offense for method call chained on the same line as a block 193s 193s RuboCop::Cop::Lint::CircularArgumentReference 193s circular argument references in ordinal arguments 193s when the method contains a circular argument reference 193s registers an offense 193s when the method does not contain a circular argument reference 193s does not register an offense 193s when the seemingly-circular default value is a method call 193s does not register an offense 193s circular argument references in keyword arguments 193s when there are multiple offensive keyword arguments 193s registers an offense 193s when the keyword argument is not circular, and calls a method 193s does not register an offense 193s when the keyword argument is not circular, but calls a method of some other object with the same name 193s does not register an offense 193s when the keyword argument is not circular, but calls a method of its own class with a self specification 193s does not register an offense 193s when there is one circular argument reference 193s registers an offense 193s when the keyword argument is not circular 193s does not register an offense 193s 193s RuboCop::Cop::Style::CommentAnnotation 193s with default RequireColon configuration (colon + space) 193s accepts a comment that is obviously a code example 193s accepts upper case keyword with colon, space and note 193s accepts a keyword that is just the beginning of a sentence 193s accepts upper case keyword alone 193s accepts a keyword that is somewhere in a sentence 193s upper case keyword with space but no note 193s registers an offense without autocorrection 193s upper case keyword with colon but no note 193s registers an offense without autocorrection 193s offenses in consecutive inline comments 193s registers each of them 193s missing space after colon 193s registers an offense and adds space 193s capitalized keyword 193s registers an offense and upcases 193s multiline comment 193s only registers an offense on the first line 193s when a keyword is not in the configuration 193s accepts the word without colon 193s lower case keyword 193s registers an offense and upcases 193s with configured keyword 193s registers an offense for a missing colon after the word 193s with multiword keywords 193s registers an offense for each matching keyword 193s missing colon 193s registers an offense and adds colon 193s with RequireColon configuration set to false 193s accepts a keyword that is just the beginning of a sentence 193s accepts a keyword that is somewhere in a sentence 193s accepts upper case keyword with colon, space and note 193s accepts upper case keyword alone 193s accepts a comment that is obviously a code example 193s offenses in consecutive inline comments 193s registers each of them 193s upper case keyword with space but no note 193s registers an offense without autocorrection 193s with configured keyword 193s registers an offense for containing a colon after the word 193s with colon 193s registers an offense and removes colon 193s when a keyword is not in the configuration 193s accepts the word with colon 193s lower case keyword 193s registers an offense and upcases 193s upper case keyword with colon but no note 193s registers an offense without autocorrection 193s multiline comment 193s only registers an offense on the first line 193s 193s RuboCop::Cop::Lint::EmptyWhen 193s when `AllowComments: false` 193s registers an offense for empty when body with a comment 193s when a `when` body is present 193s accepts case with when bodies and else clause 193s accepts case with when bodies 193s accepts with no case line expression 193s accepts case with when ... then statements 193s accepts case with when ... then statements and else clause 193s when a `when` body is missing 193s registers an offense for missing when body with a comment 193s registers an offense for missing when ... then body 193s registers an offense for missing when ... then body followed by else 193s registers an offense for missing when body with a comment followed by else 193s registers an offense for missing when body followed by else 193s registers an offense for a missing when body 193s registers an offense when case line has no expression 193s when `AllowComments: true` 193s accepts an empty when ... then body with a comment 193s accepts an empty when body with a comment 193s registers an offense for missing when body without a comment 193s 193s RuboCop::Cop::Style::RedundantFreeze 193s allows .freeze on method call 193s behaves like immutable objects 193s registers an offense for frozen (a > b) 193s behaves like mutable objects 193s allows (a + b) with freeze 193s behaves like immutable objects 193s registers an offense for frozen :sym 193s behaves like mutable objects 193s allows ::ENV['foo'] with freeze 193s behaves like immutable objects 193s registers an offense for frozen 'foo'.count 193s behaves like mutable objects 193s allows { a: 1, b: 2 } with freeze 193s behaves like mutable objects 193s allows [1, 2, 3] with freeze 193s behaves like immutable objects 193s registers an offense for frozen ('a' > 'b') 193s behaves like mutable objects 193s allows ('a' * 20) with freeze 193s when the receiver is a string literal 193s Regexp and Range literals 193s Ruby 2.7 or lower 193s behaves like mutable objects 193s allows /./ with freeze 193s behaves like mutable objects 193s allows (1..5) with freeze 193s behaves like mutable objects 193s allows (1...5) with freeze 193s Ruby 3.0 or higher 193s behaves like immutable objects 193s registers an offense for frozen (1..5) 193s behaves like immutable objects 193s registers an offense for frozen (1...5) 193s behaves like immutable objects 193s registers an offense for frozen /./ 193s Ruby 3.0 or higher 193s when the frozen string literal comment is missing 193s behaves like mutable objects 193s allows "#{a}" with freeze 193s when the frozen string literal comment is true 193s behaves like mutable objects 193s allows "#{a}" with freeze 193s when the frozen string literal comment is false 193s behaves like mutable objects 193s allows "#{a}" with freeze 193s Ruby 2.7 or lower 193s when the frozen string literal comment is true 193s behaves like immutable objects 193s registers an offense for frozen "#{a}" 193s when the frozen string literal comment is missing 193s behaves like mutable objects 193s allows "#{a}" with freeze 193s when the frozen string literal comment is false 193s behaves like mutable objects 193s allows "#{a}" with freeze 193s behaves like mutable objects 193s allows ('a' + 'b') with freeze 193s behaves like immutable objects 193s registers an offense for frozen [1, 2, 3].size 193s behaves like immutable objects 193s registers an offense for frozen (1 + 2) 193s behaves like immutable objects 193s registers an offense for frozen (2 > 1) 193s behaves like mutable objects 193s allows 'str' with freeze 193s behaves like mutable objects 193s allows ([42] * 42) with freeze 193s behaves like mutable objects 193s allows "top#{1 + 2}" with freeze 193s behaves like immutable objects 193s registers an offense for frozen :"" 193s behaves like mutable objects 193s allows ENV['foo'] with freeze 193s behaves like immutable objects 193s registers an offense for frozen 1 193s behaves like immutable objects 193s registers an offense for frozen 1.5 193s 193s RuboCop::Cop::Style::ClassEqualityComparison 193s registers an offense and corrects when comparing single quoted class name for equality 193s registers an offense and corrects when comparing double quoted class name for equality 193s registers an offense and corrects when comparing `Module#name` for equality 193s registers an offense and corrects when comparing class using `==` for equality 193s registers an offense and corrects when comparing class using `equal?` for equality 193s registers an offense and corrects when comparing class using `eql?` for equality 193s does not register an offense when using `instance_of?` 193s with instance variable comparison in module 193s registers and corrects an offense 193s when AllowedPatterns is enabled 193s does not register an offense when comparing class for equality 193s when AllowedMethods is enabled 193s does not register an offense when comparing class for equality 193s with String comparison in module 193s registers and corrects an offense 193s 193s RuboCop::Cop::Style::SymbolArray 193s when EnforcedStyle is brackets 193s does not register an offense for arrays of symbols 193s autocorrects an array starting with %i 193s autocorrects multiline %i array 193s registers an offense for empty array starting with %i 193s autocorrects an array has interpolations 193s registers an offense for array starting with %i 193s with non-default MinSize 193s does not autocorrect array of one symbol if MinSize > 1 193s when EnforcedStyle is percent 193s detects right value for MinSize to use for --auto-gen-config 193s registers an offense in a non-ambiguous block context 193s autocorrects arrays of symbols with new line 193s does not register an offense if symbol contains whitespace 193s doesn't break when a symbol contains ) 193s does not register an offense for array with non-syms 193s autocorrects arrays of one symbol 193s detects when the cop must be disabled to avoid offenses 193s autocorrects arrays of symbols with embedded newlines and tabs 193s does not register an offense for array starting with %i 193s registers an offense for arrays of symbols 193s uses %I when appropriate 193s when PreferredDelimiters is specified 193s autocorrects an array using partial newlines 193s autocorrects an array in multiple lines 193s autocorrects an array with delimiters 193s 193s RuboCop::Cop::Style::RedundantSelfAssignment 193s does not register an offense when assigning to attribute of `self` the result from other object 193s registers an offense and corrects when assigning to attribute of non `self` 193s registers an offense and corrects when assigning to attribute of `self` 193s does not register an offense when there is no a receiver 193s does not register an offense when lhs and receiver are different 193s when lhs and receiver are the same 193s registers an offense and corrects when assigning to global variable 193s registers an offense and corrects when assigning to instance variable 193s registers an offense and corrects when assigning to local variable 193s registers an offense and corrects when assigning to class variable 193s 193s RuboCop::Cop::Style::CommandLiteral 193s when EnforcedStyle is set to backticks 193s a multi-line %x string without backticks 193s registers an offense and corrects to backticks 193s a multi-line ` string with backticks 193s registers an offense without autocorrection 193s when configured to allow inner backticks 193s is accepted 193s a single-line %x string with backticks 193s is accepted 193s when configured to allow inner backticks 193s registers an offense without autocorrection 193s a single-line ` string without backticks 193s is accepted 193s a multi-line %x string with backticks 193s is accepted 193s when configured to allow inner backticks 193s registers an offense without autocorrection 193s a single-line ` string with backticks 193s registers an offense without autocorrection 193s when configured to allow inner backticks 193s is accepted 193s a multi-line ` string without backticks 193s is accepted 193s a single-line %x string without backticks 193s registers an offense and corrects to backticks 193s heredoc commands 193s is ignored 193s when EnforcedStyle is set to percent_x 193s a single-line ` string with backticks 193s registers an offense without autocorrection 193s a single-line %x string without backticks 193s is accepted 193s a multi-line ` string with backticks 193s registers an offense without autocorrection 193s a single-line ` string without backticks 193s registers an offense and corrects to %x 193s a single-line %x string with backticks 193s is accepted 193s a multi-line %x string without backticks 193s is accepted 193s a multi-line %x string with backticks 193s is accepted 193s a multi-line ` string without backticks 193s registers an offense and corrects to %x 193s when PercentLiteralDelimiters is configured and a default exists 193s ignores the default when autocorrecting 193s %x commands with other delimiters than parentheses 193s registers an offense 193s when EnforcedStyle is set to mixed 193s a single-line ` string with backticks 193s registers an offense without autocorrection 193s when configured to allow inner backticks 193s is accepted 193s a multi-line ` string without backticks 193s registers an offense and corrects to %x 193s a single-line %x string without backticks 193s registers an offense and corrects to backticks 193s a single-line ` string without backticks 193s is accepted 193s a single-line %x string with backticks 193s is accepted 193s when configured to allow inner backticks 193s registers an offense without autocorrection 193s a multi-line %x string with backticks 193s is accepted 193s a multi-line %x string without backticks 193s is accepted 193s a multi-line ` string with backticks 193s registers an offense without autocorrection 193s when PercentLiteralDelimiters is configured with curly braces 193s respects the configuration when autocorrecting 193s when PercentLiteralDelimiters only has a default 193s respects the configuration when autocorrecting 193s 193s RuboCop::Cop::Lint::EmptyExpression 193s when used as a return value 193s registers an offense in the return value of a condition 193s registers an offense in the return value of a case statement 193s registers an offense in the return value of a method 193s when used in a condition 193s registers an offense inside `elsif` 193s registers an offense inside `case` 193s registers an offense in the condition of a ternary operator 193s registers an offense in the return value of a ternary operator 193s registers an offense inside `if` 193s registers an offense inside `when` 193s when used as a standalone expression 193s registers an offense 193s with nested empty expressions 193s registers an offense 193s when used as an assignment 193s registers an offense for the assigned value 193s 193s RuboCop::Cop::Style::NegatedWhile 193s accepts a while where only part of the condition is negated 193s does not blow up for empty while condition 193s accepts a while where the condition is doubly negated 193s does not blow up for empty until condition 193s registers an offense for until with exclamation point condition 193s autocorrects by replacing while not with until 193s registers an offense for while with exclamation point condition 193s registers an offense for while with "not" condition 193s autocorrects by replacing until not with while 193s 193s RuboCop::Cop::Style::EmptyLambdaParameter 193s registers an offense for an empty block parameter with a lambda 193s accepts a keyword lambda 193s does not crash on a super 193s 193s RuboCop::Cop::Style::ParenthesesAroundCondition 193s allows parens if the condition node is a modifier if op 193s does not register an offense when parentheses in multiple expressions separated by semicolon 193s allows parens if the condition node is a modifier unless op 193s allows parens if the condition node is a modifier while op 193s registers an offense for parentheses around condition 193s is not confused by leading parentheses in subexpression 193s accepts parentheses around condition in a ternary 193s does not blow up for empty unless condition 193s allows parens if the condition node is a modifier until op 193s allows parens if the condition node is a modifier rescue op 193s accepts parentheses if there is no space between the keyword and (. 193s is not confused by parentheses in subexpression 193s does not blow up when the condition is a ternary op 193s does not blow up for empty if condition 193s parentheses in multiline conditions are allowed 193s accepts parentheses around multiline condition 193s registers an offense for parentheses in single line condition 193s safe assignment is not allowed 193s does not accept variable assignment in condition surrounded with parentheses 193s does not accept element assignment in condition surrounded with parentheses 193s parentheses in multiline conditions are not allowed 193s registers an offense for parentheses around multiline condition 193s safe assignment is allowed 193s accepts variable assignment in condition surrounded with parentheses 193s accepts element assignment in condition surrounded with parentheses 193s accepts setter in condition surrounded with parentheses 193s 193s RuboCop::Cop::Style::MultipleComparison 193s does not register an offense for a duplicated condition 193s does not register an offense for comparing multiple literal strings 193s does not register an offense for comparing lvars 193s does not register an offense for a == b || b == a 193s does not register an offense when comparing two sides of the disjunction is unrelated 193s registers an offense and corrects when `a` is compared twice 193s does not register an offense for Array#include? 193s registers an offense and corrects when `a` is compared three times 193s does not register an offense for comparing multiple int literals 193s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 193s does not register an offense for comparing an lvar 193s registers an offense and corrects when multiple comparison is not part of a conditional 193s registers an offense and corrects when `a` is compared three times on the right hand side 193s does not register an offense for comparing lvars when a string is on the lefthand side 193s registers an offense and corrects when `a` is compared three times, once on the righthand side 193s when `AllowMethodComparison: false` 193s registers an offense and corrects when using multiple method calls 193s when `AllowMethodComparison: true` 193s does not register an offense when using multiple method calls 193s 193s RuboCop::Cop::Style::MultilineInPatternThen 193s >= Ruby 2.7 193s doesn't register an offense for singleline `in` statement with `then` 193s doesn't register an offense when `then` required for a body of `in` is used 193s does not register an offense for hash `in` statement with `then` 193s doesn't register an offense for multiline `in` statement with `then` followed by other lines 193s registers an offense when one line for multiple candidate values of `in` 193s registers an offense for empty `in` statement with `then` 193s doesn't register an offense for empty `in` statement without `then` 193s does not register an offense for array `when` statement with `then` 193s doesn't register an offense for multiline `in` statement without `then` 193s does not register an offense when line break for multiple candidate values of `in` 193s autocorrects when the body of `in` branch starts with `then` 193s registers an offense for multiline (one line in a body) `in` statement with `then` 193s registers an offense for multiline (two lines in a body) `in` statement with `then` 193s 193s RuboCop::Cop::Style::MagicCommentFormat 193s kebab case style 193s does not register an offense for dashes in other comments 193s registers an offense for snake case in emacs style 193s registers an offense for snake case 193s accepts a source with no tokens 193s accepts a frozen string literal in snake case in emacs style 193s does not register an offense for incorrect style in comments after the first statement 193s registers an offense for mixed case 193s accepts a magic comments in kebab case 193s accepts an empty source 193s DirectiveCapitalization 193s when lowercase 193s registers an offense and corrects when the case does not match 193s when uppercase 193s registers an offense and corrects when the case does not match 193s when not set 193s does not change the case of magic comment directives 193s snake case style 193s accepts a frozen string literal in snake case in emacs style 193s accepts an empty source 193s accepts a source with no tokens 193s registers an offense for kebab case 193s registers an offense for kebab case in emacs style 193s accepts a magic comments in snake case 193s does not register an offense for dashes in other comments 193s registers an offense for mixed case 193s does not register an offense for incorrect style in comments after the first statement 193s invalid config 193s DirectiveCapitalization 193s raises an error 193s ValueCapitalization 193s raises an error 193s all issues at once 193s registers and corrects multiple issues 193s ValueCapitalization 193s when lowercase 193s registers an offense and corrects when the case does not match 193s when uppercase 193s registers an offense and corrects when the case does not match 193s when not set 193s does not change the case of magic comment directives 193s 193s RuboCop::Cop::Lint::RequireRangeParentheses 193s registers an offense when the end of the range (`..`) is line break 193s does not register an offense when using `nil..42` 193s does not register an offense when begin and end of the range are on the same line 193s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 193s does not register an offense when using `42..nil` 193s registers an offense when the end of the range (`...`) is line break 193s Ruby >= 2.6 193s does not register an offense when using endless range only 193s Ruby >= 2.7 193s does not register an offense when using beginless range only 193s 193s RuboCop::Cop::Style::RedundantInterpolation 193s accepts strings with characters before the interpolation 193s registers an offense for "#{@var}" 193s accepts strings implicitly concatenated with a later string 193s registers an offense for "#@@var" 193s registers an offense for "#$var" 193s registers an offense for "#@var" 193s registers an offense for "#{$1}" 193s registers an offense for "#{do_something 42}" 193s accepts strings that are part of a %W() 193s registers an offense for "#{@@var}" 193s registers an offense for "#{$var}" 193s registers an offense for "#{do_something(42)}" 193s registers an offense for "#$1" 193s registers an offense for ["#{@var}"] 193s registers an offense for "%|#{1 + 1}|" 193s registers an offense for "#{$+}" 193s registers an offense for "#$+" 193s accepts strings implicitly concatenated with an earlier string 193s registers an offense for "#{number}" 193s registers an offense for "#{1 + 1}" 193s registers an offense for "#{foo.do_something 42}" 193s registers an offense for "#{1 + 1; 2 + 2}" 193s registers an offense for "#{var}" 193s registers an offense for "%Q(#{1 + 1})" 193s accepts strings with characters after the interpolation 193s 193s RuboCop::Cop::Style::Semicolon 193s accept semicolons inside strings 193s accepts semicolon after params if so configured 193s accepts semicolon before end if so configured 193s registers an offense for a single expression 193s registers an offense for a semicolon at the beginning of a line 193s registers an offense for semicolon at the end no matter what 193s accepts one line empty module definitions 193s registers an offense for range (`1...42`) with semicolon 193s accepts one line method definitions 193s accepts one line empty method definitions 193s accepts one line empty class definitions 193s registers an offense for range (`1..42`) with semicolon 193s registers an offense for several expressions 193s registers an offense for one line method with two statements 193s Ruby >= 2.6 193s registers an offense for endless range with semicolon in the method definition 193s registers an offense for endless range with semicolon (irange only) 193s registers an offense for endless range with semicolon (irange and erange) 193s does not register an offense for endless range without semicolon 193s when AllowAsExpressionSeparator is true 193s accepts several expressions 193s accepts one line method with two statements 193s with a multi-expression line without a semicolon 193s does not register an offense 193s 193s RuboCop::Cop::Style::StringHashKeys 193s does not register an offense when string key is used in gsub! 193s does not register an offense when string key is used in Open3.pipeline 193s registers an offense when using strings as keys mixed with other keys 193s does not register an offense when string key is used in Open3.capture3 193s does not register an offense when not using strings as keys 193s autocorrects strings as keys into symbols with the correct syntax 193s does not register an offense when string key is used in gsub 193s does not register an offense when string key is used in IO.popen 193s registers an offense when using strings as keys 193s 193s RuboCop::Cop::Security::MarshalLoad 193s does not register an offense Marshal methods under another namespace 193s registers an offense for using Marshal.restore 193s does not register an offense for Marshal.dump 193s registers an offense for using Marshal.load 193s allows using dangerous Marshal methods for deep cloning 193s 193s RuboCop::Cop::Metrics::BlockLength 193s reports the correct beginning and end lines 193s accepts empty blocks 193s does not count commented lines by default 193s properly counts nested blocks 193s accepts a block with less than 3 lines 193s does not count blank lines 193s rejects brace blocks too 193s rejects a block with more than 5 lines 193s accepts a block with multiline receiver and less than 3 lines of body 193s when `CountAsOne` is not empty 193s folds array into one line 193s when CountComments is enabled 193s also counts commented lines 193s when defining a Struct 193s does not register an offense 193s when defining a module 193s does not register an offense 193s when using numbered parameter 193s accepts a block with less than 3 lines 193s rejects a block with more than 5 lines 193s reports the correct beginning and end lines 193s does not count blank lines 193s when methods to allow are defined 193s when IgnoredMethods is enabled 193s when string 193s does not report an offense 193s that does not match 193s reports an offense 193s when regex 193s does not report an offense 193s that does not match 193s reports an offense 193s when ExcludedMethods is enabled 193s does not report an offense 193s that does not match 193s reports an offense 193s when AllowedMethods is enabled 193s when a method is allowed, but receiver is a module 193s does not report an offense 193s when receiver contains whitespaces 193s allows whitespaces 193s behaves like allow an offense on an allowed method 193s accepts the foo method with a long block 193s still rejects other methods with long blocks 193s behaves like allow an offense on an allowed method 193s accepts the foo method with a long block 193s still rejects other methods with long blocks 193s when AllowedPatterns is enabled 193s does not report an offense 193s that does not match 193s reports an offense 193s when defining a class 193s does not register an offense 193s 193s RuboCop::Cop::Style::EachWithObject 193s correctly autocorrects with return value only 193s ignores inject/reduce with assignment to accumulator param in block 193s ignores inject and reduce passed in symbol 193s ignores inject and reduce with passed in, but not returned hash 193s ignores inject and reduce with condition as body 193s correctly autocorrects 193s finds inject and reduce with passed in and returned hash 193s ignores inject and reduce with empty body 193s does not blow up for reduce with no arguments 193s Ruby 2.7 193s finds inject and reduce with passed in and returned hash and numblock 193s when a simple literal is passed as initial value 193s ignores inject/reduce 193s 193s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 193s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 193s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 193s registers and corrects an offense when using `IO.select` with single write and timeout arguments 193s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 193s does not register an offense when using `IO.select` with multiple write arguments 193s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 193s does not register an offense when using `IO.select` with read and write arguments 193s registers and corrects an offense when using `::IO.select` with single read argument 193s registers and corrects an offense when using `IO.select` with single read and timeout arguments 193s registers and corrects an offense when using `IO.select` with single write argument 193s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 193s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 193s does not register an offense when using `IO.select` with multiple read arguments 193s registers and corrects an offense when using `IO.select` with single read argument 193s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 193s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 193s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 193s does not register an offense when using `Enumerable#select` 193s 193s RuboCop::Cop::Lint::UselessTimes 193s registers an offense and corrects with 1.times 193s registers an offense and corrects with negative times with block arg 193s registers an offense and corrects when there is a blank line in the method definition 193s registers an offense and corrects with 0.times 193s does not register an offense for an integer > 1 193s registers an offense and corrects with negative times 193s registers an offense and corrects with 0.times with block arg 193s registers an offense and corrects when 1.times with empty block argument 193s registers an offense and corrects with 1.times with block arg 193s registers an offense and corrects with 1.times with method chain 193s multiline block 193s corrects a block that changes another lvar 193s does not try to correct a block if the block arg is changed in parallel assignment 193s correctly handles a multiline block with 1.times 193s does not try to correct a block if the block arg is changed 193s short-form method 193s does not register an offense for an integer > 1 193s registers an offense and corrects with 0.times 193s does not adjust surrounding space 193s registers an offense and corrects with negative times 193s registers an offense and corrects with 1.times 193s within indentation 193s corrects properly when removing single line 193s corrects properly when removing multiline 193s corrects properly when replacing 193s inline `Integer#times` calls 193s does not try to correct `1.times` 193s does not try to correct `0.times` 193s 193s RuboCop::Cop::InternalAffairs::CopDescription 193s The description starts with a word such as verb 193s does not register if the description like `Checks` 193s does not register if the description starts with non-verb word 193s There is no description comment 193s does not register offense 193s The description starts with `This cop ...` 193s registers an offense and corrects if using just a verb 193s registers an offense if the description like `This cop is ...` 193s registers an offense if using an auxiliary verb 193s 193s RuboCop::Cop::Style::Attr 193s accepts attr when it has a receiver 193s registers offense for attr within module_eval 193s does not register offense for custom `attr` method 193s registers offense for attr within class_eval 193s registers an offense attr 193s accepts attr when it does not take arguments 193s autocorrects 193s attr, false to attr_reader 193s attr to attr_reader 193s attr :name, true to attr_accessor :name 193s attr with multiple names to attr_reader 193s 193s RuboCop::Cop::Gemspec::RequiredRubyVersion 193s registers an offense when `required_ruby_version` is not specified 193s registers an offense when `required_ruby_version` is an empty array 193s registers an offense when `required_ruby_version` is blank 193s target ruby version > 2.6 193s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 193s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 193s target ruby version > 2.7 193s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 193s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 193s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 193s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 193s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 193s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 193s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 193s target ruby version > 2.7 193s recognizes Gem::Requirement and registers offense 193s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 193s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 193s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 193s recognizes a Gem::Requirement with multiple requirements and does not register an offense 193s false negatives 193s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 193s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 193s 193s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 193s registers and corrects an offense when using lambda with a proc variable block argument 193s does not register an offense when using lambda with a literal block 193s does not register an offense when using `lambda.call` 193s does not register an offense when using lambda with a symbol proc 193s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 193s registers and corrects an offense when using lambda with `&proc {}` block argument 193s 193s RuboCop::Cop::Style::SafeNavigation 193s allows an object check before a method call that is used in a negated regex comparison 193s allows calls to methods not safeguarded by respond_to 193s allows method call that is used in a regex comparison safe guarded by an object check 193s does not move comments that are inside an inner block 193s allows an object check before a method call that is used in a regex comparison 193s allows an object check before a method call that is used in a spaceship comparison 193s allows chained method calls during arithmetic operations safe guarded by an object check 193s allows method call that is used in a spaceship comparison safe guarded by an object check 193s allows method calls that do not get called using . safe guarded by an object check 193s allows an object check before a nil check on a short chain 193s allows an object check before a nil check on a long chain 193s allows an object check before a method chain that is used in a comparison 193s allows an object check before a method call that is used with `empty?` 193s allows a method chain that is used in a comparison safe guarded by an object check 193s allows a method call safeguarded when using `unless nil?` 193s allows an object check before a method call that is used in a comparison 193s allows a method call as a parameter when the parameter is safe guarded with an object check 193s allows an object check before a long chain with a block 193s allows for empty if blocks with comments 193s allows calls on nil 193s allows method call that is used in a comparison safe guarded by an object check 193s allows method call that is used in a negated regex comparison safe guarded by an object check 193s allows an object check before a negated method call with a safe navigation 193s allows an object check before a blank check 193s allows an object check before a negated predicate method chain 193s allows object checks in the condition of an elsif statement and a method call on that object in the body 193s allows chained method calls during assignment safe guardedby an object check 193s allows an object check before a negated predicate 193s allows a method call safeguarded with a negative check for the object when using `if` 193s allows an object check before hash access 193s allows an object check before a method chain longer than 2 methods 193s allows calls using safe navigation 193s allows a method call safeguarded with a negative check for the object when using `unless` 193s behaves like all variable types 193s if expression 193s registers an offense for a single method call with params inside of an unless negative check for the object 193s registers an offense for a single method call with a block inside of an unless negative check for the object 193s only moves comments that fall within the expression 193s registers an offense for a single method call with params inside of an unless nil check for the object 193s registers an offense for a single method call with params and a block inside of an unless negative check for the object 193s registers an offense for a single method call with a block inside of a non-nil check for the object 193s registers an offense for a single method call with params inside of a check for the object 193s registers an offense for a single method call inside of an unless nil check for the object 193s registers an offense for a single method call with params and a block inside of a check for the object 193s does not lose comments within if expression 193s registers an offense for a single method call with a block inside of an unless nil check for the object 193s registers an offense for a single method call with params inside of a non-nil check for the object 193s registers an offense for a single method call inside of a non-nil check for the object 193s registers an offense for a single method call inside of a check for the object 193s registers an offense for a single method call with params and a block inside of a non-nil check for the object 193s registers an offense for a single method call inside of an unless negative check for the object 193s allows a single method call inside of a check for the object with an else 193s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s ternary expression 194s allows ternary expression 194s object check before method call 194s allows a nil object check followed by a method call 194s allows a nil object check followed by a method call with params and a block 194s allows a non object check followed by a method call with params and a block 194s allows a non object check followed by a method call with a block 194s allows a non object check followed by a method call 194s allows a non object check followed by a method call with params 194s allows a nil object check followed by a method call with a block 194s allows a nil object check followed by a method call with params 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for a non-nil object check followed by a method call with a block 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method call with params 194s corrects an object check followed by a method call and another check 194s registers an offense for an object check followed by a method call with params and a block 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s MaxChainLength: 3 194s registers an offense for an object check followed by 3 chained method calls 194s allows an object check followed by 4 chained method calls 194s MaxChainLength: 1 194s allows an object check followed by 2 chained method calls 194s registers an offense for an object check followed by 1 chained method calls 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls with blocks 194s allows an object check followed by chained method calls 194s ConvertCodeThatCanStartToReturnNil false 194s allows a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params and a block 194s allows a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method calls that nil responds to 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s allows a non-nil object check followed by a method call 194s allows a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call 194s registers an offense for an object check followed by a method call with params 194s registers an offense for an object check followed by a method call with a block 194s method chaining 194s corrects an object check followed by a chained method call 194s corrects an object check followed by a chained method call with params 194s corrects an object check followed by a chained method call with a block 194s corrects an object check followed by a chained method call with a symbol proc 194s modifier if 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s registers an offense for an object check followed by a method call with a comment at EOL 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s respond_to? 194s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 194s allows method calls safeguarded by a respond_to check on adifferent variable and method 194s allows method calls safeguarded by a respond_to check to a different method 194s allows enumerable accessor method calls safeguarded by a respond_to check 194s allows method calls safeguarded by a respond_to check 194s behaves like all variable types 194s if expression 194s registers an offense for a single method call with a block inside of a non-nil check for the object 194s registers an offense for a single method call with params and a block inside of a check for the object 194s only moves comments that fall within the expression 194s registers an offense for a single method call with params inside of a check for the object 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s registers an offense for a single method call inside of an unless negative check for the object 194s registers an offense for a single method call inside of an unless nil check for the object 194s registers an offense for a single method call with params and a block inside of an unless negative check for the object 194s registers an offense for a single method call with params inside of an unless nil check for the object 194s does not lose comments within if expression 194s registers an offense for a single method call with a block inside of an unless nil check for the object 194s allows a single method call inside of a check for the object with an else 194s registers an offense for a single method call inside of a non-nil check for the object 194s registers an offense for a single method call with params and a block inside of a non-nil check for the object 194s registers an offense for a single method call with params inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call with params inside of an unless negative check for the object 194s registers an offense for a single method call with a block inside of an unless negative check for the object 194s registers an offense for a single method call inside of a check for the object 194s ternary expression 194s allows ternary expression 194s modifier if 194s registers an offense for an object check followed by a method call with a comment at EOL 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s object check before method call 194s allows a non object check followed by a method call with a block 194s allows a nil object check followed by a method call with params 194s allows a nil object check followed by a method call 194s allows a nil object check followed by a method call with a block 194s allows a non object check followed by a method call with params and a block 194s allows a non object check followed by a method call with params 194s allows a nil object check followed by a method call with params and a block 194s allows a non object check followed by a method call 194s ConvertCodeThatCanStartToReturnNil false 194s allows a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method call 194s allows a non-nil object check followed by a method call with a block 194s allows a non-nil object check followed by a method call with params and a block 194s allows a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method calls that nil responds to 194s method chaining 194s corrects an object check followed by a chained method call 194s corrects an object check followed by a chained method call with a symbol proc 194s corrects an object check followed by a chained method call with a block 194s corrects an object check followed by a chained method call with params 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for an object check followed by a method call with params and a block 194s registers an offense for a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params 194s registers an offense for an object check followed by a method call 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s corrects an object check followed by a method call and another check 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls 194s allows an object check followed by chained method calls with blocks 194s MaxChainLength: 1 194s registers an offense for an object check followed by 1 chained method calls 194s allows an object check followed by 2 chained method calls 194s MaxChainLength: 3 194s registers an offense for an object check followed by 3 chained method calls 194s allows an object check followed by 4 chained method calls 194s when Ruby <= 2.2 194s does not register an offense when a method call that nil responds to safe guarded by an object check 194s behaves like all variable types 194s modifier if 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for an object check followed by a method call with a comment at EOL 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s if expression 194s registers an offense for a single method call inside of an unless negative check for the object 194s registers an offense for a single method call with a block inside of an unless negative check for the object 194s registers an offense for a single method call inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of an unless nil check for the object 194s registers an offense for a single method call with params inside of a non-nil check for the object 194s only moves comments that fall within the expression 194s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call with a block inside of a non-nil check for the object 194s does not lose comments within if expression 194s registers an offense for a single method call with params inside of an unless negative check for the object 194s registers an offense for a single method call with params and a block inside of a check for the object 194s registers an offense for a single method call with params and a block inside of an unless negative check for the object 194s allows a single method call inside of a check for the object with an else 194s registers an offense for a single method call with params inside of an unless nil check for the object 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s registers an offense for a single method call inside of a check for the object 194s registers an offense for a single method call with params inside of a check for the object 194s registers an offense for a single method call inside of an unless nil check for the object 194s registers an offense for a single method call with params and a block inside of a non-nil check for the object 194s ternary expression 194s allows ternary expression 194s object check before method call 194s allows a nil object check followed by a method call with a block 194s allows a nil object check followed by a method call with params 194s allows a nil object check followed by a method call with params and a block 194s allows a non object check followed by a method call with params 194s allows a nil object check followed by a method call 194s allows a non object check followed by a method call with a block 194s allows a non object check followed by a method call 194s allows a non object check followed by a method call with params and a block 194s ConvertCodeThatCanStartToReturnNil false 194s allows a non-nil object check followed by a method call with params 194s allows a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call with params 194s registers an offense for an object check followed by a method call 194s registers an offense for an object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method calls that nil responds to 194s allows a non-nil object check followed by a method call 194s allows a non-nil object check followed by a method call with a block 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method call with a block 194s method chaining 194s corrects an object check followed by a chained method call 194s corrects an object check followed by a chained method call with a symbol proc 194s corrects an object check followed by a chained method call with params 194s corrects an object check followed by a chained method call with a block 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call with params and a block 194s corrects an object check followed by a method call and another check 194s registers an offense for an object check followed by a method call with params 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls 194s allows an object check followed by chained method calls with blocks 194s MaxChainLength: 1 194s registers an offense for an object check followed by 1 chained method calls 194s allows an object check followed by 2 chained method calls 194s MaxChainLength: 3 194s registers an offense for an object check followed by 3 chained method calls 194s allows an object check followed by 4 chained method calls 194s behaves like all variable types 194s modifier if 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for an object check followed by a method call with a comment at EOL 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s object check before method call 194s allows a non object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with a block 194s allows a nil object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with params 194s allows a non object check followed by a method call with a block 194s allows a non object check followed by a method call 194s allows a non object check followed by a method call with params 194s allows a nil object check followed by a method call 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method call with params 194s registers an offense for an object check followed by a method call 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params and a block 194s corrects an object check followed by a method call and another check 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls 194s allows an object check followed by chained method calls with blocks 194s MaxChainLength: 3 194s allows an object check followed by 4 chained method calls 194s registers an offense for an object check followed by 3 chained method calls 194s MaxChainLength: 1 194s allows an object check followed by 2 chained method calls 194s registers an offense for an object check followed by 1 chained method calls 194s ConvertCodeThatCanStartToReturnNil false 194s registers an offense for an object check followed by a method call 194s allows a non-nil object check followed by a method call with params 194s allows a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params 194s allows a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with params and a block 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method calls that nil responds to 194s allows a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call with a block 194s method chaining 194s corrects an object check followed by a chained method call with a symbol proc 194s corrects an object check followed by a chained method call 194s corrects an object check followed by a chained method call with a block 194s corrects an object check followed by a chained method call with params 194s if expression 194s does not lose comments within if expression 194s registers an offense for a single method call with params and a block inside of an unless negative check for the object 194s registers an offense for a single method call with params inside of a check for the object 194s allows a single method call inside of a check for the object with an else 194s registers an offense for a single method call with a block inside of an unless nil check for the object 194s registers an offense for a single method call with params and a block inside of a non-nil check for the object 194s only moves comments that fall within the expression 194s registers an offense for a single method call inside of a non-nil check for the object 194s registers an offense for a single method call inside of an unless negative check for the object 194s registers an offense for a single method call inside of an unless nil check for the object 194s registers an offense for a single method call with a block inside of an unless negative check for the object 194s registers an offense for a single method call with params inside of an unless negative check for the object 194s registers an offense for a single method call with params and a block inside of a check for the object 194s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call with params inside of an unless nil check for the object 194s registers an offense for a single method call with params inside of a non-nil check for the object 194s registers an offense for a single method call inside of a check for the object 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s registers an offense for a single method call with a block inside of a non-nil check for the object 194s ternary expression 194s allows ternary expression 194s behaves like all variable types 194s object check before method call 194s allows a non object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with a block 194s allows a nil object check followed by a method call with params 194s allows a nil object check followed by a method call 194s allows a non object check followed by a method call with a block 194s allows a non object check followed by a method call 194s allows a non object check followed by a method call with params 194s ConvertCodeThatCanStartToReturnNil false 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method call 194s allows a non-nil object check followed by a method call with a block 194s allows a non-nil object check followed by a method call with params 194s allows a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method calls that nil responds to 194s registers an offense for an object check followed by a method call with params 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params and a block 194s allows a non-nil object check followed by a method call 194s method chaining 194s corrects an object check followed by a chained method call with a symbol proc 194s corrects an object check followed by a chained method call with params 194s corrects an object check followed by a chained method call 194s corrects an object check followed by a chained method call with a block 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for an object check followed by a method call 194s corrects an object check followed by a method call and another check 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with params 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call with params and a block 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s MaxChainLength: 1 194s registers an offense for an object check followed by 1 chained method calls 194s allows an object check followed by 2 chained method calls 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls with blocks 194s allows an object check followed by chained method calls 194s MaxChainLength: 3 194s registers an offense for an object check followed by 3 chained method calls 194s allows an object check followed by 4 chained method calls 194s if expression 194s only moves comments that fall within the expression 194s registers an offense for a single method call inside of an unless nil check for the object 194s registers an offense for a single method call with params inside of a non-nil check for the object 194s registers an offense for a single method call with params inside of a check for the object 194s registers an offense for a single method call with a block inside of an unless negative check for the object 194s registers an offense for a single method call with params and a block inside of an unless negative check for the object 194s does not lose comments within if expression 194s registers an offense for a single method call inside of an unless negative check for the object 194s registers an offense for a single method call with a block inside of a non-nil check for the object 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s registers an offense for a single method call with a block inside of an unless nil check for the object 194s registers an offense for a single method call inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call with params inside of an unless nil check for the object 194s allows a single method call inside of a check for the object with an else 194s registers an offense for a single method call inside of a check for the object 194s registers an offense for a single method call with params and a block inside of a non-nil check for the object 194s registers an offense for a single method call with params and a block inside of a check for the object 194s registers an offense for a single method call with params inside of an unless negative check for the object 194s ternary expression 194s allows ternary expression 194s modifier if 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for an object check followed by a method call with a comment at EOL 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like all variable types 194s object check before method call 194s allows a nil object check followed by a method call with a block 194s allows a non object check followed by a method call with a block 194s allows a non object check followed by a method call 194s allows a non object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with params and a block 194s allows a nil object check followed by a method call with params 194s allows a nil object check followed by a method call 194s allows a non object check followed by a method call with params 194s ConvertCodeThatCanStartToReturnNil false 194s registers an offense for an object check followed by a method call with params and a block 194s allows a non-nil object check followed by a method call with params and a block 194s allows a non-nil object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params 194s allows a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method calls that nil responds to 194s registers an offense for an object check followed by a method call with a block 194s allows a non-nil object check followed by a method call with params 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for an object check followed by a method call 194s method chaining 194s corrects an object check followed by a chained method call with params 194s corrects an object check followed by a chained method call with a symbol proc 194s corrects an object check followed by a chained method call with a block 194s corrects an object check followed by a chained method call 194s ConvertCodeThatCanStartToReturnNil true 194s registers an offense for a non-nil object check followed by a method call 194s registers an offense for an object check followed by a method call with a block 194s registers an offense for an object check followed by a method call with params 194s registers an offense for a check for the object followed by a method call in the condition for an if expression 194s registers an offense for a non-nil object check followed by a method call with params 194s registers an offense for an object check followed by a method call with params and a block 194s registers an offense for a non-nil object check followed by a method call with params and a block 194s registers an offense for an object check followed by a method call 194s corrects an object check followed by a method call and another check 194s registers an offense for a non-nil object check followed by a method call with a block 194s method chaining 194s registers an offense for an object check followed by chained method calls with blocks 194s with Lint/SafeNavigationChain disabled 194s allows an object check followed by chained method calls with blocks 194s allows an object check followed by chained method calls 194s MaxChainLength: 1 194s allows an object check followed by 2 chained method calls 194s registers an offense for an object check followed by 1 chained method calls 194s MaxChainLength: 3 194s registers an offense for an object check followed by 3 chained method calls 194s allows an object check followed by 4 chained method calls 194s modifier if 194s registers an offense for a method call safeguarded with a nil check for the object 194s registers an offense for a chained method call safeguarded with an unless nil check for the object 194s registers an offense for a method call safeguarded with a negative nil check for the object 194s registers an offense for a method call with a block safeguarded with a nil check for the object 194s registers an offense for a method call with a block safeguarded with a negative check for the object 194s registers an offense for a chained method call safeguarded with a negative nil check for the object 194s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 194s registers an offense for an object check followed by a method call with a comment at EOL 194s registers an offense for a method call with params safeguarded with a negative nil check for the object 194s registers an offense for a method call that nil responds to safe guarded by an object check 194s registers an offense for a method call safeguarded with a negative check for the object 194s registers an offense for a method call safeguarded with a check for the object 194s registers an offense for a chained method call safeguarded with a check for the object 194s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 194s registers an offense for a method call with a block safeguarded with a check for the object 194s registers an offense for a method call with params and a block safeguarded with a check for the object 194s registers an offense for a method call with a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 194s registers an offense for a method call with params safeguarded with a check for the object 194s registers an offense for a method call with params safeguarded with a negative check for the object 194s registers an offense for a method call with params and a block safeguarded with a negative check for the object 194s registers an offense for a method call with params and a block safeguarded with a nil check for the object 194s registers an offense for a method call with params safeguarded with a nil check for the object 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to yield safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to raise safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to throw safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to return safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to fail safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to next safe guarded by an object check 194s behaves like safe guarding logical break keywords 194s allows a method call being passed to break safe guarded by an object check 194s if expression 194s registers an offense for a single method call with params and a block inside of an unless nil check for the object 194s registers an offense for a single method call with params inside of a check for the object 194s registers an offense for a single method call with params inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of an unless nil check for the object 194s does not lose comments within if expression 194s registers an offense for a single method call inside of an unless nil check for the object 194s registers an offense for a single method call with params inside of an unless nil check for the object 194s registers an offense for a single method call with params and a block inside of a check for the object 194s registers an offense for a single method call with params and a block inside of a non-nil check for the object 194s registers an offense for a single method call with a block inside of an unless negative check for the object 194s registers an offense for a single method call with params and a block inside of an unless negative check for the object 194s registers an offense for a single method call inside of an unless negative check for the object 194s registers an offense for a single method call with a block inside of a check for the object 194s registers an offense for a single method call inside of a check for the object 194s registers an offense for a single method call inside of a non-nil check for the object 194s only moves comments that fall within the expression 194s allows a single method call inside of a check for the object with an else 194s registers an offense for a single method call with params inside of an unless negative check for the object 194s ternary expression 194s allows ternary expression 194s 194s RuboCop::Formatter::FuubarStyleFormatter 194s #with_color 194s when color is disabled 194s outputs nothing 194s when color is enabled 194s outputs coloring sequence code at the beginning and the end 194s #progressbar_color 194s when an error offense is detected in a file 194s is red 194s and then a convention offense is detected in the next file 194s is still red 194s when convention and error offenses are detected in a file 194s is red 194s when a offense is detected in a file and autocorrected 194s is green 194s when no offenses are detected in a file 194s is still green 194s when a convention offense is detected in a file 194s is yellow 194s initially 194s is green 194s 194s RuboCop::Cop::Lint::SafeNavigationWithEmpty 194s outside a conditional 194s registers no offense 194s in a conditional 194s does not register an offense on `.empty?` 194s registers an offense and corrects on `&.empty?` 194s 194s RuboCop::Cop::Naming::BlockForwarding 194s when `EnforcedStyle: anonymous 194s Ruby < 3.0 194s does not register an offense when not using anonymous block forwarding 194s Ruby >= 3.1 194s registers and corrects an offense when using explicit block forwarding without method body 194s registers and corrects an offense when using `yield` in method body 194s does not register an offense when using block argument as a variable 194s registers and corrects an only explicit block forwarding when using multiple proc arguments 194s registers and corrects an offense when using explicit block forwarding in singleton method 194s registers and corrects an offense when using explicit block forwarding without method definition parentheses 194s does not register an offense when defining without block argument method 194s does not register an offense when using anonymous block forwarding 194s does not register an offense when using anonymous block forwarding without method body 194s registers and corrects an offense when using symbol proc argument in method body 194s does not register an offense when defining no arguments method 194s does not register an offense when assigning the block arg 194s does not register an offense when defining kwarg with block args method 194s does not register an offense when defining kwoptarg with block args method 194s registers and corrects an offense when using explicit block forwarding 194s when `EnforcedStyle: explicit 194s Ruby >= 3.1 194s registers and corrects an offense when using `yield` in method body 194s does not register an offense when using explicit block forwarding 194s registers and corrects an offense when using anonymous block forwarding in singleton method 194s registers and corrects an offense when using anonymous block forwarding 194s does not register an offense when defining without block argument method 194s does not register an offense when assigning the block arg 194s registers and corrects and corrects an offense when using anonymous block forwarding without method body 194s registers and corrects an offense when using symbol proc argument in method body 194s does not register an offense when using explicit block forwarding without method body 194s when `BlockForwardingName: proc 194s registers and corrects an offense when using anonymous block forwarding 194s when `BlockForwardingName: block` is already in use 194s registers and no corrects an offense when using anonymous block forwarding 194s 194s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 194s behaves like deprecated attributes 194s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 194s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 194s registers and corrects an offense when using `spec.rubygems_version =` 194s registers and corrects an offense when using `s.rubygems_version =` 194s behaves like deprecated attributes with addition 194s registers and corrects an offense when using `s.rubygems_version +=` 194s registers and corrects an offense when using `spec.rubygems_version +=` 194s behaves like deprecated attributes 194s registers and corrects an offense when using `s.rubygems_version =` 194s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 194s registers and corrects an offense when using `spec.rubygems_version =` 194s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 194s behaves like deprecated attributes 194s registers and corrects an offense when using `s.rubygems_version =` 194s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 194s registers and corrects an offense when using `spec.rubygems_version =` 194s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 194s behaves like deprecated attributes 194s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 194s registers and corrects an offense when using `spec.rubygems_version =` 194s registers and corrects an offense when using `s.rubygems_version =` 194s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 194s 194s RuboCop::Cop::Layout::FirstArrayElementIndentation 194s when array is method argument 194s and arguments are surrounded by parentheses 194s and EnforcedStyle is special_inside_parentheses 194s accepts normal indentation for array within array 194s 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 195s accepts special indentation for first argument 195s registers an offense and corrects 'align_brackets' indentation 195s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 195s registers an offense and corrects 'consistent' indentation 195s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 195s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 195s accepts special indentation for second argument 195s when using safe navigation operator 195s registers an offense and corrects 'consistent' indentation 195s and EnforcedStyle is consistent 195s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 195s accepts normal indentation for first argument 195s accepts normal indentation for second argument 195s registers an offense and corrects incorrect indentation 195s 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 195s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 195s 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 195s and argument are not surrounded by parentheses 195s accepts single line array with brackets 195s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 195s accepts a correctly indented multi-line array with brackets 195s 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 195s accepts bracketless array 195s registers an offense and corrects incorrectly indented multi-line array with brackets 195s 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 195s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 195s when array is operand 195s registers an offense and corrects incorrectly indented first element 195s accepts correctly indented first element 195s registers an offense and corrects incorrectly indented ] 195s when indentation width is overridden for this cop 195s registers an offense and corrects incorrectly indented 1st element 195s accepts correctly indented first element 195s when array is right hand side in assignment 195s accepts a first element on the same line as the left bracket 195s accepts an empty array 195s accepts single line array 195s accepts multi-assignments with brackets 195s registers an offense and corrects incorrectly indented first element 195s accepts correctly indented first element 195s accepts multi-assignments with no brackets 195s accepts several elements per line 195s when array is argument to setter 195s accepts correctly indented first element 195s registers an offense and corrects incorrectly indented first element 195s when EnforcedStyle is align_brackets 195s accepts correctly indented first element 195s accepts several elements per line 195s accepts single line array 195s accepts an empty array 195s registers an offense and corrects incorrectly indented ] 195s accepts multi-assignments with no brackets 195s accepts multi-assignments with brackets 195s accepts a first element on the same line as the left bracket 195s when indentation width is overridden for this cop 195s registers an offense and corrects indentation that does not match IndentationWidth 195s accepts correctly indented first element 195s when 'consistent' style is used 195s registers an offense and corrects incorrect indentation 195s registers an offense and corrects incorrectly indented 1st element 195s when 'special_inside_parentheses' style is used 195s registers an offense and corrects incorrect indentation 195s 195s RuboCop::Cop::Naming::BinaryOperatorParameterName 195s registers an offense and corrects when argument is referenced in method body 195s does not register an offense for the match operator 195s registers an offense and corrects for `#eql?` when argument is not named other 195s registers an offense and corrects for `#+` when argument is not named other 195s works properly even if the argument not surrounded with braces 195s does not register an offense for []= 195s registers an offense and corrects when assigned to argument in method body 195s does not register an offense for non binary operators 195s does not register an offense for arg named _other 195s does not register an offense for === 195s registers an offense and corrects for `#equal?` when argument is not named other 195s does not register an offense for << 195s does not register an offense for multibyte character method name 195s does not register an offense for [] 195s does not register an offense for arg named other 195s 195s RuboCop::Formatter::JUnitFormatter 195s #file_finished 195s displays start of parsable text 195s displays a non-offense element in parsable text 195s displays an offense for `classname='test_1` in parsable text 195s displays an offense for `classname='test_2` in parsable text 195s displays end of parsable text 195s 195s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 195s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 195s registers an offense and corrects when using `loc.first_line` 195s registers an offense and corrects when using `first_line` 195s registers an offense and corrects when using `source_range.first_line` 195s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 195s does not register an offense when using `same_line?` 195s 195s RuboCop::Cop::Lint::BigDecimalNew 195s registers an offense and corrects using `::BigDecimal.new()` 195s registers an offense and corrects using `BigDecimal.new()` 195s does not register an offense when using `BigDecimal()` 195s 195s RuboCop::Cop::Lint::FloatComparison 195s does not register an offense when comparing with float using epsilon 195s registers an offense when comparing with arightmetic operator on floats 195s registers an offense when comparing with method on float receiver 195s registers an offense when comparing with float method that can return numeric and returns float 195s does not register an offense when comparing with float method that can return numeric and returns integer 195s registers an offense when comparing with float returning method 195s registers an offense when comparing with float 195s 195s RuboCop::Cop::Style::Copyright 195s does not register an offense when the notice is not the first comment 195s does not register an offense when the notice is present 195s does not register an offense when the notice is in a block comment 195s when the copyright notice is missing and the source code file starts with an encoding comment 195s adds an offense 195s when the copyright notice is missing and the source code file starts with a shebang 195s adds an offense 195s when the copyright notice is missing 195s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 195s fails to autocorrect if no AutocorrectNotice is given 195s adds an offense 195s when the copyright notice comes after any code 195s adds an offense 195s when the source code file is empty 195s adds an offense 195s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 195s adds an offense 195s 195s RuboCop::Cop::Layout::IndentationStyle 195s when EnforcedStyle is spaces 195s registers and corrects an offense for a line indented with multiple tabs 195s accepts a line which begins with tab in a string 195s accepts a line which begins with tab in a heredoc 195s registers offenses before __END__ but not after 195s registers and corrects an offense for a line indented with mixed whitespaces 195s registers and corrects an offense for a line indented with tab 195s accepts a line with tab in a string 195s accepts a line with a tab between string literals 195s accepts a line which begins with tab in a multiline heredoc 195s registers and corrects an offense for a line with tab in a string indented with tab 195s accepts a line with a tab other than indentation 195s custom indentation width 195s uses the configured number of spaces to replace a tab 195s when EnforcedStyle is tabs 195s accepts a line which begins with tab in a string 195s registers and corrects an offense for a line indented with space 195s registers and corrects an offense for a line indented with multiple spaces 195s accepts a line with tab in a string 195s accepts a line which begins with tab in a multiline heredoc 195s registers an offense for a line indented with mixed whitespace 195s accepts a line a tab other than indentation 195s accepts a line with tabs between string literals 195s accepts a line which begins with tab in a heredoc 195s registers offenses before __END__ but not after 195s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 195s registers and corrects an offense for a line with tab in a string indented with space 195s custom indentation width 195s uses the configured number of spaces to replace with a tab 195s 195s RuboCop::Cop::InternalAffairs::UndefinedConfig 195s registers an offense when the cop inherits `RuboCop::Cop::Base` 195s registers an offense when the cop is not within the `RuboCop::Cop` namespace 195s registers an offense when the cop inherits `Cop::Base` 195s ignores `cop_config` in non-cop classes 195s works with deeper nested cop names 195s does not register an offense for implicit configuration keys 195s can handle an empty file 195s ignores `cop_config` in non-cop subclasses 195s registers an offense when the cop has no configuration at all 195s works when the base class is `Cop` instead of `Base` 195s registers an offense when the cop inherits `::RuboCop::Cop::Base` 195s does not register an offense if using `cop_config` outside of a cop class 195s element lookup 195s registers an offense for missing configuration keys 195s does not register an offense for defined configuration keys 195s fetch 195s does not register an offense for defined configuration keys 195s registers an offense for missing configuration keys 195s with a default value 195s registers an offense for missing configuration keys 195s does not register an offense for defined configuration keys 195s 195s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 195s does not register an offense when using `:ruby30` only 195s does not register an offense when not using `:config` 195s registers an offense when using `:config` parameter 195s registers an offense when using `:config` parameter with other parameters 195s does not register an offense when using `:config` in other than `context` 195s 195s RuboCop::Cop::Registry 195s can filter down to all but one type 195s exposes the number of stored cops 195s exposes a mapping of cop names to cop classes 195s exposes a list of cop names 195s can filter down to one type 195s exposes cop departments 195s can be cloned 195s names_for_department 195s returns array of cops for specified department 195s #enabled 195s selects only safe cops if :safe passed 195s selects cops which are enabled in the config 195s overrides config if :only includes the cop 195s when new cops are introduced 195s does not include them 195s overrides config if :only includes the cop 195s when specifying `NewCops: disable` option in .rubocop.yml 195s does not include them 195s when specifying `NewCops: pending` option in .rubocop.yml 195s does not include them 195s when specifying `--enable-pending-cops` command-line option 195s includes them 195s when specifying `NewCops: disable` option in .rubocop.yml 195s includes them because command-line option takes precedence over .rubocop.yml 195s when specifying `NewCops: enable` option in .rubocop.yml 195s includes them 195s when specifying `--disable-pending-cops` command-line option 195s does not include them 195s when specifying `NewCops: enable` option in .rubocop.yml 195s does not include them because command-line option takes precedence over .rubocop.yml 195s #contains_cop_matching? 195s returns false for cops not included in the store 195s can find cops matching a given name 195s #department? 195s returns false for other names 195s returns true for department name 195s when dismissing a cop class 195s allows re-listing 195s allows it if done rapidly 195s disallows it if done too late 195s #cops 195s exposes a list of cops 195s with cops having the same inner-most module 195s exposes both cops 195s #qualified_cop_name 195s qualifies names with the correct namespace 195s emits a warning when namespace is incorrect 195s gives back already properly qualified names 195s raises an error when a cop name is ambiguous 195s returns the provided name if no namespace is found 195s qualifies names without a namespace 195s 195s RuboCop::Cop::InternalAffairs::MethodNameEqual 195s does not register an offense when using `#method?` 195s registers an offense when using `#method == :do_something` 195s registers an offense when using `#method == other_node.do_something` 195s 195s RuboCop::Cop::Style::OptionHash 195s registers an offense 195s when the last argument is an options hash named something else 195s does not register an offense 195s when the argument name is in the list of suspicious names 195s registers an offense 195s when there are no arguments 195s does not register an offense 195s permitted list 195s ignores if the method is permitted 195s when passing options hash to super 195s does not register an offense when call to super is in a nested block 195s does not register an offense 195s does not register an offense when code exists before call to super 195s when the last argument is a non-options-hash optional hash 195s does not register an offense 195s 195s RuboCop::Cop::Style::IdenticalConditionalBranches 195s on if..else with identical bodies 195s registers and corrects an offense 195s on if..else with identical leading lines 195s registers and corrects an offense 195s on if..elsif with no else 195s doesn't register an offense 195s on case with empty when 195s doesn't register an offense 195s with empty brace 195s does not raise any error 195s on case..when with identical bodies and assigning to a variable used in `case` condition 195s doesn't register an offense 195s when one of the case branches is empty 195s does not register an offense 195s on if..else with slightly different trailing lines 195s doesn't register an offense 195s on if..else with identical trailing lines 195s registers and corrects an offense 195s on case with identical trailing lines 195s registers and corrects an offense 195s on case with identical leading lines 195s registers and corrects an offense 195s on case without else 195s doesn't register an offense 195s with a ternary 195s registers an offense 195s when using pattern matching 195s on case-match with identical bodies 195s registers an offense and corrects 195s on case..in with identical bodies and assigning to a variable used in `case` condition 195s doesn't register an offense 195s on case-match with identical trailing lines 195s registers and corrects an offense 195s on case-match with identical leading lines 195s registers and corrects an offense 195s on case-match without else 195s doesn't register an offense 195s when one of the case-match branches is empty 195s does not register an offense 195s on case-match with empty when 195s doesn't register an offense 195s on if..else with identical bodies and assigning to a variable used in `if` condition 195s doesn't register an offense 195s on case with identical bodies 195s registers an offense and corrects 195s 195s RuboCop::Cop::Lint::OutOfRangeRegexpRef 195s does not register an offense when in range references are used inside a when clause 195s uses the maximum number of captures for when clauses with multiple conditions 195s registers an offense when out of range references are used inside a when clause 195s registers an offense when out of range references are used for non captures 195s does not register offense to a regexp with encoding option and valid references for numbered captures 195s does not register offense to a regexp with valid references for a mix named and numbered captures 195s registers an offense when out of range references are used for named captures 195s does not register offense to a regexp with valid references for named captures 195s does not register an offense regexp containing non literal 195s only registers an offense for when clauses when the regexp is matched as a literal 195s registers an offense when the regexp is matched with `match` 195s registers an offense when out of range references are used for mix of numbered and named captures 195s registers an offense when the regexp appears on the right hand side of `=~` 195s ignores regexp when clause conditions that contain interpolations 195s registers an offense when the regexp is matched with `===` 195s ignores `match` with no arguments 195s only registers an offense when the regexp is matched as a literal 195s ignores calls to `match?` 195s ignores `match` with no receiver 195s registers an offense when references are used before any regexp 195s does not register offense to a regexp with valid references for numbered captures 195s registers an offense when out of range references are used for numbered captures 195s matching with rpartition 195s only registers an offense when the regexp is matched as a literal 195s registers an offense when out of range references are used 195s does not register an offense when in range references are used 195s matching with index 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s matching with start_with? 195s only registers an offense when the regexp is matched as a literal 195s registers an offense when out of range references are used 195s does not register an offense when in range references are used 195s matching with scan 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s matching with sub! 195s registers an offense when out of range references are used 195s does not register an offense when in range references are used 195s only registers an offense when the regexp is matched as a literal 195s matching with match 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s matching with slice! 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s matching with rindex 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s matching with slice 195s does not register an offense when in range references are used 195s only registers an offense when the regexp is matched as a literal 195s registers an offense when out of range references are used 195s when both the LHS and RHS use regexp 195s only considers the RHS regexp 195s matching with `[]` 195s only registers an offense when the regexp is matched as a literal 195s registers an offense when out of range references are used 195s does not register an offense when in range references are used 195s matching with `grep` 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s matching with gsub 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s matching with sub 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s when calling a regexp method on a nth-ref node 195s does not register an offense when calling gsub on a valid nth-ref 195s registers an offense if the capturing groups have changed 195s registers an offense when calling gsub on an invalid nth-ref 195s matching with gsub! 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s matching with end_with? 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s does not register an offense when in range references are used 195s matching with partition 195s does not register an offense when in range references are used 195s registers an offense when out of range references are used 195s only registers an offense when the regexp is matched as a literal 195s 195s RuboCop::Cop::Style::HashAsLastArrayItem 195s when EnforcedStyle is braces 195s does not register an offense when hash is not inside array 195s does not register an offense when using double splat operator 195s does not register an offense when the array is all hashes 195s does not register an offense when hash with braces 195s does not register an offense when the hash is empty 195s registers an offense and corrects when hash without braces 195s when EnforcedStyle is no_braces 195s does not register an offense when hash is not the last element 195s does not register an offense when hash is not inside array 195s registers an offense and corrects when hash with braces and trailing comma 195s does not register an offense when hash without braces 195s does not register an offense when the hash is empty 195s registers an offense and corrects when hash with braces and trailing comma and new line 195s does not register an offense when the array is all hashes 195s registers an offense and corrects when hash with braces 195s does not register an offense when passing an implicit array to a setter 195s 195s RuboCop::Cop::Style::ColonMethodDefinition 195s accepts a class method defined using . 195s using the class name 195s registers an offense for a class method defined using :: 195s using self 195s registers an offense for a class method defined using :: 195s 195s RuboCop::Cop::Lint::RequireParentheses 195s accepts calls to methods that are setters 195s registers an offense for missing parentheses around expression in ternary 195s accepts calls to methods that are operators 195s accepts method calls without parentheses followed by keyword and/or 195s accepts missing parentheses when using ternary operator in square bracksts 195s accepts missing parentheses around expression with + operator 195s accepts missing parentheses when method is not a predicate 195s registers an offense for missing parentheses around expression with && operator 195s accepts method call with parentheses in ternary 195s registers an offense for missing parentheses around expression with || operator 195s accepts method calls that are all operations 195s accepts missing parentheses when using ternary operator 195s accepts condition that is not a call 195s accepts parentheses around expression with boolean operator 195s when using safe navigation operator 195s registers an offense for missing parentheses around expression with && operator 195s 195s RuboCop::Cop::InternalAffairs::MethodNameEndWith 195s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 195s does not register offense if argument for end_with? is some other string 195s registers an offense if there is potentially usage of `assignment_method?` 195s registers offense if there is potentially usage of `bang_method?` 195s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 195s registers offense if there is potentially usage of `predicate_method?` 195s Ruby >= 2.7 195s registers an offense if method_name is symbol 195s does not register offense if argument for Symbol#end_with? is some other string 195s registers an offense if method_name is symbol with safe navigation operator 195s registers offense if argument for Symbol#end_with? is '?' 195s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 195s registers offense if argument for Symbol#end_with? is '!' 195s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 195s 195s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 195s registers an offense when unrecognized_style_detected is used in a conditional expression 195s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 195s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 195s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 195s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 195s registers an offense when unexpected_style_detected is used in a conditional expression 195s registers an offense when ambiguous_style_detected is used in a conditional expression 195s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 195s registers an offense when correct_style_detected is used in a conditional expression 195s registers an offense when opposite_style_detected is used in a conditional expression 195s does not register an offense when correct_style_detected and a opposite_style_detected are both used 195s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 195s registers an offense when no_acceptable_style! is used in a conditional expression 195s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 195s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 195s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 195s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 195s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 195s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 195s registers an offense when conflicting_styles_detected is used in a conditional expression 195s 195s isolated environment 195s is not affected by a config file above the work directory 195s 195s RuboCop::Cop::Style::RedundantCapitalW 195s registers no offense for normal arrays of strings with interpolation 195s does not register an offense for array of non-words 195s registers no offense for %W with special characters 195s registers no offense for %w with interpolation-like syntax 195s registers an offense for misused %W 195s registers no offense for arrays with character constants 195s registers no offense for %w without interpolation 195s registers no offense for %W with interpolation 195s does not register an offense for array with one element 195s does not register an offense for array containing non-string 195s registers an offense for misused %W with different bracket 195s does not register an offense for array with empty strings 195s registers no offense for normal arrays of strings 195s 195s RuboCop::Cop::Layout::LineContinuationLeadingSpace 195s EnforcedStyle: leading 195s puts the offense message in correct position also on indented line 195s registers offense in the right location when 1st line is not the string 195s registers offenses when 1st and 2nd line has trailing spaces 195s registers an offense when 1st line has one trailing space 196s marks the correct range when string is a block method argument 196s registers an offense when 1st line has multiple trailing spaces 196s marks the correct range when string is a positional method argument 196s interpolated strings 196s registers no offense for correctly formatted multiline interpolation 196s registers no offense on doubly interpolated string alone 196s registers no offense for correctly formatted multiline interpolated string 196s registers no offense on interpolated string alone 196s registers offenses when 1st line has leading spaces and 1st line is interpolated 196s registers an offense for incorrectly formatted multiline interpolated string 196s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 196s EnforcedStyle: trailing 196s marks the correct range when string is a block method argument 196s registers an offense when 2nd line has one leading space 196s registers offense in the right location when 1st line is not the string 196s registers an offense when 2nd line has multiple leading spaces 196s registers offenses when 2nd and 3rd line has leading spaces 196s marks the correct range when string is a positional method argument 196s puts the offense message in correct position also on indented line 196s interpolated strings 196s registers no offense for correctly formatted multiline interpolated string 196s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 196s registers no offense for correctly formatted multiline interpolation 196s registers offenses when 2nd line has leading spaces and 1st line is interpolated 196s registers no offense on interpolated string alone 196s registers no offense on doubly interpolated string alone 196s registers an offense for incorrectly formatted multiline interpolated string 196s 196s RuboCop::Cop::Layout::SpaceInsideParens 196s when EnforcedStyle is space 196s accepts parentheses with line break 196s registers an offense for no spaces inside parens 196s registers an offense in block parameter list with no spaces 196s registers an offense for space inside empty parens 196s registers an offense for no space around heredoc start 196s accepts parentheses with spaces 196s accepts parentheses with comment and line break 196s accepts empty parentheses without spaces 196s when EnforcedStyle is no_space 196s accepts parentheses in block parameter list 196s registers an offense for space around heredoc start 196s accepts parentheses with comment and line break 196s registers an offense for spaces inside parens 196s accepts parentheses with line break 196s accepts parentheses with no spaces 196s when EnforcedStyle is compact 196s registers an offense for space between consecutive brackets 196s registers an offense for no space around heredoc start 196s accepts parentheses with spaces 196s accepts three consecutive right parentheses 196s registers an offense for no spaces inside parens 196s accepts three consecutive left parentheses 196s accepts parentheses with line break 196s accepts two consecutive right parentheses 196s accepts empty parentheses without spaces 196s accepts two consecutive left parentheses 196s registers an offense in block parameter list with no spaces 196s accepts parentheses with comment and line break 196s registers multiple offense for a missing and extra space between consecutive brackets 196s registers an offense for space inside empty parens 196s 196s RuboCop::Cop::Lint::NextWithoutAccumulator 196s behaves like reduce/inject 196s given a inject block 196s registers an offense for a bare next 196s accepts next within a nested block 196s accepts next with a value 196s Ruby 2.7 196s registers an offense for a bare next 196s given an unrelated block 196s accepts next with a value 196s accepts a bare next 196s behaves like reduce/inject 196s given a reduce block 196s accepts next within a nested block 196s accepts next with a value 196s registers an offense for a bare next 196s Ruby 2.7 196s registers an offense for a bare next 196s 196s RuboCop::Cop::Layout::SpaceAfterNot 196s registers an offense and corrects a single space after ! 196s registers an offense and corrects multiple spaces after ! 196s accepts space after not keyword 196s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 196s accepts no space after ! 196s 196s RuboCop::Cop::Lint::UselessAssignment 196s when an assignment in a if branch is referenced in another if branch 196s accepts 196s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 196s registers an offense 196s when a optional keyword method argument is not used 196s accepts 196s when a rescued error variable is wrongly tried to be referenced in another rescue body 196s registers an offense 196s when a block method argument is not used 196s accepts 196s when a block argument is not used 196s accepts 196s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 196s accepts 196s when a variable is reassigned multiple times in main body of begin then referenced in ensure 196s accepts 196s when a variable is assigned multiple times but unreferenced 196s registers offenses for each assignment 196s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 196s registers an offense for the assignment in the if branch 196s when a variable is assigned while being passed to a method taking block 196s and the variable is used 196s accepts 196s and the variable is not used 196s registers an offense 196s when a variable is assigned and unreferenced in a method 196s registers an offense 196s when an unreferenced variable is reassigned in a block 196s accepts 196s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 196s registers an offense for the reassignment in the if branch 196s when a block local variable is assigned and unreferenced 196s registers offenses for the assignment 196s when a variable is reassigned with binary operator assignment and referenced 196s accepts 196s when a keyword splat method argument is used 196s accepts 196s when a variable is assigned in loop body and unreferenced 196s registers an offense 196s when a variable is assigned on each side of && and referenced after the && 196s accepts 196s when a variable is assigned in single branch if and unreferenced 196s registers an offense 196s when a variable is assigned with ||= at the last expression of the scope 196s registers an offense 196s when a variable is assigned at the end of rescue and would be referenced with retry 196s accepts 196s when a variable is assigned and unreferenced in a singleton method defined with variable name 196s registers an offense 196s when a method argument is reassigned and zero arity super is called 196s accepts 196s when a variable is assigned first with ||= and referenced 196s accepts 196s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 196s registers an offense 196s when a variable is assigned in begin and referenced outside 196s accepts 196s when a variable is assigned and assigned again in a modifier condition 196s accepts without parentheses 196s accepts with parentheses 196s when a method argument is not used 196s accepts 196s when a named capture is unreferenced in top level 196s registers an offense 196s when an anonymous keyword splat method argument is defined 196s accepts 196s when a variable is reassigned multiple times in main body of begin then referenced after the begin 196s accepts 196s when a variable is assigned with operator assignment in top level 196s registers an offense 196s when a block local variable is declared but not assigned 196s accepts 196s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 196s registers an offense for the reassignment in the if branch 196s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 196s registers an offense for the reassignment in the if branch 196s when a variable is assigned and unreferenced in a class 196s registers an offense 196s when a variable is assigned in each branch of if and referenced after the branching 196s accepts 196s when a variable is assigned in loop body and referenced in post until condition 196s accepts 196s when a variable is reassigned in single branch if and referenced after the branching 196s accepts 196s when a referenced variable is reassigned but not re-referenced 196s registers an offense for the non-re-referenced assignment 196s when a variable is assigned and unreferenced in top level 196s registers an offense 196s when a variable is assigned and unreferenced in a singleton class 196s registers an offense 196s when a variable is assigned and unreferenced in a module 196s registers an offense 196s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 196s registers an offense 196s when a named capture is referenced 196s accepts 196s when a unreferenced variable is reassigned on the right side of && and referenced after the && 196s accepts 196s when a local variable is unreferenced and zero arity super is called 196s registers an offense 196s when a variable is assigned and passed to a method followed by method taking block 196s accepts 196s when an optional method argument is not used 196s accepts 196s when a variable is reassigned with logical operator assignment and referenced 196s accepts 196s when a variable is assigned and unreferenced in a singleton method defined with self keyword 196s registers an offense 196s when a keyword splat method argument is not used 196s accepts 196s when a unreferenced variable is reassigned on the left side of && and referenced after the && 196s registers an offense for the unreferenced assignment 196s when a variable is reassigned multiple times in main body of begin then referenced in rescue 196s accepts 196s when a variable is assigned with ||= before the last expression of the scope 196s registers an offense 196s inside a `case-match` node 196s does not register an offense when the variable is used 196s when a referenced variable is reassigned but not re-referenced in a method defined in loop 196s registers an offense 196s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 196s registers offenses for each assignment before ensure 196s when a method argument is reassigned but not passed to super 196s registers an offense 196s when a variable is assigned in each branch of if and referenced in the else branch 196s registers an offense for the assignment in the if branch 196s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 196s registers an offense for the assignment in rhs 196s when a variable is assigned in 2 identical if branches 196s doesn't think 1 of the 2 assignments is useless 196s when a variable is assigned with operator assignment in rescue and would be referenced with retry 196s accepts 196s similar name suggestion 196s when there's a similar variable-like method invocation 196s suggests the method name 196s when there's a similar method invocation with arguments 196s does not suggest any name 196s when there's a similar variable 196s suggests the variable name 196s when there's a similar method invocation with explicit receiver 196s does not suggest any name 196s when there's a similar name but it's in inner scope 196s does not suggest any name 196s when there are only less similar names 196s does not suggest any name 196s when a variable is referenced in rhs of named capture expression 196s accepts 196s when a splat method argument is not used 196s accepts 196s when a variable is reassigned in a loop 196s while loop 196s accepts 196s for loop 196s accepts 196s post until loop 196s accepts 196s until loop 196s accepts 196s post while loop 196s accepts 196s when a variable is reassigned multiple times in rescue and referenced after the begin 196s registers an offense 196s when a variable is reassigned at the end of loop body and would be referenced in next iteration 196s accepts 196s when a variable is shadowed by a block argument and unreferenced 196s registers an offense 196s when a variable is reassigned at the end of loop body and would be referenced in loop condition 196s accepts 196s when a variable is assigned with multiple assignment and unreferenced 196s registers an offense 196s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 196s accepts 196s when there is only one AST node and it is unused variable 196s registers an offense 196s when a setter is invoked with operator assignment in loop body 196s accepts 196s when a named capture is unreferenced in other than top level 196s registers an offense 196s when a unreferenced variable is reassigned in same branch and referenced after the branching 196s registers an offense for the unreferenced assignment 196s when a variable is not used and the name starts with _ 196s accepts 196s when a referenced variable is reassigned in a block 196s accepts 196s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 196s registers an offense 196s when a variable is assigned in loop body and referenced in post while condition 196s accepts 196s when a variable is assigned in main body of begin with rescue but unreferenced 196s registers an offense 196s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 196s registers an offense 196s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 196s accepts 196s when a variable is reassigned while referencing itself in rhs and referenced 196s accepts 196s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 196s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 196s when a variable is reassigned in single branch if and referenced in the branch 196s registers an offense for the unreferenced assignment 196s when an unreferenced variable is reassigned and re-referenced 196s registers an offense for the unreferenced assignment 196s when a variable is assigned and referenced when defining a module 196s does not register an offense 196s 196s RuboCop::Formatter::ClangStyleFormatter 196s #report_file 196s displays text containing the offending source line 196s when the source contains multibyte characters 196s displays text containing the offending source line 196s when the offense is automatically corrected 196s prints [Corrected] along with message 196s when the offense is correctable 196s prints message as-is 196s when the offense is not corrected 196s prints message as-is 196s when the offending source spans multiple lines 196s displays the first line with ellipses 196s when the source line is blank 196s does not display offending source line 196s 196s RuboCop::Cop::Style::MissingRespondToMissing 196s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 196s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 196s registers an offense when method_missing is implemented as a class methods 196s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 196s allows method_missing and respond_to_missing? implemented as class methods 196s allows method_missing and respond_to_missing? when defined with inline access modifier 196s registers an offense when respond_to_missing? is not implemented 196s allows method_missing and respond_to_missing? implemented as instance methods 196s 196s RuboCop::Cop::Lint::OrderedMagicComments 196s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 196s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 196s does not register an offense when using `encoding` magic comment is next of shebang 196s does not register an offense when using `frozen_string_literal` magic comment only 196s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 196s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 196s does not register an offense when using `encoding` magic comment only 196s does not register an offense when using `encoding` magic comment is first line 196s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 196s 196s RuboCop::Cop::Style::IfWithSemicolon 196s registers an offense and corrects for one line if/;/end 196s can handle modifier conditionals 196s accepts without `else` branch 196s when elsif is present 196s accepts without `else` branch 196s accepts with `else` branch 196s accepts second elsif block 196s 196s RuboCop::Cop::Team 196s #inspect_file 196s returns offenses 196s when Cop#on_* raises an error 196s records Team#errors 196s when autocorrection is enabled and file encoding is mismatch 196s no error occurs 196s when autocorrection is enabled 196s still returns offenses 196s does autocorrection 196s when a correction raises an error 196s records Team#errors 196s when Parser reports non-fatal warning for the file 196s returns Parser warning offenses 196s returns offenses from cops 196s when a cop has no interest in the file 196s returns all offenses except the ones of the cop 196s when done twice 196s allows cops to get ready 196s #debug? 196s when { debug: true } is passed to .new 197s is expected to be truthy 197s when the option argument of .new is omitted 197s is expected to be falsey 197s #autocorrect? 197s when the option argument of .new is omitted 197s is expected to be falsey 197s when { autocorrect: true } is passed to .new 197s is expected to be truthy 197s when incompatible cops are correcting together 198s autocorrects without SyntaxError 198s .new 198s accepts cops directly classes 198s calls mobilize when passed classes 198s #external_dependency_checksum 198s does not error with no cops 198s when a cop joins 198s returns string 198s when multiple cops join 198s returns string 198s when cop with different checksum joins 198s has a different checksum for the whole team 198s #forces 198s returns force instances 198s when no cops joined force 198s returns nothing 198s when a cop joined a force 198s returns the force 198s when multiple cops joined a same force 198s returns only one force instance 198s #cops 198s returns cop instances 198s when some classes are disabled with config 198s does not return instances of the classes 198s when only some cop classes are passed to .new 198s returns only instances of the classes 198s 198s RuboCop::ConfigRegeneration 198s #options 198s it parses options from the generation comment 198s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 198s when there is a blank todo file 198s is expected to eq {:auto_gen_config=>true} 198s when no todo file exists 198s is expected to eq {:auto_gen_config=>true} 198s when the todo file is malformed 198s is expected to eq {:auto_gen_config=>true} 198s 198s RuboCop::Cop::Style::AccessorGrouping 198s when EnforcedStyle is grouped 198s does not register an offense when the same accessor is given more than once in the same statement 198s does not register offense for accessors with comments 198s registers an offense and corrects when using separated accessors 198s registers an offense and corrects when using separated accessors within eigenclass 198s registers offense and corrects if at least two separate accessors without comments 198s registers an offense and corrects when using separated accessors with different access modifiers 198s does not register an offense when using grouped accessors 198s registers an offense and correct if the same accessor is listed twice 198s when EnforcedStyle is separated 198s registers an offense and corrects when using grouped accessors 198s registers an offense and corrects when the same accessor is given more than once in the same statement 198s registers an offense and corrects when using grouped accessors with different access modifiers 198s does not register an offense if the same accessor is listed twice 198s does not register an offense for grouped accessors with comments 198s registers an offense and corrects when using grouped accessors within eigenclass 198s does not register an offense when using separated accessors 198s when there are comments for attributes 198s registers and corrects an offense 198s 198s RuboCop::Cop::Lint::UriEscapeUnescape 198s registers an offense when using `URI.decode(enc_uri)` 198s registers an offense when using `::URI.encode('http://example.com)` 198s registers an offense when using `URI.escape('@?@!', '!?')` 198s registers an offense when using `URI.unescape(enc_uri)` 198s registers an offense when using `URI.escape('http://example.com')` 198s registers an offense when using `::URI.unescape(enc_uri)` 198s registers an offense when using `URI.encode('http://example.com')` 198s registers an offense when using `::URI.decode(enc_uri)` 198s registers an offense when using `::URI.escape('http://example.com')` 198s 198s RuboCop::Cop::Layout::EmptyLineBetweenDefs 198s finds offenses in inner classes 198s doesn't allow more than the required number of newlines 198s registers an offense for multiple one-liners on the same line 198s autocorrects when there are too many new lines 198s accepts a nested def 198s accepts a def that follows a line with code 198s registers an offense for adjacent one-liners by default 198s accepts a def that follows code and a comment 198s accepts a def that follows an empty line and then a comment 198s accepts the first def without leading empty line in a class 198s treats lines with whitespaces as blank 198s accepts a def that is the first of a module 198s when a maximum of empty lines is specified 198s finds no offense for one empty line 198s finds no offense for no empty line 198s finds an offense for two empty lines 198s class methods 198s adjacent class methods 198s registers an offense for missing blank line between methods 198s mixed instance and class methods 198s registers an offense for missing blank line between methods 198s EmptyLineBetweenClassDefs 198s registers offense when no empty lines between class and method definitions 198s when disabled 198s does not register offense 198s with AllowAdjacentOneLineDefs enabled 198s does not register offense 198s endless methods 198s with AllowAdjacentOneLineDefs: false 198s registers an offense and corrects 198s with AllowAdjacentOneLineDefs: true 198s does not register an offense 198s between endless class method and regular methods 198s registers an offense and corrects 198s between endless and regular methods 198s registers an offense and corrects 198s between regular and endless methods 198s registers an offense and corrects 198s between endless class method and regular class methods 198s registers an offense and corrects 198s when empty lines between classes and modules together 198s registers offense when no empty lines between module and method definitions 198s conditional method definitions 198s registers an offense for consecutive defs inside a conditional 198s accepts defs inside a conditional without blank lines in between 198s when multiple lines between defs are allowed 198s treats lines with whitespaces as blank 198s registers an offense and corrects when there are too many new lines 198s when there are only comments between defs 198s registers an offense 198s when AllowAdjacentOneLineDefs is enabled 198s accepts adjacent one-liners 198s registers an offense for adjacent defs if some are multi-line 198s EmptyLineBetweenModuleDefs 198s registers offense when no empty lines between module and method definitions 198s when disabled 198s does not register offense 198s 198s RuboCop::Cop::Style::PreferredHashMethods 198s with enforced `verbose` style 198s accepts key? with no args 198s accepts value? with no args 198s registers an offense for key? with one arg 198s registers an offense for value? with one arg 198s with enforced `short` style 198s accepts has_value? with no args 198s registers an offense for has_value? with one arg 198s registers an offense for has_key? with one arg 198s accepts has_key? with no args 198s when using safe navigation operator 198s registers an offense for has_value? with one arg 198s 198s RuboCop::Cop::Layout::SpaceBeforeFirstArg 198s for method calls with parentheses 198s accepts a method call without space 198s accepts a method call with space after the left parenthesis 198s for method calls without parentheses 198s registers an offense for method call with no spaces before the first arg 198s accepts multiple space containing line break 198s registers an offense and corrects method call with two spaces before the first arg 198s accepts a method call with one space before the first arg 198s accepts + operator 198s accepts setter call 198s when a vertical argument positions are aligned 198s registers an offense 198s when using safe navigation operator 198s registers an offense and corrects method call with two spaces before the first arg 198s when AllowForAlignment is false 198s registers an offense and corrects method calls with aligned first arguments 198s when AllowForAlignment is true 198s accepts method calls with aligned first arguments 198s 198s RuboCop::Cop::Style::EndBlock 198s reports an offense and corrects END block 198s does not report offenses for other blocks 198s 198s RuboCop::ConfigObsoletion::RenamedCop 198s #message 198s when the cop has been moved to a new department 198s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 198s when the cop has changed names but in a new department 198s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 198s when the cop has changed names but in the same department 198s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 198s 198s RuboCop::Cop::Style::RedundantCondition 198s when regular condition (if) 198s accepts different when the condition does not match the branch 198s accepts elsif 198s when condition and if_branch are same 198s does not register an offense when using assignment by hash key access 198s registers an offense and correct when the branches are the same with the same receivers 198s registers an offense and corrects when the branches contains assignment method 198s registers an offense and corrects when using operator method in `else` 198s registers an offense and corrects when the branches contains method call with braced hash 198s registers an offense and corrects multiline nodes 198s registers an offense and corrects when the else branch contains an irange 198s registers an offense and corrects when a method without argument parentheses in `else` 198s accepts an elsif branch 198s does not register offenses when the branches contains hash key access 198s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 198s registers an offense and corrects when using modifier if 198s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 198s registers an offense and corrects when the branches contains assignment 198s does not register an offense when the branches are the same with different receivers 198s registers an offense and corrects modifier nodes offense 198s accepts when using ternary if in `else` branch 198s registers an offense and corrects when the branches contains arithmetic operation 198s registers an offense and corrects when the branches contains method call 198s registers an offense and corrects when the branches contains parenthesized method call 198s registers an offense and corrects when the branches contains method call with non-braced hash 198s registers an offense and corrects when `raise` without argument parentheses in `else` 198s registers an offense and corrects 198s autocorrects when using `<<` method higher precedence than `||` operator 198s accepts complex else branches 198s does not register offenses when the branches contains assignment but target not matched 198s registers an offense and corrects complex one liners 198s does not register offenses when using `nil?` and the branches contains assignment 198s registers an offense and corrects when defined inside method and the branches contains assignment 198s when inverted condition (unless) 198s registers no offense 198s when condition and else branch are same 198s registers an offense 198s accepts complex unless branches 198s ternary expression (?:) 198s accepts expressions when the condition and if branch do not match 198s when condition and if_branch are same 198s registers an offense and corrects 198s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 198s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 198s registers an offense and corrects when the else branch contains `rescue` 198s registers an offense and corrects functions 198s registers an offense and corrects brackets accesses 198s registers an offense and corrects when the else branch contains `and` 198s registers an offense and corrects class vars 198s registers an offense and corrects nested vars 198s registers an offense and corrects when the else branch contains an irange 198s registers an offense and corrects when the else branch contains an erange 198s 198s RuboCop::Cop::Style::LineEndConcatenation 198s registers offenses only for the appropriate lines in chained concats 198s accepts string concat at line end for special strings like __FILE__ 198s registers multiple offenses when there are chained << methods 198s autocorrects only the lines that should be autocorrected 198s registers multiple offenses when there are chained concatenationscombined with << calls 198s registers multiple offenses when there are chained concatenations 198s autocorrects a + with \ to just \ 198s accepts string concat with a return value of method on a string 198s registers an offense for dynamic string concat with << at line end 198s accepts string concat with a return value of method on an interpolated string 198s registers an offense for string concat with << and \ at line ends 198s accepts string concat at line end when followed by a comment line 198s accepts string concat on the same line 198s autocorrects a + with trailing whitespace to \ 198s accepts string concat at line end when followed by comment 198s registers an offense for string concat with << at line end 198s registers an offense for string concat at line end 198s registers an offense for dynamic string concat at line end 198s accepts string concat at line end when % literals are involved 198s 198s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 198s accepts non array percent literals 198s for W type and ["!", "!"] delimiters 198s accepts literals without additional spaces 198s registers an offense for unnecessary spaces 198s accepts literals with escaped spaces 198s accepts literals with escaped and additional spaces 198s accepts multi-line literals 198s accepts newlines and additional following alignment spaces 198s registers an offense for multiple spaces between items 198s accepts multi-line literals within a method 198s for w type and ["[", "]"] delimiters 198s registers an offense for multiple spaces between items 198s accepts literals without additional spaces 198s accepts multi-line literals within a method 198s accepts literals with escaped and additional spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals with escaped spaces 198s accepts multi-line literals 198s registers an offense for unnecessary spaces 198s for W type and ["{", "}"] delimiters 198s registers an offense for multiple spaces between items 198s accepts multi-line literals 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts literals with escaped spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals without additional spaces 198s accepts literals with escaped and additional spaces 198s for i type and ["{", "}"] delimiters 198s registers an offense for multiple spaces between items 198s accepts literals with escaped spaces 198s accepts newlines and additional following alignment spaces 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts multi-line literals 198s accepts literals with escaped and additional spaces 198s accepts literals without additional spaces 198s for w type and ["!", "!"] delimiters 198s accepts literals with escaped and additional spaces 198s accepts newlines and additional following alignment spaces 198s registers an offense for multiple spaces between items 198s accepts literals with escaped spaces 198s registers an offense for unnecessary spaces 198s accepts multi-line literals within a method 198s accepts literals without additional spaces 198s accepts multi-line literals 198s for W type and ["[", "]"] delimiters 198s registers an offense for multiple spaces between items 198s accepts multi-line literals 198s accepts literals with escaped spaces 198s accepts newlines and additional following alignment spaces 198s registers an offense for unnecessary spaces 198s accepts multi-line literals within a method 198s accepts literals without additional spaces 198s accepts literals with escaped and additional spaces 198s for I type and ["(", ")"] delimiters 198s registers an offense for multiple spaces between items 198s registers an offense for unnecessary spaces 198s accepts multi-line literals within a method 198s accepts literals without additional spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals with escaped spaces 198s accepts multi-line literals 198s accepts literals with escaped and additional spaces 198s for i type and ["!", "!"] delimiters 198s registers an offense for multiple spaces between items 198s accepts multi-line literals 198s registers an offense for unnecessary spaces 198s accepts literals with escaped spaces 198s accepts multi-line literals within a method 198s accepts newlines and additional following alignment spaces 198s accepts literals without additional spaces 198s accepts literals with escaped and additional spaces 198s for W type and ["(", ")"] delimiters 198s accepts literals without additional spaces 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts multi-line literals 198s accepts literals with escaped and additional spaces 198s registers an offense for multiple spaces between items 198s accepts literals with escaped spaces 198s accepts newlines and additional following alignment spaces 198s for i type and ["(", ")"] delimiters 198s accepts multi-line literals 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts literals with escaped spaces 198s accepts literals without additional spaces 198s registers an offense for multiple spaces between items 198s accepts literals with escaped and additional spaces 198s accepts newlines and additional following alignment spaces 198s for I type and ["[", "]"] delimiters 198s accepts literals with escaped spaces 198s accepts multi-line literals 198s accepts multi-line literals within a method 198s accepts literals with escaped and additional spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals without additional spaces 198s registers an offense for multiple spaces between items 198s registers an offense for unnecessary spaces 198s for w type and ["{", "}"] delimiters 198s accepts literals without additional spaces 198s accepts literals with escaped spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals with escaped and additional spaces 198s accepts multi-line literals within a method 198s registers an offense for multiple spaces between items 198s registers an offense for unnecessary spaces 198s accepts multi-line literals 198s for I type and ["{", "}"] delimiters 198s accepts literals with escaped and additional spaces 198s accepts multi-line literals 198s accepts multi-line literals within a method 198s accepts literals with escaped spaces 198s registers an offense for multiple spaces between items 198s registers an offense for unnecessary spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals without additional spaces 198s for i type and ["[", "]"] delimiters 198s accepts literals with escaped spaces 198s registers an offense for multiple spaces between items 198s accepts literals without additional spaces 198s accepts multi-line literals 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals with escaped and additional spaces 198s for I type and ["!", "!"] delimiters 198s accepts multi-line literals within a method 198s accepts newlines and additional following alignment spaces 198s registers an offense for unnecessary spaces 198s registers an offense for multiple spaces between items 198s accepts literals with escaped and additional spaces 198s accepts literals with escaped spaces 198s accepts literals without additional spaces 198s accepts multi-line literals 198s for w type and ["(", ")"] delimiters 198s accepts multi-line literals 198s accepts literals with escaped and additional spaces 198s accepts multi-line literals within a method 198s registers an offense for unnecessary spaces 198s accepts newlines and additional following alignment spaces 198s accepts literals with escaped spaces 198s accepts literals without additional spaces 198s registers an offense for multiple spaces between items 198s 198s RuboCop::Cop::Layout::BlockEndNewline 198s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 198s registers an offense and corrects when `}` of multiline block without processing is not on its own line 198s accepts a one-liner 198s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 198s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 198s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 198s registers an offense and corrects when multiline block `}` is not on its own line 198s registers an offense and corrects when a multiline block ends with a method call with hash arguments 198s accepts multiline blocks with newlines before the end 198s registers an offense and corrects when multiline block end is not on its own line 198s registers an offense and corrects when a multiline block ends with a hash 198s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 198s Ruby 2.7 198s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 198s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 198s 198s RuboCop::Cop::Style::Send 198s with send 198s and with a receiver 198s registers an offense for an invocation with args 198s does not register an offense for an invocation without args 198s when using safe navigation operator 198s registers an offense for an invocation with args 198s and without a receiver 198s registers an offense for an invocation with args 198s does not register an offense for an invocation without args 198s with __send__ 198s and without a receiver 198s does not register an offense for an invocation without args 198s does not register an offense for an invocation with args 198s and with a receiver 198s does not register an offense for an invocation without args 198s does not register an offense for an invocation with args 198s with public_send 198s and without a receiver 198s does not register an offense for an invocation without args 198s does not register an offense for an invocation with args 198s and with a receiver 198s does not register an offense for an invocation without args 198s does not register an offense for an invocation with args 198s 198s RuboCop::Cop::Layout::EmptyLines 198s does not register an offense for empty lines in a string 198s registers an offense for consecutive empty lines 198s does not register an offense for heredocs with empty lines inside 198s does not register an offense when there are no tokens 198s does not register an offense for comments 198s 198s RuboCop::Cop::Lint::HeredocMethodCallPosition 198s incorrect cases 198s chained case no parens 198s detects 198s chained case with parens 198s detects 198s chained case with multiple line args 198s detects 198s simple incorrect case with paren 198s detects 198s chained case without args 198s detects 198s with trailing comma in method call 198s detects 198s simple incorrect case 198s detects 198s correct cases 198s ignores if no call 198s accepts simple correct case 198s accepts chained correct case 198s 198s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 198s when condition is a predicate method 198s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 198s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 198s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 198s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 198s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 198s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 198s when condition is a comparison method 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 198s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 198s does not register an offense when using a branch that is not boolean literal 198s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 198s registers and corrects an offense when using ternary operator with boolean literal branches 198s registers and corrects an offense when using `if foo == bar` with boolean literal branches 198s registers and corrects an offense when using opposite ternary operator with boolean literal branches 198s when `AllowedMethods: nonzero?` 198s does not register an offense when using `nonzero?` 198s when complex condition 198s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 198s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 198s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 198s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 198s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 198s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 198s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 198s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 198s when condition is a logical operator and all operands are predicate methods 198s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 198s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 198s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 198s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 198s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 198s when condition is a logical operator and operands do not known whether to return boolean value 198s does not register an offense when using `if foo || bar` with opposite boolean literal branches 198s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 198s does not register an offense when using `if foo && bar` with opposite boolean literal branches 198s does not register an offense when using `unless foo || bar` with boolean literal branches 198s does not register an offense when using `if foo && bar` with boolean literal branches 198s does not register an offense when using `unless foo && bar` with boolean literal branches 198s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 198s does not register an offense when using `if foo || bar` with boolean literal branches 198s when double negative is used in condition 198s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 198s registers and corrects an offense when using `if !!condition` with boolean literal branches 198s when condition is a method that does not known whether to return boolean value 198s does not register an offense when using `unless condition` with opposite boolean literal branches 198s does not register an offense when using `if condition` with boolean literal branches 198s does not register an offense when using `unless condition` with boolean literal branches 198s does not register an offense when using `if condition` with opposite boolean literal branches 198s when using `elsif` with boolean literal branches 198s registers and corrects an offense when using single `elsif` with boolean literal branches 198s does not register an offense when using multiple `elsif` with boolean literal branches 198s 198s RuboCop::Cop::Cop 198s initially has 0 offenses 198s will set custom severity if present 198s will set default severity 198s will report registered offenses 198s will warn if custom severity is invalid 198s keeps track of offenses 198s for a cop with a name 198s registers offense with its name 198s with lint cops 198s has right department 198s has right name 198s .qualified_cop_name 198s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 198s returns the given cop name if it already has a namespace 198s raises an error if the cop name is in more than one namespace 198s returns the given cop name if it is not found in any namespace 198s returns the cop name in a different namespace if the provided namespace is incorrect 198s adds namespace if the cop name is found in exactly one namespace 198s when disabled by a comment 198s ignore_disable_comments is false 198s will set offense as disabled 198s ignore_disable_comments is true 198s will not set offense as disabled 198s #autocorrect? 198s when the option is not given 198s is expected to equal false 198s when the option is given 198s is expected to equal true 198s when cop does not support autocorrection 198s is expected to equal false 198s when disable_uncorrectable is enabled 198s is expected to equal true 198s when the cop is set to not autocorrect 198s is expected to equal false 198s .documentation_url 198s for a builtin cop class 198s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 198s for a custom cop class 198s is expected to be nil 198s with no submodule 198s has right department 198s has right name 198s with style cops 198s has right department 198s has right name 198s #safe_autocorrect? 198s when safety is undeclared 198s is expected to equal true 198s when cop is declared unsafe 198s is expected to equal false 198s when autocorrection of the cop is declared unsafe 198s is expected to equal false 198s Registry 198s #with_department 198s returns 0 for an invalid type 198s has each cop in exactly one type 198s has at least one cop per department 198s #departments 198s has departments 198s is expected to include :Lint 198s is expected to include :Style 198s contains every value only once 198s setting of Offense#corrected attribute 198s when cop supports autocorrection 198s when offense was corrected 198s is set to true 198s when offense was not corrected because of an error 198s is set to false 198s when autocorrection is not needed 198s is set to false 198s when cop does not support autocorrection 198s is not specified (set to nil) 198s when autocorrect is requested 198s is not specified (set to nil) 198s when disable_uncorrectable is enabled 198s is set to true 198s #relevant_file? 198s when the file is an anonymous source 198s is expected to equal true 198s when the file matches the Include configuration 198s is expected to equal true 198s when the file doesn't match the Include configuration 198s is expected to equal false 198s 198s RuboCop::Cop::Style::MultilineBlockChain 198s accepts a chain of blocks spanning one line 198s accepts a multi-line block chained with calls on one line 198s accepts a chain of calls followed by a multi-line block 198s with multi-line block chaining 198s registers an offense for a slightly more complicated case 198s registers two offenses for a chain of three blocks 198s registers an offense for a simple case 198s registers an offense for a chain where the second block is single-line 198s accepts a chain where the first block is single-line 198s Ruby 2.7 198s registers an offense for a slightly more complicated case 198s 198s RuboCop::Cop::Style::SwapValues 198s does not register an offense when assigning receiver object at `def` 198s handles comments when correcting 198s does not register an offense when almost swapping variables 198s does not register an offense when idiomatically swapping variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping instance variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping global variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping mixed variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping local variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping constant with namespaces variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping class variables 198s behaves like verbosely swapping 198s registers an offense and corrects when verbosely swapping constant variables 198s 198s RuboCop::Cop::Lint::BooleanSymbol 198s does not register an offense when used inside percent-literal symbol array 198s registers an offense when using `:false` 198s does not register an offense when using `true` 198s does not register an offense when using regular symbol 198s registers an offense when using `:true` 198s does not register an offense when using `false` 198s when using the new hash syntax 198s registers an offense when using `false:` 198s registers an offense when using `true:` 198s registers an offense when using `key: :false` 198s 198s RuboCop::Cop::Layout::RescueEnsureAlignment 198s accepts correctly aligned ensure 198s accepts aligned rescue in do-end block on operation assignment 198s accepts end being misaligned 198s accepts correctly aligned rescue/ensure with def 198s accepts aligned rescue in do-end block assigned to global variable 198s accepts correctly aligned rescue in assigned begin-end block 198s accepts aligned rescue in do-end block with `.()` call 198s accepts aligned rescue in do-end block on or-assignment 198s accepts aligned rescue in do-end block assigned to class 198s accepts the modifier form 198s accepts aligned rescue with do-end block that line break with leading dot for method calls 198s accepts aligned rescue in do-end block assigned to class variable 198s accepts aligned rescue do-end block assigned to local variable 198s accepts rescue and ensure on the same line 198s accepts correctly aligned rescue/ensure with def with no body 198s accepts aligned rescue in do-end block on and-assignment 198s accepts aligned rescue in do-end block 198s accepts aligned rescue in do-end block in a method 198s accepts aligned rescue in do-end block on multi-assignment 198s accepts aligned rescue in do-end block assigned to instance variable 198s accepts correctly aligned rescue 198s accepts aligned rescue with do-end block that line break with trailing dot for method calls 198s accepts aligned rescue in assigned do-end block starting on newline 198s rescue with class 198s registers an offense when rescue used with class 198s ensure with def 198s registers an offense 198s rescue in do-end block on multi-assignment 198s registers an offense 198s rescue in do-end block assigned to class 198s registers an offense 198s rescue in do-end block assigned to instance variable 198s registers an offense 198s rescue with defs 198s registers an offense 198s allows inline access modifier 198s with public_class_method modifier 198s rescue with def 198s correct alignment 198s registers an offense 198s ensure with def 198s correct alignment 198s registers an offense 198s ensure with defs 198s correct alignment 198s registers an offense 198s rescue with defs 198s registers an offense 198s correct alignment 198s with private modifier 198s ensure with def 198s registers an offense 198s correct alignment 198s rescue with defs 198s correct alignment 198s registers an offense 198s ensure with defs 198s registers an offense 198s correct alignment 198s rescue with def 198s correct alignment 198s registers an offense 198s with private_class_method modifier 198s ensure with defs 198s correct alignment 198s registers an offense 198s rescue with defs 198s correct alignment 198s registers an offense 198s rescue with def 198s registers an offense 198s correct alignment 198s ensure with def 198s correct alignment 198s registers an offense 198s rescue in do-end block assigned to class variable 198s registers an offense 198s ensure with begin 198s registers an offense when ensure used with begin 198s rescue in do-end block on operation assignment 198s registers an offense 198s rescue in assigned do-end block starting on newline 198s registers an offense 198s rescue with def 198s registers an offense 198s when using zsuper with block 198s registers and corrects an offense and corrects when incorrect alignment 198s does not register an offense when correct alignment 198s rescue with module 198s registers an offense when rescue used with module 198s rescue in do-end block assigned to global variable 198s registers an offense 198s ensure with module 198s registers an offense when ensure used with module 198s rescue in do-end block on and-assignment 198s registers an offense 198s allows inline expression before 198s rescue 198s registers an offense 198s ensure 198s registers an offense 198s excluded file 198s processes excluded files with issue 198s rescue in do-end block on or-assignment 198s registers an offense 198s rescue with do-end block 198s registers an offense 198s ensure with defs 198s registers an offense 198s rescue with begin 198s registers an offense 198s as RHS of assignment 198s `Layout/BeginEndAlignment` cop is not enabled 198s accepts multi-line, aligned 198s registers an offense and corrects for incorrect alignment 198s accepts multi-line, indented 198s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 198s accepts multi-line, aligned 198s accepts multi-line, indented 198s registers an offense and corrects for incorrect alignment 198s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 198s accepts multi-line, indented 198s registers an offense and corrects for incorrect alignment 198s accepts multi-line, aligned 198s rescue in do-end block assigned to local variable 198s registers an offense 198s ensure with class 198s registers an offense 198s 198s RuboCop::Cop::Style::NonNilCheck 198s when allowing semantic changes 198s does not register an offense for `!x` 198s does not blow up with ternary operators 198s registers an offense for unless x.nil? 198s does not blow up when autocorrecting implicit receiver 198s registers an offense for `!x.nil?` 198s corrects code that would not be modified if IncludeSemanticChanges were false 198s registers an offense for `not x.nil?` 198s autocorrects by changing `x != nil` to `x` 198s does not register an offense for `x.nil?` 198s when not allowing semantic changes 198s registers an offense for != nil 198s registers an offense but does not correct when the code was not modified 198s does not register an offense if only expression in predicate 198s does not register an offense if last expression in predicate 198s does not register an offense with implicit receiver 198s does not register an offense if only expression in class predicate 198s does not register an offense for !x.nil? 198s does not register an offense for != 0 198s does not register an offense for not x.nil? 198s does not register an offense if last expression in class predicate 198s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 198s `IncludeSemanticChanges: true` 198s registers an offense for `foo != nil` 198s `IncludeSemanticChanges: false` 198s does not register an offense for `foo != nil` 198s 198s RuboCop::Cop::Lint::RaiseException 198s registers an offense and corrects for `raise` with `Exception.new` and message 198s does not register an offense when raising Exception with explicit namespace 198s does not register an offense for `raise` without arguments 198s registers an offense and corrects for `fail` with `Exception` 198s registers an offense and corrects for `raise` with `Exception` 198s does not register an offense for `fail` without arguments 198s registers an offense and corrects for `raise` with `::Exception` and message 198s registers an offense and corrects for `raise` with `Exception.new(args*)` 198s registers an offense and corrects for `raise` with `::Exception` 198s registers an offense and corrects for `raise` with `::Exception.new` 198s registers an offense and corrects for `fail` with `Exception.new` and message 198s registers an offense and corrects for `fail` with `Exception` and message 198s registers an offense and corrects for `raise` with `Exception` and message 198s when under namespace 198s does not register an offense when Exception without cbase specified 198s registers an offense and corrects when Exception with cbase specified 198s 198s RuboCop::Cop::Style::SelectByRegexp 198s with reject 198s does not register an offense when the receiver is `to_hash` 198s does not register an offense when the block arity is not 1 198s does not register an offense when the block has multiple expressions 198s registers an offense and corrects when the receiver is a range 198s registers an offense and corrects for `regexp =~ blockvar` 198s registers an offense and corrects when there is no explicit regexp 198s does not register an offense when the block uses an external variable in a regexp match 198s registers an offense and corrects for `Regexp#match?` 198s registers an offense and corrects when the receiver is a set 198s does not register an offense when the block param is a method argument 198s registers an offense and corrects for `blockvar =~ regexp` 198s registers an offense and corrects when the receiver is an array 198s does not register an offense when the receiver is `Hash.new` 198s registers an offense if `to_h` is in the receiver chain but not the actual receiver 198s does not register an offense when the receiver is `ENV` 198s does not register an offense when the receiver is a hash literal 198s registers an offense and corrects with a multiline block 198s registers an offense and corrects for `blockvar =~ lvar` 198s does not register an offense when the receiver is `to_h` 198s does not register an offense when the receiver is `Hash[]` 198s registers an offense and corrects without a receiver 198s does not register an offense when the block does not match a regexp 198s registers an offense and corrects for `lvar =~ blockvar` 198s does not register an offense when given a proc 198s does not register an offense when there is no block 198s registers an offense and corrects for `match?` 198s with `numblock`s 198s registers an offense and corrects for `blockvar =~ regexp` 198s does not register an offense when the param is a method argument 198s registers an offense and corrects for `match?` 198s does not register an offense if there is more than one numbered param 198s registers an offense and corrects for `Regexp#match?` 198s registers an offense and corrects for `regexp =~ blockvar` 198s does not register an offense when using `match?` without a receiver 198s with find_all 198s does not register an offense when the block arity is not 1 198s registers an offense and corrects for `match?` 198s registers an offense and corrects with a multiline block 198s does not register an offense when given a proc 198s registers an offense and corrects when the receiver is an array 198s registers an offense and corrects when the receiver is a set 198s registers an offense and corrects when the receiver is a range 198s does not register an offense when the receiver is `to_hash` 198s does not register an offense when the block has multiple expressions 198s does not register an offense when the receiver is `Hash[]` 198s registers an offense and corrects for `lvar =~ blockvar` 198s does not register an offense when there is no block 198s does not register an offense when the receiver is `ENV` 198s does not register an offense when the receiver is a hash literal 198s does not register an offense when the block uses an external variable in a regexp match 198s does not register an offense when the receiver is `to_h` 198s registers an offense and corrects for `regexp =~ blockvar` 198s registers an offense and corrects when there is no explicit regexp 198s registers an offense and corrects for `Regexp#match?` 198s does not register an offense when the receiver is `Hash.new` 198s does not register an offense when the block param is a method argument 198s registers an offense if `to_h` is in the receiver chain but not the actual receiver 198s registers an offense and corrects for `blockvar =~ lvar` 198s registers an offense and corrects without a receiver 198s does not register an offense when the block does not match a regexp 199s registers an offense and corrects for `blockvar =~ regexp` 199s with `numblock`s 199s does not register an offense when using `match?` without a receiver 199s registers an offense and corrects for `Regexp#match?` 199s registers an offense and corrects for `regexp =~ blockvar` 199s does not register an offense if there is more than one numbered param 199s registers an offense and corrects for `blockvar =~ regexp` 199s does not register an offense when the param is a method argument 199s registers an offense and corrects for `match?` 199s with select 199s does not register an offense when the block has multiple expressions 199s registers an offense and corrects when the receiver is a set 199s does not register an offense when the block arity is not 1 199s does not register an offense when the block does not match a regexp 199s registers an offense and corrects for `lvar =~ blockvar` 199s registers an offense and corrects for `Regexp#match?` 199s does not register an offense when the receiver is `to_hash` 199s does not register an offense when given a proc 199s does not register an offense when the block param is a method argument 199s registers an offense and corrects when there is no explicit regexp 199s registers an offense and corrects when the receiver is an array 199s registers an offense and corrects for `match?` 199s does not register an offense when the receiver is a hash literal 199s registers an offense and corrects with a multiline block 199s registers an offense and corrects without a receiver 199s does not register an offense when the receiver is `Hash.new` 199s does not register an offense when the receiver is `Hash[]` 199s does not register an offense when the receiver is `ENV` 199s registers an offense and corrects for `regexp =~ blockvar` 199s does not register an offense when the receiver is `to_h` 199s registers an offense and corrects for `blockvar =~ regexp` 199s registers an offense and corrects for `blockvar =~ lvar` 199s registers an offense and corrects when the receiver is a range 199s does not register an offense when the block uses an external variable in a regexp match 199s does not register an offense when there is no block 199s registers an offense if `to_h` is in the receiver chain but not the actual receiver 199s with `numblock`s 199s registers an offense and corrects for `blockvar =~ regexp` 199s does not register an offense when the param is a method argument 199s registers an offense and corrects for `regexp =~ blockvar` 199s does not register an offense when using `match?` without a receiver 199s does not register an offense if there is more than one numbered param 199s registers an offense and corrects for `match?` 199s registers an offense and corrects for `Regexp#match?` 199s 199s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 199s when EnforcedStyle is empty_lines 199s registers an offense for module body not starting or ending with a blank 199s autocorrects beginning and end 199s registers an offense for module body not ending with a blank 199s accepts modules with an empty body 199s when EnforcedStyle is empty_lines_special 199s when first child is an access modifier 199s with no blank lines at the beginning and ending of module body 199s registers and corrects an offense 199s with blank lines at the beginning and ending of module body 199s registers no offense 199s when namespace has multiple children 199s requires empty lines for namespace 199s when first child is NOT a method 199s 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 199s source with blank lines 199s registers an offense for module beginning with a blank line 199s when module has a namespace 199s 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 199s source without blank lines 199s registers and autocorrects the offenses 199s source with blank lines 199s registers and autocorrects the offenses 199s source with constants 199s registers and autocorrects the offenses 199s source without blank lines 199s registers an offense for module not ending with a blank line 199s source with comment before method definition 199s registers an offense for module beginning with a blank line 199s module with constant and child module 199s registers and autocorrects the offenses 199s module with only constants 199s registers and autocorrects the offenses 199s module with empty body 199s without empty line 199s does NOT register offenses 199s with empty line 199s does NOT register offenses 199s when first child is a method 199s requires blank line at the beginning and ending of module body 199s when module has a namespace 199s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 199s source with blank lines 199s autocorrects the offenses 199s source without blank lines 199s registers and autocorrects the offenses 199s source without blank lines 199s registers an offense for module not beginning and ending with a blank line 199s when EnforcedStyle is no_empty_lines 199s registers an offense for module body ending with a blank 199s autocorrects beginning and end 199s registers an offense for module body starting with a blank 199s when EnforcedStyle is empty_lines_except_namespace 199s when only child is class 199s requires no empty lines for namespace 199s registers offense for namespace body starting with a blank 199s registers offense for namespace body ending with a blank 199s when only child is module 199s autocorrects beginning and end 199s requires no empty lines for namespace 199s registers offenses for namespaced module body not ending with a blank 199s registers offense for namespace body ending with a blank 199s registers offenses for namespaced module body not starting with a blank 199s registers offense for namespace body starting with a blank 199s when has multiple child modules 199s registers offenses for namespace body starting and ending without a blank 199s requires empty lines for namespace 199s 199s RuboCop::Cop::Style::OperatorMethodCall 199s registers an offense when using `foo.< bar` 199s registers an offense when using `foo.===(bar)` 199s does not register an offense when using `obj.!` 199s does not register an offense when using `foo + bar` 199s registers an offense when chaining `foo.bar.>=(baz).round(2)` 199s registers an offense when using `foo.+ bar` 199s registers an offense when chaining `foo.bar.<=(baz).round(2)` 199s registers an offense when using `foo.^ bar` 199s does not register an offense when using `foo ^ bar` 199s registers an offense when using `foo.~ bar` 199s registers an offense when using `foo.**(bar)` 199s does not register an offense when using `foo ! bar` 199s registers an offense when using `foo.<<(bar)` 199s does not register an offense when using `foo << bar` 199s registers an offense when chaining `foo.bar.**(baz).round(2)` 199s registers an offense when chaining `foo.bar.===(baz).round(2)` 199s does not register an offense when using `foo * bar` 199s does not register an offense when using `foo - bar` 199s does not register an offense when using `foo > bar` 199s registers an offense when using `foo.!~ bar` 199s registers an offense when using `foo.!~(bar)` 199s registers an offense when using `foo.<< bar` 199s registers an offense when chaining `foo.bar.~(baz).round(2)` 199s does not register an offense when using `foo.+@bar.to_s` 199s registers an offense when chaining `foo.bar.&(baz).round(2)` 199s registers an offense when chaining `foo.bar.=~(baz).round(2)` 199s registers an offense when chaining `foo.bar.^(baz).round(2)` 199s does not register an offense when using `foo.!@bar` 199s registers an offense when chaining `foo.bar.*(baz).round(2)` 199s registers an offense when using `foo.>= bar` 199s registers an offense when using `foo.& bar` 199s does not register an offense when using `foo != bar` 199s registers an offense when using `foo.%(bar)` 199s registers an offense when chaining `foo.bar.-(baz).round(2)` 199s does not register an offense when using `foo / bar` 199s does not register an offense when using `foo.`bar` 199s registers an offense when using `foo.|(bar)` 199s registers an offense when using `foo.>=(bar)` 199s registers an offense when using `foo.| bar` 199s does not register an offense when using `foo <=> bar` 199s registers an offense when using `foo.> bar` 199s does not register an offense when using `foo.-@bar` 199s does not register an offense when using `foo & bar` 199s registers an offense when using `foo./ bar` 199s registers an offense when chaining `foo.bar.+(baz).round(2)` 199s registers an offense when using `foo.<=(bar)` 199s does not register an offense when using `foo >> bar` 199s does not register an offense when using `foo == bar` 199s registers an offense when chaining `foo.bar.%(baz).round(2)` 199s does not register an offense when using `foo | bar` 199s registers an offense when using `foo.==(bar)` 199s registers an offense when using `foo.* bar` 199s registers an offense when chaining `foo.bar.>>(baz).round(2)` 199s registers an offense when using `foo.<=>(bar)` 199s registers an offense when using `foo.** bar` 199s does not register an offense when using `foo ** bar` 199s registers an offense when using `foo.! bar` 199s registers an offense when using `foo.+(bar)` 199s registers an offense when using `foo.!=(bar)` 199s registers an offense when using `foo.!(bar)` 199s registers an offense when using `foo.=~(bar)` 199s registers an offense when chaining `foo.bar.!=(baz).round(2)` 199s registers an offense when using `foo.>(bar)` 199s does not register an offense when using `foo.+@bar` 199s registers an offense when using `foo.<= bar` 199s registers an offense when using `foo.- bar` 199s registers an offense when chaining `foo.bar.!(baz).round(2)` 199s registers an offense when chaining `foo.bar.!~(baz).round(2)` 199s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 199s registers an offense when chaining `foo.bar.==(baz).round(2)` 199s registers an offense when chaining `foo.bar.<(baz).round(2)` 199s registers an offense when using `foo.>>(bar)` 199s registers an offense when chaining `foo.bar.<<(baz).round(2)` 199s does not register an offense when using `foo <= bar` 199s registers an offense when using `foo.>> bar` 199s registers an offense when using `foo.=~ bar` 199s registers an offense when chaining `foo.bar.>(baz).round(2)` 199s does not register an offense when using `foo =~ bar` 199s does not register an offense when using `foo.~@bar` 199s registers an offense when using `foo./(bar)` 199s registers an offense when using `foo.~(bar)` 199s registers an offense when chaining `foo.bar.|(baz).round(2)` 199s registers an offense when using `foo.!= bar` 199s registers an offense when using `foo.% bar` 199s does not register an offense when using `foo ~ bar` 199s registers an offense when using `foo.&(bar)` 199s registers an offense when using `foo.<=> bar` 199s does not register an offense when using `foo === bar` 199s registers an offense when using `foo.<(bar)` 199s registers an offense when chaining `foo.bar./(baz).round(2)` 199s registers an offense when using `foo.^(bar)` 199s registers an offense when using `foo.-(bar)` 199s does not register an offense when using `foo % bar` 199s does not register an offense when using `Foo.+(bar)` 199s registers an offense when using `foo.== bar` 199s does not register an offense when using `foo < bar` 199s registers an offense when using `foo.*(bar)` 199s does not register an offense when using `foo !~ bar` 199s does not register an offense when using `foo >= bar` 199s registers an offense when using `foo.=== bar` 199s 199s RuboCop::Cop::Style::HashSyntax 199s configured to enforce hash rockets style 199s accepts hash rockets in method calls 199s registers an offense for 1.9 style in method calls 199s accepts hash rockets in a hash literal 199s registers offense for Ruby 1.9 style 199s accepts an empty hash 199s registers an offense for mixed syntax 199s UseHashRocketsWithSymbolValues has no impact 199s does not register an offense when there is a symbol value 199s configured to accept both shorthand and explicit use of hash literal value 199s Ruby >= 3.1 199s does not register an offense when hash key and hash value are not the same 199s does not register an offense when hash values are omitted 199s does not register an offense when hash key and hash value are the same 199s does not register an offense when hash key and hash value are partially the same 199s Ruby <= 3.0 199s does not register an offense when hash key and hash value are the same 199s configured to disallow mixing of implicit and explicit hash literal value 199s Ruby <= 3.0 199s does not register an offense when all hash key and hash values are the same 199s Ruby >= 3.1 199s does not register an offense when all hash values are present, but only some values can be omitted 199s does not register an offense when all hash values are present, but no values can be omitted 199s registers an offense when some hash values are omitted but they can all be omitted 199s registers an offense when some hash values are omitted but they cannot all be omitted 199s does not register an offense when all hash values are omitted 199s registers an offense when all hash values are present, but can all be omitted 199s configured to enforce ruby 1.9 style with no mixed keys 199s UseHashRocketsWithSymbolValues enabled 199s registers an offense for mixed syntax when new is possible 199s accepts an empty hash 199s registers offense for hash rocket syntax when new is possible 199s accepts new syntax in a hash literal 199s registers an offense when keys have different types and styles 199s registers an offense when any element uses a symbol for the value 199s accepts new syntax when keys are interpolated string 199s accepts hash rockets when keys have different types 199s autocorrects to hash rockets when all elements have symbol value 199s registers an offense when keys start with a digit 199s registers an offense for hash rockets in method calls 199s registers an offense when keys have special symbols in them 199s accepts new syntax in method calls 199s registers an offense when keys have whitespaces in them 199s registers an offense when any element has a symbol value in method calls 199s ruby < 2.2 199s accepts hash rockets when keys have whitespaces in them 199s accepts hash rockets when keys start with a digit 199s registers an offense when keys start with a digit and mix styles 199s accepts hash rockets when keys have special symbols in them 199s registers an offense when keys have whitespaces and mix styles 199s registers an offense when keys have special symbols and mix styles 199s UseHashRocketsWithSymbolValues disabled 199s registers an offense when keys start with a digit 199s accepts an empty hash 199s registers an offense for hash rockets in method calls 199s accepts hash rockets when keys have different types 199s accepts new syntax when keys are interpolated string 199s accepts new syntax in method calls 199s registers offense for hash rocket syntax when new is possible 199s accepts new syntax in a hash literal 199s registers an offense for mixed syntax when new is possible 199s registers an offense when keys have special symbols in them 199s registers an offense when keys have different types and styles 199s registers an offense when keys have whitespaces in them 199s ruby < 2.2 199s accepts hash rockets when keys have special symbols in them 199s registers an offense when keys have special symbols and mix styles 199s registers an offense when keys have whitespaces and mix styles 199s accepts hash rockets when keys have whitespaces in them 199s accepts hash rockets when keys start with a digit 199s registers an offense when keys start with a digit and mix styles 199s configured to enforce ruby19 style 199s with SpaceAroundOperators disabled 199s autocorrects even if there is no space around => 199s configured to use hash rockets when symbol values are found 199s accepts ruby19 syntax when no elements have symbol values 199s accepts hash in ruby19 style with no symbol values 199s registers an offense when using hash rockets and no elements have a symbol value 199s registers an offense for hashes with elements on multiple lines 199s autocorrects to hash rockets when all elements have symbol value 199s accepts ruby19 syntax when no elements have symbol values in method calls 199s registers an offense when any element uses a symbol for the value 199s accepts an empty hash 199s accepts both hash rockets and ruby19 syntax in the same code 199s registers an offense when any element has a symbol value in method calls 199s with SpaceAroundOperators enabled 199s autocorrects a missing space when hash is used as argument 199s accepts new syntax in method calls 199s accepts new syntax in a hash literal 199s registers an offense for hash rockets in method calls 199s registers offense when keys start with an uppercase letter 199s preserves quotes during autocorrection 199s registers an offense when symbol keys have strings in them 199s registers offense for hash rocket syntax when new is possible 199s accepts hash rockets when keys have different types 199s autocorrects even if it interferes with SpaceAroundOperators 199s accepts hash rockets when symbol keys end with = 199s registers an offense for mixed syntax when new is possible 199s accepts hash rockets when symbol characters are not supported 199s accepts an empty hash 199s when using a return value uses `return` 199s registers an offense and corrects when not enclosed in parentheses 199s registers an offense and corrects when enclosed in parentheses 199s if PreferHashRocketsForNonAlnumEndingSymbols is false 199s registers an offense for hash rockets when symbols end with ? 199s registers an offense for hash rockets when symbols end with ! 199s ruby < 2.2 199s accepts hash rockets when symbol keys have string in them 199s if PreferHashRocketsForNonAlnumEndingSymbols is true 199s accepts hash rockets when symbols end with ? 199s accepts hash rockets when symbols end with ! 199s configured to enforce shorthand syntax style 199s Ruby >= 3.1 199s does not register an offense when with parentheses call expr follows assignment expr 199s does not register an offense when hash key and hash value are partially the same 199s does not register an offense when hash key and hash value are the same but the value ends `?` 199s does not register an offense when call expr without arguments and with a block follows 199s does not register an offense when call expr with argument and a block follows 199s does not register an offense when `return` with one line `if` condition follows (without parentheses) 199s does not register an offense when hash pattern matching 199s does not register an offense when without parentheses call expr follows 199s registers and corrects an offense when hash key and hash value are the same 199s does not register an offense when one line `until` condition follows (without parentheses) 199s registers and corrects an offense when `Hash[foo: foo]` 199s does not register an offense when symbol hash key and string hash value are the same 199s does not register an offense when hash key and hash value are the same but the value ends `!` 199s registers an offense when one line `until` condition follows (with parentheses) 199s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 199s does not register an offense when symbol hash key and hash value (lvar) are not the same 199s registers and corrects an offense when hash key and hash value are the same and it in the method body 199s does not register an offense when method call hash key and hash value are the same 199s does not register an offense when one line `if` condition follows (without parentheses) 199s does not register an offense when with parentheses call expr follows 199s registers an offense when hash key and hash value are not the same and method with `[]` is called 199s registers and corrects an offense when hash key and hash value (lvar) are the same 199s does not register an offense when hash values are omitted 199s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 199s does not register an offense when lvar hash key and hash value are the same 199s registers and corrects an offense when hash key and hash value are partially the same 199s registers an offense when one line `if` condition follows (with parentheses) 199s does not register an offense when without parentheses call expr follows after nested method call 199s does not register an offense when hash key and hash value are not the same 199s when hash roket syntax 199s does not register an offense 199s Ruby <= 3.0 199s does not register an offense when hash key and hash value are the same 199s configured to enforce explicit hash value syntax style 199s Ruby >= 3.1 199s does not register an offense when hash key and hash value are not the same 199s does not register an offense when hash key and hash value are the same 199s registers and corrects an offense when hash values are omitted 199s registers and corrects an offense when hash key and hash value are partially the same 199s Ruby <= 3.0 199s does not register an offense when hash key and hash value are the same 199s configured to enforce no mixed keys 199s accepts hash rockets when keys have special symbols in them 199s accepts hash rockets when keys start with a digit 199s accepts new syntax in method calls 199s accepts hash rockets in method calls 199s accepts hash rockets when keys have different types 199s accepts the hash rocket syntax when new is possible 199s accepts new hash style 199s registers an offense for mixed syntax when new is possible 199s autocorrects mixed key hashes 199s registers an offense when keys have different types and styles 199s registers an offense when keys start with a digit and mix styles 199s accepts old hash rockets style 199s accepts an empty hash 199s registers an offense when keys have special symbols and mix styles 199s accepts new syntax in a hash literal 199s registers an offense when keys have whitespaces and mix styles 199s accepts hash rockets when keys have whitespaces in them 199s 199s RuboCop::Cop::Style::BlockDelimiters 199s BracesRequiredMethods 199s other methods 199s autocorrects { and } to do and end 199s allows braces 199s BracesRequiredMethods methods 199s allows braces 199s registers an offense with do 199s EnforcedStyle: semantic 199s accepts a single line block with {} if used in a logical and 199s accepts a single line block with {} if used in an erange 199s accepts a single line block with {} followed by a safe navigation method call 199s accepts a single line block with {} if used in an if statement 199s autocorrects do-end to {} if it is a functional block and does not change the meaning 199s autocorrects do-end with `ensure` to {} if it is a functional block 199s accepts a single line block with {} if used in an irange 199s allows {} if it is a known functional method 199s accepts a single line block with {} if used in an array 199s accepts a multi-line block with braces when chained 199s accepts a multi-line functional block with do-end if it is an ignored method 199s accepts a multi-line block with do-end if it is the return value of its scope 199s registers an offense for a multi-line block with do-end if the return value is passed to a method 199s registers an offense for a multi-line block with braces if the return value is not used 199s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 199s accepts a multi-line functional block with do-end if it is an ignored method by regex 199s accepts a multi-line block with braces when passed to a method 199s autocorrects do-end with `rescue` to {} if it is a functional block 199s allows {} if it is a known procedural method 199s accepts a multi-line block with braces when passed to a known functional method 199s accepts a multi-line block with braces if it is the return value of its scope 199s registers an offense for a multi-line block with do-end if the return value is assigned 199s accepts a single line block with {} if used in a logical or 199s autocorrects do-end to {} with appropriate spacing 199s autocorrects do-end to {} if it is a functional block 199s accepts a multi-line functional block with do-end if it is a known procedural method 199s accepts a multi-line block with braces if the return value is assigned 199s with a procedural multi-line block 199s autocorrects { and } to do and end 199s autocorrects { and } to do and end with appropriate spacing 199s with a procedural one-line block 199s with AllowBracesOnProceduralOneLiners false or unset 199s accepts a single line block with do-end if it is procedural 199s registers an offense for a single line procedural block 199s with AllowBracesOnProceduralOneLiners true 199s accepts a single line procedural block with braces 199s accepts a single line procedural do-end block 199s EnforcedStyle: braces_for_chaining 199s disallows {} with no chain inside of Hash[] 199s registers an offense for a single line block with do-end 199s accepts a multi-line functional block with {} if it is an ignored method by regex 199s accepts a single line block with braces 199s accepts a multi-line functional block with {} if it is an ignored method 199s allows when :[] is chained 199s autocorrects do-end with `rescue` to {} if it is a functional block 199s allows chaining to } inside of Hash[] 199s autocorrects do-end with `ensure` to {} if it is a functional block 199s allows do/end inside Hash[] 199s accepts a multi-line block with do-end 199s registers an offense for multi-line chained do-end blocks 199s accepts a multi-line block that needs braces to be valid ruby 199s Ruby >= 2.7 199s accepts a single line numblock with braces 199s accepts a multi-line numblock with do-end 199s accepts a multi-line numblock that needs braces to be valid ruby 199s registers an offense for a single line numblock with do-end 199s when there are braces around a multi-line block 199s registers an offense in the simple case 199s allows when the block is being chained 199s registers an offense when combined with attribute assignment 199s allows when the block is being chained with attribute assignment 199s with safe navigation 199s registers an offense for multi-line chained do-end blocks 199s EnforcedStyle: always_braces 199s accepts a multi-line block that needs braces to be valid ruby 199s accepts a single line block with braces 199s accepts a multi-line functional block with do-end if it is an ignored method 199s registers an offense for multi-lined do-end blocks when combined with attribute assignment 199s autocorrects do-end with `ensure` to {} if it is a functional block 199s registers an offense for a single line block with do-end 199s does not autocorrect do-end if {} would change the meaning 199s registers an offense for a multi-line block with do-end 199s registers an offense for multi-line chained do-end blocks 199s accepts a multi-line functional block with do-end if it is an ignored method by regex 199s autocorrects do-end with `rescue` to {} if it is a functional block 199s when there are braces around a multi-line block 199s allows when combined with attribute assignment 199s allows when the block is being chained 199s allows in the simple case 199s EnforcedStyle: line_count_based 199s accepts a single line block with braces 199s registers an offense for a single line block with do-end 199s does not autocorrect {} if do-end would change the meaning 199s does not autocorrect do-end if {} would change the meaning 199s autocorrects do-end for single line blocks to { and } 199s accepts a multi-line block with do-end 199s accepts a multi-line block that needs braces to be valid ruby 199s when there are braces around a multi-line block 199s accepts braces if do-end would change the meaning 199s registers an offense for braces if do-end would not change the meaning 199s accepts a multi-line functional block with {} if it is an ignored method 199s registers an offense when there is a comment after the closing brace and block body is empty 199s registers an offense when combined with attribute assignment 199s accepts a multi-line functional block with {} if it is an ignored method by regex 199s autocorrects { and } to do and end 199s registers an offense when there is a comment after the closing brace and using method chain 199s does not autocorrect {} if do-end would introduce a syntax error 199s registers an offense when there is a comment after the closing brace and block body is not empty 199s can handle special method names such as []= and done? 199s autocorrects adjacent curly braces correctly 199s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 199s registers an offense in the simple case 199s Ruby >= 2.7 199s accepts a single line numblock with braces 199s accepts a multi-line numblock that needs braces to be valid ruby 199s accepts a multi-line numblock with do-end 199s registers an offense for a single line numblock with do-end 199s with a single line do-end block with an inline `rescue` 199s autocorrects properly 199s 199s RuboCop::Cop::Style::EvalWithLocation 199s accepts `eval` with a string, a filename and `__LINE__` 199s registers an offense when using correct file argument but incorrect line 199s registers an offense when using `eval` with improper arguments 199s registers an offense when using `::Kernel.eval` without any arguments 199s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 199s accepts `eval` with a code that is a variable 199s registers an offense when using `#eval` without lineno 199s registers an offense when using `#eval` with `binding` only 199s registers an offense when using `#eval` with a heredoc and an incorrect line number 199s registers an offense when using `#eval` with an incorrect line number 199s registers an offense when using `#module_eval` without any arguments 199s registers an offense when using `#instance_eval` with a string argument in parentheses 199s registers an offense when using `#class_eval` with an incorrect lineno 199s registers an offense when using `module_eval` with improper arguments 199s registers an offense when using `class_eval` with improper arguments 199s registers an offense when using `instance_eval` with improper arguments 199s does not register an offense if `eval` is called on another object 199s registers an offense when using `#class_eval` without any arguments 199s registers an offense when using `#instance_eval` without any arguments 199s registers an offense when using `#eval` without any arguments 199s registers an offense when using `Kernel.eval` without any arguments 199s accepts `eval` with a string, a filename and `__LINE__` on a new line 199s registers an offense when using `#eval` with a string on a new line 199s does not register an offense when using eval with block argument 199s 199s RuboCop::Cop::Lint::EmptyEnsure 199s registers an offense and corrects empty ensure 199s does not register an offense for non-empty ensure 199s 199s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 199s registers an offense for space inside ... literal 199s registers an offense for space inside .. literal 199s registers an offense in multiline range literal with space in it 199s accepts no space inside ... literal 199s accepts complex range literal with space in it 199s accepts multiline range literal with no space in it 199s accepts no space inside .. literal 199s 199s RuboCop::Cop::Style::RedundantSort 199s registers an offense when slice(0) is called on sort_by 199s does not register an offense when first has an argument 199s registers an offense when last is called on sort_by 199s registers an offense when first is called on sort_by no block 199s registers an offense with `sort_by { a || b }` 199s registers an offense when first is called on sort_by with line breaks 199s registers an offense when slice(0) is called on sort 199s does not register an offense when sort has an argument 199s registers an offense when first is called on sort_by 199s registers an offense when last is called on sort with comparator 199s does not register an offense for sort!.first 199s does not register an offense when sort_by is not given a block 199s registers an offense when [](0) is called on sort 199s registers an offense when [0] is called on sort_by 199s registers an offense when [0] is called on sort 199s registers an offense when first is called on sort_by with line breaks and `||` operator 199s registers an offense when first is called with sort 199s registers an offense when last is called on sort_by no block 199s registers an offense when [-1] is called on sort 199s does not register an offense for sort_by!(&:something).last 199s does not register an offense when sort_by is used without first 199s does not register an offense when first is used without sort_by 199s registers an offense when [-1] is called on sort_by 199s registers an offense when at(-1) is called with sort 199s registers an offense when first is called on sort_by with line breaks and `or` operator 199s registers an offense when at(0) is called on sort_by 199s registers an offense when slice(-1) is called on sort_by 199s registers an offense when first is called on sort_by with line breaks and `and` operator 199s registers an offense when last is called with sort 199s does not register an offense when first is used before sort 199s registers an offense when [](-1) is called on sort_by 199s registers an offense when first is called on sort_by with line breaks and `&&` operator 199s when not taking first or last element 199s does not register an offense when [1] is called on sort 199s does not register an offense when [-1] is called on sort with an argument 199s does not register an offense when at(-2) is called on sort_by 199s >= Ruby 2.7 199s when using numbered parameter 199s registers an offense and corrects when first is called on sort_by 199s registers an offense and corrects when last is called on sort with comparator 199s registers an offense and corrects when at(0) is called on sort_by 199s 199s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 199s empty constructor 199s accepts 199s constructor has disjunctive assignment 199s LHS is ivar 199s registers an offense and corrects 199s constructor calls super before disjunctive assignment 199s accepts 199s constructor calls super after assignment 199s registers an offense and corrects 199s constructor calls any method before disjunctive assignment 199s accepts 199s LHS is lvar 199s accepts 199s constructor does not have disjunctive assignment 199s accepts 199s 199s RuboCop::Cop::Gemspec::OrderedDependencies 199s behaves like ordered dependency 199s when add_dependency 199s when dependency is separated by multiline comment 199s with TreatCommentsAsGroupSeparators: true 199s accepts 199s with TreatCommentsAsGroupSeparators: false 199s registers an offense 199s When gems are alphabetically sorted 199s does not register any offenses 199s when gems are not alphabetically sorted 199s registers an offense 199s when each individual group of line is sorted 199s does not register any offenses 199s behaves like ordered dependency 199s when add_runtime_dependency 199s when dependency is separated by multiline comment 199s with TreatCommentsAsGroupSeparators: false 199s registers an offense 199s with TreatCommentsAsGroupSeparators: true 199s accepts 199s when each individual group of line is sorted 199s does not register any offenses 199s when gems are not alphabetically sorted 199s registers an offense 199s When gems are alphabetically sorted 199s does not register any offenses 199s when different dependencies are consecutive 199s does not register any offenses 199s When using a local variable in an argument of dependent gem 199s does not register any offenses 199s When using method call to gem names 199s does not register any offenses 199s behaves like ordered dependency 199s when add_development_dependency 199s when dependency is separated by multiline comment 199s with TreatCommentsAsGroupSeparators: true 199s accepts 199s with TreatCommentsAsGroupSeparators: false 199s registers an offense 199s when each individual group of line is sorted 199s does not register any offenses 199s When gems are alphabetically sorted 199s does not register any offenses 199s when gems are not alphabetically sorted 199s registers an offense 199s 199s RuboCop::Cop::Lint::DuplicateRequire 199s registers and corrects an offense for multiple duplicate requires 199s registers and corrects an offense when duplicate `require` through `Kernel` is detected 199s does not register an offense when calling user-defined `require` method 199s does not register an offense when same feature argument but different require method 199s does not register an offense when using single `require` 199s registers and corrects an offense for duplicate non top-level requires 199s registers and corrects an offense when duplicate `require_relative` is detected 199s registers and corrects an offense when duplicate `require` is detected 199s registers and corrects an offense when duplicate requires are interleaved with some other code 199s does not register an offense when there are no duplicate `require`s 199s 199s RuboCop::Cop::Lint::FloatOutOfRange 199s does not register an offense for respectably sized floats 199s does not register an offense for 0.0 199s does not register an offense for tiny little itty bitty floats 199s on whopping big floats which tip the scales 199s registers an offense 199s on floats so close to zero that nobody can tell the difference 199s registers an offense 199s 199s RuboCop::Cop::Style::NilComparison 199s configured with comparison preferred 199s registers an offense for nil? 199s registers and corrects an offense for `!x.nil?` 199s configured with predicate preferred 199s registers an offense for === nil 199s registers an offense for == nil 199s registers and corrects an offense when using `x == nil` as a guard condition 199s 199s RuboCop::Cop::Lint::ScriptPermission 199s with file permission 0644 199s registers an offense for script permission 199s if autocorrection is off 199s leaves the file intact 199s with stdin 199s skips investigation 199s with file permission 0755 199s accepts with blank 199s accepts with shebang line 199s accepts without shebang line 199s 199s RuboCop::Cop::Style::MultilineWhenThen 199s does not register an offense for hash when statement with then 199s does not register an offense when line break for multiple candidate values of `when` 199s registers an offense for empty when statement with then 199s registers an offense for multiline (two lines in a body) when statement with then 199s doesn't register an offense for singleline when statement with then 199s does not register an offense for array when statement with then 199s doesn't register an offense for multiline when statementwith then followed by other lines 199s registers an offense when one line for multiple candidate values of `when` 199s doesn't register an offense when `then` required for a body of `when` is used 199s registers an offense for multiline (one line in a body) when statement with then 199s doesn't register an offense for empty when statement without then 199s autocorrects when the body of `when` branch starts with `then` 199s doesn't register an offense for multiline when statement without then 199s 199s RuboCop::Runner 199s #run with cops autocorrecting each-other 199s with two pairs of conflicting cops 199s if there is an offense in an inspected file 199s aborts because of an infinite loop 199s with three cop cycle 199s if there is an offense in an inspected file 199s aborts because of an infinite loop 199s with display options 199s --display-only-safe-correctable 199s ommits unsafe correctable `Style/FrozenStringLiteral` 199s returns false 199s --display-only-correctable 199s returns false 199s ommits uncorrectable `Layout/LineLength` 199s with two conflicting cops 199s if there is an offense in an inspected file 199s aborts because of an infinite loop 199s if there are multiple offenses in an inspected file 199s aborts because of an infinite loop 199s #run 199s if a cop crashes 199s does not call ResultCache#save 199s if there is an offense in an inspected file 200s returns false 200s sends the offense to a formatter 200s if there are no offenses in inspected files 200s returns true 200s if -s/--stdin is used with an offense 200s returns false 200s sends the offense to a formatter 200s #run when interrupted 200s with SIGINT 200s returns false 200s 200s RuboCop::Cop::Lint::NumberConversion 200s IgnoredClasses 200s when using Time/DateTime with multiple method calls 200s when using DateTime 200s when using Time 200s AllowedPatterns 200s does not register an offense for an allowed method 200s registers an offense for other methods 200s to_method in symbol form 200s registers an offense when using nested number conversion methods 200s does not register an offense when using `Complex` constructor 200s does not register an offense when using `Integer` constructor 200s registers offense with try 200s registers offense and autocorrects 200s does not register an offense when using `Float` constructor 200s registers offense with send 200s registers offense and autocorrects without parentheses 200s registers an offense 200s when `#to_i` called on a variable 200s when `#to_i` called on a variable on a hash 200s when `#to_i` called on a hash value 200s when using `#to_i` 200s when using `#to_i` for number literals 200s when using `#to_f` 200s when using `#to_r` 200s when using `#to_r` for number literals 200s when `#to_i` called on a variable on a array 200s when using `#to_c` 200s when using `#to_c` for number literals 200s when using `#to_f` for number literals 200s does not register an offense 200s when `#to_i` called without a receiver 200s when using Integer() with integer 200s when using Float() 200s when using Complex() 200s when `:to_f` is one of multiple method arguments 200s AllowedMethods 200s does not register an offense for an allowed method 200s registers an offense for other methods 200s 200s RuboCop::Cop::Style::MultilineIfThen 200s does not get confused by a then in a when 200s registers an offense for then in multiline unless 200s registers an offense for then in multiline elsif 200s registers an offense for then in multiline if 200s does not get confused by empty elsif branch 200s does not get confused by a postfix unless 200s does not raise an error for an implicit match unless 200s accepts table style if/then/elsif/ends 200s does not raise an error for an implicit match if 200s does not get confused by a nested postfix unless 200s does not get confused by a commented-out then 200s 200s RuboCop::Cop::Lint::UselessElseWithoutRescue 200s with `else` with `rescue` 200s accepts 200s with `else` without `rescue` 200s registers an offense 200s 200s RuboCop::Cop::Style::FormatStringToken 200s ignores time format (when used as argument to strptime) 200s ignores xstr 200s supports flags and modifiers 200s ignores `%r` regexp 200s ignores time format when it is stored in a variable 200s works inside hashes 200s handles dstrs 200s ignores http links 200s ignores time format (when used as argument to strftime) 200s ignores regexp 200s ignores percent escapes 200s ignores __FILE__ 200s ignores time format and unrelated `format` method using 200s ignores placeholder arguments 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s does not register offenses for annotated style 200s detects when the cop must be disabled to avoid offenses 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s registers offenses for template style 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s sets the enforced style to annotated after inspecting "%s" 200s detects when the cop must be disabled to avoid offenses 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s detects when the cop must be disabled to avoid offenses 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s registers offenses for template style 200s sets the enforced style to annotated after inspecting "%s" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is template 200s #correctable_sequence? 200s does not register offenses for annotated style 200s detects when the cop must be disabled to avoid offenses 200s configures the enforced style to template after inspecting "%{a}" 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s configures the enforced style to template after inspecting "%{a}" 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s detects when the cop must be disabled to avoid offenses 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s configures the enforced style to template after inspecting "%{a}" 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s supports dynamic string with interpolation 200s does not register offenses for annotated style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s sets the enforced style to annotated after inspecting "%s" 200s registers offenses for template style 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s registers offenses for template style 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s sets the enforced style to annotated after inspecting "%s" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is template 200s detects when the cop must be disabled to avoid offenses 200s supports dynamic string with interpolation 200s registers offenses for annotated style 200s #correctable_sequence? 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is template 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s configures the enforced style to template after inspecting "%{a}" 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s does not register offenses for annotated style 200s detects when the cop must be disabled to avoid offenses 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s registers offenses for template style 200s #correctable_sequence? 200s sets the enforced style to annotated after inspecting "%s" 200s detects when the cop must be disabled to avoid offenses 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is annotated 200s gives a helpful error message 200s when AllowedPatterns is enabled 200s does not register an offense for value in nested structure 200s does not register an offense 200s registers an offense for different method call within ignored method 200s when AllowedMethods is disabled 200s registers an offense 200s when AllowedMethods is enabled 200s does not register an offense for value in nested structure 200s registers an offense for different method call within ignored method 200s does not register an offense 200s when AllowedPatterns is disabled 200s registers an offense 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is annotated 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s sets the enforced style to annotated after inspecting "%s" 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s registers offenses for template style 200s sets the enforced style to annotated after inspecting "%s" 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is template 200s configures the enforced style to template after inspecting "%{a}" 200s #correctable_sequence? 200s does not register offenses for annotated style 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s sets the enforced style to annotated after inspecting "%s" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is template 200s configures the enforced style to template after inspecting "%{a}" 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s configures the enforced style to template after inspecting "%{a}" 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s gives a helpful error message 200s when enforced style is template 200s gives a helpful error message 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s does not register offenses for annotated style 200s configures the enforced style to template after inspecting "%{a}" 200s detects when the cop must be disabled to avoid offenses 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s detects when the cop must be disabled to avoid offenses 200s #correctable_sequence? 200s registers offenses for template style 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s configures the enforced style to template after inspecting "%{a}" 200s does not register offenses for annotated style 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is annotated 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s sets the enforced style to annotated after inspecting "%s" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s supports dynamic string with interpolation 200s does not register offenses for annotated style 200s detects when the cop must be disabled to avoid offenses 200s #correctable_sequence? 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is annotated 200s detects when the cop must be disabled to avoid offenses 200s sets the enforced style to annotated after inspecting "%s" 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s registers offenses for template style 200s detects when the cop must be disabled to avoid offenses 200s sets the enforced style to annotated after inspecting "%s" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is template 200s detects when the cop must be disabled to avoid offenses 200s configures the enforced style to template after inspecting "%{a}" 200s #correctable_sequence? 200s does not register offenses for annotated style 200s supports dynamic string with interpolation 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s #correctable_sequence? 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s registers offense for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is template 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s does not register offenses for annotated style 200s #correctable_sequence? 200s configures the enforced style to template after inspecting "%{a}" 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s behaves like enforced styles for format string tokens 200s when enforced style is template 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s #correctable_sequence? 200s configures the enforced style to template after inspecting "%{a}" 200s does not register offenses for annotated style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s #correctable_sequence? 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for single unannotated 200s does not register offenses for dual unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s behaves like enforced styles for format string tokens 200s when enforced style is annotated 200s sets the enforced style to annotated after inspecting "%s" 200s supports dynamic string with interpolation 200s #correctable_sequence? 200s detects when the cop must be disabled to avoid offenses 200s registers offenses for template style 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s registers offense for dual unannotated 200s does not register offenses for single unannotated 200s when enforced style is unannotated 200s #correctable_sequence? 200s when enforced style is template 200s does not register offenses for annotated style 200s supports dynamic string with interpolation 200s detects when the cop must be disabled to avoid offenses 200s configures the enforced style to template after inspecting "%{a}" 200s #correctable_sequence? 200s behaves like maximum allowed unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 2 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s when MaxUnannotatedPlaceholdersAllowed is 1 200s does not register offenses for dual unannotated 200s does not register offenses for single unannotated 200s 200s RuboCop::Formatter::PacmanFormatter 200s #next_step 200s when a offense is detected in a file 200s calls the step function with a dot 200s when no offenses are detected 200s calls the step function with a dot 200s #update_progress_line 200s when total_files less than columns in the terminal 200s updates the progress_line properly 200s when total_files is greater than columns in the terminal 200s updates the progress_line properly 200s when need to change the line 200s updates the progress_line properly 200s #step 200s character is ghost 200s removes the first • and puts a ghosts 200s character is normal dot 200s removes the first • and puts a . 200s character is a Pacdot 200s leaves the progress_line as it is 200s character is Pacman 200s removes the first • and puts a ᗧ 200s 200s RuboCop::Cop::Lint::NestedMethodDefinition 200s does not register offense for nested definition inside class_exec 200s does not register offense for nested definition inside Struct.new 200s registers an offense for a nested method definition inside lambda 200s does not register offense for nested definition inside ::Module.new 200s registers an offense for a nested method definition 200s does not register offense for nested definition inside ::Struct.new 200s does not register offense for nested definition inside class shovel 200s does not register offense for nested definition inside module_eval 200s registers an offense for a nested class method definition 200s does not register offense for nested definition inside instance_exec 200s does not register offense for definition of method on local var 200s does not register offense for nested definition inside class_eval 200s does not register offense for nested definition inside ::Class.new 200s registers an offense for a nested singleton method definition 200s does not register offense for nested definition inside module_exec 200s does not register offense for nested definition inside instance_eval 200s does not register offense for nested definition inside Module.new 200s does not register offense for nested definition inside Class.new 200s does not register an offense for a lambda definition inside method 200s when `AllowedPatterns: [baz]` 200s does not register offense for nested definition inside `do_baz` 201s registers offense for nested definition inside `do_qux` 201s when `AllowedMethods: [has_many]` 201s registers offense for nested definition inside `denied_method` 201s does not register offense for nested definition inside `has_many` 201s 201s RuboCop::Cop::Lint::StructNewOverride 201s does not register an offense with no overrides 201s registers an offense using `Struct.new(...)` with multiple overrides 201s registers an offense using `Struct.new(...)` with an option argument 201s registers an offense using `Struct.new(...symbols)` 201s registers an offense using `Struct.new(symbol, string)` 201s registers an offense using `Struct.new(symbol)` 201s registers an offense using `Struct.new(...)` with a block 201s does not register an offense with an override within a given block 201s registers an offense using `::Struct.new(symbol)` 201s registers an offense using `Struct.new(string, ...symbols)` 201s 201s RuboCop::Cop::Style::Next 201s does not crash with empty brackets 201s does not crash with an empty body branch 201s does not blow up on empty body until block 201s allows loops with conditions at the end with ternary op 201s keeps comments when autocorrecting 201s handles nested autocorrections 201s does not blow up on empty body for block 201s does not blow up on empty body while block 201s doesn't reindent heredoc bodies when autocorrecting 201s handles `then` when autocorrecting 201s allows empty blocks 201s allows super nodes 201s behaves like iterators 201s registers an offense for if inside of downto 201s registers an offense for if inside of nested iterators 201s allows loops with if being the entire body with else 201s registers an offense for if inside of for 201s registers an offense for if inside of each_with_object 201s allows loops with if with else, nested in another condition 201s allows loops with conditional break 201s registers an offense for if inside of nested iterators 201s reports an offense for if whose body has 3 lines 201s registers an offense for if inside of loop 201s allows loops with conditional return 201s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 201s registers an offense for if inside of reject! 201s allows loops with if with else at the end 201s registers an offense for if inside of select 201s registers an offense for if inside of each 201s registers an offense for if inside of reject 201s registers an offense for if inside of select! 201s registers an offense for if inside of map 201s registers an offense when line break before condition 201s autocorrects a misaligned end 201s registers an offense for if inside of collect 201s registers an offense for if inside of times 201s EnforcedStyle: skip_modifier_ifs 201s allows modifier if 201s EnforcedStyle: always 201s registers an offense for modifier if 201s Ruby 2.7 201s registers an offense for if inside of downto numblock 201s Invalid MinBodyLength 201s fails with an error 201s MinBodyLength: 3 201s accepts if whose body has 1 line 201s behaves like iterators 201s registers an offense for unless inside of reject! 201s registers an offense for unless inside of times 201s allows loops with conditional return 201s registers an offense for unless inside of loop 201s registers an offense for unless inside of each_with_object 201s registers an offense for unless inside of collect 201s registers an offense for unless inside of for 201s allows loops with unless with else, nested in another condition 201s registers an offense for unless inside of select 201s autocorrects a misaligned end 201s registers an offense for unless inside of downto 201s registers an offense for unless inside of nested iterators 201s registers an offense when line break before condition 201s allows loops with unless being the entire body with else 201s registers an offense for unless inside of nested iterators 201s registers an offense for unless inside of each 201s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 201s allows loops with conditional break 201s registers an offense for unless inside of select! 201s reports an offense for unless whose body has 3 lines 201s registers an offense for unless inside of map 201s registers an offense for unless inside of reject 201s allows loops with unless with else at the end 201s Ruby 2.7 201s registers an offense for unless inside of downto numblock 201s EnforcedStyle: skip_modifier_ifs 201s allows modifier unless 201s EnforcedStyle: always 201s registers an offense for modifier unless 201s 201s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 201s does not register an offense when using `__ENCODING__` 201s does not register an offense when no method call operator 201s safe navigation operator 201s registers an offense and corrects when space before first method call operator 201s registers an offense and corrects when spaces after method call 201s registers an offense and corrects when space before last method call operator 201s registers an offense and corrects when space before method call 201s registers an offense and corrects when space around multiple method call operator 201s does not register an offense when no space around method call 201s does not register an offense when no space around any `.` operators 201s registers an offense and corrects when space after method call 201s registers an offense and corrects when space after last method call operator 201s registers an offense and corrects when space after first method call operator 201s registers an offense and corrects when spaces before method call 201s registers an offense and corrects when spaces around method call 201s registers an offense and corrects when space around intermediate method call operator 201s when multi line method call 201s registers an offense and corrects when space before method call in suffix chaining 201s does not register an offense when no space after the `&.` 201s registers an offense and corrects when space before method call 201s dot operator 201s registers an offense and corrects when spaces before method call 201s registers an offense and corrects when spaces around method call 201s registers an offense and corrects when spaces after `Proc#call` shorthand call 201s does not register an offense when no space around method call 201s does not register an offense when no space around any `.` operators 201s registers an offense and corrects when space after last method call operator 201s registers an offense and corrects when space after first method call operator 201s registers an offense and corrects when space after method call 201s registers an offense and corrects when space around intermediate method call operator 201s registers an offense and corrects when space before last method call operator 201s registers an offense and corrects when space before method call 201s registers an offense and corrects when spaces after method call 201s registers an offense and corrects when space before first method call operator 201s registers an offense and corrects when space around multiple method call operator 201s when multi line method call 201s registers an offense and corrects when space before method call in suffix chaining 201s does not register an offense when no space after the `.` 201s registers an offense and corrects when space before method call 201s when there is a space between `.` operator and a comment 201s registers an offense when there is a space before `.` 201s does not register an offense when there is not a space before `.` 201s :: operator 201s registers an offense and corrects when space after last method call operator 201s does not register an offense if no space before `::` operator with assignment 201s does not register an offense when no space around any `.` operators 201s registers an offense and corrects when multiple spaces with assignment 201s does not register an offense if no space with conditionals 201s does not register an offense when no space around method call 201s does not register an offense if no space before `::` operator with inheritance 201s registers an offense and corrects when space after first operator with assignment 201s registers an offense and corrects when spaces after method call 201s registers an offense and corrects when space around multiple method call operator 201s registers an offense and corrects when space around intermediate method call operator 201s registers an offense and corrects when space after method call 201s when multi line method call 201s does not register an offense when no space after the `::` 201s registers an offense and corrects when space before method call 201s 201s RuboCop::Cop::Style::EmptyElse 201s configured to warn on empty else and nil in else 201s given an if-statement 201s with an else-clause with side-effects 201s doesn't register an offense 201s with no else-clause 201s doesn't register an offense 201s with a completely empty else-clause 201s behaves like autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s with an else-clause containing only the literal nil 201s with one elsif 201s behaves like autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s with multiple elsifs 201s behaves like autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s given a case statement 201s with an else-clause containing only the literal nil 201s behaves like autocorrect 201s MissingElse is if 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is case 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s with a completely empty else-clause 201s behaves like autocorrect 201s MissingElse is if 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is case 201s does not autocorrect 201s with an else-clause with side-effects 201s doesn't register an offense 201s with no else-clause 201s doesn't register an offense 201s given an unless-statement 201s with an else-clause containing only the literal nil 201s behaves like autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s with no else-clause 201s doesn't register an offense 201s with an else-clause with side-effects 201s doesn't register an offense 201s with a completely empty else-clause 201s behaves like autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s configured to warn on nil in else 201s given a case statement 201s with no else-clause 201s doesn't register an offense 201s with a completely empty else-clause 201s doesn't register an offense 201s with an else-clause containing only the literal nil 201s using semicolons 201s behaves like autocorrect 201s MissingElse is if 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is case 201s does not autocorrect 201s when the result is assigned to a variable 201s behaves like autocorrect 201s MissingElse is if 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is case 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s with an else-clause with side-effects 201s doesn't register an offense 201s given an if-statement 201s with no else-clause 201s doesn't register an offense 201s with an else-clause with side-effects 201s doesn't register an offense 201s with a completely empty else-clause 201s doesn't register an offense 201s with an else-clause containing only the literal nil 201s when the result is assigned to a variable 201s behaves like autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s when standalone 201s behaves like autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s with an else-clause containing only the literal nil using semicolons 201s with multiple elsifs 201s behaves like autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s with one elsif 201s behaves like autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s given an unless-statement 201s with an else-clause containing only the literal nil 201s behaves like autocorrect 201s MissingElse is both 201s does not autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s with an else-clause with side-effects 201s doesn't register an offense 201s with no else-clause 201s doesn't register an offense 201s with a completely empty else-clause 201s doesn't register an offense 201s when `AllowComments: true` 201s given an unless-statement 201s with comment and nil else-clause 201s doesn't register an offense 201s with not comment and nil else-clause 201s registers an offense 201s with comment and empty else-clause 201s doesn't register an offense 201s with not comment and empty else-clause 201s registers an offense 201s given an if-statement 201s with not comment and empty else-clause 201s registers an offense 201s with not comment and nil else-clause 201s registers an offense 201s with comment and empty else-clause 201s doesn't register an offense 201s with comment and nil else-clause 201s doesn't register an offense 201s given a case statement 201s with not comment and empty else-clause 201s registers an offense 201s with not comment and nil else-clause 201s registers an offense 201s with comment and nil else-clause 201s doesn't register an offense 201s with comment and empty else-clause 201s doesn't register an offense 201s configured to warn on empty else 201s given an if-statement 201s with a completely empty else-clause 201s using semicolons 201s behaves like autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s not using semicolons 201s behaves like autocorrect 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s with no else-clause 201s doesn't register an offense 201s with an empty comment 201s does not autocorrect 201s with an else-clause with side-effects 201s doesn't register an offense 201s in an if-statement 201s behaves like autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is both 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s with an else-clause containing only the literal nil 201s doesn't register an offense 201s given a case statement 201s with an else-clause with side-effects 201s doesn't register an offense 201s with no else-clause 201s doesn't register an offense 201s with an else-clause containing only the literal nil 201s doesn't register an offense 201s with a completely empty else-clause 201s behaves like autocorrect 201s MissingElse is if 201s does autocorrection 201s MissingElse is case 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s given an unless-statement 201s with an else-clause containing only the literal nil 201s doesn't register an offense 201s with no else-clause 201s doesn't register an offense 201s with a completely empty else-clause 201s behaves like autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does not autocorrect 201s MissingElse is case 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s with an else-clause with side-effects 201s doesn't register an offense 201s with nested if and case statement 201s behaves like autocorrect 201s MissingElse is case 201s does not autocorrect 201s MissingElse is disabled 201s does autocorrection 201s MissingElse is if 201s does autocorrection 201s MissingElse is both 201s does not autocorrect 201s 201s RuboCop::Cop::Lint::RescueType 201s accepts rescuing a single exception 201s accepts rescuing nothing 201s accepts rescue modifier 201s accepts rescuing nothing within a method definition 201s behaves like offenses 201s def rescue 201s rescuing from nil 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from nil 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from nil 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from nil after another exception 201s registers an offense and autocorrects 201s rescuing from nil 201s registers an offense and autocorrects 201s rescuing from nil before another exception 201s registers an offense and autocorrects 201s behaves like offenses 201s begin rescue ensure 201s rescuing from 0.0 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from 0.0 before another exception 201s registers an offense and autocorrects 201s rescuing from 0.0 after another exception 201s registers an offense and autocorrects 201s rescuing from 0.0 201s registers an offense and autocorrects 201s def rescue 201s rescuing from 0.0 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from 0.0 201s registers an offense and autocorrects 201s behaves like offenses 201s def rescue 201s rescuing from 0 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from 0 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from 0 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from 0 201s registers an offense and autocorrects 201s rescuing from 0 after another exception 201s registers an offense and autocorrects 201s rescuing from 0 before another exception 201s registers an offense and autocorrects 201s behaves like offenses 201s begin rescue 201s rescuing from 'string' after another exception 201s registers an offense and autocorrects 201s rescuing from 'string' before another exception 201s registers an offense and autocorrects 201s rescuing from 'string' 201s registers an offense and autocorrects 201s def rescue 201s rescuing from 'string' 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from 'string' 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from 'string' 201s registers an offense and autocorrects 201s behaves like offenses 201s def rescue ensure 201s rescuing from :symbol 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from :symbol 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from :symbol after another exception 201s registers an offense and autocorrects 201s rescuing from :symbol before another exception 201s registers an offense and autocorrects 201s rescuing from :symbol 201s registers an offense and autocorrects 201s def rescue 201s rescuing from :symbol 201s registers an offense and autocorrects 201s behaves like offenses 201s def rescue ensure 201s rescuing from [] 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from [] 201s registers an offense and autocorrects 201s def rescue 201s rescuing from [] 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from [] 201s registers an offense and autocorrects 201s rescuing from [] before another exception 201s registers an offense and autocorrects 201s rescuing from [] after another exception 201s registers an offense and autocorrects 201s behaves like offenses 201s def rescue 201s rescuing from "#{string}" 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from "#{string}" 201s registers an offense and autocorrects 201s begin rescue ensure 201s rescuing from "#{string}" 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from "#{string}" after another exception 201s registers an offense and autocorrects 201s rescuing from "#{string}" 201s registers an offense and autocorrects 201s rescuing from "#{string}" before another exception 201s registers an offense and autocorrects 201s behaves like offenses 201s begin rescue ensure 201s rescuing from {} 201s registers an offense and autocorrects 201s def rescue ensure 201s rescuing from {} 201s registers an offense and autocorrects 201s def rescue 201s rescuing from {} 201s registers an offense and autocorrects 201s begin rescue 201s rescuing from {} 201s registers an offense and autocorrects 201s rescuing from {} before another exception 201s registers an offense and autocorrects 201s rescuing from {} after another exception 201s registers an offense and autocorrects 201s 201s RuboCop::Formatter::FormatterSet 201s responds to all formatter API methods 201s #close_output_files 201s does not close non file output 201s closes all output files 201s formatter API method 201s invokes the same method of all containing formatters 201s #custom_formatter_class 201s can handle top level namespaced constant name 201s can handle namespaced constant name 201s returns constant represented by the passed string 201s when non-existent constant name is passed 201s raises error 201s #builtin_formatter_class 201s returns class which matches double character alias name 201s returns class which matches single character alias name 201s returns class which matches passed alias name exactly 201s add_formatter 201s adds a formatter with specified formatter type 201s can add multiple formatters by being invoked multiple times 201s adds a formatter to itself 201s when output path is omitted 201s adds a formatter outputs to $stdout 201s when output path is specified 201s adds a formatter outputs to the specified file 201s when parent directories don't exist 201s creates them 201s 201s RuboCop::Cop::InternalAffairs::NumblockHandler 201s does not register an offense for cops with on_numblock method 201s registers an offense for cops with forgotten numblock handlers 201s does not register an offense for cops with on_numblock alias 201s does not register an offense for cops with on_numblock alias_method 201s 201s RuboCop::Cop::Metrics::ParameterLists 201s accepts a proc with more than 4 parameters 201s does not register an offense when method has allowed amount of optargs 201s registers an offense when optargs count exceeds the maximum 201s accepts a method def with 4 parameters 201s accepts a lambda with more than 4 parameters 201s does not register an offense when method has no args 201s does not register an offense when method has allowed amount of args with block arg 201s registers an offense for a method def with 5 parameters 201s When CountKeywordArgs is false 201s does not count keyword arguments without default values 201s does not count keyword arguments 201s When CountKeywordArgs is true 201s counts keyword arguments as well 201s 201s RuboCop::Cop::Layout::FirstHashElementLineBreak 201s registers an offense and corrects hash nested in a method call 201s ignores elements listed on a single line 201s registers an offense and corrects single element multi-line hash 201s ignores implicit hashes in method calls without parens 201s ignores implicit hashes in method calls that are improperly formatted 201s ignores implicit hashes in method calls with parens 201s registers an offense and corrects elements listed on the first line 201s 201s RuboCop::Cop::Style::Lambda 201s with default `line_count_dependent` style 201s with a multiline do-end lambda as a parenthesized kwarg 201s registers an offense 201s when calling a lambda method without a block 201s does not register an offense 201s with a multiline lambda method call 201s does not register an offense 201s unusual lack of spacing 201s without any spacing 201s registers an offense 201s with a multiline lambda literal 201s with no arguments and bad spacing 201s registers an offense 201s with empty arguments 201s registers an offense 201s with no parentheses and many args 201s registers an offense 201s with no arguments and no spacing 201s registers an offense 201s without parentheses 201s registers an offense 201s with no parentheses and bad spacing 201s registers an offense 201s without spacing before arguments 201s registers an offense 201s without spacing after arguments 201s registers an offense 201s with a single line lambda method call 201s with arguments 201s registers an offense 201s without arguments 201s registers an offense 201s with a multiline do-end lambda literal as a keyword argument 201s registers an offense 201s with a single line lambda literal 201s does not register an offense 201s with a multiline lambda literal 201s with arguments 201s registers an offense 201s without arguments 201s registers an offense 201s with a multiline lambda literal as an argument 201s registers an offense 201s >= Ruby 2.7 201s when using numbered parameter 201s with a single line lambda literal 201s does not register an offense 201s with a multiline lambda method call 201s does not register an offense 201s with a single line lambda method call 201s registers an offense 201s with a multiline braces lambda literal as a keyword argument 201s registers an offense 201s with enforced `literal` style 201s with a single line lambda method call 201s without arguments 201s registers an offense 201s with arguments 201s registers an offense 201s with a multiline lambda method call 201s without arguments 201s registers an offense 201s with arguments 201s registers an offense 201s when using safe navigation operator 201s does not break 201s with enforced `lambda` style 201s with a single line lambda literal 201s without arguments 201s registers an offense 201s with arguments 201s registers an offense 201s without argument parens and spaces 201s registers an offense 201s with a multiline lambda literal 201s with arguments 201s registers an offense 201s without arguments 201s registers an offense 201s 201s RuboCop::Cop::Layout::SpaceAfterComma 201s block argument commas without space 201s behaves like trailing comma 201s accepts the last comma 201s behaves like ends with an item 201s registers an offense and does autocorrection 201s array index commas without space 201s behaves like trailing comma 201s accepts the last comma 201s behaves like ends with an item 201s registers an offense and does autocorrection 201s inside hash braces 201s when EnforcedStyle for SpaceInsideBlockBraces is no_space 201s accepts no space between a comma and a closing brace 201s behaves like common behavior 201s accepts a space between a comma and a closing brace 201s when EnforcedStyle for SpaceInsideBlockBraces is space 201s registers an offense for no space between a comma and a closing brace 201s behaves like common behavior 201s accepts a space between a comma and a closing brace 201s method call arg commas without space 201s behaves like ends with an item 201s registers an offense and does autocorrection 201s 201s RuboCop::Cop::Layout::ClosingHeredocIndentation 201s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 201s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 201s accepts correctly indented closing heredoc when heredoc contents with blank line 201s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 201s does not register an offense for a << heredoc 201s does not register an offense for correctly indented empty heredocs 201s accepts correctly indented closing heredoc 201s registers an offense for incorrectly indented empty heredocs 201s accepts correctly indented closing heredoc when aligned at the beginning of method definition 201s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 201s registers an offense for bad indentation of a closing heredoc 201s 201s RuboCop::Cop::Lint::NestedPercentLiteral 201s registers no offense for nestings under percent 201s registers offense for multiply nested percent literals 201s registers no offense for percents in the middle of literals 201s registers no offense for empty array 201s registers no offense for array 201s registers offense for repeated nested percent literals 201s registers offense for nested percent literals 201s registers no offense for percent modifier character in isolation 201s when handling invalid UTF8 byte sequence 201s registers no offense for array 201s registers offense for nested percent literal 201s 201s RuboCop::Cop::Lint::ReturnInVoidContext 201s with a non initialize method containing a return 201s accepts 201s with an initialize method containing a return without a value 201s accepts 201s when return is in top scope 201s accepts 201s with an initialize method containing a return with a value 201s registers an offense 201s with a setter method containing a return without a value 201s accepts 201s with a setter method containing a return with a value 201s registers an offense 201s with a class method called initialize containing a return 201s accepts 201s 201s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 201s when EnforcedStyle is space 201s accepts empty interpolation 201s for well-formatted string interpolations 201s does not register an offense for excess literal spacing 201s for ill-formatted string interpolations 201s registers offenses and autocorrects 201s for "no_space" style formatted string interpolations 201s registers offenses and autocorrects 201s when EnforcedStyle is no_space 201s accepts empty interpolation 201s does not touch spaces inside the interpolated expression 201s when interpolation starts or ends with a line break 201s does not register an offense 201s ignores comments and whitespace when looking for line breaks 201s for ill-formatted string interpolations 201s finds interpolations in string-like contexts 201s registers offenses and autocorrects 201s for well-formatted string interpolations 201s accepts excess literal spacing 201s for "space" style formatted string interpolations 201s registers offenses and autocorrects 201s 201s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 201s Ruby 2.7 201s registers an offense for a chained call 201s with a multi-line do..end block 201s accepts a chained block 201s accepts it if there is no chained call 201s registers an offense for a chained call 201s when using safe navigation operator 201s registers an offense for a chained call 201s with a single-line do..end block 201s registers an offense for a chained call 201s accepts a single-line do..end block with a chained block 201s with a {} block 201s accepts a single-line block with a chained call 201s accepts a multi-line block with a chained call 201s 201s RuboCop::Cop::Style::GlobalVars 201s does not register an offense for built-in variable $ENV_JAVA 201s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 201s does not register an offense for built-in variable $-w 201s does not register an offense for built-in variable $` 201s does not register an offense for built-in variable $+ 201s does not register an offense for built-in variable $LOAD_PATH 201s does not register an offense for built-in variable $LAST_PAREN_MATCH 201s does not register an offense for built-in variable $-p 201s does not register an offense for built-in variable $FILENAME 201s does not register an offense for built-in variable $DEBUG 201s does not register an offense for built-in variable $0 201s does not register an offense for built-in variable $' 201s does not register an offense for built-in variable $-l 201s does not register an offense for built-in variable $! 201s does not register an offense for built-in variable $_ 201s does not register an offense for built-in variable $NR 201s does not register an offense for built-in variable $-0 201s does not register an offense for built-in variable $JRUBY_VERSION 201s does not register an offense for built-in variable $DEFAULT_INPUT 201s does not register an offense for built-in variable $DEFAULT_OUTPUT 201s allows user permitted variables 201s does not register an offense for built-in variable $PROCESS_ID 201s does not register an offense for built-in variable $/ 201s does not register an offense for built-in variable $VERBOSE 201s does not register an offense for built-in variable $-I 201s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 201s does not register an offense for built-in variable $& 201s does not register an offense for built-in variable $OFS 201s does not register an offense for built-in variable $SAFE 201s does not register an offense for built-in variable $ERROR_INFO 201s does not register an offense for built-in variable $. 201s does not register an offense for built-in variable $: 201s does not register an offense for built-in variable $-F 201s does not register an offense for built-in variable $-a 201s does not register an offense for built-in variable $stdout 201s does not register an offense for built-in variable $LAST_MATCH_INFO 201s does not register an offense for built-in variable $stdin 201s registers an offense for $custom 201s does not register an offense for built-in variable $? 201s does not register an offense for built-in variable $FS 201s does not register an offense for built-in variable $ORS 201s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 201s does not register an offense for built-in variable $; 201s does not register an offense for built-in variable $< 201s does not register an offense for built-in variable $stderr 201s does not register an offense for built-in variable $ARGV 201s does not register an offense for built-in variable $LOADED_FEATURES 201s does not register an offense for built-in variable $IGNORECASE 201s does not register an offense for built-in variable $LAST_READ_LINE 201s does not register an offense for built-in variable $PID 201s does not register an offense for built-in variable $PREMATCH 201s does not register an offense for built-in variable $* 201s does not register an offense for built-in variable $-d 201s does not register an offense for built-in variable $INPUT_LINE_NUMBER 201s does not register an offense for built-in variable $-i 201s does not register an offense for built-in variable $CHILD_STATUS 201s does not register an offense for built-in variable $$ 201s does not register an offense for built-in variable $> 201s does not register an offense for built-in variable $~ 201s does not register an offense for built-in variable $ERROR_POSITION 201s does not register an offense for built-in variable $-v 201s does not register an offense for built-in variable $= 201s does not register an offense for built-in variable $FIELD_SEPARATOR 201s does not register an offense for built-in variable $POSTMATCH 201s does not register an offense for backrefs like $1 201s does not register an offense for built-in variable $@ 201s does not register an offense for built-in variable $, 201s does not register an offense for built-in variable $RS 201s does not register an offense for built-in variable $PROGRAM_NAME 201s does not register an offense for built-in variable $JRUBY_REVISION 201s does not register an offense for built-in variable $\ 201s does not register an offense for built-in variable $CLASSPATH 201s does not register an offense for built-in variable $MATCH 201s does not register an offense for built-in variable $" 201s 201s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 201s does not register an offense when not overriding an exception with an exception result 201s does not register an offense when using `=>` but correctly assigning to variables 201s registers an offense when overriding an exception with an exception result 201s 201s RuboCop::Cop::Style::VariableInterpolation 201s registers an offense for interpolated regexp back references 201s registers an offense for interpolated regexp nth back references 201s registers an offense for interpolated global variables in regexp 201s registers an offense for interpolated global variables in backticks 201s registers an offense for interpolated instance variables 201s does not register an offense for variables in expressions 201s registers an offense for interpolated global variables in symbol 201s registers an offense for interpolated global variables in string 201s registers an offense for interpolated class variables 201s 201s RuboCop::Cop::Corrector 201s #rewrite 201s accepts a node instead of a range 201s raises a useful error if not given a node or a range 201s allows removal of characters from range ending 201s allows insertion before a source range 201s allows replacement of a range 201s allows insertion after a source range 201s allows insertion before and after a source range 201s allows removal of characters preceding range 201s allows removal of a range 201s allows removal of characters from range beginning 201s when range is from incorrect source 201s raises exception from remove 201s raises exception from insert_after 201s raises exception from replace 201s raises exception from insert_before 201s raises exception from remove_trailing 201s raises exception from remove_preceding 201s raises exception from remove_leading 201s 201s RuboCop::Cop::Lint::RefinementImportMethods 201s Ruby <= 3.0 201s does not register an offense when using `prepend` in `refine` block 201s does not register an offense when using `include` in `refine` block 201s Ruby >= 3.1 201s does not register an offense when using `import_methods` in `refine` block 201s does not register an offense when using `include` with a receiver in `refine` block 201s registers an offense when using `include` in `refine` block 201s registers an offense when using `prepend` in `refine` block 201s 201s RuboCop::Cop::Layout::MultilineAssignmentLayout 201s same_line style 201s registers an offense when the rhs is a different line 201s allows multi-line assignments on the same line 201s registers an offense when the rhs is a different line in []= 201s registers an offense when the rhs is a different line in setters 201s ignores arrays 201s registers an offense for masgn with multi-line lhs 201s configured supported types 201s allows supported types to be configured 201s when supported types is block 201s allows when multi-line assignments using block definition is on the same line 201s registers an offense when multi-line assignments using block definition on separate lines 201s allows multi-line assignments when using shovel operator 201s allows multi-line block defines on separate lines 201s new_line style 201s allows multi-line assignments on separate lines 201s registers an offense when the rhs is on the same line in setters 201s ignores arrays 201s registers an offense when the rhs is on the same line in []= 201s registers an offense for masgn with multi-line lhs 201s registers an offense when the rhs is on the same line 201s configured supported types 201s allows supported types to be configured 201s when supported types is block 201s allows multi-line block defines on separate lines 201s allows multi-line assignments when using block definition on separate lines 201s registers an offense when multi-line assignments using block definition is on the same line 201s allows multi-line assignments when using shovel operator 201s 201s RuboCop::Cop::Style::ArrayJoin 201s autocorrects '*' to 'join' when there are no spaces 201s autocorrects '*' to 'join' when setting to a variable 201s does not register an offense for numbers 201s does not register an offense for ambiguous cases 201s registers an offense for an array followed by string 201s 201s RuboCop::Cop::Style::TrailingBodyOnModule 201s registers an offense when body trails after module definition 201s accepts regular module 201s registers offense with multi-line module 201s registers offense when module definition uses semicolon 201s autocorrects when there are multiple semicolons 201s autocorrects with comment after body 201s when module is not on first line of processed_source 201s autocorrects offense 201s 201s RuboCop::Cop::Migration::DepartmentName 201s when a disable comment has cop names with departments 201s accepts 201s when todo/enable comments have cop names without departments 201s registers offenses and corrects when there is space around `:` 201s registers offenses and corrects when using a legacy cop name 201s registers offenses and corrects 201s when a disable comment contains an unexpected character for department name 201s accepts 201s when an unexpected disable comment format 201s does not register an offense 201s when a disable comment contains a plain comment 201s accepts 201s when only department name has given 201s does not register an offense 201s 201s RuboCop::Cop::Layout::TrailingEmptyLines 201s when EnforcedStyle is final_newline 201s accepts an empty file 201s autocorrects even if some lines have space 201s registers an offense for no final newline after block comment 201s registers an offense for multiple blank lines in an empty file 201s accepts final blank lines if they come after __END__ in empty file 201s registers an offense for no final newline after assignment 201s registers an offense for multiple trailing blank lines 201s accepts final newline 201s accepts final blank lines if they come after __END__ 201s when EnforcedStyle is final_blank_line 201s autocorrects missing newline 201s registers an offense for final newline 201s autocorrects missing blank line 201s accepts final blank line 201s registers an offense for multiple blank lines in an empty file 201s registers an offense for multiple trailing blank lines 201s registers an offense for no final newline 201s 201s RuboCop::Cop::Naming::PredicateName 201s with method definition macros 201s registers an offense when using `define_method` 201s accepts method name when corrected name is invalid identifier 201s registers an offense when using an internal affair macro 201s with permitted predicate names 201s accepts method name which is in permitted list 201s without method definition macros 201s does not register any offenses when using an internal affair macro 201s accepts method name when corrected name is invalid identifier 201s registers an offense when using `define_method` 201s without restricted prefixes 201s accepts method name that starts with unknown prefix 201s registers an offense when method name starts with "is" 201s registers an offense when method name starts with "has" 201s accepts method name when corrected name is invalid identifier 201s with restricted prefixes 201s accepts method name that is an assignment 201s registers an offense when method name starts with "has" 201s accepts method name that starts with unknown prefix 201s accepts method name when corrected name is invalid identifier 201s registers an offense when method name starts with "is" 201s 201s RuboCop::Cop::Lint::UnreachableCode 201s accepts `fail` is in `if`, and without `else` 201s registers an offense for `retry` before other statements 201s accepts `throw` is in all `if` branches 201s accepts `exit` is in `case` branch without else 201s accepts code with conditional `exit!` 201s registers an offense for `raise` in `begin` 201s registers an offense for `break` in all `case` branches 201s registers an offense for `fail` in `begin` 201s accepts `return` is in `if` branch only 201s registers an offense for `redo` in all `if` branches 201s registers an offense for `return` in all `if` branches with other expressions 201s accepts `exit!` is in all `if` branches 201s registers an offense for `retry` in `begin` 202s accepts code with conditional `retry` 202s accepts `redo` is in all `if` branches 202s registers an offense for `abort` in all `if` branches with other expressions 202s accepts `retry` is in `if`, and without `else` 202s registers an offense for `exit!` in `begin` 202s registers an offense for `return` in all `case` branches 202s registers an offense for `abort` in all `if` branches 202s registers an offense for `return` in all `if` and `elsif` branches 202s accepts `next` is not in `elsif` branch 202s registers an offense for `break` in `begin` 202s accepts `exit` is not in `elsif` branch 202s registers an offense for `exit` in all `case` branches 202s accepts `redo` is in `if` branch only 202s accepts code with conditional `throw` 202s registers an offense for `raise` in all `if` branches 202s accepts `return` is in `if`, and without `else` 202s accepts `throw` is in `else` branch only 202s accepts `redo` as the final expression 202s accepts `redo` is in `if`, and without `else` 202s accepts `exit!` is in `else` branch only 202s accepts `throw` as the final expression 202s accepts `break` is not in `elsif` branch 202s accepts `fail` is in all `if` branches 202s accepts `raise` is in `if`, and without `else` 202s registers an offense for `exit!` in all `case` branches 202s registers an offense for `redo` in `begin` 202s accepts `raise` is in all `if` branches 202s accepts `break` as the final expression 202s accepts `retry` is in `if` branch only 202s accepts `next` is in all `if` branches 202s accepts `abort` is in `case` branch without else 202s registers an offense for `break` in all `if` branches with other expressions 202s accepts `throw` is not in `elsif` branch 202s accepts `exit!` is in `if`, and without `else` 202s registers an offense for `throw` in `begin` 202s accepts `exit!` is in `case` branch without else 202s accepts `throw` is in `if`, and without `else` 202s registers an offense for `redo` in all `if` and `elsif` branches 202s registers an offense for `redo` in all `if` branches with other expressions 202s accepts `return` is not in `elsif` branch 202s registers an offense for `exit!` before other statements 202s accepts `next` is in `if` branch only 202s accepts `break` is in `case` branch without else 202s accepts `raise` as the final expression 202s registers an offense for `break` in all `if` branches 202s accepts `next` as the final expression 202s registers an offense for `abort` in all `if` and `elsif` branches 202s accepts `break` is in `else` branch only 202s registers an offense for `exit` before other statements 202s registers an offense for `next` in all `if` branches with other expressions 202s accepts `exit` is in `else` branch only 202s registers an offense for `exit!` in all `if` branches with other expressions 202s accepts `exit!` is not in `elsif` branch 202s registers an offense for `abort` in `begin` 202s accepts `throw` is in `if` branch only 202s registers an offense for `throw` in all `case` branches 202s accepts `retry` is in `else` branch only 202s registers an offense for `exit` in all `if` branches with other expressions 202s registers an offense for `raise` in all `if` and `elsif` branches 202s accepts `retry` is in all `if` branches 202s registers an offense for `redo` before other statements 202s registers an offense for `exit` in all `if` branches 202s registers an offense for `fail` in all `if` branches with other expressions 202s accepts `redo` is not in `elsif` branch 202s registers an offense for `throw` before other statements 202s registers an offense for `retry` in all `case` branches 202s registers an offense for `throw` in all `if` branches 202s accepts `exit!` as the final expression 202s accepts `abort` is in `if`, and without `else` 202s registers an offense for `throw` in all `if` branches with other expressions 202s accepts code with conditional `exit` 202s accepts `next` is in `else` branch only 202s accepts `retry` is in `case` branch without else 202s registers an offense for `fail` in all `if` branches 202s accepts `break` is in all `if` branches 202s accepts `break` is in `if` branch only 202s registers an offense for `retry` in all `if` branches with other expressions 202s registers an offense for `exit!` in all `if` branches 202s accepts code with conditional `fail` 202s accepts `fail` is in `if` branch only 202s registers an offense for `abort` in all `case` branches 202s accepts `abort` is not in `elsif` branch 202s registers an offense for `next` before other statements 202s accepts `exit` is in `if` branch only 202s registers an offense for `break` before other statements 202s registers an offense for `next` in all `if` branches 202s accepts `throw` is in `case` branch without else 202s accepts code with conditional `raise` 202s accepts `fail` is in `else` branch only 202s accepts code with conditional `return` 202s accepts `next` is in `case` branch without else 202s accepts `return` as the final expression 202s registers an offense for `throw` in all `if` and `elsif` branches 202s registers an offense for `exit!` in all `if` and `elsif` branches 202s registers an offense for `raise` in all `if` branches with other expressions 202s accepts `return` is in all `if` branches 202s accepts code with conditional `break` 202s registers an offense for `raise` in all `case` branches 202s accepts `abort` as the final expression 202s accepts `abort` is in `else` branch only 202s accepts `exit!` is in `if` branch only 202s registers an offense for `next` in all `if` and `elsif` branches 202s registers an offense for `exit` in `begin` 202s registers an offense for `abort` before other statements 202s registers an offense for `retry` in all `if` branches 202s registers an offense for `next` in all `case` branches 202s accepts `redo` is in `case` branch without else 202s registers an offense for `return` before other statements 202s accepts `return` is in `else` branch only 202s accepts `break` is in `if`, and without `else` 202s accepts `raise` is in `case` branch without else 202s accepts `abort` is in all `if` branches 202s accepts `fail` as the final expression 202s accepts `fail` is in `case` branch without else 202s accepts code with conditional `redo` 202s registers an offense for `return` in all `if` branches 202s registers an offense for `exit` in all `if` and `elsif` branches 202s registers an offense for `return` in `begin` 202s registers an offense for `raise` before other statements 202s accepts `abort` is in `if` branch only 202s accepts `exit` as the final expression 202s registers an offense for `fail` before other statements 202s registers an offense for `fail` in all `if` and `elsif` branches 202s accepts `raise` is in `else` branch only 202s accepts `fail` is not in `elsif` branch 202s accepts `raise` is in `if` branch only 202s accepts code with conditional `next` 202s registers an offense for `redo` in all `case` branches 202s registers an offense for `fail` in all `case` branches 202s registers an offense for `next` in `begin` 202s accepts code with conditional `abort` 202s accepts `retry` as the final expression 202s accepts `next` is in `if`, and without `else` 202s accepts `retry` is not in `elsif` branch 202s accepts `return` is in `case` branch without else 202s accepts `redo` is in `else` branch only 202s accepts `exit` is in `if`, and without `else` 202s registers an offense for `retry` in all `if` and `elsif` branches 202s accepts `exit` is in all `if` branches 202s accepts `raise` is not in `elsif` branch 202s registers an offense for `break` in all `if` and `elsif` branches 202s 202s RuboCop::Cop::Style::DefWithParentheses 202s reports an offense for class def with empty parens 202s accepts empty parentheses in one liners 202s reports an offense for def with empty parens 202s accepts def without arguments 202s accepts def with arg and parens 202s Ruby >= 3.0 202s reports an offense for endless method definition with empty parens 202s 202s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 202s when expected heredoc delimiter is used at RuboCop specific expectation 202s does not register an offense 202s when unexpected heredoc delimiter is used in multi-line heredoc 202s registers an offense 202s when unexpected heredoc delimiter is used at non RuboCop specific expectation 202s does not register an offense 202s when unexpected heredoc delimiter is used in single-line heredoc 202s registers an offense 202s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 202s does not register an offense 202s 202s RuboCop::Cop::Naming::VariableName 202s when configured for camelCase 202s registers an offense for snake case in local variable name 202s registers an offense for block arguments 202s registers an offense for keyword rest arguments 202s registers an offense for default method arguments 202s accepts screaming snake case constants 202s accepts camel case in class variable name 202s accepts one symbol size local variables 202s accepts camel case in local variable name 202s registers an offense for opposite + correct 202s accepts assigning to camel case constant 202s registers an offense for snake case in method parameter 202s registers an offense for rest arguments 202s accepts with non-ascii characters 202s accepts camel case in instance variable name 202s registers an offense for keyword arguments 202s accepts local variables marked as unused 202s accepts camel case local variables marked as unused 202s accepts assignment with indexing of self 202s accepts screaming snake case globals 202s registers an offense for camel case when invoking method args 202s when AllowedIdentifiers is set 202s does not register an offense for a class variable name that is allowed 202s does not register an offense for a instance variable name that is allowed 202s does not register an offense for a symbol that is allowed 202s does not register an offense for a local variable name that is allowed 202s does not register an offense for a method name that is allowed 202s does not register an offense for a global variable name that is allowed 202s when AllowedPatterns is set 202s does not register an offense for a method name that matches the allowed pattern 202s does not register an offense for a symbol that matches the allowed pattern 202s does not register an offense for a class variable name that matches the allowed pattern 202s does not register an offense for a global variable name that matches the allowed pattern 202s does not register an offense for a local variable name that matches the allowed pattern 202s does not register an offense for a instance variable name that matches the allowed pattern 202s when configured for snake_case 202s registers an offense for rest arguments 202s registers an offense for camel case in instance variable name 202s accepts screaming snake case globals 202s registers an offense for block arguments 202s accepts assigning to camel case constant 202s registers an offense for correct + opposite 202s accepts local variables marked as unused 202s accepts screaming snake case constants 202s registers an offense for keyword arguments 202s registers an offense for keyword rest arguments 202s accepts assignment with indexing of self 202s registers an offense for default method arguments 202s registers an offense for camel case local variables marked as unused 202s registers an offense for method arguments 202s registers an offense for camel case in class variable name 202s accepts one symbol size local variables 202s registers an offense for camel case in local variable name 202s registers an offense for camel case when invoking method args 202s when AllowedPatterns is set 202s does not register an offense for a symbol that matches the allowed pattern 202s does not register an offense for a method name that matches the allowed pattern 202s does not register an offense for a instance variable name that matches the allowed pattern 202s does not register an offense for a local variable name that matches the allowed pattern 202s does not register an offense for a class variable name that matches the allowed pattern 202s does not register an offense for a global variable name that matches the allowed pattern 202s when AllowedIdentifiers is set 202s does not register an offense for a class variable name that is allowed 202s does not register an offense for a symbol that is allowed 202s does not register an offense for a local variable name that is allowed 202s does not register an offense for a instance variable name that is allowed 202s does not register an offense for a method name that is allowed 202s does not register an offense for a global variable name that is allowed 202s 202s RuboCop::Cop::Lint::NonDeterministicRequireOrder 202s when not requiring files 202s does not register an offense 202s when requiring files 202s when Ruby 3.0 or higher 202s with `Dir[]` 202s does not register an offense 202s with require block passed as parameter 202s does not register an offense 202s with extra logic 202s does not register an offense 202s with top-level ::Dir 202s does not register an offense 202s with direct block glob 202s does not register an offense 202s with top-level ::Dir 202s does not register an offense 202s with require block passed as parameter 202s does not register an offense 202s with `Dir.glob` 202s does not register an offense 202s with top-level ::Dir 202s does not register an offense 202s with require block passed as parameter 202s does not register an offense 202s with `sort: false` keyword option 202s does not register an offense 202s with sorted glob 202s does not register an offense 202s when Ruby 2.7 or lower 202s with unsorted index 202s registers an offense and autocorrects to add .sort when the block has `require_relative` 202s registers an offense with extra logic 202s registers an offense and autocorrects to add .sort when the block has `require` 202s registers an offense and autocorrects to add .sort when the numblock has `require` 202s with require_relative block passed as parameter 202s registers an offense an autocorrects to add sort 202s with require block passed as parameter 202s registers an offense an autocorrects to add sort 202s with top-level ::Dir 202s registers an offense and corrects to add .sort 202s with unsorted glob 202s registers an offense and autocorrects to add .sort 202s with top-level ::Dir 202s registers an offense and corrects to add .sort 202s with require block passed as parameter 202s registers an offense an autocorrects to add sort 202s with direct block glob 202s registers an offense and autocorrects to add .sort.each 202s with require_relative block passed as parameter 202s registers an offense and autocorrects to add sort 202s with top-level ::Dir 202s registers an offense and corrects to add .sort.each 202s with require block passed as parameter 202s registers an offense and autocorrects to add sort 202s with sorted index 202s does not register an offense 202s 202s RuboCop::Cop::Lint::OrAssignmentToConstant 202s does not register an offense with or-assignment to a class variable 202s does not register an offense with or-assignment to a global variable 202s registers an offense with or-assignment to a constant 202s does not register an offense with plain assignment to a constant 202s does not register an offense with or-assignment to a local variable 202s does not register an offense with or-assignment to an instance variable 202s does not register an offense with or-assignment to an attribute 202s 202s RuboCop::Cop::Style::CaseLikeIf 202s registers an offense and corrects when using `match?` with non regexp in other branches except first 202s does not register an offense when using `==` with method call with arguments 202s does not register an offense when using `=~` in first branch with non regexp 202s does not register an offense when only `if-else` 202s registers an offense and corrects when using `||` within conditions 202s does not register an offense when one of `||` subconditions is not convertible 202s does not register an offense when using `match?` without a receiver 202s does not register an offense when using `==` with constant containing 1 letter in name 202s does not register an offense when using `==` with class reference 202s registers an offense and corrects when using nested conditions with `||` 202s registers an offense and corrects when using `=~` 202s does not register an offense when using modifier `if` 202s registers an offense and corrects when using `==` with literal 202s does not register an offense when using `include?` without a receiver 202s does not register an offense when using `unless` 202s registers an offense and corrects when using `include?` with range 202s does not register an offense when using `cover?` without a receiver 202s registers an offense and corrects when using `===` 202s does not register an offense when using ternary operator 202s does not register an offense when one of the branches contains `==` with class reference 202s does not register an offense when only single `if` 202s registers an offense and corrects when using `match?` with regexp 202s does not register an offense when using `equal?` without a receiver 202s does not register an offense when using `match?` in first branch with non regexp 202s registers an offense and corrects when using `is_a?` 202s does not register an offense when an object overrides `equal?` with no arity 202s does not register an offense when not all conditions contain target 202s does not register an offense when using `match?` with non regexp 202s registers an offense and corrects when using `==` with constant 202s registers an offense and corrects when target is a method call 202s when using regexp with named captures 202s registers and corrects an offense with match? and regexp on rhs 202s registers and corrects an offense with match? and regexp on lhs 202s does not register an offense with match and regexp on lhs 202s registers and corrects an offense with =~ and regexp on rhs 202s does not register an offense with match and regexp on rhs 202s does not register an offense with =~ and regexp on lhs 202s 202s RuboCop::Cop::Lint::EmptyInPattern 202s when a `in` body is present 202s accepts `case` with `in` ... `then` statements and else clause 202s accepts `case` with `in` bodies 202s accepts `case` with `in` ... `then` statements 202s accepts `case` with `in` bodies and `else` clause 202s when `AllowComments: true` 202s accepts an empty `in` body with a comment 202s registers an offense for empty `in` when comment is in another branch 202s when `AllowComments: false` 202s registers an offense for empty `in` body with a comment 202s when a `in` body is missing 202s registers an offense for missing `in` ... `then` body 202s registers an offense for missing `in` ... then `body` followed by `else` 202s registers an offense for missing `in` body followed by `else` 202s registers an offense for a missing `in` body 202s registers an offense for missing `in` body with a comment followed by `else` 202s registers an offense for missing `in` body with a comment 202s 202s RuboCop::ConfigStore 202s .for 202s always uses config specified in command line 202s when no config specified in command line 202s gets config path and config from cache if available 202s searches for config path if not available in cache 202s when --force-default-config option is specified 202s uses default config without searching for config path 202s 202s RuboCop::Formatter::MarkdownFormatter 202s outputs the cached result in Markdown 202s outputs the result in Markdown 202s 202s RuboCop::Cop::Lint::ShadowedArgument 202s block argument shadowing 202s when multiple arguments are shadowed 202s and one of them shadowed within a lambda while another is shadowed outside 202s registers an offense 202s when a block local variable is assigned but no argument is shadowed 202s accepts 202s when a single argument is shadowed 202s registers an offense 202s and shadowed within a block 202s registers an offense without specifying where the reassignment took place 202s and the block occurs after the reassignment 202s registers an offense 202s and the block is nested within a block 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and was used before shadowing 202s accepts 202s and the block is nested within a conditional 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and the argument was not shadowed outside the block 202s accepts 202s and the argument is not used 202s accepts 202s and shadowed within a conditional 202s registers an offense without specifying where the reassignment took place 202s and the conditional is nested within a lambda 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and the conditional is nested within a conditional 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and was used before shadowing 202s accepts 202s and the argument was not shadowed outside the conditional 202s accepts 202s and the conditional occurs after the reassignment 202s registers an offense 202s when binding is used 202s registers an offense 202s when IgnoreImplicitReferences config option is set to true 202s accepts 202s when zsuper is used 202s accepts 202s method argument shadowing 202s when a single argument is shadowed 202s registers an offense 202s when reassigning to splat variable 202s does not register an offense 202s and the argument is not used 202s accepts 202s when zsuper is used 202s registers an offense 202s when argument was shadowed by zsuper 202s registers an offense 202s when IgnoreImplicitReferences config option is set to true 202s accepts 202s when argument was shadowed by zsuper 202s does not register an offense 202s when argument was used in shorthand assignment 202s does not register an offense 202s when binding is used 202s registers an offense 202s when IgnoreImplicitReferences config option is set to true 202s accepts 202s when a splat argument is shadowed 202s registers an offense 202s and shadowed within a block 202s registers an offense without specifying where the reassignment took place 202s and the block is nested within a conditional 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and the block is nested within a block 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and the block occurs after the reassignment 202s registers an offense 202s and was used before shadowing 202s accepts 202s and the argument was not shadowed outside the block 202s accepts 202s and shadowed within a conditional 202s registers an offense without specifying where the reassignment took place 202s and was used before shadowing 202s accepts 202s and the argument was not shadowed outside the conditional 202s accepts 202s and the conditional occurs after the reassignment 202s registers an offense 202s and the conditional is nested within a lambda 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s and the conditional is nested within a conditional 202s registers an offense without specifying where the reassignment took place 202s and the argument was used before shadowing 202s accepts 202s when multiple arguments are shadowed 202s and one of them shadowed within a lambda while another is shadowed outside 202s registers an offense 202s 202s RuboCop::Cop::Style::BisectedAttrAccessor 202s registers an offense for accessors with the same visibility in different scopes 202s registers and corrects in a module 202s does not register an offense when using `attr_accessor` 202s does not register an offense when only one accessor of the name exists 202s registers an offense and corrects when both accessors of the name exists 202s registers an offense and corrects when both accessors are in the same visibility scope 202s does not register an offense when accessors are within different visibility scopes 202s registers an offense and corrects properly when attr_writer is before attr_reader 202s registers an offense and corrects when attr and attr_writer exists 202s registers an offense and corrects when both accessors of the splat exists 202s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 202s registers an offense and corrects when within eigenclass 202s multiple bisected accessors 202s when some attr names are bisected 202s registers and retains non-bisected attrs 202s when all attr names are bisected 202s registers and replaces with attr_accessor 202s 202s RuboCop::Cop::Lint::InterpolationCheck 202s does not crash for \xff 202s does not register an offense for an escaped interpolation 202s does not register offense for strings in %w() 202s does not register an offense for escaped crab claws in dstr 202s registers an offense and corrects when including interpolation and double quoted string in single quoted string 202s registers an offense and corrects for interpolation in single quoted string 202s does not register an offense for interpolation in nested strings 202s registers an offense for interpolation in double + single quoted split string 202s registers an offense for interpolation in single quoted split string 202s does not register an offense for properly interpolation strings 202s does not register an offense for interpolation in a regexp 202s 202s RuboCop::Cop::Style::NumberedParametersLimit 202s with Ruby >= 2.7 202s does not register an offense for a numblock with exactly `Max` parameters 202s does not register an offense for a numblock with fewer than `Max` parameters 202s sets Max properly for auto-gen-config 202s does not register an offense for a normal block with too many parameters 202s when Max is 1 202s uses the right offense message 202s when configuring Max 202s does not register an offense when there are not too many numbered params 202s when there are more than `Max` numbered parameters 202s registers an offense for a multiline `numblock` 202s registers an offense for a single line `numblock` 202s 202s RuboCop::Cop::Style::SymbolProc 202s registers an offense when receiver is a hash literal and using `max` with a block 202s registers an offense for a block when method in body is unary -/+ 202s does not register an offense when receiver is a array literal and using `max` with a block 202s registers an offense when receiver is an array literal and using `reject` with a block 202s accepts block with a block argument 202s accepts ::Proc.new with 1 argument 202s accepts block with adding a comma after the sole argument 202s accepts block when method in body is not called on block arg 202s registers an offense when receiver is a hash literal and using `min` with a block 202s autocorrects multiple aliases with symbols as proc 202s accepts block with more than 1 arguments 202s does not crash with a bare method call 202s accepts block with more than 1 expression in body 202s registers an offense when receiver is some value and using `select` with a block 202s accepts Proc.new with 1 argument 202s registers an offense when receiver is some value and using `reject` with a block 202s registers an offense for safe navigation operator 202s accepts block with splat params 202s registers an offense when receiver is an array literal and using `select` with a block 202s does not register an offense when receiver is a hash literal and using `select` with a block 202s autocorrects correctly when there are no arguments in parentheses 202s accepts proc with 1 argument 202s does not register an offense when receiver is a array literal and using `min` with a block 202s accepts block with no arguments 202s accepts a block with an unused argument with an method call 202s registers an offense for a block with parameterless method call on param 202s accepts empty block body 202s autocorrects correctly when args have a trailing comma 202s accepts lambda with 1 argument 202s accepts a block with an unused argument with an lvar 202s does not register an offense when receiver is a hash literal and using `reject` with a block 202s when `AllowMethodsWithArguments: false` 202s when `super` has arguments 202s registers an offense 202s when method has arguments 202s registers an offense 202s when AllowedPatterns is enabled 202s accepts ignored method 202s when `AllowMethodsWithArguments: true` 202s when method has arguments 202s does not register an offense 202s when method has no arguments 202s registers an offense 202s when `super` has arguments 202s does not register an offense 202s numblocks 202s registers an offense when receiver is some value and using `reject` with a numblock 202s does not register an offense when receiver is a array literal and using `min` with a numblock 202s registers an offense when receiver is an array literal and using `select` with a numblock 202s accepts Proc.new with 1 numbered parameter 202s accepts ::Proc.new with 1 numbered parameter 202s registers an offense when receiver is an hash literal and using `min` with a numblock 202s accepts proc with 1 numbered parameter 202s registers an offense when receiver is an hash literal and using `max` with a numblock 202s registers an offense when receiver is an array literal and using `reject` with a numblock 202s accepts block with only second numbered parameter 202s does not register an offense when receiver is a hash literal and using `select` with a numblock 202s registers an offense for a block with a numbered parameter 202s does not register an offense when receiver is a hash literal and using `reject` with a numblock 202s does not register an offense when receiver is a array literal and using `max` with a numblock 202s accepts block with multiple numbered parameters 202s accepts lambda with 1 numbered parameter 202s registers an offense when receiver is some value and using `select` with a numblock 202s AllowComments: true 202s registers an offense for a block with parameterless method call on paramand not contains a comment 202s accepts block with parameterless method call on param and contains a comment 202s when `super` has no arguments 202s registers an offense 202s when AllowedMethods is enabled 202s accepts ignored method 202s when the method has arguments 202s registers an offense 202s 202s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 202s accepts code that where the attr_accessor is the last line 202s does not register an offense and corrects when using `if` ... `else` branches 202s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 202s registers an offense and corrects for some attribute accessors and comment line 202s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 202s registers an offense and corrects for code that immediately follows accessor 202s accepts code that separates attribute accessors from the code with a newline 202s registers an offense and corrects for code that immediately follows accessor with comment 202s registers an offense and corrects for an attribute accessor and comment line 202s accepts code that separates an attribute accessor from the code with a newline 202s accepts code when attribute method is method chained 202s accepts code that separates attribute accessors from the code and comment line with a newline 202s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 202s registers an offense and corrects for an attribute accessor and some comment line 202s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 202s accepts code when used in class definition 202s when `AllowAliasSyntax: true` 202s does not register an offense for code that immediately `alias` syntax after accessor 202s when `AllowedMethods: private` 202s does not register an offense for code that immediately ignored methods after accessor 202s when `AllowedMethods: []` 202s registers an offense for code that immediately ignored methods after accessor 202s when `AllowAliasSyntax: false` 202s registers an offense for code that immediately `alias` syntax after accessor 202s 202s RuboCop::Cop::Style::Sample 202s behaves like offense 202s registers an offense for shuffle.last(bar) 202s behaves like accepts 202s accepts shuffle[foo, bar] 202s behaves like offense 202s registers an offense for shuffle(random: Random.new).first 202s behaves like accepts 202s accepts shuffle.slice(foo) 202s Ruby >= 2.7 202s behaves like offense 202s registers an offense for shuffle[...3] 202s behaves like accepts 202s accepts shuffle[2..3] 202s behaves like offense 202s registers an offense for shuffle.last(3) 202s behaves like accepts 202s accepts shuffle(random: Random.new) 202s behaves like offense 202s registers an offense for shuffle.at(0) 202s behaves like offense 202s registers an offense for shuffle(random: foo).last(bar) 202s behaves like accepts 202s accepts shuffle(random: Random.new)[2, 3] 202s behaves like offense 202s registers an offense for shuffle[0..3] 202s behaves like accepts 202s accepts shuffle[foo..bar] 202s behaves like accepts 202s accepts shuffle[2] 202s behaves like accepts 202s accepts shuffle[3, 3] 202s behaves like accepts 202s accepts shuffle.slice(2) 202s behaves like accepts 202s accepts shuffle.slice(foo, bar) 202s behaves like accepts 202s accepts shuffle.at(2) 202s behaves like accepts 202s accepts sample 202s behaves like accepts 202s accepts shuffle.slice(2..3) 202s behaves like offense 202s registers an offense for shuffle.first(foo) 202s behaves like offense 202s registers an offense for shuffle[0...3] 202s behaves like offense 202s registers an offense for shuffle[0] 202s behaves like accepts 202s accepts shuffle.slice(foo..bar) 202s behaves like offense 202s registers an offense for shuffle.last 202s behaves like accepts 202s accepts shuffle.slice(3, 3) 202s behaves like offense 202s registers an offense for shuffle(random: Random.new).first(2) 202s behaves like offense 202s registers an offense for shuffle.slice(0, 3) 202s behaves like accepts 202s accepts shuffle[2..-3] 202s behaves like offense 202s registers an offense for shuffle.first 202s behaves like accepts 202s accepts shuffle[-4..-3] 202s behaves like accepts 202s accepts shuffle(random: Random.new)[2] 202s behaves like accepts 202s accepts shuffle[foo, 3] 202s behaves like offense 202s registers an offense for shuffle.at(-1) 202s behaves like accepts 202s accepts shuffle[foo..3] 202s behaves like accepts 202s accepts shuffle.slice(foo..3) 202s behaves like offense 202s registers an offense for shuffle.slice(0...3) 202s behaves like accepts 202s accepts shuffle.slice(-4..-3) 202s Ruby >= 2.6 202s behaves like accepts 202s accepts shuffle[3...] 202s behaves like accepts 202s accepts shuffle[3..] 202s behaves like offense 202s registers an offense for shuffle(random: Random.new)[0..3] 202s behaves like accepts 202s accepts shuffle 202s behaves like accepts 202s accepts shuffle.map { |e| e } 202s behaves like offense 202s registers an offense for shuffle[0, 3] 202s behaves like accepts 202s accepts shuffle.slice(2..-3) 202s behaves like offense 202s registers an offense for shuffle.slice(0..3) 202s behaves like offense 202s registers an offense for shuffle[-1] 202s behaves like offense 202s registers an offense for shuffle.slice(-1) 202s behaves like accepts 202s accepts shuffle.slice(foo, 3) 202s behaves like accepts 202s accepts shuffle.join([5, 6, 7]) 202s behaves like accepts 202s accepts shuffle(random: Random.new).find(&:odd?) 202s behaves like offense 202s registers an offense for shuffle.first(2) 202s behaves like offense 202s registers an offense for shuffle.slice(0) 202s behaves like accepts 202s accepts shuffle[foo] 202s behaves like accepts 202s accepts shuffle.at(foo) 202s 202s RuboCop::Cop::Bundler::GemFilename 202s with EnforcedStyle set to `gems.rb` 202s with non-root Gemfile.lock file path 202s registers an offense 202s with non-root gems.rb file path 202s does not register an offense 202s with gems.rb file path 202s does not register an offense 202s with non-root gems.locked file path 202s does not register an offense 202s with Gemfile.lock file path 202s registers an offense 202s with Gemfile file path 202s registers an offense 202s with non-root Gemfile file path 202s registers an offense 202s with default configuration (EnforcedStyle => `Gemfile`) 202s with Gemfile file path 202s does not register an offense 202s with Gemfile.lock file path 202s does not register an offense 202s with non-root Gemfile file path 203s does not register an offense 203s with non-root gems.locked file path 203s registers an offense 203s with non-root gems.rb file path 203s registers an offense 203s with non-root Gemfile.lock file path 203s does not register an offense 203s with gems.locked file path 203s registers an offense 203s with gems.rb file path 203s registers an offense 203s 203s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 203s ignores defs without params 203s ignores single-line defs 203s ignores implicit defs 203s symmetrical style 203s opening brace on separate line from first element 203s allows closing brace on separate line from last element 203s allows closing brace on separate line from last multiline element 203s detects closing brace on same line as last element 203s opening brace on same line as first element 203s autocorrects closing brace on different line from last element 203s allows closing brace on same line as last element 203s allows closing brace on same line as last multiline element 203s detects closing brace on different line from last element 203s same_line style 203s opening brace on same line as first element 203s autocorrects closing brace on different line as last element 203s detects closing brace on different line from multiline element 203s allows closing brace on same line from last element 203s allows closing brace on same line as multi-line element 203s opening brace on separate line from first element 203s allows closing brace on same line as last multiline element 203s detects closing brace on different line from last element 203s allows closing brace on same line as last element 203s new_line style 203s opening brace on same line as first element 203s allows closing brace on different line from multi-line element 203s allows closing brace on different line from last element 203s detects closing brace on same line as last multiline element 203s autocorrects closing brace on same line as last element 203s opening brace on separate line from first element 203s allows closing brace on separate line from last multiline element 203s detects closing brace on same line as last element 203s allows closing brace on separate line from last element 203s heredoc 203s detects heredoc structures that are safe to add to 203s ignores heredocs that could share a last line 203s 203s RuboCop::Cop::Style::CollectionMethods 203s accepts detect without a block 203s registers an offense for find_all with an argument and proc param 203s registers an offense for collect with proc param 203s registers an offense for member? with an argument and proc param 203s registers an offense for detect with an argument and proc param 203s registers an offense for member? with block 203s registers an offense for find_all with proc param 203s registers an offense for inject with proc param 203s accepts collect without a block 203s registers an offense for find_all with block 203s registers an offense for inject with block 203s registers an offense for inject with an argument and proc param 203s accepts find_all without a block 203s registers an offense for detect with proc param 203s registers an offense for collect with an argument and proc param 203s registers an offense for collect with block 203s registers an offense for member? with proc param 203s accepts inject without a block 203s registers an offense for detect with block 203s accepts member? without a block 203s Ruby 2.7 203s registers an offense for inject with numblock 203s Ruby 2.7 203s registers an offense for find_all with numblock 203s Ruby 2.7 203s registers an offense for detect with numblock 203s for methods that accept a symbol as implicit block 203s registers an offense with an argument and final symbol param 203s registers an offense with a final symbol param 203s Ruby 2.7 203s registers an offense for member? with numblock 203s for methods that do not accept a symbol as implicit block 203s does not register an offense for a final symbol param 203s does not register an offense for a final symbol param with extra args 203s Ruby 2.7 203s registers an offense for collect with numblock 203s 203s RuboCop::Cop::Style::LambdaCall 203s when style is set to call 203s registers an offense for correct + opposite 203s registers an offense for x.() 203s registers an offense for correct + multiple opposite styles 203s when style is set to braces 203s registers an offense for x.call() 203s accepts a call without receiver 203s registers an offense for opposite + correct 203s autocorrects x.call to x.() 203s autocorrects x.call asdf, x123 to x.(asdf, x123) 203s registers an offense for correct + multiple opposite styles 203s 203s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 203s with multi-line list of values 203s when EnforcedStyleForMultiline is consistent_comma 203s accepts trailing comma 203s accepts a multiline array with a single item and trailing comma 203s accepts two values on the same line 203s registers an offense for literal with two of the values on the same line and no trailing comma 203s accepts a multiline array with items on a single line andtrailing comma 203s accepts a multiline word array 203s when closing bracket is on same line as last value 203s registers an offense for no trailing comma 203s when EnforcedStyleForMultiline is no_comma 203s registers an offense for trailing comma 203s accepts a literal with no trailing comma 203s autocorrects unwanted comma where HEREDOC has commas 203s accepts HEREDOC with commas 203s when EnforcedStyleForMultiline is comma 203s accepts trailing comma 203s accepts a multiline array with a single item and trailing comma 203s registers an offense for a literal with two of the values on the same line and a trailing comma 203s accepts an empty array being passed as a method argument 203s accepts a multiline word array 203s accepts literal with two of the values on the same line 203s when closing bracket is on same line as last value 203s accepts literal with no trailing comma 203s with single line list of values 203s when EnforcedStyleForMultiline is comma 203s registers an offense for trailing comma 203s accepts rescue clause 203s accepts single element literal without trailing comma 203s accepts empty literal 203s accepts literal without trailing comma 203s when EnforcedStyleForMultiline is consistent_comma 203s accepts rescue clause 203s accepts empty literal 203s registers an offense for trailing comma 203s accepts single element literal without trailing comma 203s accepts literal without trailing comma 203s when EnforcedStyleForMultiline is no_comma 203s accepts single element literal without trailing comma 203s accepts empty literal 203s accepts literal without trailing comma 203s accepts rescue clause 203s registers an offense for trailing comma 203s 203s RuboCop::Formatter::FileListFormatter 203s #file_finished 203s displays parsable text 203s 203s RuboCop::Cop::Layout::MultilineArrayBraceLayout 203s ignores empty arrays 203s ignores single-line arrays 203s ignores implicit arrays 203s when comment present before closing brace 203s corrects closing brace without crashing 203s behaves like multiline literal brace layout method argument 203s when arguments to a method 203s and a comment after the last element 203s detects closing brace on separate line from last element 203s but no comment after the last element 203s autocorrects the closing brace 203s behaves like multiline literal brace layout trailing comma 203s symmetrical style 203s opening brace on same line as first element 203s last element has a trailing comma 203s autocorrects closing brace on different line from last element 203s same_line style 203s opening brace on same line as first element 203s last element has a trailing comma 203s autocorrects closing brace on different line as last element 203s behaves like multiline literal brace layout 203s symmetrical style 203s opening brace on separate line from first element 203s allows closing brace on separate line from last element 203s detects closing brace on same line as last element 203s allows closing brace on separate line from last multiline element 203s opening brace on same line as first element 203s autocorrects closing brace on different line from last element 203s allows closing brace on same line as last element 203s allows closing brace on same line as last multiline element 203s detects closing brace on different line from last element 203s with a chained call on the closing brace 203s and a comment after the last element 203s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 203s but no comment after the last element 203s autocorrects the closing brace 203s new_line style 203s opening brace on same line as first element 203s allows closing brace on different line from last element 203s allows closing brace on different line from multi-line element 203s autocorrects closing brace on same line as last element 203s detects closing brace on same line as last multiline element 203s opening brace on separate line from first element 203s detects closing brace on same line as last element 203s allows closing brace on separate line from last element 203s allows closing brace on separate line from last multiline element 203s same_line style 203s opening brace on same line as first element 203s allows closing brace on same line from last element 203s autocorrects closing brace on different line as last element 203s allows closing brace on same line as multi-line element 203s detects closing brace on different line from multiline element 203s with a chained call on the closing brace 203s but no comment after the last element 203s autocorrects the closing brace 203s and a comment after the last element 203s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 203s opening brace on separate line from first element 203s allows closing brace on same line as last element 203s detects closing brace on different line from last element 203s allows closing brace on same line as last multiline element 203s heredoc 203s detects heredoc structures that are safe to add to 203s ignores heredocs that could share a last line 203s 203s RuboCop::Cop::Layout::LineLength 203s registers an offense for long line before __END__ but not after 203s registers an offense for a line that's 81 characters wide 203s highlights excessive characters 203s accepts a line that's 80 characters wide 203s accepts the first line if it is a shebang line 203s when AllowURI option is disabled 203s and all the excessive characters are part of a URL 203s registers an offense for the line 203s when AllowHeredoc option is enabled 203s accepts long lines in heredocs 203s when the source has no AST 203s does not crash 203s and only certain heredoc delimiters are permitted 203s rejects long lines in heredocs with not permitted delimiters 203s when line is indented with tabs 203s accepts a short line 203s registers an offense for a long line 203s when IgnoreCopDirectives is disabled 203s and the source is too long and has a trailing cop directive 203s highlights the excess source and cop directive 203s and the source is acceptable length 203s with a trailing RuboCop directive 203s registers an offense for the line 203s with an inline comment 203s highlights the excess comment 203s when AllowedPatterns option is set 203s only registers an offense for lines not matching the pattern 203s when IgnoreCopDirectives is enabled 203s and the Rubocop directive is excessively long 203s accepts the line 203s and the Rubocop directive causes an excessive line length 203s accepts the line 203s and has explanatory text 203s does not register an offense 203s and the source is too long 203s highlights only the non-directive part 203s and the source contains non-directive #s as non-comment 203s registers an offense for the line 203s and the source contains non-directive # as comment 203s highlights only the non-directive part 203s affecting by IndentationWidth from Layout\Tab 203s with AllowURI option 203s accepts a line that's including URI with text 203s accepts a line that's including URI in quotes with text 203s accepts a line that's including URI 203s accepts a line that's including URI and exceeds by 1 char 203s behaves like with tabs indentation 203s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 203s accepts a line that's including 1 tab with size 2 and 28 other characters 203s without AllowURI option 203s behaves like with tabs indentation 203s accepts a line that's including 1 tab with size 2 and 28 other characters 203s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 203s autocorrection 203s long blocks 203s Ruby 2.7 203s adds an offense for {} block does correct it 203s adds an offense for do-end block and does correct it 203s braces 203s adds an offense and does correct it 203s no spaces 203s adds an offense and does correct it 203s let block 203s adds an offense and does correct it 203s lambda syntax 203s when argument is enclosed in parentheses 203s registers an offense and corrects 203s when argument is not enclosed in parentheses 203s registers an offense and corrects 203s do/end 203s adds an offense for block without arguments and does correct it 203s adds an offense for block with arguments and does correct it 203s no breakable collections 203s adds an offense and does not autocorrect it 203s HEREDOC 203s when over limit with semicolon 203s adds offense and does not autocorrect 203s array 203s when over limit 203s adds an offense and autocorrects it 203s when already on two lines 203s does not add any offenses 203s when under limit 203s does not add any offenses 203s when two arrays on two lines allows outer to get broken first 203s adds an offense only to inner and does not autocorrect it 203s when has inside array 203s adds an offense only to outer and autocorrects it 203s multiple assignment 203s when over limit at right hand side 203s registers and corrects an offense 203s method call 203s when two together 203s does not add any offenses 203s when under limit 203s does not add any offenses 203s when call with hash on same line 203s adds an offense only to outer and autocorrects it 203s when two method calls 203s adds an offense only to outer and autocorrects it 203s when unparenthesized 203s when there is one argument 203s does not autocorrect 203s when there are multiple arguments 203s splits the line after the first element 203s when nested method calls allows outer to get broken up first 203s adds offense and does not autocorrect 203s with a hash with a too long first item 203s when parenthesized 203s corrects 203s when the hash is parenthesized 203s corrects 203s when not parenthesized 203s when there are multiple elements 203s moves the 2nd element to a new line 203s when on multiple lines 203s does not correct 203s when there is only one element 203s does not autocorrect 203s with long argument list 203s registers an offense and autocorrects it 203s when over limit 203s adds an offense and autocorrects it 203s with a heredoc argument 203s does not break up the line 203s does not break up the line when parentheses are omitted 203s does not break up the line when a heredoc is used as the first element of an array 203s and the heredoc is after the line should split 203s can break up the line before the heredoc argument 203s and other arguments before the heredoc 203s can break up the line before the heredoc argument 203s method definition 203s when over limit 203s adds an offense and autocorrects it 203s when under limit 203s does not add any offenses 203s hash 203s when under limit 203s does not add any offenses 203s when over limit and keys already on multiple lines 203s adds an offense and does not autocorrect 203s when over limit 203s adds an offense and autocorrects it 203s when hash in method call 203s adds an offense only to outer and autocorrects it 203s when over limit and already on multiple lines long key 203s adds an offense and does not autocorrect 203s when over limit because of a comment 203s adds an offense and does not autocorrect 203s when over limit rocket 203s adds an offense and autocorrects it 203s when nested hashes on same line 203s adds an offense only to outer and autocorrects it 203s when over limit rocket symbol 203s adds an offense and autocorrects it 203s comments 203s when over limit with semicolon 203s adds offense and does not autocorrect 203s semicolon 203s when over limit and semicolon at end of line 203s adds offense and autocorrects it by breaking the first semicolonbefore the hash 203s when over limit 203s adds offense and autocorrects it by breaking the semicolonbefore the hash 203s when over limit and many semicolons at the end 203s adds offense and does not autocorrectbefore the hash 203s when over limit and many semicolons 203s adds offense and autocorrects it by breaking the semicolonbefore the hash 203s when over limit and many spaces around semicolon 203s adds offense and autocorrects it by breaking the semicolonbefore the hash 203s when under limit 203s does not add any offenses 203s semicolons inside string literal 203s adds offense and autocorrects elsewhere 203s semicolon inside string literal 203s adds offense and autocorrects elsewhere 203s when over limit and one semicolon at the end 203s adds offense and does not autocorrectbefore the hash 203s when AllowURI option is enabled 203s and the excessive characters include part of a URL and another word 203s registers an offense for the line 203s and the excessive characters include a complete URL 203s registers an offense for the line 203s and the URL does not have a http(s) scheme 203s rejects the line 203s and the scheme has been configured 203s does not register an offense 203s and the excessive characters include part of a URL and trailing whitespace 203s registers an offense for the line 203s and the excessive characters include part of a URL in double quotes 203s does not include the quote as part of the offense 203s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 203s does not crash 203s and the URL fits within the max allowed characters 203s registers an offense for the line 203s and the URI is an argument 203s does not register an offense 203s and all the excessive characters are part of a URL 203s accepts the line 203s and the URL is wrapped in double quotes 203s accepts the line 203s and the URL is wrapped in single quotes 203s accepts the line 203s and the URL is wrapped in braces 203s accepts the line 203s and the URL is wrapped in braces with title 203s accepts the line 203s and the excessive characters include part of a URL in braces and another word 203s registers an offense for the line 203s and the URI is assigned 203s does not register an offense 203s 203s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 203s EnforcedStyle is `only_before` 203s registers an offense for blank line after private 203s registers an offense for missing blank line before public 203s accepts missing blank line after private 203s registers an offense for missing blank line before protected 203s accepts blank line after module_function 203s does not register an offense when `end` immediately after protected 203s does not register an offense when `end` immediately after private 203s registers an offense for blank line after protected 203s accepts blank line after public 203s registers an offense for missing blank line before private 203s registers an offense for missing blank line before module_function 203s accepts missing blank line after protected 203s Ruby 2.7 203s registers an offense for missing around line before module_function 203s ignores private with numblock argument 203s ignores module_function with numblock argument 203s registers an offense for missing around line before protected 203s ignores public with numblock argument 203s registers an offense for missing around line before private 203s ignores protected with numblock argument 203s registers an offense for missing around line before public 203s EnforcedStyle is `around` 203s requires blank line before module_function 203s requires blank line after, but not before, module_function when at the beginning of class/module 203s ignores protected with block argument 203s ignores comment line before protected 203s accepts missing blank line when at the beginning of class 203s accepts missing blank line when specifying a superclass that breaks the line 203s accepts only using access modifier 203s requires blank line when next line started with end 203s ignores comment line before public 203s recognizes blank lines with DOS style line endings 203s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 203s accepts only using access modifier 203s accepts missing blank line when at the beginning of file and preceded by a comment 203s accepts missing blank line when at the beginning of file and preceded by a comment 203s accepts missing blank line when at the end of specifying a superclass 203s accepts missing blank line when at the beginning of sclass 203s accepts missing blank line when at the end of specifying `self` 203s requires blank line before protected 203s accepts missing blank line when specifying `self` that breaks the line 203s requires blank line when next line started with end 203s autocorrects blank line after #{access_modifier} with comment 203s requires blank line after, but not before, public when at the beginning of class/module 203s requires blank line before private 203s ignores an accessor with the same name as public above a method definition 203s accepts missing blank line when specifying `self` that breaks the line 203s ignores private inside a method call 203s ignores public inside a method call 203s ignores module_function deep inside a method call 203s ignores public with a right-hand-side condition 203s ignores public deep inside a method call 203s ignores public with block argument 203s accepts missing blank line when at the beginning of sclass 203s accepts only using access modifier 203s ignores comment line before module_function 203s accepts missing blank line when at the end of specifying `self` 203s ignores module_function with a right-hand-side condition 203s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 203s accepts missing blank line when at the end of block 203s accepts missing blank line when at the end of block 203s accepts missing blank line when at the beginning of class 203s accepts missing blank line when at the beginning of file and preceded by a comment 203s requires blank line before public 203s ignores protected inside a method call 203s requires blank line when next line started with end 203s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 203s ignores an accessor with the same name as module_function above a method definition 203s ignores an accessor with the same name as private above a method definition 203s ignores module_function inside a method call 203s accepts missing blank line when at the end of block 203s accepts only using access modifier 203s accepts missing blank line when at the beginning of file and preceded by a comment 203s ignores an accessor with the same name as protected above a method definition 203s requires blank line when next line started with end 203s accepts missing blank line when at the end of specifying a superclass 203s accepts missing blank line when at the beginning of module 203s ignores private with a right-hand-side condition 203s requires blank line after, but not before, private when at the beginning of class/module 203s autocorrects blank line after #{access_modifier} with comment 203s ignores private deep inside a method call 203s accepts missing blank line when specifying a superclass that breaks the line 203s requires blank line after private 203s recognizes blank lines with DOS style line endings 203s accepts missing blank line when at the end of specifying `self` 203s accepts missing blank line when at the beginning of sclass 203s autocorrects blank line after #{access_modifier} with comment 203s autocorrects blank line after #{access_modifier} with comment 203s accepts missing blank line when specifying `self` that breaks the line 203s recognizes blank lines with DOS style line endings 203s ignores module_function with block argument 203s accepts missing blank line when at the end of block 203s requires blank line after public 203s requires blank line after module_function 203s ignores comment line before private 203s accepts missing blank line when at the beginning of module 203s accepts missing blank line when at the end of specifying a superclass 203s accepts missing blank line when specifying a superclass that breaks the line 203s accepts missing blank line when specifying `self` that breaks the line 203s accepts missing blank line when at the beginning of class 203s accepts missing blank line when at the beginning of sclass 203s accepts missing blank line when at the end of specifying `self` 203s accepts missing blank line when at the beginning of class 203s ignores private with block argument 203s requires blank line after protected 203s recognizes blank lines with DOS style line endings 203s accepts missing blank line when at the end of specifying a superclass 203s ignores protected deep inside a method call 203s ignores protected with a right-hand-side condition 203s accepts missing blank line when specifying a superclass that breaks the line 203s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 203s accepts missing blank line when at the beginning of module 203s accepts missing blank line when at the beginning of module 203s requires blank line after, but not before, protected when at the beginning of class/module 203s at the beginning of block 203s for blocks defined with {} 203s accepts missing blank line with arguments 203s accepts missing blank line 203s for blocks defined with do 203s accepts missing blank line 203s requires blank line after, but not before, private 203s accepts missing blank line with arguments 203s at the beginning of block 203s for blocks defined with {} 203s accepts missing blank line 203s accepts missing blank line with arguments 203s for blocks defined with do 203s accepts missing blank line 203s requires blank line after, but not before, public 203s accepts missing blank line with arguments 203s at the beginning of block 203s for blocks defined with do 203s accepts missing blank line with arguments 203s requires blank line after, but not before, module_function 203s accepts missing blank line 203s for blocks defined with {} 203s accepts missing blank line with arguments 203s accepts missing blank line 203s at the beginning of block 203s for blocks defined with {} 203s accepts missing blank line 203s accepts missing blank line with arguments 203s for blocks defined with do 203s accepts missing blank line with arguments 203s accepts missing blank line 203s requires blank line after, but not before, protected 203s 203s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 203s accepts execute-string literals 203s accepts other percent literals 203s for I type and ["!", "!"] delimiters 203s accepts spaces between entries 203s registers an offense for literals with escaped and other spaces 203s registers an offense for unnecessary spaces 203s accepts literals with escaped spaces 203s accepts newlines and additional following alignment spaces 203s registers an offense for spaces after first delimiter 203s accepts multi-line literals within a method 203s accepts multi-line literals 203s accepts literals without additional spaces 203s registers an offense for spaces before final delimiter 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s for w type and ["{", "}"] delimiters 203s accepts multi-line literals within a method 203s accepts literals with escaped spaces 203s accepts literals without additional spaces 203s accepts newlines and additional following alignment spaces 203s accepts spaces between entries 203s accepts multi-line literals 203s registers an offense for literals with escaped and other spaces 203s registers an offense for spaces after first delimiter 203s registers an offense for spaces before final delimiter 203s registers an offense for unnecessary spaces 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s for x type and ["!", "!"] delimiters 203s accepts multi-line literals 203s accepts spaces between entries 203s accepts literals with escaped spaces 203s accepts newlines and additional following alignment spaces 203s accepts literals without additional spaces 203s registers an offense for unnecessary spaces 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces after first delimiter 203s registers an offense for spaces before final delimiter 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for w type and ["[", "]"] delimiters 203s registers an offense for spaces before final delimiter 203s accepts multi-line literals 203s accepts literals without additional spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces after first delimiter 203s accepts newlines and additional following alignment spaces 203s accepts spaces between entries 203s registers an offense for literals with escaped and other spaces 203s registers an offense for unnecessary spaces 203s accepts literals with escaped spaces 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for W type and ["[", "]"] delimiters 203s accepts spaces between entries 203s accepts literals without additional spaces 203s registers an offense for unnecessary spaces 203s registers an offense for spaces before final delimiter 203s accepts literals with escaped spaces 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces after first delimiter 203s accepts newlines and additional following alignment spaces 203s accepts multi-line literals 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for w type and ["(", ")"] delimiters 203s registers an offense for unnecessary spaces 203s registers an offense for spaces before final delimiter 203s accepts newlines and additional following alignment spaces 203s registers an offense for spaces after first delimiter 203s accepts spaces between entries 203s accepts literals with escaped spaces 203s accepts multi-line literals 203s registers an offense for literals with escaped and other spaces 203s accepts literals without additional spaces 203s accepts multi-line literals within a method 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for i type and ["(", ")"] delimiters 203s accepts multi-line literals 203s accepts spaces between entries 203s registers an offense for spaces after first delimiter 203s registers an offense for literals with escaped and other spaces 203s accepts literals with escaped spaces 203s registers an offense for unnecessary spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces before final delimiter 203s accepts newlines and additional following alignment spaces 203s accepts literals without additional spaces 203s with space in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for x type and ["[", "]"] delimiters 203s accepts multi-line literals within a method 203s registers an offense for spaces after first delimiter 203s accepts literals without additional spaces 203s accepts spaces between entries 203s registers an offense for unnecessary spaces 203s accepts newlines and additional following alignment spaces 203s registers an offense for spaces before final delimiter 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals 203s accepts literals with escaped spaces 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for w type and ["!", "!"] delimiters 203s registers an offense for spaces before final delimiter 203s accepts multi-line literals within a method 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals 203s accepts literals without additional spaces 203s registers an offense for spaces after first delimiter 203s accepts newlines and additional following alignment spaces 203s accepts literals with escaped spaces 203s registers an offense for unnecessary spaces 203s accepts spaces between entries 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for x type and ["(", ")"] delimiters 203s registers an offense for unnecessary spaces 203s registers an offense for spaces after first delimiter 203s accepts multi-line literals 203s registers an offense for literals with escaped and other spaces 203s accepts spaces between entries 203s accepts newlines and additional following alignment spaces 203s registers an offense for spaces before final delimiter 203s accepts literals with escaped spaces 203s accepts literals without additional spaces 203s accepts multi-line literals within a method 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for i type and ["!", "!"] delimiters 203s registers an offense for spaces after first delimiter 203s accepts newlines and additional following alignment spaces 203s accepts multi-line literals within a method 203s accepts spaces between entries 203s accepts literals without additional spaces 203s accepts multi-line literals 203s accepts literals with escaped spaces 203s registers an offense for spaces before final delimiter 203s registers an offense for unnecessary spaces 203s registers an offense for literals with escaped and other spaces 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s for I type and ["[", "]"] delimiters 203s accepts spaces between entries 203s accepts multi-line literals 203s accepts literals without additional spaces 203s accepts newlines and additional following alignment spaces 203s registers an offense for unnecessary spaces 203s registers an offense for spaces after first delimiter 203s registers an offense for literals with escaped and other spaces 203s accepts literals with escaped spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces before final delimiter 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for x type and ["{", "}"] delimiters 203s registers an offense for spaces after first delimiter 203s registers an offense for unnecessary spaces 203s accepts multi-line literals within a method 203s registers an offense for spaces before final delimiter 203s accepts newlines and additional following alignment spaces 203s registers an offense for literals with escaped and other spaces 203s accepts literals without additional spaces 203s accepts multi-line literals 203s accepts spaces between entries 203s accepts literals with escaped spaces 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for I type and ["{", "}"] delimiters 203s accepts literals without additional spaces 203s accepts literals with escaped spaces 203s accepts spaces between entries 203s registers an offense for spaces after first delimiter 203s registers an offense for spaces before final delimiter 203s accepts multi-line literals 203s accepts newlines and additional following alignment spaces 203s registers an offense for unnecessary spaces 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals within a method 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for W type and ["{", "}"] delimiters 203s accepts multi-line literals within a method 203s registers an offense for spaces before final delimiter 203s accepts literals with escaped spaces 203s accepts spaces between entries 203s registers an offense for spaces after first delimiter 203s registers an offense for unnecessary spaces 203s accepts multi-line literals 203s registers an offense for literals with escaped and other spaces 203s accepts literals without additional spaces 203s accepts newlines and additional following alignment spaces 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for W type and ["!", "!"] delimiters 203s registers an offense for unnecessary spaces 203s registers an offense for spaces before final delimiter 203s accepts literals with escaped spaces 203s registers an offense for spaces after first delimiter 203s accepts multi-line literals 203s accepts multi-line literals within a method 203s accepts spaces between entries 203s accepts literals without additional spaces 203s registers an offense for literals with escaped and other spaces 203s accepts newlines and additional following alignment spaces 203s with spaces in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s for I type and ["(", ")"] delimiters 203s accepts spaces between entries 203s accepts literals with escaped spaces 203s accepts multi-line literals within a method 203s accepts newlines and additional following alignment spaces 203s registers an offense for spaces after first delimiter 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals 203s registers an offense for unnecessary spaces 203s accepts literals without additional spaces 203s registers an offense for spaces before final delimiter 203s with newline in blank percent literals 203s registers and corrects an offense 203s with space in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for i type and ["{", "}"] delimiters 203s accepts newlines and additional following alignment spaces 203s accepts multi-line literals 203s registers an offense for unnecessary spaces 203s registers an offense for spaces before final delimiter 203s registers an offense for spaces after first delimiter 203s accepts spaces between entries 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals within a method 203s accepts literals without additional spaces 203s accepts literals with escaped spaces 203s with space in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for i type and ["[", "]"] delimiters 203s accepts spaces between entries 203s registers an offense for literals with escaped and other spaces 203s accepts multi-line literals within a method 203s registers an offense for unnecessary spaces 203s accepts literals without additional spaces 203s accepts newlines and additional following alignment spaces 203s accepts multi-line literals 203s registers an offense for spaces before final delimiter 203s registers an offense for spaces after first delimiter 203s accepts literals with escaped spaces 203s with space in blank percent literals 203s registers and corrects an offense 203s with newline in blank percent literals 203s registers and corrects an offense 203s with spaces in blank percent literals 203s registers and corrects an offense 203s for W type and ["(", ")"] delimiters 203s registers an offense for unnecessary spaces 203s registers an offense for spaces after first delimiter 203s accepts literals without additional spaces 203s registers an offense for spaces before final delimiter 203s accepts multi-line literals 203s accepts spaces between entries 204s accepts multi-line literals within a method 204s accepts literals with escaped spaces 204s accepts newlines and additional following alignment spaces 204s registers an offense for literals with escaped and other spaces 204s with spaces in blank percent literals 204s registers and corrects an offense 204s with space in blank percent literals 204s registers and corrects an offense 204s with newline in blank percent literals 204s registers and corrects an offense 204s 204s RuboCop::Cop::Style::ArrayCoercion 204s does not register an offense when splatting multiple variables into array 204s does not register an offense when splat is not in array 204s does not register an offense when converting variable into other named array variable with check 204s registers an offense and corrects when splatting variable into array 204s registers an offense and corrects when converting variable into array with check 204s 204s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 204s registers an offense and corrects params with default values 204s accepts params without parens 204s registers an offense and corrects params on first line of singleton method 204s accepts single-line methods 204s accepts params listed on a single line 204s registers an offense and corrects params listed on the first line 204s accepts methods without params 204s 204s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 204s registers an offense when body trails after method definition 204s registers when body starts on def line & continues one more line 204s autocorrects body with method definition with args not in parens 204s does not register offense with trailing body on method end 204s removes semicolon from method definition but not body when autocorrecting 204s accepts a method with one line of body 204s accepts a method with multiple lines of body 204s autocorrects with comment after body 204s registers when body starts on def line & continues many more lines 204s when method is not on first line of processed_source 204s autocorrects offense 204s Ruby 3.0 or higher 204s does not register offense when endless method definition body is after newline in opening parenthesis 204s 204s RuboCop::Cop::Style::MethodDefParentheses 204s require_no_parentheses 204s behaves like endless methods 204s endless methods 204s accepts parens with `forward-arg` 204s accepts parens without args 204s accepts parens with args 204s accepts parens for method calls inside an endless method 204s behaves like no parentheses 204s reports an offense for def with no args and parens 204s reports an offense for def with parameters with parens 204s accepts def with no args and no parens 204s auto-removes the parens for defs 204s reports an offense for class def with parameters with parens 204s accepts a class def with parameters with parens 204s reports an offense for opposite + correct 204s accepts a def with parameters but no parens 204s requires parens for forwarding 204s requires parens for anonymous block forwarding 204s require_no_parentheses_except_multiline 204s when args span multiple lines 204s auto-adds required parens to argument lists on multiple lines 204s reports an offense for correct + opposite 204s when args are all on a single line 204s behaves like no parentheses 204s reports an offense for opposite + correct 204s reports an offense for def with no args and parens 204s accepts def with no args and no parens 204s requires parens for forwarding 204s requires parens for anonymous block forwarding 204s reports an offense for class def with parameters with parens 204s accepts a def with parameters but no parens 204s auto-removes the parens for defs 204s accepts a class def with parameters with parens 204s reports an offense for def with parameters with parens 204s behaves like endless methods 204s endless methods 204s accepts parens for method calls inside an endless method 204s accepts parens with `forward-arg` 204s accepts parens without args 204s accepts parens with args 204s require_parentheses 204s auto-adds required parens for a defs 204s reports an offense for correct + opposite 204s auto-adds required parens for a defs after a passing method 204s reports an offense for def with parameters but no parens 204s reports an offense for class def with parameters but no parens 204s auto-adds required parens to argument lists on multiple lines 204s accepts def with no args and no parens 204s behaves like endless methods 204s endless methods 204s accepts parens with `forward-arg` 204s accepts parens with args 204s accepts parens without args 204s accepts parens for method calls inside an endless method 204s 204s RuboCop::Cop::Lint::NonAtomicFileOperation 204s registers an offense when use `FileTest.exist?` before force creating file 204s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 204s registers an offense when use `FileTest.exists?` before creating file 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use `FileTest.exist?` before force creating file 204s registers an offense when use `FileTest.exist?` before force remove file 204s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 204s does not register an offense when processing other than file operations 204s does not register an offense when not a method of file operation 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use `FileTest.exist?` before remove file 204s does not register an offense when using complex conditional with `&&` 204s registers an offense when use `FileTest.exist?` with negated `if` before creating file 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use file existence checks `unless` by postfix before creating file 204s does not register an offense when checking for the existence of different files 204s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when using `FileTest.exist?` as a condition for `elsif` 204s does not register an offense when using complex conditional with `||` 204s registers an offense when use `FileTest.exist?` before force remove file 204s registers an offense when use `FileTest.exist?` before remove file 204s does not register an offense when use `FileTest.exist?` before remove recursive file 204s does not register an offense when not an exist check 204s registers an offense when use `FileTest.exist?` before remove file 204s registers an offense when use file existence checks `if` by postfix before removing file 204s registers an offense when use `FileTest.exist?` before force creating file 204s does not register an offense when use `FileTest.exist?` before remove recursive file 204s does not register an offense when not checking for the existence 204s registers an offense when use `FileTest.exist?` before creating file 204s 204s RuboCop::Cop::Style::RedundantSelf 204s does not report an offense when lvasgn name is used in `while` 204s reports an offense when a different masgn name is used in `if` 204s accepts a self receiver on an lvalue of a plus-assignment 204s does not report an offense when lvasgn name is used in `until` 204s accepts a self receiver of methods also defined on `Kernel` 204s accepts a self receiver on an lvalue of mlhs arguments 204s accepts a self receiver on an lvalue of a parallel assignment 204s does not report an offense when self receiver in a method argument and lvalue have the same name 204s does not report an offense when lvasgn name is used in `if` 204s does not report an offense when receiver and multiple assigned lvalue have the same name 204s does not report an offense when masgn name is used in `if` 204s accepts a self receiver with the double less-than operator 204s does not report an offense when masgn name is used in `until` 204s accepts a self receiver on an lvalue of an or-assignment 204s accepts a self receiver with the square bracket operator 204s accepts when nested receiver and lvalue have the name name 204s accepts a self receiver used to distinguish from argument of block 204s accepts a self receiver on an lvalue of an and-assignment 204s does not report an offense when masgn name is used in `unless` 204s does not report an offense when lvasgn name is used in `unless` 204s does not report an offense when receiver and lvalue have the same name 204s reports an offense a self receiver of .call 204s accepts a self receiver used to distinguish from constant 204s does not report an offense when masgn name is used in `while` 204s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 204s accepts a self receiver for methods named like ruby keywords 204s reports an offense when a different lvasgn name is used in `if` 204s accepts a self receiver of .() 204s accepts a self receiver on an lvalue of an assignment 204s does not report an offense when lvasgn name is nested below `if` 204s reports an offense a self receiver on an rvalue 204s instance methods 204s accepts a self receiver used to distinguish from optional argument 204s accepts a self receiver used to distinguish from an argument 204s accepts a self receiver used to distinguish from an argument when an inner method is defined 204s accepts a self receiver used to distinguish from local variable 204s accepts a self receiver used to distinguish from argument 204s accepts a self receiver used to distinguish from blockarg 204s Ruby 2.7 204s registers offense for self usage in numblocks 204s with ruby >= 2.7 204s with pattern matching 204s registers an offense when using a self receiver with a pin 204s accepts a self receiver on a `array-pattern` 204s registers an offense when using self with a different match var 204s accepts a self receiver on a `hash-pattern` 204s accepts a self receiver in a `if-guard` 204s accepts a self receiver with a `match-alt` 204s accepts a self receiver in a nested pattern` 204s accepts a self receiver in a conditional pattern 204s accepts a self receiver on an `match-var` 204s class methods 204s accepts a self receiver used to distinguish from optional argument 204s accepts a self receiver used to distinguish from blockarg 204s accepts a self receiver used to distinguish from argument 204s accepts a self receiver used to distinguish from local variable 204s 204s RuboCop::Cop::Lint::UriRegexp 204s registers an offense and corrects using `::URI.regexp` with argument 204s does not register an offense when using `regexp` with variable receiver 204s registers an offense and corrects using `URI.regexp` without argument 204s registers an offense and corrects using `::URI.regexp` without argument 204s registers an offense and corrects using `URI.regexp` with argument 204s does not register an offense when using `regexp` without receiver 204s array argument 204s registers an offense and corrects using `URI.regexp` with %w arrays 204s registers an offense and corrects using `URI.regexp` with %i arrays 204s registers an offense and corrects using `URI.regexp` with literal arrays 204s 204s RuboCop::CLI --autocorrect 204s can correct two empty lines at end of class body 204s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 204s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 204s can correct two problems with blocks 204s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 204s 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` 204s corrects RedundantCopDisableDirective offenses 204s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 204s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 205s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 205s says [Correctable] if correction is unsafe 205s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 205s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 205s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 205s corrects InitialIndentation offenses 205s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 205s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 205s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 205s 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` 205s can correct MethodDefParentheses and other offense 205s corrects Style/InverseMethods and Style/Not offenses 205s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 205s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 205s corrects indentation for a begin/rescue/else/ensure/end block properly 206s does not correct SpaceAroundOperators in a hash that would be changed back 206s corrects only IndentationWidth without crashing 206s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 206s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 206s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 206s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 206s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 206s 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` 206s can correct empty line inside special form of nested modules 206s corrects RedundantBegin offenses and fixes indentation etc 206s can correct indentation and another thing 206s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 206s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 206s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 207s corrects Style/Next and Style/SafeNavigation offenses 207s can correct IndentHash offenses with separator style 207s can correct TrailingEmptyLines and TrailingWhitespace offenses 207s can correct HashSyntax when --only is used 207s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 207s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 207s can correct two problems in the same place 207s can be disabled for any cop in configuration 207s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 207s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 207s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 207s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 207s corrects SymbolProc and SpaceBeforeBlockBraces offenses 208s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 208s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 208s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 208s 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` 208s plays nicely with default cops in complex ExtraSpacing scenarios 208s can correct HashSyntax and SpaceAroundOperators offenses 208s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 208s honors Exclude settings in individual cops 208s can correct WordArray and SpaceAfterComma offenses 208s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 209s can change block comments and indent them 209s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 209s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 209s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 209s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 209s can correct single line methods 209s can correct SpaceAfterComma and HashSyntax offenses 209s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 209s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 209s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 209s does not hang SpaceAfterPunctuation and SpaceInsideParens 209s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 209s corrects code with indentation problems 209s can correct a problems and the problem it creates 209s 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 209s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 210s 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 210s corrects IndentationWidth and IndentationConsistency offenses 210s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 210s does not say [Corrected] if correction is not possible 210s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 210s corrects Tab and IndentationConsistency offenses 210s does not correct ExtraSpacing in a hash that would be changed back 210s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 210s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 210s when BlockDelimiters has semantic style 210s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 210s when BlockDelimiters has line_count_based style 210s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 210s caching 210s with no offenses in the cache 210s doesn't correct offenses 210s with an offense in the cache 210s corrects offenses 210s space_inside_bracket cops 210s when array style is compact & reference style is space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is space & reference style is no space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is compact & reference style is no_space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when array style is no_space & reference style is space 211s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 211s when BlockDelimiters has braces_for_chaining style 211s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 211s trailing comma cops 211s when the style is `consistent_comma` 211s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 211s when the style is `comma` 211s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 211s 211s RuboCop::Cop::Layout::DotPosition 211s Leading dots style 211s registers an offense for correct + opposite 211s does not err on method call with no dots 211s accepts leading do in multi-line method call 211s does not err on method call without a method name 211s does not err on method call on same line 211s registers an offense for only dot line 211s registers an offense for trailing dot in multi-line call 211s when the receiver has a heredoc argument 211s with a dynamic heredoc 211s registers an offense 211s as the first argument 211s registers an offense 211s with another method on the same line 211s does not register an offense 211s with multiple heredocs 211s registers an offense 211s as the last argument 211s registers an offense 211s when using safe navigation operator 211s registers an offense for correct + opposite 211s accepts leading do in multi-line method call 211s when there is an intervening blank line 211s does not register offense 211s when the receiver is a heredoc 211s registers an offense 211s when there is an intervening line comment 211s does not register offense 211s with multiple offenses 211s registers all of them 211s when a method spans multiple lines 211s registers an offense 211s Trailing dots style 211s registers an offense for leading dot in multi-line call 211s accepts trailing dot in multi-line method call 211s does not err on method call with multi-line arguments 211s does not err on method call with no dots 211s does not err on method call on same line 211s does not get confused by several lines of chained methods 211s does not err on method call without a method name 211s when the receiver is a heredoc 211s registers an offense 211s when using safe navigation operator 211s registers an offense for correct + opposite 211s accepts trailing dot in multi-line method call 211s when the receiver has a heredoc argument 211s as the last argument 211s registers an offense 211s with a dynamic heredoc 211s registers an offense 211s with another method on the same line 211s does not register an offense 211s with multiple heredocs 211s registers an offense 211s as the first argument 211s registers an offense 211s when there is a heredoc with a following method 211s does not register an offense for a heredoc 211s 211s RuboCop::Cop::Style::RedundantStringEscape 211s does not register an offense for a __dir__ literal 211s does not register an offense for a regexp literal 211s does not register an offense for a __FILE__ literal 211s does not register an offense for a x-str literal 211s with a %Q(...) literal 211s behaves like a literal with interpolation 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for an escaped delimiter 211s registers an offense and corrects an escaped single quote 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense for an escaped backslash 211s does not register an offense for meta control characters 211s registers an offense and corrects an escaped double quote 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for a technically-unnecessary escape 211s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for an escaped newline 211s does not register an offense for an ascii DEL 211s registers an offense and corrects an escaped # before interpolation 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for control characters 211s does not register an offense for multiple unicode escapes 211s does not register an offense for an octal escape 211s does not register an offense for a $-escaped gvar interpolation 211s does not register an offense for a meta character 211s registers an offense and corrects a escaped nested delimiter in a double quoted string 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense without escapes 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense for an escaped interpolation 211s does not register an offense for a unicode escape 211s does not register an offense for an escaped # followed { 211s does not register an offense for a newline 211s does not register an offense for a hex escape 211s registers an offense and corrects an escaped # at end-of-string 211s registers an offense and corrects an escaped # without following { 211s when using character literals 211s does not register an offense for `?\n` 211s does not register an offense for `?a` 211s with a %W(...) literal 211s does not register an offense for escaped spaces 211s behaves like a literal with interpolation 211s does not register an offense for an octal escape 211s does not register an offense for meta control characters 211s does not register an offense for a hex escape 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense for a unicode escape 211s does not register an offense without escapes 211s does not register an offense for control characters 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for multiple unicode escapes 211s does not register an offense for a meta character 211s does not register an offense for an ascii DEL 211s does not register an offense for an escaped interpolation 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense for a technically-unnecessary escape 211s registers an offense and corrects an escaped double quote 211s registers an offense and corrects a escaped nested delimiter in a double quoted string 211s registers an offense and corrects an escaped # without following { 211s does not register an offense for a $-escaped gvar interpolation 211s registers an offense and corrects an escaped single quote 211s registers an offense and corrects an escaped # at end-of-string 211s does not register an offense for an escaped backslash 211s does not register an offense for an escaped delimiter 211s does not register an offense for an escaped newline 211s does not register an offense for a newline 211s does not register an offense for an escaped # followed { 211s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 211s registers an offense and corrects an escaped # before interpolation 211s does not register an offense for a @-escaped cvar interpolation 211s does not register a bracket-escaped lvar interpolation 211s with a %q(...) literal 211s behaves like a literal without interpolation 211s does not register an offense for a meta character 211s does not register an offense without escapes 211s does not register an offense for an escaped # followed { 211s does not register an offense with escaped # without following { 211s does not register an offense for an escaped newline 211s does not register an offense for an escaped # with following { 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for a newline 211s does not register an offense for multiple unicode escapes 211s does not register an offense for an escaped interpolation 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for an allowed escape inside multi-line literal 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense for an escaped delimiter 211s does not register an offense for an escaped backslash 211s does not register an offense for a unicode escape 211s does not register an offense with escaped # at end-of-string 211s does not register an offense with escaped double quote 211s does not register an offense for control characters 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense for an ascii DEL 211s does not register an offense for meta control characters 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense for a hex escape 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for a $-escaped gvar interpolation 211s does not register an offense for an octal escape 211s does not register an offense with escaped single quote 211s with a %w(...) literal 211s does not register an offense for escaped spaces 211s behaves like a literal without interpolation 211s does not register an offense for an allowed escape inside multi-line literal 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense with escaped single quote 211s does not register an offense for a newline 211s does not register an offense for an escaped newline 211s does not register an offense for a meta character 211s does not register an offense for an escaped delimiter 211s does not register an offense with escaped # at end-of-string 211s does not register an offense for an escaped backslash 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense for an escaped interpolation 211s does not register an offense with escaped double quote 211s does not register an offense for a $-escaped gvar interpolation 211s does not register an offense for multiple unicode escapes 211s does not register an offense with escaped # without following { 211s does not register an offense for an ascii DEL 211s does not register an offense for a hex escape 211s does not register an offense for an octal escape 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense for meta control characters 211s does not register an offense for an escaped # followed { 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense without escapes 211s does not register an offense for a unicode escape 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped # with following { 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for control characters 211s with an interpolation-disabled HEREDOC 211s behaves like a literal without interpolation 211s does not register an offense for an allowed escape inside multi-line literal 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense with escaped # without following { 211s does not register an offense for an escaped # with following { 211s does not register an offense without escapes 211s does not register an offense for an escaped # followed { 211s does not register an offense for an octal escape 211s does not register an offense for an escaped interpolation 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense with escaped double quote 211s does not register an offense for a meta character 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense for a hex escape 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for multiple unicode escapes 211s does not register an offense with escaped single quote 211s does not register an offense for control characters 211s does not register an offense with escaped # at end-of-string 211s does not register an offense for a unicode escape 211s does not register an offense for an escaped newline 211s does not register an offense for an ascii DEL 211s does not register an offense for meta control characters 211s does not register an offense for a newline 211s does not register an offense for an escaped backslash 211s does not register an offense for a $-escaped gvar interpolation 211s with an interpolation-enabled HEREDOC 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense for a unicode escape 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped # followed { 211s does not register an offense for a hex escape 211s does not register an offense for a meta character 211s does not register an offense for a $-escaped gvar interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for a @-escaped ivar interpolation 211s registers an offense and corrects an escaped # without following { 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for an escaped newline 211s registers an offense and corrects an escaped single quote 211s does not register an offense for meta control characters 211s does not register an offense for control characters 211s does not register an offense without escapes 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for a nested heredoc without interpolation 211s registers an offense and corrects an escaped # at end-of-string 211s does not register an offense for an escaped backslash 211s registers an offense and corrects an escaped # before interpolation 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for multiple unicode escapes 211s does not register an offense for an octal escape 211s does not register an offense for a newline 211s does not register an offense for a heredoc interpolating a string with an allowed escape 211s does not register an offense for an escaped interpolation 211s does not register an offense for an ascii DEL 211s does not register an offense for a bracket-escaped interpolation 211s with a double quoted string 211s does not register an offense when escaping a quote in multi-line broken string 211s does not register an offense with escaped double quote 211s does not register an offense with multiple escaped backslashes 211s registers an offense and corrects an unnecessary escape in multi-line broken string 211s behaves like a literal with interpolation 211s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 211s does not register an offense for an escaped newline 211s does not register an offense without escapes 211s registers an offense and corrects an escaped single quote 211s registers an offense and corrects an escaped # before interpolation 211s does not register an offense for a hex escape 211s does not register an offense for an escaped backslash 211s does not register an offense for meta control characters 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense for a bracket-escaped interpolation 211s does not register an offense for an octal escape 211s does not register an offense for a newline 211s registers an offense and corrects an escaped # at end-of-string 211s does not register an offense for a unicode escape 211s registers an offense and corrects an escaped # without following { 211s does not register an offense for an ascii DEL 211s does not register an offense for multiple unicode escapes 211s does not register an offense for control characters 211s does not register an offense for an escaped # followed { 211s does not register an offense for a meta character 211s does not register an offense for an escaped interpolation 211s does not register an offense for an escaped delimiter 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped ivar interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense for a $-escaped gvar interpolation 211s with a %(...) literal 211s behaves like a literal with interpolation 211s does not register an offense for an octal escape 211s does not register an offense for a technically-unnecessary escape 211s does not register an offense for a unicode escape 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense for a bracket-escaped interpolation 211s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 211s registers an offense and corrects an escaped # before interpolation 211s registers an offense and corrects an escaped # at end-of-string 211s does not register an offense for a hex escape 211s does not register an offense for an escaped cvar interpolation 211s does not register an offense for an escaped delimiter before interpolation 211s does not register an offense for an escaped newline 211s does not register an offense for an escaped # followed { 211s registers an offense and corrects an escaped single quote 211s does not register an offense for an ascii DEL 211s does not register an offense without escapes 211s does not register an offense for an escaped interpolation 211s does not register an offense for an escaped gvar interpolation 211s does not register an offense for meta control characters 211s does not register an offense for control characters 211s registers an offense and corrects a escaped nested delimiter in a double quoted string 211s does not register an offense for a $-escaped gvar interpolation 211s does not register an offense for an escaped backslash 211s does not register an offense for a newline 211s does not register an offense for a @-escaped cvar interpolation 211s does not register a bracket-escaped lvar interpolation 211s does not register an offense for multiple unicode escapes 211s does not register an offense for an escaped delimiter 211s does not register an offense for an escaped ivar interpolation 211s registers an offense and corrects an escaped # without following { 211s registers an offense and corrects an escaped double quote 211s does not register an offense for a meta character 211s with a single quoted string 211s behaves like a literal without interpolation 211s does not register an offense for a @-escaped cvar interpolation 211s does not register an offense for an escaped backslash 211s does not register an offense for multiple unicode escapes 211s does not register an offense for an escaped # followed { 211s does not register an offense for a meta character 211s does not register an offense for control characters 211s does not register an offense for a @-escaped ivar interpolation 211s does not register an offense with escaped single quote 212s does not register an offense for an escaped delimiter before interpolation 212s does not register an offense for a bracket-escaped interpolation 212s does not register an offense for an escaped delimiter 212s does not register an offense for an escaped # with following { 212s does not register an offense for a technically-unnecessary escape 212s does not register an offense with escaped # at end-of-string 212s does not register an offense for an escaped cvar interpolation 212s does not register an offense with escaped double quote 212s does not register an offense for a unicode escape 212s does not register an offense for meta control characters 212s does not register an offense for an escaped ivar interpolation 212s does not register an offense for a newline 212s does not register an offense for a $-escaped gvar interpolation 212s does not register an offense for an escaped gvar interpolation 212s does not register an offense for an allowed escape inside multi-line literal 212s does not register an offense for an octal escape 212s does not register an offense with escaped # without following { 212s does not register an offense for an ascii DEL 212s does not register a bracket-escaped lvar interpolation 212s does not register an offense for an escaped interpolation 212s does not register an offense for a hex escape 212s does not register an offense for an escaped newline 212s does not register an offense without escapes 212s with a %Q!...! literal 212s behaves like a literal with interpolation 212s does not register an offense for an escaped # followed { 212s does not register an offense for a @-escaped ivar interpolation 212s does not register an offense for an escaped backslash 212s does not register an offense for a newline 212s registers an offense and corrects an escaped single quote 212s does not register an offense for meta control characters 212s does not register an offense for control characters 212s does not register an offense for an escaped cvar interpolation 212s does not register an offense for a bracket-escaped interpolation 212s does not register an offense for an octal escape 212s does not register an offense for an escaped ivar interpolation 212s registers an offense and corrects an escaped # at end-of-string 212s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 212s registers an offense and corrects an escaped # without following { 212s does not register an offense for an escaped interpolation 212s does not register an offense for multiple unicode escapes 212s does not register an offense for a technically-unnecessary escape 212s does not register an offense for a unicode escape 212s does not register an offense for an escaped delimiter 212s does not register an offense for a hex escape 212s does not register a bracket-escaped lvar interpolation 212s does not register an offense for an escaped gvar interpolation 212s does not register an offense for a meta character 212s registers an offense and corrects an escaped # before interpolation 212s does not register an offense without escapes 212s does not register an offense for a $-escaped gvar interpolation 212s does not register an offense for an escaped delimiter before interpolation 212s does not register an offense for a @-escaped cvar interpolation 212s does not register an offense for an escaped newline 212s does not register an offense for an ascii DEL 212s registers an offense and corrects a escaped nested delimiter in a double quoted string 212s registers an offense and corrects an escaped double quote 212s 212s RuboCop::Cop::Layout::SpaceBeforeComment 212s registers an offense and corrects missing space before an EOL comment 212s accepts an EOL comment with a preceding space 212s accepts a doc comment 212s accepts a comment that begins a line 212s registers an offense and corrects after a heredoc 212s 212s RuboCop::Cop::Lint::RandOne 212s behaves like no offense 212s rand 212s does not register an offense 212s behaves like no offense 212s rand(-1..1) 212s does not register an offense 212s behaves like offenses 212s Kernel.rand 1.0 212s registers an offense 212s behaves like offenses 212s Kernel.rand(-1) 212s registers an offense 212s behaves like no offense 212s Kernel.rand 2 212s does not register an offense 212s behaves like offenses 212s rand(-1.0) 212s registers an offense 212s behaves like offenses 212s Kernel.rand(1) 212s registers an offense 212s behaves like no offense 212s Kernel.rand 212s does not register an offense 212s behaves like no offense 212s Kernel.rand(-1..1) 212s does not register an offense 212s behaves like offenses 212s rand(-1) 212s registers an offense 212s behaves like no offense 212s rand(2) 212s does not register an offense 212s behaves like offenses 212s rand(1.0) 212s registers an offense 212s behaves like offenses 212s Kernel.rand(-1.0) 212s registers an offense 212s behaves like no offense 212s ::Kernel.rand 212s does not register an offense 212s behaves like offenses 212s rand 1 212s registers an offense 212s behaves like offenses 212s ::Kernel.rand(1) 212s registers an offense 212s 212s RuboCop::Cop::Style::RedundantSortBy 212s autocorrects array.sort_by { |x| x } 212s autocorrects array.sort_by do |x| x end 212s autocorrects array.sort_by { |y| y } 212s Ruby 2.7 212s autocorrects array.sort_by { |x| x } 212s 212s RuboCop::Cop::Security::CompoundHash 212s registers an offense when using XOR and bitshifts 212s registers an offense when using addition in the implementation of the hash method 212s registers an offense when using multiplication in the implementation of the hash method 212s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 212s registers an offense when using XOR operator in the implementation of the hash method 212s registers an offense when using XOR between an array hash and a class 212s registers an offense if .hash is called on any elements of a hashed array 212s registers an offense when using XOR involving super 212s registers an offense when using XOR operator in the implementation of a dynamic hash method 212s registers an offense when delegating to Array#hash for a single value 212s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 212s does not register an offense when delegating to a single object 212s registers an offense when using addition assignment operator in the implementation of the hash method 212s registers an offense when using bitshift and OR 212s registers an offense when using XOR operator in the implementation of the hash singleton method 212s registers an offense when using XOR assignment operator in the implementation of the hash method 212s registers an offense for complex usage 212s registers an offense when using multiplication assignment operator in the implementation of the hash method 212s does not register an offense when delegating to Array#hash 212s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 212s 212s RuboCop::Cop::MessageAnnotator 212s #annotate 212s with default options 212s returns the message 212s when the output format is JSON 212s returns the message unannotated 212s with options on 212s returns an annotated message 212s #urls 212s returns multiple reference urls 212s returns an empty array if the reference url is blank 212s returns an empty array without StyleGuide URL 212s returns reference url when it is specified 212s returns style guide and reference url when they are specified 212s returns style guide url when it is specified 212s with style guide url 212s when StyleGuide is not set in the config 212s does not add style guide url 212s when a base URL is specified 212s allows absolute URLs in the cop config 212s can use a path-based setting 212s can accept relative paths if base has a full path 212s does not specify a URL if a cop does not have one 212s combines correctly with a target-based setting 212s when a nested department is specified 212s returns style guide url when it is specified 212s when a department other than AllCops is specified 212s returns style guide url when it is specified 212s when StyleGuide is set in the config 212s adds style guide url 212s 212s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 212s is not fooled by single line methods 212s accepts method body starting with a line with spaces 212s registers an offense for class method body starting with a blank 212s registers an offense for class method body ending with a blank 212s registers an offense for method body starting with a blank 212s registers an offense for method body ending with a blank 212s 212s RuboCop::Cop::Metrics::ClassLength 212s accepts a class with less than 5 lines 212s rejects a class with more than 5 lines 212s accepts a class with 5 lines 212s does not count blank lines 212s accepts empty classes 212s reports the correct beginning and end lines 212s when a class has inner classes 212s does not count lines of inner classes 212s rejects a class with 6 lines that belong to the class directly 212s when using numbered parameter 212s when inspecting a class defined with Struct.new 212s registers an offense when multiple assignments to constants 212s registers an offense when inspecting or equals (`||=`) for constant 212s registers an offense 212s when inspecting a class defined with ::Class.new 212s registers an offense 212s when inspecting a class defined with Class.new 212s registers an offense 212s when CountComments is enabled 212s also counts commented lines 212s registers an offense for a class that only contains comments 212s when inspecting a class defined with Struct.new 212s registers an offense when multiple assignments to constants 212s registers an offense 212s registers an offense when inspecting or equals (`||=`) for constant 212s when inspecting a class defined with ::Class.new 212s registers an offense 212s when `CountAsOne` is not empty 212s folds array into one line 212s when overlapping constant assignments 212s does not register an offense 212s when CountComments is disabled 212s accepts classes that only contain comments 212s when inspecting a class defined with Class.new 212s registers an offense 212s 212s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 212s does not register an offense when the `loc` is on a different node 212s does not register an offense when the `loc` is on a child node 212s when `node.loc.selector` is passed 212s registers an offense 212s registers an offense if message argument is passed 212s 212s RuboCop::Cop::Style::InverseMethods 212s registers an offense for not (foo == bar) 212s registers an offense for !(foo < bar) 212s registers an offense for !foo.present? 212s allows an inverse method in a block with next 212s allows comparing camel case constants on the right 212s allows an inverse method with a block when double negation is used 212s allows a method call without a not 212s registers an offense for comparing snake case constants on the left 212s registers an offense for !(foo > bar) 212s allows an inverse method when double negation is used 212s registers an offense for !foo.odd? 212s registers an offense for not (foo < bar) 212s registers an offense for calling !.none? with a block 212s registers an offense for !(foo !~ bar) 212s allows comparing camel case constants on the left 212s registers an offense for !(foo =~ bar) 212s registers an offense for comparing snake case constants on the right 212s registers an offense for !foo.exclude? 212s registers an offense for !foo.any? 212s registers an offense for not (foo != bar) 212s registers an offense for calling !.any? inside parens 212s registers an offense for !(foo != bar) 212s registers an offense for !foo.even? 212s registers an offense for not (foo > bar) 212s registers an offense for !foo.include? 212s registers an offense for not (foo !~ bar) 212s registers an offense for calling !.none? with a symbol proc 212s registers an offense for not (foo =~ bar) 212s registers an offense for !foo.none? 212s registers an offense for !(foo == bar) 212s registers an offense for !foo.blank? 212s behaves like all variable types 212s registers an offense for calling not $foo.none? 212s registers an offense for calling !$foo.none? 212s behaves like all variable types 212s registers an offense for calling !foo.none? 212s registers an offense for calling not foo.none? 212s Ruby 2.7 212s registers an offense for calling !.none? with a numblock 212s behaves like all variable types 212s registers an offense for calling not foo["bar"].none? 212s registers an offense for calling !foo["bar"].none? 212s behaves like all variable types 212s registers an offense for calling !FOO::BAR.none? 212s registers an offense for calling not FOO::BAR.none? 212s inverse blocks 212s corrects a complex inverted method call 212s corrects an inverted do end method call 212s corrects an inverted method call when using `BasicObject#!` 212s corrects an inverted do end method call 212s registers a single offense for nested inverse method calls 212s registers an offense for an inverted equality block 212s registers an offense for a multiline inverted equality block 212s registers a single offense for nested inverse method calls 212s registers an offense for a multiline method call where the last method is inverted 212s registers an offense for an inverted equality block 212s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 212s registers an offense for a multiline inverted equality block 212s registers a single offense for nested inverse method calls 212s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 212s registers an offense for an inverted equality block 212s registers an offense for a multiline method call where the last method is inverted 212s registers an offense for a multiline inverted equality block 212s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 212s corrects an inverted method call 212s corrects an inverted method call when using `BasicObject#!` 212s registers an offense for an inverted equality block 212s corrects a complex inverted method call 212s registers an offense for a multiline method call where the last method is inverted 212s registers an offense for foo.reject! { |e| !e } 212s corrects a complex inverted method call 212s corrects a complex inverted method call 212s corrects an inverted method call 212s corrects an inverted do end method call 212s corrects an inverted method call 212s registers an offense for a multiline method call where the last method is inverted 212s registers an offense for a multiline inverted equality block 212s corrects an inverted method call 212s registers a single offense for nested inverse method calls 212s registers an offense for foo.select! { |e| !e } 212s registers an offense for foo.select { |e| !e } 212s registers an offense for foo.reject { |e| !e } 212s corrects an inverted do end method call 212s corrects an inverted method call when using `BasicObject#!` 212s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 212s corrects an inverted method call when using `BasicObject#!` 212s behaves like all variable types 212s registers an offense for calling not FOO.none? 212s registers an offense for calling !FOO.none? 212s behaves like all variable types 212s registers an offense for calling not @foo.none? 212s registers an offense for calling !@foo.none? 212s behaves like all variable types 212s registers an offense for calling not foo.bar.none? 212s registers an offense for calling !foo.bar.none? 212s behaves like all variable types 212s registers an offense for calling !@@foo.none? 212s registers an offense for calling not @@foo.none? 212s 212s RuboCop::Cop::Lint::AmbiguousBlockAssociation 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s when AllowedMethods is enabled 212s does not register an offense for an allowed method 212s registers an offense for other methods 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s when AllowedPatterns is enabled 212s does not register an offense for an allowed method 212s registers an offense for other methods 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s without parentheses 212s with receiver 212s registers an offense 212s when using safe navigation operator 212s registers an offense 212s with assignment 212s registers an offense 212s as a hash key 212s registers an offense 212s rspec expect {}.to change {} 212s registers an offense 212s without receiver 212s registers an offense 212s behaves like accepts 212s does not register an offense 212s behaves like accepts 212s does not register an offense 212s 212s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 212s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 212s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 212s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 212s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 212s 212s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 212s when EnforcedStyle is empty_lines for do end block 212s registers an offense for block body not starting or ending with a blank 212s ignores block with an empty body 212s is not fooled by single line blocks 212s when EnforcedStyle is empty_lines for { } block 212s ignores block with an empty body 212s registers an offense for block body not starting or ending with a blank 212s is not fooled by single line blocks 212s when EnforcedStyle is no_empty_lines for { } block 212s registers an offense for block body starting with a blank 212s accepts block body starting with a line with spaces 212s registers an offense for block body ending with a blank 212s is not fooled by single line blocks 212s registers an offense for block body starting with a blank passed to a multi-line method call 212s Ruby 2.7 212s registers an offense for block body ending with a blank 212s when EnforcedStyle is no_empty_lines for do end block 212s registers an offense for block body ending with a blank 212s registers an offense for block body starting with a blank 212s is not fooled by single line blocks 212s accepts block body starting with a line with spaces 212s registers an offense for block body starting with a blank passed to a multi-line method call 212s Ruby 2.7 212s registers an offense for block body ending with a blank 212s 212s RuboCop::Cop::Lint::RedundantCopDisableDirective 212s .check 212s when there are no disabled lines 212s returns no offense 212s autocorrecting whitespace 212s when the comment is the first line of the file 212s followed by code 212s removes the comment 212s followed by a newline 212s removes the comment and newline 212s followed by another comment 212s removes the comment and newline 212s when there is a blank line before inline comment 212s removes the comment and preceding whitespace 212s when there is only whitespace before the comment 212s leaves the whitespace 212s inline comment 212s removes the comment and preceding whitespace 212s when the comment is not the first line of the file 212s preserves whitespace before the comment 212s nested inside a namespace 212s preserves indentation 212s when there are disabled lines 212s and there is an offense 212s and a comment disables 212s all cops 212s returns no offense 212s that cop 212s returns no offense 212s that cop but on other lines 212s returns an offense 212s and there are no offenses 212s and a comment disables 212s all cops 212s returns an offense 212s comment is not at the beginning of the file 212s and not all cops have offenses 212s returns an offense 212s itself and all cops 212s disabled on different ranges 212s returns no offense 212s misspelled cops 212s returns an offense 212s multiple cops 212s returns an offense 212s itself and another cop 212s disabled on the same range 212s returns no offense 212s disabled on different ranges 212s returns no offense 212s and the other cop is disabled a second time 212s returns no offense 212s multiple cops, and the leftmost one has no offenses 212s returns an offense 212s a cop that is disabled in the config 212s returns an offense 212s if that cop has offenses 212s returns an offense 212s when that cop was previously enabled 212s returns no offense 212s multiple cops, and one of them has offenses 212s returns an offense 212s multiple cops, with abbreviated names 212s one of them has offenses 212s returns an offense 212s one cop 212s returns an offense 212s when using a directive comment after a non-directive comment 212s returns an offense 212s an unknown cop 212s returns an offense 212s and there are two offenses 212s and a comment disables 212s one cop twice 212s returns an offense 212s one cop and then all cops 212s returns an offense 212s with a disabled department 212s removes cop duplicated by department on previous line 212s removes cop duplicated by department 212s removes redundant department 212s does not remove correct department 212s removes cop duplicated by department and leaves free text as a comment 212s removes entire comment 212s 212s RuboCop::Cop::Style::SymbolLiteral 212s registers an offense for word-line symbols using string syntax 212s accepts string syntax when symbol start with a digit 212s accepts string syntax when symbols have whitespaces in them 212s accepts string syntax when symbols have special chars in them 212s 212s Pending: (Failures listed here are expected and do not affect your suite's status) 212s 212s 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 212s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 212s Failure/Error: 212s expect_offense(<<~RUBY) 212s def some_method 212s total = 0 212s foo = 0 212s 212s while total < 100 212s total += 1 212s foo += 1 212s ^^^ Useless assignment to variable - `foo`. 212s end 212s 212s Diff: 212s @@ -5,7 +5,6 @@ 212s while total < 100 212s total += 1 212s foo += 1 212s - ^^^ Useless assignment to variable - `foo`. 212s end 212s 212s total 212s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 212s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 212s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 212s 212s Failures: 212s 212s 1) RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 212s Failure/Error: expect_no_offenses('foo = /[\032]/') 212s 212s expected: "foo = /[\\032]/" 212s got: "foo = /[\\032]/ ^^^^^^ Redundant single-element character class, `[\\032]` can be replaced with `\\032`.\n" 212s 212s (compared using ==) 212s 212s Diff: 212s @@ -1 +1 @@ 212s -foo = /[\032]/ 212s +foo = /[\032]/ ^^^^^^ Redundant single-element character class, `[\032]` can be replaced with `\032`. 212s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:184:in `expect_no_offenses' 212s # ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:315:in `block (3 levels) in ' 212s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 212s 212s Finished in 57.15 seconds (files took 2.53 seconds to load) 212s 19119 examples, 1 failure, 1 pending 212s 212s Failed examples: 212s 212s rspec ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:314 # RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 212s 212s Randomized with seed 2988 212s 213s /usr/bin/ruby3.3 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb,spec/project_spec.rb,spec/rubocop/cli/options_spec.rb,spec/rubocop/cli/suggest_extensions_spec.rb,spec/rubocop/config_obsoletion_spec.rb,spec/rubocop/lockfile_spec.rb,spec/rubocop/server/rubocop_server_spec.rb,spec/rubocop/version_spec.rb,./spec/rubocop/cop/generator_spec.rb --format documentation failed 213s mv ./.gem2deb.lib lib 213s autopkgtest [19:02:45]: test gem2deb-test-runner: -----------------------] 214s gem2deb-test-runner FAIL non-zero exit status 1 214s autopkgtest [19:02:46]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 214s autopkgtest [19:02:46]: @@@@@@@@@@@@@@@@@@@@ summary 214s gem2deb-test-runner FAIL non-zero exit status 1