0s autopkgtest [19:36:15]: starting date and time: 2026-02-09 19:36:15+0000 0s autopkgtest [19:36:15]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [19:36:15]: host juju-7f2275-prod-proposed-migration-environment-2; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.8gp8vd_p/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-s390x --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-2@sto01-s390x-23.secgroup --name adt-resolute-s390x-rubocop-20260209-193614-juju-7f2275-prod-proposed-migration-environment-2-0fe15b2d-8a2b-47f7-8a49-76c0e512f709 --image adt/ubuntu-resolute-s390x-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-2 --net-id=net_prod-autopkgtest-workers-s390x -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-s390x-rubocop-20260209-193614-juju-7f2275-prod-proposed-migration-environment-2-0fe15b2d-8a2b-47f7-8a49-76c0e512f709 from image adt/ubuntu-resolute-s390x-server-20260209.img (UUID 9cc437fa-9eb6-47c5-b3be-2034f91c6244)... 184s autopkgtest [19:39:19]: testbed dpkg architecture: s390x 185s autopkgtest [19:39:20]: testbed apt version: 3.1.15 186s autopkgtest [19:39:21]: @@@@@@@@@@@@@@@@@@@@ test bed setup 186s autopkgtest [19:39:21]: testbed release detected to be: None 188s autopkgtest [19:39:23]: updating testbed package index (apt update) 189s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [124 kB] 189s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 189s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 189s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 190s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [177 kB] 190s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [1655 kB] 192s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [29.4 kB] 192s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [1764 B] 192s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main s390x Packages [253 kB] 192s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/universe s390x Packages [1474 kB] 194s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse s390x Packages [8136 B] 196s Fetched 3723 kB in 6s (588 kB/s) 201s Reading package lists... 203s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 203s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 203s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 203s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 210s Reading package lists... 210s Reading package lists... 212s Building dependency tree... 212s Reading state information... 213s Calculating upgrade... 215s The following packages will be upgraded: 215s cryptsetup-bin dracut-install iproute2 iptables libcryptsetup12 libip4tc2 215s libip6tc2 libxtables12 wget 216s 9 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 216s Need to get 2585 kB of archives. 216s After this operation, 59.4 kB of additional disk space will be used. 216s Get:1 http://ftpmaster.internal/ubuntu resolute/main s390x iptables s390x 1.8.11-2ubuntu3 [384 kB] 216s Get:2 http://ftpmaster.internal/ubuntu resolute/main s390x libip4tc2 s390x 1.8.11-2ubuntu3 [25.0 kB] 216s Get:3 http://ftpmaster.internal/ubuntu resolute/main s390x libip6tc2 s390x 1.8.11-2ubuntu3 [25.0 kB] 216s Get:4 http://ftpmaster.internal/ubuntu resolute/main s390x libxtables12 s390x 1.8.11-2ubuntu3 [37.8 kB] 216s Get:5 http://ftpmaster.internal/ubuntu resolute/main s390x iproute2 s390x 6.18.0-1ubuntu1 [1199 kB] 218s Get:6 http://ftpmaster.internal/ubuntu resolute/main s390x libcryptsetup12 s390x 2:2.8.0-1ubuntu3 [273 kB] 218s Get:7 http://ftpmaster.internal/ubuntu resolute/main s390x wget s390x 1.25.0-2ubuntu4 [367 kB] 218s Get:8 http://ftpmaster.internal/ubuntu resolute/main s390x cryptsetup-bin s390x 2:2.8.0-1ubuntu3 [227 kB] 218s Get:9 http://ftpmaster.internal/ubuntu resolute/main s390x dracut-install s390x 109-11ubuntu1 [46.9 kB] 223s dpkg-preconfigure: unable to re-open stdin: No such file or directory 223s Fetched 2585 kB in 3s (900 kB/s) 231s (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 ... 88641 files and directories currently installed.) 231s Preparing to unpack .../0-iptables_1.8.11-2ubuntu3_s390x.deb ... 231s Unpacking iptables (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 233s Preparing to unpack .../1-libip4tc2_1.8.11-2ubuntu3_s390x.deb ... 233s Unpacking libip4tc2:s390x (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 235s Preparing to unpack .../2-libip6tc2_1.8.11-2ubuntu3_s390x.deb ... 236s Unpacking libip6tc2:s390x (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 240s Preparing to unpack .../3-libxtables12_1.8.11-2ubuntu3_s390x.deb ... 242s Unpacking libxtables12:s390x (1.8.11-2ubuntu3) over (1.8.11-2ubuntu2) ... 245s Preparing to unpack .../4-iproute2_6.18.0-1ubuntu1_s390x.deb ... 247s Unpacking iproute2 (6.18.0-1ubuntu1) over (6.16.0-1ubuntu3) ... 249s Preparing to unpack .../5-libcryptsetup12_2%3a2.8.0-1ubuntu3_s390x.deb ... 249s Unpacking libcryptsetup12:s390x (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 250s Preparing to unpack .../6-wget_1.25.0-2ubuntu4_s390x.deb ... 250s Unpacking wget (1.25.0-2ubuntu4) over (1.25.0-2ubuntu3) ... 251s Preparing to unpack .../7-cryptsetup-bin_2%3a2.8.0-1ubuntu3_s390x.deb ... 252s Unpacking cryptsetup-bin (2:2.8.0-1ubuntu3) over (2:2.8.0-1ubuntu2) ... 253s Preparing to unpack .../8-dracut-install_109-11ubuntu1_s390x.deb ... 253s Unpacking dracut-install (109-11ubuntu1) over (109-9ubuntu1) ... 254s Setting up libip4tc2:s390x (1.8.11-2ubuntu3) ... 255s Setting up wget (1.25.0-2ubuntu4) ... 257s Setting up libip6tc2:s390x (1.8.11-2ubuntu3) ... 257s Setting up libxtables12:s390x (1.8.11-2ubuntu3) ... 258s Setting up dracut-install (109-11ubuntu1) ... 259s Setting up libcryptsetup12:s390x (2:2.8.0-1ubuntu3) ... 259s Setting up cryptsetup-bin (2:2.8.0-1ubuntu3) ... 260s Setting up iptables (1.8.11-2ubuntu3) ... 265s Setting up iproute2 (6.18.0-1ubuntu1) ... 268s Processing triggers for man-db (2.13.1-1build1) ... 311s Processing triggers for install-info (7.2-5) ... 314s Processing triggers for libc-bin (2.42-2ubuntu4) ... 316s autopkgtest [19:41:31]: upgrading testbed (apt dist-upgrade and autopurge) 316s Reading package lists... 318s Building dependency tree... 318s Reading state information... 319s Calculating upgrade... 320s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 320s Reading package lists... 321s Building dependency tree... 321s Reading state information... 322s Solving dependencies... 323s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 330s autopkgtest [19:41:45]: testbed running kernel: Linux 6.19.0-3-generic #3-Ubuntu SMP Fri Jan 23 19:02:49 UTC 2026 331s autopkgtest [19:41:46]: @@@@@@@@@@@@@@@@@@@@ apt-source rubocop 339s Get:1 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (dsc) [2425 B] 339s Get:2 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (tar) [1029 kB] 339s Get:3 http://ftpmaster.internal/ubuntu resolute/universe rubocop 1.39.0+dfsg-1build1 (diff) [11.1 kB] 344s gpgv: Signature made Fri Jan 9 19:37:41 2026 UTC 344s gpgv: using RSA key 25E3FF2D7F469DBE7D0D4E50AFCFEC8E669CE1C2 344s gpgv: Can't check signature: No public key 344s dpkg-source: warning: cannot verify inline signature for ./rubocop_1.39.0+dfsg-1build1.dsc: no acceptable signature found 346s autopkgtest [19:42:01]: testing package rubocop version 1.39.0+dfsg-1build1 348s autopkgtest [19:42:03]: build not needed 351s autopkgtest [19:42:06]: test gem2deb-test-runner: preparing testbed 353s Reading package lists... 354s Building dependency tree... 354s Reading state information... 355s Solving dependencies... 357s The following NEW packages will be installed: 357s gem2deb-test-runner libjs-jquery libjs-jquery-easing libjs-jquery-fancybox 357s libjs-jquery-mousewheel libjs-jquery-ui libruby libruby3.3 pry racc rake 357s rubocop ruby ruby-addressable ruby-ast ruby-coderay ruby-crack ruby-csv 357s ruby-did-you-mean ruby-diff-lcs ruby-docile ruby-hashdiff ruby-json 357s ruby-method-source ruby-minitest ruby-net-telnet ruby-parallel 357s ruby-power-assert ruby-progressbar ruby-public-suffix ruby-rainbow 357s ruby-regexp-parser ruby-rspec ruby-rspec-core ruby-rspec-expectations 357s ruby-rspec-mocks ruby-rspec-support ruby-rubocop-ast ruby-ruby2-keywords 357s ruby-rubygems ruby-simplecov ruby-simplecov-html ruby-test-unit 357s ruby-unicode-display-width ruby-webmock ruby-webrick ruby-whitequark-parser 357s ruby-xmlrpc ruby3.3 rubygems-integration 357s 0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded. 357s Need to get 9805 kB of archives. 357s After this operation, 58.2 MB of additional disk space will be used. 357s Get:1 http://ftpmaster.internal/ubuntu resolute/main s390x rubygems-integration all 1.19build1 [5666 B] 357s Get:2 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-csv all 3.3.4-1 [43.0 kB] 357s Get:3 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-did-you-mean all 1.6.3-2build1 [14.9 kB] 357s Get:4 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-net-telnet all 0.2.0-1build1 [13.5 kB] 357s Get:5 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-ruby2-keywords all 0.0.5-1build1 [4398 B] 357s Get:6 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-webrick all 1.9.1-1build1 [60.9 kB] 357s Get:7 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-xmlrpc all 0.3.3-2build1 [24.9 kB] 357s Get:8 http://ftpmaster.internal/ubuntu resolute/main s390x libruby3.3 s390x 3.3.8-2ubuntu2 [5871 kB] 365s Get:9 http://ftpmaster.internal/ubuntu resolute/main s390x ruby3.3 s390x 3.3.8-2ubuntu2 [58.8 kB] 365s Get:10 http://ftpmaster.internal/ubuntu resolute/main s390x libruby s390x 1:3.3 [5162 B] 365s Get:11 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-rubygems all 3.6.7-2ubuntu2 [332 kB] 365s Get:12 http://ftpmaster.internal/ubuntu resolute/main s390x ruby s390x 1:3.3 [3668 B] 365s Get:13 http://ftpmaster.internal/ubuntu resolute/main s390x rake all 13.2.1-1build1 [45.9 kB] 365s Get:14 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-minitest all 5.26.1-1 [49.3 kB] 365s Get:15 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-power-assert all 3.0.1-1 [11.4 kB] 365s Get:16 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-test-unit all 3.6.2-1 [67.0 kB] 365s Get:17 http://ftpmaster.internal/ubuntu resolute/universe s390x gem2deb-test-runner s390x 2.2.5 [18.3 kB] 365s Get:18 http://ftpmaster.internal/ubuntu resolute/main s390x libjs-jquery all 3.7.1+dfsg+~3.5.33-1build1 [321 kB] 365s Get:19 http://ftpmaster.internal/ubuntu resolute/universe s390x libjs-jquery-easing all 12-4build1 [7078 B] 365s Get:20 http://ftpmaster.internal/ubuntu resolute/universe s390x libjs-jquery-mousewheel all 1:3.1.13-5 [6324 B] 365s Get:21 http://ftpmaster.internal/ubuntu resolute/universe s390x libjs-jquery-fancybox all 12-4build1 [45.8 kB] 365s Get:22 http://ftpmaster.internal/ubuntu resolute/universe s390x libjs-jquery-ui all 1.13.2+dfsg-1build1 [251 kB] 365s Get:23 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-coderay all 1.1.3-8build1 [78.4 kB] 365s Get:24 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-method-source all 1.1.0-1 [8502 B] 365s Get:25 http://ftpmaster.internal/ubuntu resolute/universe s390x pry all 0.15.2-1 [122 kB] 365s Get:26 http://ftpmaster.internal/ubuntu resolute/universe s390x racc all 1.8.1-2 [71.5 kB] 365s Get:27 http://ftpmaster.internal/ubuntu resolute/main s390x ruby-json s390x 2.15.2+dfsg-1 [69.5 kB] 365s Get:28 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-progressbar all 1.11.0-1 [16.3 kB] 365s Get:29 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-parallel all 1.27.0-1 [13.5 kB] 365s Get:30 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-ast all 2.4.3-1 [10.8 kB] 365s Get:31 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-whitequark-parser all 3.3.4.2-2 [511 kB] 365s Get:32 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rainbow all 3.1.1-1 [12.4 kB] 365s Get:33 http://ftpmaster.internal/ubuntu resolute-proposed/universe s390x ruby-regexp-parser all 2.11.3-1 [58.1 kB] 365s Get:34 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rubocop-ast all 1.24.0-2 [50.3 kB] 365s Get:35 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-unicode-display-width all 1.6.1-1 [8904 B] 365s Get:36 http://ftpmaster.internal/ubuntu resolute/universe s390x rubocop all 1.39.0+dfsg-1build1 [455 kB] 365s Get:37 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-public-suffix all 6.0.2-1.1 [14.6 kB] 365s Get:38 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-addressable all 2.8.7-2 [55.4 kB] 365s Get:39 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-crack all 0.4.4-4 [8764 B] 365s Get:40 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-diff-lcs all 1.5.1-1 [22.8 kB] 365s Get:41 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-docile all 1.4.1-1 [7038 B] 365s Get:42 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-hashdiff all 1.2.1-1 [13.8 kB] 365s Get:43 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rspec-support all 3.13.0c0e0m0s1-2 [29.2 kB] 365s Get:44 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rspec-core all 3.13.0c0e0m0s1-2 [164 kB] 365s Get:45 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [89.8 kB] 365s Get:46 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.0 kB] 365s Get:47 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-rspec all 3.13.0c0e0m0s1-2 [3500 B] 365s Get:48 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-simplecov-html all 0.12.3-2 [477 kB] 365s Get:49 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-simplecov all 0.22.0-2 [40.9 kB] 365s Get:50 http://ftpmaster.internal/ubuntu resolute/universe s390x ruby-webmock all 3.25.1-1 [48.0 kB] 369s Fetched 9805 kB in 8s (1157 kB/s) 370s Selecting previously unselected package rubygems-integration. 370s (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 ... 88644 files and directories currently installed.) 370s Preparing to unpack .../00-rubygems-integration_1.19build1_all.deb ... 370s Unpacking rubygems-integration (1.19build1) ... 370s Selecting previously unselected package ruby-csv. 370s Preparing to unpack .../01-ruby-csv_3.3.4-1_all.deb ... 370s Unpacking ruby-csv (3.3.4-1) ... 370s Selecting previously unselected package ruby-did-you-mean. 370s Preparing to unpack .../02-ruby-did-you-mean_1.6.3-2build1_all.deb ... 370s Unpacking ruby-did-you-mean (1.6.3-2build1) ... 370s Selecting previously unselected package ruby-net-telnet. 370s Preparing to unpack .../03-ruby-net-telnet_0.2.0-1build1_all.deb ... 370s Unpacking ruby-net-telnet (0.2.0-1build1) ... 370s Selecting previously unselected package ruby-ruby2-keywords. 370s Preparing to unpack .../04-ruby-ruby2-keywords_0.0.5-1build1_all.deb ... 370s Unpacking ruby-ruby2-keywords (0.0.5-1build1) ... 371s Selecting previously unselected package ruby-webrick. 371s Preparing to unpack .../05-ruby-webrick_1.9.1-1build1_all.deb ... 371s Unpacking ruby-webrick (1.9.1-1build1) ... 371s Selecting previously unselected package ruby-xmlrpc. 371s Preparing to unpack .../06-ruby-xmlrpc_0.3.3-2build1_all.deb ... 371s Unpacking ruby-xmlrpc (0.3.3-2build1) ... 371s Selecting previously unselected package libruby3.3:s390x. 371s Preparing to unpack .../07-libruby3.3_3.3.8-2ubuntu2_s390x.deb ... 371s Unpacking libruby3.3:s390x (3.3.8-2ubuntu2) ... 374s Selecting previously unselected package ruby3.3. 374s Preparing to unpack .../08-ruby3.3_3.3.8-2ubuntu2_s390x.deb ... 374s Unpacking ruby3.3 (3.3.8-2ubuntu2) ... 374s Selecting previously unselected package libruby:s390x. 374s Preparing to unpack .../09-libruby_1%3a3.3_s390x.deb ... 374s Unpacking libruby:s390x (1:3.3) ... 374s Selecting previously unselected package ruby-rubygems. 374s Preparing to unpack .../10-ruby-rubygems_3.6.7-2ubuntu2_all.deb ... 374s Unpacking ruby-rubygems (3.6.7-2ubuntu2) ... 374s Selecting previously unselected package ruby. 375s Preparing to unpack .../11-ruby_1%3a3.3_s390x.deb ... 375s Unpacking ruby (1:3.3) ... 375s Selecting previously unselected package rake. 375s Preparing to unpack .../12-rake_13.2.1-1build1_all.deb ... 375s Unpacking rake (13.2.1-1build1) ... 375s Selecting previously unselected package ruby-minitest. 375s Preparing to unpack .../13-ruby-minitest_5.26.1-1_all.deb ... 375s Unpacking ruby-minitest (5.26.1-1) ... 375s Selecting previously unselected package ruby-power-assert. 375s Preparing to unpack .../14-ruby-power-assert_3.0.1-1_all.deb ... 375s Unpacking ruby-power-assert (3.0.1-1) ... 375s Selecting previously unselected package ruby-test-unit. 375s Preparing to unpack .../15-ruby-test-unit_3.6.2-1_all.deb ... 375s Unpacking ruby-test-unit (3.6.2-1) ... 375s Selecting previously unselected package gem2deb-test-runner. 375s Preparing to unpack .../16-gem2deb-test-runner_2.2.5_s390x.deb ... 375s Unpacking gem2deb-test-runner (2.2.5) ... 376s Selecting previously unselected package libjs-jquery. 376s Preparing to unpack .../17-libjs-jquery_3.7.1+dfsg+~3.5.33-1build1_all.deb ... 376s Unpacking libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 376s Selecting previously unselected package libjs-jquery-easing. 376s Preparing to unpack .../18-libjs-jquery-easing_12-4build1_all.deb ... 376s Unpacking libjs-jquery-easing (12-4build1) ... 376s Selecting previously unselected package libjs-jquery-mousewheel. 376s Preparing to unpack .../19-libjs-jquery-mousewheel_1%3a3.1.13-5_all.deb ... 376s Unpacking libjs-jquery-mousewheel (1:3.1.13-5) ... 376s Selecting previously unselected package libjs-jquery-fancybox. 376s Preparing to unpack .../20-libjs-jquery-fancybox_12-4build1_all.deb ... 376s Unpacking libjs-jquery-fancybox (12-4build1) ... 376s Selecting previously unselected package libjs-jquery-ui. 376s Preparing to unpack .../21-libjs-jquery-ui_1.13.2+dfsg-1build1_all.deb ... 376s Unpacking libjs-jquery-ui (1.13.2+dfsg-1build1) ... 376s Selecting previously unselected package ruby-coderay. 376s Preparing to unpack .../22-ruby-coderay_1.1.3-8build1_all.deb ... 376s Unpacking ruby-coderay (1.1.3-8build1) ... 377s Selecting previously unselected package ruby-method-source. 377s Preparing to unpack .../23-ruby-method-source_1.1.0-1_all.deb ... 377s Unpacking ruby-method-source (1.1.0-1) ... 377s Selecting previously unselected package pry. 377s Preparing to unpack .../24-pry_0.15.2-1_all.deb ... 377s Unpacking pry (0.15.2-1) ... 378s Selecting previously unselected package racc. 378s Preparing to unpack .../25-racc_1.8.1-2_all.deb ... 378s Unpacking racc (1.8.1-2) ... 378s Selecting previously unselected package ruby-json:s390x. 378s Preparing to unpack .../26-ruby-json_2.15.2+dfsg-1_s390x.deb ... 378s Unpacking ruby-json:s390x (2.15.2+dfsg-1) ... 378s Selecting previously unselected package ruby-progressbar. 378s Preparing to unpack .../27-ruby-progressbar_1.11.0-1_all.deb ... 378s Unpacking ruby-progressbar (1.11.0-1) ... 378s Selecting previously unselected package ruby-parallel. 379s Preparing to unpack .../28-ruby-parallel_1.27.0-1_all.deb ... 379s Unpacking ruby-parallel (1.27.0-1) ... 379s Selecting previously unselected package ruby-ast. 379s Preparing to unpack .../29-ruby-ast_2.4.3-1_all.deb ... 379s Unpacking ruby-ast (2.4.3-1) ... 379s Selecting previously unselected package ruby-whitequark-parser. 379s Preparing to unpack .../30-ruby-whitequark-parser_3.3.4.2-2_all.deb ... 379s Unpacking ruby-whitequark-parser (3.3.4.2-2) ... 380s Selecting previously unselected package ruby-rainbow. 380s Preparing to unpack .../31-ruby-rainbow_3.1.1-1_all.deb ... 380s Unpacking ruby-rainbow (3.1.1-1) ... 380s Selecting previously unselected package ruby-regexp-parser. 380s Preparing to unpack .../32-ruby-regexp-parser_2.11.3-1_all.deb ... 380s Unpacking ruby-regexp-parser (2.11.3-1) ... 380s Selecting previously unselected package ruby-rubocop-ast. 380s Preparing to unpack .../33-ruby-rubocop-ast_1.24.0-2_all.deb ... 380s Unpacking ruby-rubocop-ast (1.24.0-2) ... 381s Selecting previously unselected package ruby-unicode-display-width. 381s Preparing to unpack .../34-ruby-unicode-display-width_1.6.1-1_all.deb ... 381s Unpacking ruby-unicode-display-width (1.6.1-1) ... 381s Selecting previously unselected package rubocop. 381s Preparing to unpack .../35-rubocop_1.39.0+dfsg-1build1_all.deb ... 381s Unpacking rubocop (1.39.0+dfsg-1build1) ... 382s Selecting previously unselected package ruby-public-suffix. 382s Preparing to unpack .../36-ruby-public-suffix_6.0.2-1.1_all.deb ... 382s Unpacking ruby-public-suffix (6.0.2-1.1) ... 382s Selecting previously unselected package ruby-addressable. 382s Preparing to unpack .../37-ruby-addressable_2.8.7-2_all.deb ... 382s Unpacking ruby-addressable (2.8.7-2) ... 383s Selecting previously unselected package ruby-crack. 383s Preparing to unpack .../38-ruby-crack_0.4.4-4_all.deb ... 383s Unpacking ruby-crack (0.4.4-4) ... 383s Selecting previously unselected package ruby-diff-lcs. 383s Preparing to unpack .../39-ruby-diff-lcs_1.5.1-1_all.deb ... 383s Unpacking ruby-diff-lcs (1.5.1-1) ... 383s Selecting previously unselected package ruby-docile. 383s Preparing to unpack .../40-ruby-docile_1.4.1-1_all.deb ... 383s Unpacking ruby-docile (1.4.1-1) ... 383s Selecting previously unselected package ruby-hashdiff. 383s Preparing to unpack .../41-ruby-hashdiff_1.2.1-1_all.deb ... 383s Unpacking ruby-hashdiff (1.2.1-1) ... 383s Selecting previously unselected package ruby-rspec-support. 383s Preparing to unpack .../42-ruby-rspec-support_3.13.0c0e0m0s1-2_all.deb ... 383s Unpacking ruby-rspec-support (3.13.0c0e0m0s1-2) ... 383s Selecting previously unselected package ruby-rspec-core. 383s Preparing to unpack .../43-ruby-rspec-core_3.13.0c0e0m0s1-2_all.deb ... 383s Unpacking ruby-rspec-core (3.13.0c0e0m0s1-2) ... 383s Selecting previously unselected package ruby-rspec-expectations. 384s Preparing to unpack .../44-ruby-rspec-expectations_3.13.0c0e0m0s1-2_all.deb ... 384s Unpacking ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 384s Selecting previously unselected package ruby-rspec-mocks. 384s Preparing to unpack .../45-ruby-rspec-mocks_3.13.0c0e0m0s1-2_all.deb ... 384s Unpacking ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 384s Selecting previously unselected package ruby-rspec. 384s Preparing to unpack .../46-ruby-rspec_3.13.0c0e0m0s1-2_all.deb ... 384s Unpacking ruby-rspec (3.13.0c0e0m0s1-2) ... 384s Selecting previously unselected package ruby-simplecov-html. 384s Preparing to unpack .../47-ruby-simplecov-html_0.12.3-2_all.deb ... 384s Unpacking ruby-simplecov-html (0.12.3-2) ... 384s Selecting previously unselected package ruby-simplecov. 384s Preparing to unpack .../48-ruby-simplecov_0.22.0-2_all.deb ... 384s Unpacking ruby-simplecov (0.22.0-2) ... 384s Selecting previously unselected package ruby-webmock. 385s Preparing to unpack .../49-ruby-webmock_3.25.1-1_all.deb ... 385s Unpacking ruby-webmock (3.25.1-1) ... 385s Setting up ruby-rainbow (3.1.1-1) ... 385s Setting up ruby-ruby2-keywords (0.0.5-1build1) ... 385s Setting up ruby-regexp-parser (2.11.3-1) ... 385s Setting up ruby-power-assert (3.0.1-1) ... 385s Setting up ruby-hashdiff (1.2.1-1) ... 385s Setting up ruby-public-suffix (6.0.2-1.1) ... 385s Setting up libjs-jquery-mousewheel (1:3.1.13-5) ... 385s Setting up rubygems-integration (1.19build1) ... 385s Setting up ruby-minitest (5.26.1-1) ... 385s Setting up ruby-method-source (1.1.0-1) ... 385s Setting up ruby-test-unit (3.6.2-1) ... 385s Setting up ruby-ast (2.4.3-1) ... 385s Setting up ruby-net-telnet (0.2.0-1build1) ... 385s Setting up ruby-csv (3.3.4-1) ... 385s Setting up ruby-rspec-support (3.13.0c0e0m0s1-2) ... 385s Setting up ruby-webrick (1.9.1-1build1) ... 385s Setting up ruby-progressbar (1.11.0-1) ... 385s Setting up ruby-docile (1.4.1-1) ... 385s Setting up libjs-jquery (3.7.1+dfsg+~3.5.33-1build1) ... 385s Setting up ruby-did-you-mean (1.6.3-2build1) ... 385s Setting up ruby-xmlrpc (0.3.3-2build1) ... 385s Setting up libjs-jquery-easing (12-4build1) ... 385s Setting up ruby-addressable (2.8.7-2) ... 385s Setting up libjs-jquery-fancybox (12-4build1) ... 385s Setting up ruby-parallel (1.27.0-1) ... 385s Setting up libjs-jquery-ui (1.13.2+dfsg-1build1) ... 385s Setting up rake (13.2.1-1build1) ... 385s Setting up libruby3.3:s390x (3.3.8-2ubuntu2) ... 385s Setting up ruby-rubygems (3.6.7-2ubuntu2) ... 385s Setting up ruby3.3 (3.3.8-2ubuntu2) ... 385s Setting up libruby:s390x (1:3.3) ... 385s Setting up ruby (1:3.3) ... 385s Setting up racc (1.8.1-2) ... 385s Setting up ruby-json:s390x (2.15.2+dfsg-1) ... 385s Setting up ruby-coderay (1.1.3-8build1) ... 385s Setting up ruby-rspec-core (3.13.0c0e0m0s1-2) ... 385s Setting up ruby-unicode-display-width (1.6.1-1) ... 385s Setting up pry (0.15.2-1) ... 385s Setting up ruby-diff-lcs (1.5.1-1) ... 385s Setting up ruby-whitequark-parser (3.3.4.2-2) ... 385s Setting up ruby-simplecov-html (0.12.3-2) ... 385s Setting up ruby-crack (0.4.4-4) ... 385s Setting up gem2deb-test-runner (2.2.5) ... 385s Setting up ruby-rubocop-ast (1.24.0-2) ... 385s Setting up ruby-simplecov (0.22.0-2) ... 385s Setting up ruby-rspec-expectations (3.13.0c0e0m0s1-2) ... 385s Setting up rubocop (1.39.0+dfsg-1build1) ... 385s Setting up ruby-rspec-mocks (3.13.0c0e0m0s1-2) ... 385s Setting up ruby-webmock (3.25.1-1) ... 385s Setting up ruby-rspec (3.13.0c0e0m0s1-2) ... 385s Processing triggers for libc-bin (2.42-2ubuntu4) ... 385s Processing triggers for man-db (2.13.1-1build1) ... 391s autopkgtest [19:42:46]: test gem2deb-test-runner: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 391s autopkgtest [19:42:46]: test gem2deb-test-runner: [----------------------- 394s 394s ┌──────────────────────────────────────────────────────────────────────────────┐ 394s │ Checking Rubygems dependency resolution on ruby3.3 │ 394s └──────────────────────────────────────────────────────────────────────────────┘ 394s 394s RUBYLIB=. GEM_PATH= ruby3.3 -e gem\ \"rubocop\" 394s mv lib ./.gem2deb.lib 395s mv ./.gem2deb.lib lib 395s 395s ┌──────────────────────────────────────────────────────────────────────────────┐ 395s │ Run tests for ruby3.3 from debian/ruby-tests.rake │ 395s └──────────────────────────────────────────────────────────────────────────────┘ 395s 395s RUBYLIB=. GEM_PATH= ruby3.3 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake 395s mv lib ./.gem2deb.lib 396s /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 434s 434s Randomized with seed 15202 434s 434s RuboCop::Cop::Lint::EmptyBlock 436s does not register an offense on an empty stabby lambda 436s does not register an offense when block is not empty 436s does not register an offense for empty block with inline comments 436s registers an offense for empty block within method call 436s registers an offense for an empty block given to a non-Kernel `proc` method 437s does not register an offense on an empty proc 437s does not register an offense on an empty lambda 437s does not register an offense on an empty Proc.new 437s does not register an offense for empty block with inner comments 437s does not register an offense on an empty ::Proc.new 437s when AllowEmptyLambdas is false 437s registers an offense on an empty proc 437s registers an offense on an empty ::Proc.new 437s registers an offense for an empty stabby lambda 437s registers an offense on an empty Proc.new 437s registers an offense for an empty lambda 437s when AllowComments is false 437s registers an offense for empty block with inline comments 437s registers an offense for empty block with inner comments 437s 437s RuboCop::Cop::Style::ExponentialNotation 437s EnforcedStyle is scientific 437s registers no offense for a mantissa equal to 1 437s registers no offense for a negative mantissa 437s registers no offense for a mantissa between 1 and 10 437s registers no offense for a regular float 437s registers an offense for mantissa greater than 10 437s registers no offense for a float smaller than 1 437s registers no offense for a negative exponent 437s registers an offense for mantissa smaller than 1 437s registers an offense for mantissa equal to 10 437s EnforcedStyle is engineering 437s registers no offense for a large mantissa 437s registers no offense for a regular float 437s registers an offense for mantissa smaller than -1000 437s registers an offense for exponent equal to 4 437s registers no offense for a negative mantissa 437s registers no offense for a float smaller than 1 437s registers an offense for a mantissa greater than -0.1 437s registers an offense for exponent equal to -2 437s registers no offense for a mantissa equal to 1 437s registers an offense for mantissa smaller than 0.1 437s registers no offense for a negative exponent 437s EnforcedStyle is integral 437s registers no offense for an integral mantissa 437s registers no offense for negative mantissa 437s registers no offense for a float smaller than 1 437s registers no offense for a regular float 437s registers an offense for decimal mantissa 437s registers no offense for negative exponent 437s registers an offense for mantissa divisible by 10 437s 437s RuboCop::Cop::Lint::ConstantDefinitionInBlock 437s does not register an offense for a top-level class followed by another statement 437s registers an offense for a class defined within a block followed by another statement 437s does not register an offense for a top-level constant 437s does not register an offense for a top-level module followed by another statement 437s does not register an offense for a constant with an explicit self scope followed by another statement 437s does not register an offense for a constant with an explicit top-level scope 437s registers an offense for a module defined within a block 437s does not register an offense for a top-level module 437s does not register an offense for a top-level constant followed by another statement 437s registers an offense for a constant defined within a block followed by another statement 437s registers an offense for a constant defined within a block 437s registers an offense for a class defined within a block 437s does not register an offense for a constant with an explicit self scope 437s does not register an offense for a constant with an explicit top-level scope followed by another statement 437s registers an offense for a module defined within a block followed by another statement 437s does not register an offense for a top-level class 437s when `AllowedMethods: []` 437s registers an offense for a casign used within a block of `enums` method 437s registers an offense for a module defined within a block of `enums` method 437s registers an offense for a class defined within a block of `enums` method 437s when `AllowedMethods: [enums]` 438s does not register an offense for a module defined within a block of `enums` method 438s does not register an offense for a class defined within a block of `enums` method 438s does not register an offense for a casign used within a block of `enums` method 438s 438s RuboCop::Cop::Layout::FirstArgumentIndentation 438s when EnforcedStyle is consistent_relative_to_receiver 438s when IndentationWidth:Width is 4 438s registers an offense and corrects an over-indented first argument 438s when IndentationWidth:Width is 2 438s does not view chained call as an outer method call 438s registers an offense and corrects lines affected by other offenses 438s does not register an offense when argument has expected indent width and the method is preceded by double splat 438s accepts operator calls 438s accepts method calls with no arguments 438s does not register an offense when argument has expected indent width and the method is preceded by splat 438s registers an offense and corrects an over-indented first argument 438s accepts a first argument that is not preceded by a line break 438s does not view []= as an outer method call 438s registers an offense and corrects an under-indented first argument 438s for assignment 438s register an offense and corrects a correctly indented first argument and does not care about the second argument 438s with line break 438s accepts a correctly indented first argument 438s registers an offense and corrects an under-indented first argument 438s when the receiver contains a line break 438s accepts a correctly indented first argument preceded by an empty line 438s accepts a correctly indented first argument 438s registers an offense and corrects an over-indented 1st argument 438s when preceded by a comment line 438s registers an offense and corrects an under-indented first argument 438s accepts a correctly indented first argument 438s for method calls within method calls 438s with outer parentheses 438s indents all relative to the receiver 438s registers an offense and corrects an over-indented 1st argument 438s without outer parentheses 438s accepts a first argument with special indentation 438s indents all relative to the receiver 438s when indentation width is overridden for this cop only 438s accepts a correctly indented first argument 438s registers an offense and corrects an over-indented first argument 438s when EnforcedStyle is special_for_inner_method_call 438s for method calls within method calls 438s without outer parentheses 438s accepts a first argument with special indentation 438s with outer parentheses 438s registers an offense and corrects an over-indented first argument 438s when IndentationWidth:Width is 2 438s accepts operator calls 438s registers an offense and corrects an over-indented first argument 438s does not view []= as an outer method call 438s registers an offense and corrects lines affected by another offense 438s registers an offense and corrects an over-indented first argument of `super` 438s registers an offense and corrects an over-indented first argument on a pipe method name 438s registers an offense and corrects an under-indented first argument 438s registers an offense and corrects an over-indented first argument on an alphanumeric method name 438s accepts a first argument that is not preceded by a line break 438s registers an offense and corrects an over-indented first argument on a plus sign method name 438s accepts method calls with no arguments 438s does not view chained call as an outer method call 438s when the receiver contains a line break 438s registers an offense and corrects an over-indented first argument 438s accepts a correctly indented first argument 438s accepts a correctly indented first argument preceded by an empty line 438s when preceded by a comment line 438s registers an offense and corrects an under-indented first argument 438s accepts a correctly indented first argument 438s for assignment 438s accepts a correctly indented first argument and does not care about the second argument 438s with line break 438s accepts a correctly indented first argument 438s registers an offense and corrects an under-indented first argument 438s when using safe navigation operator 438s registers an offense and corrects an under-indented 1st argument 438s for a setter call 438s accepts an unindented value 438s when IndentationWidth:Width is 4 438s registers an offense and corrects an over-indented first argument 438s when indentation width is overridden for this cop only 438s registers an offense and corrects an over-indented first argument 438s accepts a correctly indented first argument 438s when EnforcedStyle is consistent 438s for method calls within method calls 438s accepts first argument indented relative to previous line 438s registers an offense and corrects an over-indented first argument 438s when IndentationWidth:Width is 2 438s accepts operator calls 439s does not view []= as an outer method call 439s registers an offense and corrects an under-indented first argument 439s registers an offense and corrects an over-indented first argument on a pipe method name 439s registers an offense and corrects an over-indented first argument on an alphanumeric method name 439s registers an offense and corrects an over-indented first argument 439s registers an offense and corrects lines affected by another offense 439s registers an offense and corrects an over-indented first argument of `super` 439s accepts a first argument that is not preceded by a line break 439s registers an offense and corrects an over-indented first argument on a plus sign method name 439s accepts method calls with no arguments 439s does not view chained call as an outer method call 439s for a setter call 439s accepts an unindented value 439s when the receiver contains a line break 439s accepts a correctly indented first argument preceded by an empty line 439s registers an offense and corrects an over-indented first argument 439s accepts a correctly indented first argument 439s when preceded by a comment line 439s accepts a correctly indented first argument 439s registers an offense and corrects an under-indented first argument 439s for assignment 439s accepts a correctly indented first argument and does not care about the second argument 439s with line break 439s registers an offense and corrects an under-indented first argument 439s accepts a correctly indented first argument 439s when using safe navigation operator 439s registers an offense and corrects an under-indented 1st argument 439s when indentation width is overridden for this cop only 439s registers an offense and corrects an over-indented first argument 439s accepts a correctly indented first argument 439s when IndentationWidth:Width is 4 439s registers an offense and corrects an over-indented first argument 439s when EnforcedStyle is special_for_inner_method_call_in_parentheses 439s when IndentationWidth:Width is 4 439s registers an offense and corrects an over-indented first argument 439s when IndentationWidth:Width is 2 439s accepts operator calls 439s registers an offense and corrects lines affected by another offense 439s accepts a first argument that is not preceded by a line break 439s accepts method calls with no arguments 439s registers an offense and corrects an under-indented first argument 439s registers an offense and corrects an over-indented first argument on a plus sign method name 439s registers an offense and corrects an over-indented first argument 439s does not view chained call as an outer method call 439s registers an offense and corrects an over-indented first argument of `super` 439s registers an offense and corrects an over-indented first argument on an alphanumeric method name 439s registers an offense and corrects an over-indented first argument on a pipe method name 439s does not view []= as an outer method call 439s when the receiver contains a line break 439s accepts a correctly indented first argument preceded by an empty line 439s registers an offense and corrects an over-indented first argument 439s accepts a correctly indented first argument 439s when preceded by a comment line 439s registers an offense and corrects an under-indented first argument 439s accepts a correctly indented first argument 439s when using safe navigation operator 439s registers an offense and corrects an under-indented 1st argument 439s for assignment 439s accepts a correctly indented first argument and does not care about the second argument 439s with line break 439s registers an offense and corrects an under-indented first argument 439s accepts a correctly indented first argument 439s for a setter call 440s accepts an unindented value 440s for method calls within method calls 440s without outer parentheses 440s accepts a first argument with consistent style indentation 440s with outer parentheses 440s accepts a correctly indented first argument with fullwidth characters 440s registers an offense and corrects an over-indented first argument 440s accepts a correctly indented first argument in interpolation 440s registers an offense and corrects an under-indented first argument 440s when indentation width is overridden for this cop only 440s registers an offense and corrects an over-indented first argument 440s accepts a correctly indented first argument 440s 440s RuboCop::Cop::Lint::DuplicateMagicComment 440s registers an offense when frozen magic comments are duplicated 440s registers an offense when same encoding magic comments are duplicated 440s registers an offense when different encoding magic comments are duplicated 440s does not register an offense when encoding and frozen magic comments are not duplicated 440s does not register an offense when encoding magic comments are not duplicated 440s does not register an offense when frozen magic comments are not duplicated 440s registers an offense when encoding and frozen magic comments are duplicated 440s 440s RuboCop::Cop::Lint::RandOne 440s behaves like offenses 440s ::Kernel.rand(1) 440s registers an offense 440s behaves like offenses 440s Kernel.rand(-1.0) 440s registers an offense 440s behaves like no offense 440s Kernel.rand 2 440s does not register an offense 440s behaves like offenses 440s rand(-1.0) 440s registers an offense 440s behaves like no offense 440s Kernel.rand 440s does not register an offense 440s behaves like offenses 440s rand 1 440s registers an offense 440s behaves like no offense 440s ::Kernel.rand 440s does not register an offense 440s behaves like offenses 440s rand(1.0) 440s registers an offense 440s behaves like offenses 440s rand(-1) 440s registers an offense 440s behaves like no offense 440s rand(2) 440s does not register an offense 440s behaves like offenses 440s Kernel.rand(-1) 440s registers an offense 440s behaves like no offense 440s rand(-1..1) 440s does not register an offense 440s behaves like offenses 440s Kernel.rand 1.0 440s registers an offense 440s behaves like no offense 440s Kernel.rand(-1..1) 440s does not register an offense 440s behaves like no offense 440s rand 440s does not register an offense 440s behaves like offenses 440s Kernel.rand(1) 440s registers an offense 440s 440s RuboCop::Cop::AlignmentCorrector 440s #correct 440s with single-line here docs 440s does not indent body and end marker 440s with large column deltas 440s with heredoc in backticks (<<``) 440s behaves like heredoc indenter 440s does not change indentation of here doc bodies and end markers 440s with plain heredoc (<<) 440s behaves like heredoc indenter 440s does not change indentation of here doc bodies and end markers 440s simple indentation 440s with a negative column delta 440s outdents 440s with a positive column delta 440s indents 440s within string literals 440s does not insert whitespace 440s 440s RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks 440s when many arguments including hash are on multiple lines, three on same line 440s registers an offense and corrects 440s when bracket hash assignment key on multiple lines 440s does not add any offenses 440s when argument starts on same line but ends on different line 440s registers an offense and corrects 440s when there are multiple arguments on the first line 440s registers an offense and corrects starting from the 2nd argument 440s when many arguments are on multiple lines, two on same line 440s registers an offense and corrects 440s when many arguments are on multiple lines, three on same line 440s registers an offense and corrects 440s when two arguments are on next line 441s does not add any offenses 441s when one argument on same line 441s does not add any offenses 441s when bracket hash assignment on multiple lines 441s does not add any offenses 441s when second argument starts on same line as end of first 441s registers an offense and corrects 441s 441s RuboCop::Cop::Lint::UriEscapeUnescape 441s registers an offense when using `::URI.encode('http://example.com)` 441s registers an offense when using `URI.unescape(enc_uri)` 441s registers an offense when using `URI.decode(enc_uri)` 441s registers an offense when using `::URI.escape('http://example.com')` 441s registers an offense when using `URI.encode('http://example.com')` 441s registers an offense when using `::URI.decode(enc_uri)` 441s registers an offense when using `URI.escape('http://example.com')` 441s registers an offense when using `::URI.unescape(enc_uri)` 441s registers an offense when using `URI.escape('@?@!', '!?')` 441s 441s RuboCop::Formatter::ProgressFormatter 441s #report_file_as_mark 441s when a refactor convention offense is detected 441s prints "C" 441s when no offenses are detected 441s prints "." 441s when different severity offenses are detected 441s prints highest level mark 441s when a refactor severity offense is detected 441s prints "R" 441s #file_finished 441s when no offenses are detected 441s calls #report_as_with_mark 441s when any offenses are detected 441s calls #report_as_with_mark 441s #finished 441s calls #report_summary 441s when no offenses are detected 441s does not report offenses 441s when any offenses are detected 441s reports all detected offenses for all failed files 441s 441s RuboCop::Cop::Lint::Loop 441s registers an offense for begin/end/until 441s accepts loop/break unless 441s accepts loop/break if 441s registers an offense and corrects for begin/end/while 441s 441s RuboCop::Cop::Lint::NestedMethodDefinition 441s registers an offense for a nested method definition inside lambda 441s does not register offense for nested definition inside Struct.new 441s does not register an offense for a lambda definition inside method 441s does not register offense for nested definition inside Class.new 441s does not register offense for nested definition inside ::Module.new 441s does not register offense for nested definition inside ::Struct.new 441s does not register offense for nested definition inside instance_exec 441s does not register offense for nested definition inside module_exec 441s registers an offense for a nested class method definition 441s does not register offense for nested definition inside Module.new 441s registers an offense for a nested singleton method definition 442s does not register offense for nested definition inside class_eval 442s does not register offense for nested definition inside instance_eval 442s does not register offense for nested definition inside module_eval 442s registers an offense for a nested method definition 442s does not register offense for nested definition inside class_exec 442s does not register offense for nested definition inside ::Class.new 442s does not register offense for definition of method on local var 442s does not register offense for nested definition inside class shovel 442s when `AllowedPatterns: [baz]` 442s registers offense for nested definition inside `do_qux` 442s does not register offense for nested definition inside `do_baz` 442s when `AllowedMethods: [has_many]` 442s registers offense for nested definition inside `denied_method` 442s does not register offense for nested definition inside `has_many` 442s 442s RuboCop::RemoteConfig 442s .file 442s does not download the file if cache lifetime has not been reached 442s downloads the file if cache lifetime has been reached 442s downloads the file if the file does not exist 442s when the remote URL responds with not modified 442s reuses the existing cached file 442s when the remote URL responds with 500 442s raises error 442s when remote URL is configured with token auth 442s does not download the file if cache lifetime has not been reached 442s downloads the file if cache lifetime has been reached 442s downloads the file if the file does not exist 442s when the remote URL responds with 404 442s raises error 442s when the network is inaccessible 442s reuses the existing cached file 442s when the remote URL responds with redirect 442s follows the redirect and downloads the file 442s when remote URL is configured with basic auth 442s does not download the file if cache lifetime has not been reached 442s downloads the file if the file does not exist 442s downloads the file if cache lifetime has been reached 442s when the remote URL responds with 404 442s raises error 442s when the remote URL responds with 500 442s raises error 442s .inherit_from_remote 442s when the remote includes file starting with `./` 442s returns remote includes URI 442s 442s RuboCop::Cop::Metrics::BlockLength 442s accepts a block with less than 3 lines 442s accepts empty blocks 442s reports the correct beginning and end lines 442s properly counts nested blocks 442s rejects a block with more than 5 lines 442s accepts a block with multiline receiver and less than 3 lines of body 442s does not count commented lines by default 442s does not count blank lines 442s rejects brace blocks too 442s when defining a module 442s does not register an offense 442s when CountComments is enabled 442s also counts commented lines 442s when `CountAsOne` is not empty 442s folds array into one line 442s when methods to allow are defined 442s when AllowedPatterns is enabled 442s does not report an offense 442s that does not match 442s reports an offense 442s when ExcludedMethods is enabled 442s does not report an offense 442s that does not match 442s reports an offense 442s when IgnoredMethods is enabled 442s when string 442s does not report an offense 442s that does not match 442s reports an offense 442s when regex 442s does not report an offense 442s that does not match 442s reports an offense 442s when AllowedMethods is enabled 442s behaves like allow an offense on an allowed method 442s accepts the foo method with a long block 442s still rejects other methods with long blocks 442s when receiver contains whitespaces 442s allows whitespaces 442s behaves like allow an offense on an allowed method 442s still rejects other methods with long blocks 442s accepts the foo method with a long block 442s when a method is allowed, but receiver is a module 442s does not report an offense 442s when using numbered parameter 443s reports the correct beginning and end lines 443s accepts a block with less than 3 lines 443s does not count blank lines 443s rejects a block with more than 5 lines 443s when defining a Struct 443s does not register an offense 443s when defining a class 443s does not register an offense 443s 443s RuboCop::Cop::Style::BeginBlock 443s reports an offense for a BEGIN block 443s 443s RuboCop::Cop::Style::TopLevelMethodDefinition 443s registers an offense top-level methods 443s registers an offense top-level class methods 443s does not register an offense when just called method on top-level 443s does not register an offense when defined within arbitrary block 443s does not register an offense when define_method is not top-level 444s does not register an offense when using module 444s does not register an offense when using Struct 444s does not register an offense when using class 444s registers an offense when defining a top-level method after a class definition 444s top-level define_method 444s registers offense for proc argument 444s registers offense for multi-line block 444s registers offense with inline block 444s Ruby >= 2.7 444s registers offense with inline numblock 444s 444s RuboCop::Cop::Severity 444s has a few required attributes 444s is frozen 444s overrides #to_s 444s redefines == to compare severities 444s #code 444s warning 444s is expected to eq "W" 444s fatal 444s is expected to eq "F" 444s error 444s is expected to eq "E" 444s refactor 444s is expected to eq "R" 444s info 444s is expected to eq "I" 444s convention 444s is expected to eq "C" 444s Comparable 444s convention 444s is expected to be < warning 444s warning 444s is expected to be < error 444s error 444s is expected to be < fatal 444s info 444s is expected to be < refactor 444s refactor 444s is expected to be < convention 444s #level 444s info 444s is expected to eq 1 444s convention 444s is expected to eq 3 444s error 444s is expected to eq 5 444s warning 444s is expected to eq 4 444s fatal 444s is expected to eq 6 444s refactor 444s is expected to eq 2 444s constructs from code 444s E 444s is expected to eq # 444s I 444s is expected to eq # 444s W 444s is expected to eq # 444s C 444s is expected to eq # 444s R 444s is expected to eq # 444s F 444s is expected to eq # 444s 444s RuboCop::Cop::Style::PreferredHashMethods 444s with enforced `short` style 444s registers an offense for has_value? with one arg 444s accepts has_value? with no args 444s accepts has_key? with no args 444s registers an offense for has_key? with one arg 444s when using safe navigation operator 444s registers an offense for has_value? with one arg 444s with enforced `verbose` style 444s registers an offense for value? with one arg 444s accepts value? with no args 444s accepts key? with no args 444s registers an offense for key? with one arg 444s 444s RuboCop::Cop::Lint::AmbiguousOperator 444s with a keyword splat operator in the first argument 444s with parentheses around the keyword splat operator 444s does not register an offense 444s without parentheses 444s with a whitespace on the right of the operator 444s does not register an offense 444s without whitespaces on the right of the operator 444s registers an offense and corrects 444s with a splat operator in the first argument 444s without parentheses 444s with a whitespace on the right of the operator 444s does not register an offense 444s without whitespaces on the right of the operator 444s registers an offense and corrects 444s with parentheses around the splatted argument 444s does not register an offense 444s when using safe navigation operator with a unary operator 444s does not register an offense 444s with `-` unary operator in the first argument 444s without parentheses 444s with a whitespace on the right of the operator 444s does not register an offense 444s without whitespaces on the right of the operator 444s registers an offense and corrects 444s with parentheses around the operator 444s does not register an offense 444s with `+` unary operator in the first argument 444s with parentheses around the operator 444s does not register an offense 444s without parentheses 444s without whitespaces on the right of the operator when a method with no arguments is used in advance 445s registers an offense and corrects 445s with a whitespace on the right of the operator 445s does not register an offense 445s without whitespaces on the right of the operator 445s registers an offense and corrects 445s with a block ampersand in the first argument 445s without parentheses 445s without whitespaces on the right of the operator 445s registers an offense and corrects 445s with a whitespace on the right of the operator 445s does not register an offense 445s with parentheses around the block argument 445s does not register an offense 445s 445s RuboCop::Cop::Style::IpAddresses 445s does not register an offense on an empty string 445s IPv4 445s does not register an offense for an address inside larger text 445s registers an offense for a valid address 445s does not register an offense for an invalid address 445s IPv6 445s registers an offense for a very short address 445s registers an offense for the loopback address 445s does not register an offense for an invalid address 445s registers an offense for a shortened address 445s registers an offense for a valid address 445s registers an offense for an address with 0s collapsed 445s the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) 445s does not register an offense 445s when it is removed from the allowed addresses 445s registers an offense 445s with allowed addresses 445s does not register an offense for a allowed addresses 445s does not register an offense if the case differs 445s 445s RuboCop::Cop::Layout::BeginEndAlignment 445s accepts matching puts 1; begin ... end 445s accepts matching begin ... end 445s registers an offense for mismatched begin end and autocorrects 445s when EnforcedStyleAlignWith is start_of_line 445s accepts matching var = begin ... end 445s registers an offense for mismatched begin end and autocorrects 445s registers an offense for mismatched var << begin end and autocorrects 445s accepts matching puts 1; begin ... end 445s 445s RuboCop::Cop::Team 445s #cops 446s returns cop instances 446s when only some cop classes are passed to .new 446s returns only instances of the classes 446s when some classes are disabled with config 447s does not return instances of the classes 447s #inspect_file 449s returns offenses 449s when Cop#on_* raises an error 450s records Team#errors 450s when Parser reports non-fatal warning for the file 450s returns offenses from cops 451s returns Parser warning offenses 451s when a cop has no interest in the file 453s returns all offenses except the ones of the cop 453s when autocorrection is enabled 454s does autocorrection 456s still returns offenses 456s when autocorrection is enabled and file encoding is mismatch 457s no error occurs 457s when done twice 458s allows cops to get ready 458s when a correction raises an error 459s records Team#errors 459s #forces 460s returns force instances 460s when multiple cops joined a same force 460s returns only one force instance 460s when a cop joined a force 461s returns the force 461s when no cops joined force 462s returns nothing 462s #autocorrect? 462s when the option argument of .new is omitted 463s is expected to be falsey 463s when { autocorrect: true } is passed to .new 463s is expected to be truthy 463s when incompatible cops are correcting together 465s autocorrects without SyntaxError 465s #external_dependency_checksum 465s does not error with no cops 465s when a cop joins 466s returns string 466s when cop with different checksum joins 466s has a different checksum for the whole team 466s when multiple cops join 467s returns string 467s .new 468s calls mobilize when passed classes 468s accepts cops directly classes 469s #debug? 469s when the option argument of .new is omitted 469s is expected to be falsey 469s when { debug: true } is passed to .new 470s is expected to be truthy 470s 470s RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier 470s EnforcedStyle is `around` 470s accepts missing blank line when at the end of block 470s accepts missing blank line when at the end of specifying `self` 470s accepts missing blank line when at the beginning of sclass 470s ignores module_function inside a method call 470s accepts missing blank line when specifying a superclass that breaks the line 470s requires blank line before private 470s accepts missing blank line when at the beginning of sclass 470s ignores comment line before protected 470s requires blank line after, but not before, module_function when at the beginning of class/module 470s accepts missing blank line when specifying `self` that breaks the line 470s ignores an accessor with the same name as private above a method definition 470s accepts missing blank line when at the beginning of module 470s ignores comment line before module_function 470s accepts missing blank line when at the end of specifying a superclass 470s autocorrects blank line after #{access_modifier} with comment 470s requires blank line after, but not before, protected when at the beginning of class/module 470s recognizes blank lines with DOS style line endings 470s accepts missing blank line when at the beginning of class 470s requires blank line before public 471s accepts missing blank line when at the beginning of class 471s ignores public with block argument 471s autocorrects blank line after #{access_modifier} with comment 471s requires blank line when next line started with end 471s requires blank line when next line started with end 471s accepts missing blank line when specifying a superclass that breaks the line 471s accepts missing blank line when at the end of specifying a superclass 471s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 471s accepts only using access modifier 471s ignores module_function deep inside a method call 471s ignores private deep inside a method call 471s ignores private with a right-hand-side condition 471s requires blank line before module_function 471s ignores public deep inside a method call 471s accepts missing blank line when specifying `self` that breaks the line 471s accepts missing blank line when at the beginning of class 471s recognizes blank lines with DOS style line endings 471s ignores public inside a method call 471s accepts missing blank line when specifying `self` that breaks the line 471s requires blank line after protected 471s accepts missing blank line when at the beginning of file and preceded by a comment 471s accepts missing blank line when at the end of block 471s accepts missing blank line when at the end of specifying a superclass 471s requires blank line after private 471s accepts missing blank line when at the beginning of module 471s accepts missing blank line when at the end of specifying `self` 471s accepts missing blank line when at the beginning of file and preceded by a comment 471s accepts only using access modifier 471s requires blank line when next line started with end 471s accepts missing blank line when at the end of specifying `self` 471s ignores module_function with block argument 471s accepts missing blank line when at the beginning of sclass 471s accepts missing blank line when specifying `self` that breaks the line 471s accepts missing blank line when at the beginning of class 471s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 471s accepts missing blank line when specifying a superclass that breaks the line 471s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 471s accepts missing blank line when at the beginning of module 471s accepts missing blank line when at the beginning of sclass 471s accepts only using access modifier 471s requires blank line before protected 471s accepts missing blank line when at the end of specifying a superclass 471s autocorrects blank line after #{access_modifier} with comment 471s ignores protected deep inside a method call 471s requires blank line when next line started with end 471s accepts missing blank line when at the end of block 471s accepts missing blank line when specifying a superclass that breaks the line 471s accepts only using access modifier 471s accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line 471s ignores private with block argument 471s accepts missing blank line when at the beginning of module 471s requires blank line after, but not before, public when at the beginning of class/module 471s ignores module_function with a right-hand-side condition 471s autocorrects blank line after #{access_modifier} with comment 472s requires blank line after public 472s ignores comment line before private 472s ignores protected with a right-hand-side condition 472s ignores private inside a method call 472s ignores an accessor with the same name as module_function above a method definition 472s recognizes blank lines with DOS style line endings 472s accepts missing blank line when at the beginning of file and preceded by a comment 472s recognizes blank lines with DOS style line endings 472s ignores comment line before public 472s requires blank line after, but not before, private when at the beginning of class/module 472s requires blank line after module_function 472s accepts missing blank line when at the end of block 472s ignores public with a right-hand-side condition 472s ignores an accessor with the same name as public above a method definition 472s ignores protected inside a method call 472s ignores protected with block argument 472s ignores an accessor with the same name as protected above a method definition 472s accepts missing blank line when at the beginning of file and preceded by a comment 472s accepts missing blank line when at the end of specifying `self` 472s at the beginning of block 472s for blocks defined with {} 472s accepts missing blank line 472s accepts missing blank line with arguments 472s for blocks defined with do 472s requires blank line after, but not before, public 472s accepts missing blank line with arguments 472s accepts missing blank line 472s at the beginning of block 472s for blocks defined with do 472s requires blank line after, but not before, private 472s accepts missing blank line 472s accepts missing blank line with arguments 472s for blocks defined with {} 472s accepts missing blank line 472s accepts missing blank line with arguments 472s at the beginning of block 472s for blocks defined with {} 472s accepts missing blank line with arguments 472s accepts missing blank line 472s for blocks defined with do 472s requires blank line after, but not before, module_function 472s accepts missing blank line 472s accepts missing blank line with arguments 472s at the beginning of block 472s for blocks defined with do 472s requires blank line after, but not before, protected 472s accepts missing blank line 472s accepts missing blank line with arguments 472s for blocks defined with {} 472s accepts missing blank line 472s accepts missing blank line with arguments 472s Ruby 2.7 472s ignores public with numblock argument 472s registers an offense for missing around line before protected 472s ignores module_function with numblock argument 472s registers an offense for missing around line before private 472s ignores protected with numblock argument 472s ignores private with numblock argument 472s registers an offense for missing around line before module_function 472s registers an offense for missing around line before public 472s EnforcedStyle is `only_before` 472s registers an offense for blank line after protected 473s registers an offense for missing blank line before protected 473s registers an offense for blank line after private 473s does not register an offense when `end` immediately after private 473s registers an offense for missing blank line before public 473s accepts missing blank line after protected 473s accepts blank line after public 473s accepts missing blank line after private 473s registers an offense for missing blank line before private 473s does not register an offense when `end` immediately after protected 473s accepts blank line after module_function 473s registers an offense for missing blank line before module_function 473s 473s RuboCop::Cop::Offense 473s redefines == to compare offenses based on their contents 473s has a few required attributes 473s does not blow up if a message contains % 473s is frozen 473s overrides #to_s 473s offenses that span part of a line 473s highlights the first line 473s #location 473s is frozen 473s when the location is pseudo 473s returns a column length 473s returns the first line 473s returns the last column 473s returns a column range 473s returns a line 473s returns a source line 473s returns a real column 473s returns a column 473s returns the last line 473s returns a location with valid size and length 473s offenses that span multiple lines 473s highlights the first line 473s #severity_level 473s when severity is :refactor 473s is 2 473s when severity is :info 473s is 1 473s when severity is :fatal 473s is 6 473s #severity 473s is frozen 473s #cop_name 473s is frozen 473s #message 473s is frozen 473s when unknown severity is passed 473s raises error 473s #<=> 473s when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} 473s returns 1 473s when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} 473s returns 1 473s when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} 473s returns 1 473s when receiver has {:cop=>"B"} and other has {:cop=>"A"} 473s returns 1 473s when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} 473s returns 1 473s when receiver has {} and other has {} 473s returns 0 473s when receiver has {:line=>6} and other has {:line=>5} 473s returns 1 473s 473s RuboCop::Cop::InternalAffairs::NodeDestructuring 473s does not register an offense when receiver is named `array` 473s registers an offense when destructuring using a splat 473s when destructuring using `node.children` 473s registers an offense when receiver is named `send_node` 473s registers an offense when receiver is named `node` 473s 473s RuboCop::Cop::Style::ReturnNil 473s when enforced style is `return_nil` 473s does not register an offense for returning others 473s registers an offense for return 473s when enforced style is `return` 473s does not register an offense for returning others 473s does not register an offense for return nil from iterators 473s registers an offense for return nil 473s 473s RuboCop::Cop::Gemspec::DependencyVersion 473s with `EnforcedStyle: forbidden` 473s with `AllowedGems` 473s registers an offense when adding dependency by parenthesized call without version specification 473s registers an offense when adding dependency without version specification 473s using add_dependency 473s registers an offense when adding dependency with commit ref specification 473s registers an offense when adding dependency with tag specification 473s registers an offense when adding dependency by parenthesized call with version specification 473s does not register an offense when adding dependency using git option by parenthesized call without version specification 473s registers an offense when adding dependency with branch specification 473s does not register an offense when adding dependency by parenthesized call without version specification 473s registers an offense when adding dependency by parenthesized call with tag specification 473s does not register an offense when adding dependency using git option without version specification 473s does not register an offense when adding dependency without version specification 473s registers an offense when adding dependency by parenthesized call with commit ref specification 473s registers an offense when adding dependency by parenthesized call with branch specification 473s registers an offense when adding dependency with version specification 473s using add_development_dependency 473s registers an offense when adding development dependency by parenthesized call with version specification 473s does not register an offense when adding development dependency without version specification 473s registers an offense when adding development dependency with commit ref specification 473s does not register an offense when adding development dependency using git option by parenthesized call without version specification 473s registers an offense when adding development dependency by parenthesized call with branch specification 473s registers an offense when adding development dependency with branch specification 473s registers an offense when adding development dependency by parenthesized call with tag specification 473s does not register an offense when adding development dependency using git option without version specification 473s registers an offense when adding development dependency with tag specification 473s does not register an offense when adding development dependency by parenthesized call without version specification 473s registers an offense when adding development dependency with version specification 473s registers an offense when adding development dependency by parenthesized call with commit ref specification 473s using add_runtime_dependency 473s registers an offense when adding runtime dependency with branch specification 473s registers an offense when adding runtime dependency by parenthesized call with branch specification 473s registers an offense when adding runtime dependency with commit ref specification 473s registers an offense when adding runtime dependency by parenthesized call with commit ref specification 473s registers an offense when adding runtime dependency by parenthesized call with tag specification 473s does not register an offense when adding runtime dependency using git option without version specification 474s registers an offense when adding runtime dependency with tag specification 474s registers an offense when adding runtime dependency by parenthesized call with version specification 474s does not register an offense when adding runtime dependency without version specification 474s does not register an offense when adding runtime dependency by parenthesized call without version specification 474s registers an offense when adding runtime dependency with version specification 474s does not register an offense when adding runtime dependency using git option by parenthesized call without version specification 474s with `EnforcedStyle: required` 474s using add_runtime_dependency 474s does not register an offense when adding runtime dependency with version specification 474s registers an offense when adding runtime dependency using git option without version specification 474s does not register an offense when adding runtime dependency with tag specification 474s does not register an offense when adding runtime dependency by parenthesized call with commit ref specification 474s does not register an offense when adding runtime dependency by parenthesized call with tag specification 474s registers an offense when adding runtime dependency without version specification 474s registers an offense when adding runtime dependency by parenthesized call without version specification 474s does not register an offense when adding runtime dependency with branch specification 474s does not register an offense when adding runtime dependency by parenthesized call with version specification 474s does not register an offense when adding runtime dependency by parenthesized call with branch specification 474s registers an offense when adding runtime dependency using git option by parenthesized call without version specification 474s does not register an offense when adding runtime dependency with commit ref specification 474s with `AllowedGems` 474s registers an offense when adding dependency without version specification excepts allowed gems 474s registers an offense when adding dependency by parenthesized call without version specification excepts allowed gems 474s using add_dependency 474s does not register an offense when adding dependency by parenthesized call with tag specification 474s registers an offense when adding dependency using git option without version specification 474s does not register an offense when adding dependency with tag specification 474s does not register an offense when adding dependency by parenthesized call with commit ref specification 474s registers an offense when adding dependency without version specification 474s does not register an offense when adding dependency by parenthesized call with version specification 474s registers an offense when adding dependency using git option by parenthesized call without version specification 474s does not register an offense when adding dependency by parenthesized call with branch specification 474s does not register an offense when adding dependency with commit ref specification 474s registers an offense when adding dependency by parenthesized call without version specification 474s does not register an offense when adding dependency with branch specification 474s does not register an offense when adding dependency with version specification 474s using add_development_dependency 474s does not register an offense when adding development dependency with version specification 474s does not register an offense when adding development dependency with branch specification 474s registers an offense when adding development dependency without version specification 474s registers an offense when adding development dependency using git option without version specification 474s does not register an offense when adding development dependency by parenthesized call with version specification 474s does not register an offense when adding development dependency with tag specification 474s does not register an offense when adding development dependency by parenthesized call with branch specification 474s registers an offense when adding development dependency by parenthesized call without version specification 474s does not register an offense when adding development dependency with commit ref specification 474s registers an offense when adding development dependency using git option by parenthesized call without version specification 474s does not register an offense when adding development dependency by parenthesized call with commit ref specification 474s does not register an offense when adding development dependency by parenthesized call with tag specification 474s 474s RuboCop::Cop::Layout::SpaceAroundMethodCallOperator 474s does not register an offense when no method call operator 474s does not register an offense when using `__ENCODING__` 474s :: operator 474s does not register an offense if no space before `::` operator with inheritance 474s does not register an offense if no space with conditionals 474s registers an offense and corrects when multiple spaces with assignment 474s registers an offense and corrects when spaces after method call 474s registers an offense and corrects when space after last method call operator 474s registers an offense and corrects when space after method call 474s registers an offense and corrects when space around multiple method call operator 474s registers an offense and corrects when space after first operator with assignment 475s does not register an offense when no space around any `.` operators 475s does not register an offense when no space around method call 475s does not register an offense if no space before `::` operator with assignment 475s registers an offense and corrects when space around intermediate method call operator 475s when multi line method call 475s does not register an offense when no space after the `::` 475s registers an offense and corrects when space before method call 475s safe navigation operator 475s registers an offense and corrects when space after first method call operator 475s registers an offense and corrects when space before first method call operator 475s does not register an offense when no space around method call 475s does not register an offense when no space around any `.` operators 475s registers an offense and corrects when space around intermediate method call operator 475s registers an offense and corrects when space after last method call operator 475s registers an offense and corrects when space before method call 475s registers an offense and corrects when spaces after method call 475s registers an offense and corrects when spaces around method call 475s registers an offense and corrects when space after method call 475s registers an offense and corrects when space around multiple method call operator 475s registers an offense and corrects when spaces before method call 475s registers an offense and corrects when space before last method call operator 475s when multi line method call 475s registers an offense and corrects when space before method call in suffix chaining 475s registers an offense and corrects when space before method call 475s does not register an offense when no space after the `&.` 475s dot operator 475s does not register an offense when no space around any `.` operators 475s does not register an offense when no space around method call 475s registers an offense and corrects when space before first method call operator 475s registers an offense and corrects when space after method call 475s registers an offense and corrects when spaces after `Proc#call` shorthand call 475s registers an offense and corrects when spaces before method call 475s registers an offense and corrects when space after last method call operator 475s registers an offense and corrects when spaces around method call 475s registers an offense and corrects when space around multiple method call operator 475s registers an offense and corrects when space around intermediate method call operator 475s registers an offense and corrects when space before last method call operator 475s registers an offense and corrects when spaces after method call 475s registers an offense and corrects when space before method call 475s registers an offense and corrects when space after first method call operator 475s when multi line method call 475s registers an offense and corrects when space before method call 475s does not register an offense when no space after the `.` 475s registers an offense and corrects when space before method call in suffix chaining 475s when there is a space between `.` operator and a comment 475s registers an offense when there is a space before `.` 475s does not register an offense when there is not a space before `.` 475s 475s RuboCop::Cop::Lint::FlipFlop 475s registers an offense for inclusive flip-flops 475s registers an offense for exclusive flip-flops 475s 475s RuboCop::Formatter::GitHubActionsFormatter 475s #finished 475s when message contains % 475s escapes message 475s when fail level is defined 475s reports offenses above or at fail level as errors 475s reports offenses below fail level as warnings 475s when no offenses are detected 475s does not print anything 475s when file is relative to the current directory 475s reports offenses as error with the relative path 475s when offenses are detected 475s reports offenses as errors 475s 475s RuboCop::Cop::Style::NestedModifier 476s autocorrects unless with a comparison operator + if 476s autocorrects unless + if 476s adds parentheses when needed in autocorrection 476s adds parentheses to method arguments when needed in autocorrection 476s does not add redundant parentheses in autocorrection 476s autocorrects if + unless 476s registers one offense for more than two modifiers 476s autocorrects if + if 476s autocorrects unless + unless 476s while 476s behaves like not correctable 476s does not autocorrect when while is the outer modifier 476s does not autocorrect when while is the inner modifier 476s until 476s behaves like not correctable 476s does not autocorrect when until is the outer modifier 476s does not autocorrect when until is the inner modifier 476s 476s RuboCop::Cop::Layout::SpaceInsideParens 476s when EnforcedStyle is compact 476s accepts three consecutive left parentheses 476s registers an offense in block parameter list with no spaces 476s accepts parentheses with line break 476s registers multiple offense for a missing and extra space between consecutive brackets 476s registers an offense for no spaces inside parens 476s accepts two consecutive left parentheses 476s accepts empty parentheses without spaces 476s accepts two consecutive right parentheses 476s registers an offense for no space around heredoc start 476s accepts parentheses with spaces 476s registers an offense for space between consecutive brackets 476s accepts parentheses with comment and line break 476s registers an offense for space inside empty parens 476s accepts three consecutive right parentheses 476s when EnforcedStyle is space 476s accepts empty parentheses without spaces 476s registers an offense for no spaces inside parens 476s registers an offense for no space around heredoc start 476s accepts parentheses with comment and line break 476s registers an offense in block parameter list with no spaces 476s accepts parentheses with line break 476s accepts parentheses with spaces 476s registers an offense for space inside empty parens 476s when EnforcedStyle is no_space 476s accepts parentheses with comment and line break 476s accepts parentheses with line break 476s registers an offense for spaces inside parens 476s accepts parentheses in block parameter list 476s registers an offense for space around heredoc start 476s accepts parentheses with no spaces 476s 476s RuboCop::Cop::Style::RedundantInterpolation 476s accepts strings implicitly concatenated with a later string 476s registers an offense for "#{number}" 476s registers an offense for "#{1 + 1; 2 + 2}" 476s registers an offense for "#{$var}" 476s registers an offense for "#{do_something(42)}" 476s accepts strings with characters before the interpolation 476s registers an offense for "#@var" 476s registers an offense for "%Q(#{1 + 1})" 476s registers an offense for "#{do_something 42}" 476s registers an offense for "#{@var}" 476s registers an offense for ["#{@var}"] 476s registers an offense for "%|#{1 + 1}|" 476s registers an offense for "#{var}" 476s registers an offense for "#$1" 476s registers an offense for "#$var" 476s registers an offense for "#{@@var}" 476s registers an offense for "#@@var" 477s accepts strings that are part of a %W() 477s accepts strings with characters after the interpolation 477s registers an offense for "#{$+}" 477s registers an offense for "#$+" 477s registers an offense for "#{$1}" 477s accepts strings implicitly concatenated with an earlier string 477s registers an offense for "#{foo.do_something 42}" 477s registers an offense for "#{1 + 1}" 477s 477s RuboCop::Cop::Style::HashEachMethods 477s when node matches a keys#each or values#each 477s when `AllowedReceivers: ['execute']` 477s does not register an offense when receiver is `execute` method 477s registers an offense when receiver is not allowed name 477s does not register an offense when receiver is `execute` method with a symbol proc argument 477s does not register an offense when receiver is `execute` variable 477s when receiver is a send 477s registers offense, autocorrects foo#values.each to foo#each_value with a symbol proc argument 477s registers offense, autocorrects foo#values.each to foo#each_value 477s registers offense, autocorrects foo#keys.each to foo#each_key 477s does not register an offense for Hash#each_value 477s registers offense, autocorrects foo#keys.each to foo#each_key with a symbol proc argument 477s does not register an offense for foo#each_key 477s Ruby 2.7 477s registers offense, autocorrects foo#keys.each to foo#each_key with numblock 477s when receiver is a hash literal 477s registers offense, autocorrects {}#keys.each with {}#each_key 477s registers offense, autocorrects {}#values.each with {}#each_value 477s registers offense, autocorrects {}#values.each to {}#each_value with a symbol proc argument 477s registers offense, autocorrects {}#keys.each to {}#each_key with a symbol proc argument 477s does not register an offense for {}#each_value 477s does not register an offense for {}#each_key 477s when receiver is implicit 477s does not register an offense for `values.each` with a symbol proc argument 477s does not register an offense for each_key 477s does not register an offense for `keys.each` 477s does not register an offense for `keys.each` with a symbol proc argument 477s does not register an offense for `values.each` 477s does not register an offense for each_value 477s 477s RuboCop::Cop::Lint::LambdaWithoutLiteralBlock 477s does not register an offense when using `lambda.call` 477s registers and corrects an offense when using lambda with `&Proc.new {}` block argument 477s does not register an offense when using lambda with a symbol proc 477s registers and corrects an offense when using lambda with a proc variable block argument 477s registers and corrects an offense when using lambda with `&proc {}` block argument 477s does not register an offense when using lambda with a literal block 477s 477s RuboCop::Cop::Style::RedundantFetchBlock 477s with SafeForConstants: true 477s registers an offense and corrects when using `#fetch` with Float in the block 477s registers an offense and corrects when using `#fetch` with Rational in the block 477s registers an offense and corrects when using `#fetch` with constant in the block 477s registers an offense and corrects when using `#fetch` with Integer in the block 477s registers an offense and corrects when using `#fetch` with Complex in the block 477s does not register an offense when using `#fetch` with an argument in the block 477s does not register an offense when using `#fetch` with String in the block and strings are not frozen 477s does not register an offense when using `#fetch` with interpolated Symbol in the block 477s registers an offense and corrects when using `#fetch` with empty block 477s registers an offense and corrects when using `#fetch` with String in the block and strings are frozen 477s does not register an offense when using `#fetch` with argument fallback 477s does not register an offense when using `#fetch` with `Rails.cache` 477s registers an offense and corrects when using `#fetch` with Symbol in the block 477s with SafeForConstants: false 477s does not register an offense when using `#fetch` with constant in the block 477s 477s RuboCop::Cop::Style::EmptyElse 477s configured to warn on nil in else 477s given a case statement 477s with an else-clause with side-effects 477s doesn't register an offense 477s with a completely empty else-clause 477s doesn't register an offense 477s with no else-clause 477s doesn't register an offense 477s with an else-clause containing only the literal nil 477s when the result is assigned to a variable 477s behaves like autocorrect 477s MissingElse is both 477s does not autocorrect 477s MissingElse is if 477s does autocorrection 477s MissingElse is disabled 477s does autocorrection 477s MissingElse is case 477s does not autocorrect 477s using semicolons 477s behaves like autocorrect 477s MissingElse is if 477s does autocorrection 477s MissingElse is case 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s MissingElse is disabled 478s does autocorrection 478s given an unless-statement 478s with an else-clause containing only the literal nil 478s behaves like autocorrect 478s MissingElse is both 478s does not autocorrect 478s MissingElse is disabled 478s does autocorrection 478s MissingElse is if 478s does not autocorrect 478s MissingElse is case 478s does autocorrection 478s with a completely empty else-clause 478s doesn't register an offense 478s with an else-clause with side-effects 478s doesn't register an offense 478s with no else-clause 478s doesn't register an offense 478s given an if-statement 478s with no else-clause 478s doesn't register an offense 478s with an else-clause containing only the literal nil 478s when the result is assigned to a variable 478s behaves like autocorrect 478s MissingElse is disabled 478s does autocorrection 478s MissingElse is case 478s does autocorrection 478s MissingElse is if 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s when standalone 478s behaves like autocorrect 478s MissingElse is case 478s does autocorrection 478s MissingElse is if 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s MissingElse is disabled 478s does autocorrection 478s with an else-clause containing only the literal nil using semicolons 478s with one elsif 478s behaves like autocorrect 478s MissingElse is if 478s does not autocorrect 478s MissingElse is case 478s does autocorrection 478s MissingElse is both 478s does not autocorrect 478s MissingElse is disabled 478s does autocorrection 478s with multiple elsifs 478s behaves like autocorrect 478s MissingElse is disabled 478s does autocorrection 478s MissingElse is case 478s does autocorrection 478s MissingElse is if 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s with an else-clause with side-effects 478s doesn't register an offense 478s with a completely empty else-clause 478s doesn't register an offense 478s when `AllowComments: true` 478s given a case statement 478s with not comment and nil else-clause 478s registers an offense 478s with comment and empty else-clause 478s doesn't register an offense 478s with not comment and empty else-clause 478s registers an offense 478s with comment and nil else-clause 478s doesn't register an offense 478s given an unless-statement 478s with not comment and empty else-clause 478s registers an offense 478s with comment and empty else-clause 478s doesn't register an offense 478s with not comment and nil else-clause 478s registers an offense 478s with comment and nil else-clause 478s doesn't register an offense 478s given an if-statement 478s with comment and nil else-clause 478s doesn't register an offense 478s with not comment and nil else-clause 478s registers an offense 478s with comment and empty else-clause 478s doesn't register an offense 478s with not comment and empty else-clause 478s registers an offense 478s with nested if and case statement 478s behaves like autocorrect 478s MissingElse is disabled 478s does autocorrection 478s MissingElse is case 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s MissingElse is if 478s does autocorrection 478s configured to warn on empty else and nil in else 478s given an if-statement 478s with a completely empty else-clause 478s behaves like autocorrect 478s MissingElse is if 478s does not autocorrect 478s MissingElse is both 478s does not autocorrect 478s MissingElse is disabled 478s does autocorrection 478s MissingElse is case 479s does autocorrection 479s with an else-clause with side-effects 479s doesn't register an offense 479s with an else-clause containing only the literal nil 479s with multiple elsifs 479s behaves like autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is case 479s does autocorrection 479s MissingElse is both 479s does not autocorrect 479s MissingElse is if 479s does not autocorrect 479s with one elsif 479s behaves like autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is if 479s does not autocorrect 479s MissingElse is both 479s does not autocorrect 479s MissingElse is case 479s does autocorrection 479s with no else-clause 479s doesn't register an offense 479s given an unless-statement 479s with an else-clause containing only the literal nil 479s behaves like autocorrect 479s MissingElse is case 479s does autocorrection 479s MissingElse is if 479s does not autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is both 479s does not autocorrect 479s with no else-clause 479s doesn't register an offense 479s with an else-clause with side-effects 479s doesn't register an offense 479s with a completely empty else-clause 479s behaves like autocorrect 479s MissingElse is both 479s does not autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is if 479s does not autocorrect 479s MissingElse is case 479s does autocorrection 479s given a case statement 479s with an else-clause containing only the literal nil 479s behaves like autocorrect 479s MissingElse is both 479s does not autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is case 479s does not autocorrect 479s MissingElse is if 479s does autocorrection 479s with an else-clause with side-effects 479s doesn't register an offense 479s with no else-clause 479s doesn't register an offense 479s with a completely empty else-clause 479s behaves like autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is both 479s does not autocorrect 479s MissingElse is case 479s does not autocorrect 479s MissingElse is if 479s does autocorrection 479s configured to warn on empty else 479s given an unless-statement 479s with an else-clause containing only the literal nil 479s doesn't register an offense 479s with a completely empty else-clause 479s behaves like autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is both 479s does not autocorrect 479s MissingElse is case 479s does autocorrection 479s MissingElse is if 479s does not autocorrect 479s with an else-clause with side-effects 479s doesn't register an offense 479s with no else-clause 479s doesn't register an offense 479s given an if-statement 479s with an else-clause containing only the literal nil 479s doesn't register an offense 479s with an else-clause with side-effects 479s doesn't register an offense 479s with an empty comment 479s does not autocorrect 479s in an if-statement 479s behaves like autocorrect 479s MissingElse is if 479s does not autocorrect 479s MissingElse is both 479s does not autocorrect 479s MissingElse is case 479s does autocorrection 479s MissingElse is disabled 479s does autocorrection 479s with no else-clause 479s doesn't register an offense 479s with a completely empty else-clause 479s not using semicolons 479s behaves like autocorrect 479s MissingElse is if 479s does not autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is case 479s does autocorrection 479s MissingElse is both 479s does not autocorrect 479s using semicolons 479s behaves like autocorrect 479s MissingElse is both 479s does not autocorrect 479s MissingElse is case 479s does autocorrection 479s MissingElse is if 479s does not autocorrect 479s MissingElse is disabled 479s does autocorrection 479s given a case statement 479s with an else-clause containing only the literal nil 479s doesn't register an offense 479s with no else-clause 479s doesn't register an offense 479s with a completely empty else-clause 479s behaves like autocorrect 479s MissingElse is disabled 479s does autocorrection 479s MissingElse is if 479s does autocorrection 479s MissingElse is case 479s does not autocorrect 479s MissingElse is both 479s does not autocorrect 479s with an else-clause with side-effects 479s doesn't register an offense 479s 479s RuboCop::Cop::Layout::LeadingCommentSpace 479s accepts sprockets directives 479s does not register an offense for only #s 479s does not register an offense for #! on first line 479s does not register an offense for # followed by no text 479s registers an offense and corrects comment without leading space 479s registers an offense and corrects #! after the first line 479s does not register an offense for more than one space 479s does not register an offense for more than one # 479s accepts =begin/=end comments 479s RDoc syntax 480s does not register an offense when using `#++` or `#--` 480s registers an offense when starting `:` 480s Gemfile Ruby comment 480s when config option is enabled 480s file not named Gemfile 480s registers an offense when using ruby config as comment 480s file named Gemfile 480s does not register an offense when using ruby config as comment 480s when config option is disabled 480s registers an offense when using ruby config as comment 480s file named config.ru 480s does not register an offense for #\ on first line 480s registers an offense and corrects for #\ after the first line 480s Doxygen style 480s when config option is enabled 480s does not register offense when using Doxygen style 480s when config option is disabled 480s registers an offense and corrects using Doxygen style 480s file not named config.ru 480s registers an offense and corrects #\ after the first line 480s registers an offense and corrects #\ on first line 480s 480s RuboCop::Cop::Layout::TrailingEmptyLines 480s when EnforcedStyle is final_blank_line 480s registers an offense for multiple blank lines in an empty file 480s registers an offense for final newline 480s registers an offense for multiple trailing blank lines 480s registers an offense for no final newline 480s accepts final blank line 480s autocorrects missing blank line 480s autocorrects missing newline 480s when EnforcedStyle is final_newline 480s accepts final newline 480s registers an offense for no final newline after assignment 480s registers an offense for multiple trailing blank lines 480s accepts an empty file 480s autocorrects even if some lines have space 480s registers an offense for no final newline after block comment 480s accepts final blank lines if they come after __END__ in empty file 480s registers an offense for multiple blank lines in an empty file 480s accepts final blank lines if they come after __END__ 480s 480s RuboCop::Cop::Style::MixinUsage 480s does not register an offense when using inside nested module 480s extend 480s does not register an offense when using inside class 480s registers an offense when using outside class 480s prepend 480s does not register an offense when using inside class 480s registers an offense when using outside class 480s include 480s does not register an offense when using `include` in method definition inside class 480s registers an offense when using outside class (used below) 480s registers an offense when using `include` in method definition outside class or module 480s does not register an offense when using inside block and `if` condition is after `include` 480s does not register an offense when using inside class 480s doesn't register an offense when `include` call is a method argument 480s does not register an offense when using `include` in method definition inside module 480s registers an offense when using outside class (used above) 480s does not register an offense when using inside block 480s registers an offense when using only `include` statement 480s does not register an offense when using outside class 480s Multiple definition classes in one 480s does not register an offense when using inside class 480s Nested module 480s registers an offense when using outside class 480s 480s RuboCop::Cop::Layout::SpaceInLambdaLiteral 480s when configured to enforce spaces 480s registers an offense and corrects no space in the inner nested lambda 480s registers an offense and corrects no space in both lambdas when nested 480s does not register an offense for multi-line lambdas 480s does not register an offense for a space between -> and ( 480s does not register an offense for no space between -> and { 480s registers an offense and corrects no space between -> and ( 480s registers an offense and corrects no space in the outer nested lambda 480s when configured to enforce no space 480s registers an offense and corrects a space in the inner nested lambda 480s register offenses and correct spaces in both lambdas when nested 480s does not register an offense for no space between -> and ( 480s does not register an offense for a space between -> and { 480s does not register an offense for multi-line lambdas 480s registers an offense and corrects spaces between -> and ( 480s registers an offense and corrects a space between -> and ( 480s registers an offense and corrects a space in the outer nested lambda 480s 480s RuboCop::Cop::Metrics::ClassLength 480s reports the correct beginning and end lines 480s does not count blank lines 480s rejects a class with more than 5 lines 480s accepts a class with less than 5 lines 480s accepts empty classes 480s accepts a class with 5 lines 480s when inspecting a class defined with Class.new 480s registers an offense 480s when using numbered parameter 480s when inspecting a class defined with Struct.new 480s registers an offense when multiple assignments to constants 480s registers an offense 480s registers an offense when inspecting or equals (`||=`) for constant 480s when inspecting a class defined with ::Class.new 480s registers an offense 480s when inspecting a class defined with Class.new 480s registers an offense 480s when CountComments is disabled 480s accepts classes that only contain comments 480s when inspecting a class defined with Struct.new 480s registers an offense when multiple assignments to constants 480s registers an offense when inspecting or equals (`||=`) for constant 480s registers an offense 480s when CountComments is enabled 480s also counts commented lines 480s registers an offense for a class that only contains comments 480s when overlapping constant assignments 480s does not register an offense 480s when inspecting a class defined with ::Class.new 480s registers an offense 480s when `CountAsOne` is not empty 480s folds array into one line 480s when a class has inner classes 480s does not count lines of inner classes 480s rejects a class with 6 lines that belong to the class directly 480s 480s RuboCop::Cop::Security::IoMethods 480s when using no receiver 480s behaves like accepts 480s does not register an offense when using `write("command", "hi")` 480s behaves like accepts 480s does not register an offense when using `read("command")` 480s behaves like accepts 480s does not register an offense when using `readlines("command")` 480s behaves like accepts 481s does not register an offense when using `binwrite("command", "hi")` 481s behaves like accepts 481s does not register an offense when using `foreach("command") { |x| puts x }` 481s when using `IO` receiver and string argument that starts with a pipe character (`" | command"`) 481s behaves like accepts 481s does not register an offense when using `IO.binwrite(" | command", "hi")` 481s behaves like accepts 481s does not register an offense when using `IO.foreach(" | command") { |x| puts x }` 481s behaves like accepts 481s does not register an offense when using `IO.readlines(" | command")` 481s behaves like accepts 481s does not register an offense when using `IO.read(" | command")` 481s behaves like accepts 481s does not register an offense when using `IO.write(" | command", "hi")` 481s when using `IO` receiver and variable argument 481s registers and corrects an offense when using `foreach` 481s behaves like offense 481s registers and corrects an offense when using `write` 481s behaves like offense 481s registers and corrects an offense when using `readlines` 481s behaves like offense 481s registers and corrects an offense when using `binwrite` 481s behaves like offense 481s registers and corrects an offense when using `binread` 481s behaves like offense 481s registers and corrects an offense when using `read` 481s when using `IO` receiver and string argument 481s registers and corrects an offense when using `foreach` 481s behaves like offense 481s registers and corrects an offense when using `write` 481s behaves like offense 481s registers and corrects an offense when using `binwrite` 481s behaves like offense 481s registers and corrects an offense when using `read` 481s behaves like offense 481s registers and corrects an offense when using `readlines` 481s behaves like offense 481s registers and corrects an offense when using `binwrite` 481s when using `File` receiver 481s behaves like accepts 481s does not register an offense when using `File.readlines(path)` 481s behaves like accepts 481s does not register an offense when using `File.binwrite(path, "hi")` 481s behaves like accepts 481s does not register an offense when using `File.binread(path)` 481s behaves like accepts 481s does not register an offense when using `File.read(path)` 481s behaves like accepts 481s does not register an offense when using `File.foreach(path) { |x| puts x }` 481s when using `IO` receiver and string argument that starts with a pipe character (`"| command"`) 481s behaves like accepts 481s does not register an offense when using `IO.foreach("| command") { |x| puts x }` 481s behaves like accepts 481s does not register an offense when using `IO.read("| command")` 481s behaves like accepts 481s does not register an offense when using `IO.readlines("| command")` 481s behaves like accepts 482s does not register an offense when using `IO.binwrite("| command", "hi")` 482s behaves like accepts 482s does not register an offense when using `IO.write("| command", "hi")` 482s 482s RuboCop::Cop::Lint::ToJSON 482s registers an offense and corrects using `#to_json` without arguments 482s does not register an offense when using `#to_json` with arguments 482s 482s RuboCop::Cop::Bundler::GemComment 482s when investigating Gemfiles 482s and the file contains source and group 482s does not register any offenses 482s and the gem is commented 482s does not register any offenses 482s and the gem is permitted 482s does not register any offenses 482s and a gem has no comment 482s registers an offense 482s when the "OnlyFor" option is set 482s including one or more option names but not "version_specifiers" 482s when a gem is uncommented and contains only options not specified 482s does not register an offense 482s when a gem is uncommented and has one of the specified options 482s registers an offense 482s when a gem is uncommented and has a version specifier but none of the specified options 482s does not register an offense 482s including "restrictive_version_specifiers" 482s when a gem is uncommented and has no version specified 482s does not register an offense 482s when a gem is uncommented and has a pessimistic version specifier 482s registers an offense 482s when a gem is uncommented and has a non-minimum version specifier with a leading space 482s registers an offense 482s when a gem is commented 482s does not register an offense 482s when a gem is uncommented and has only a minimum version specifier 482s does not register an offense 482s when a gem is uncommented and has a version specifier along with other options 482s registers an offense 482s when a gem is uncommented and has a frozen version specifier 482s registers an offense 482s when a gem is uncommented and has a version specifier without operator 482s registers an offense 482s when a gem is uncommented and has both minimum and non-minimum version specifier 482s registers an offense 482s when a gem is uncommented and has options but no version specifiers 482s does not register an offense 482s including "version_specifiers" 482s when a gem is uncommented and has multiple version specifiers 482s registers an offense 482s when a gem is commented 482s does not register an offense 482s when a gem is uncommented and has a version specifier 482s registers an offense 482s when a gem is uncommented and has no version specified 482s does not register an offense 482s when a gem is uncommented and has a version specifier along with other options 482s registers an offense 482s when a gem is uncommented and has options but no version specifiers 482s does not register an offense 482s and the file is empty 482s does not register any offenses 482s and the gem is commented on the same line 482s does not register any offenses 482s when investigating Ruby files 482s does not register any offenses 482s 482s Changelog 482s parses correctly 482s merges correctly 482s Changelog::Entry 482s #body 482s when there is no issue referenced in the body 482s is expected to eq "Fix something" 482s when there is an issue referenced with [Fixes #x] the body 482s is expected to eq "Fix something" 482s when there is an issue referenced with [Fix #x] the body 482s is expected to eq "Fix something" 482s when there is no body 482s is expected to eq "" 482s #content 482s when there is no issue referenced 482s generates correct content 482s when there is an issue referenced 482s generates correct content 482s #ref_id 482s when there is an issue referenced with [Fix #x] the body 482s is expected to eq "123" 482s when there is no issue referenced in the body 482s is expected to eq "x" 482s when there is no body 482s is expected to eq "x" 482s when there is an issue referenced with [Fixes #x] the body 482s is expected to eq "123" 482s 482s RuboCop::Cop::Style::MultilineIfThen 482s does not raise an error for an implicit match unless 482s does not get confused by empty elsif branch 482s registers an offense for then in multiline elsif 482s does not get confused by a nested postfix unless 482s does not get confused by a commented-out then 482s accepts table style if/then/elsif/ends 482s registers an offense for then in multiline if 482s does not raise an error for an implicit match if 482s registers an offense for then in multiline unless 482s does not get confused by a postfix unless 482s does not get confused by a then in a when 482s 482s RuboCop::TargetFinder 482s #find(..., :only_recognized_file_types) 482s does not find hidden files 483s returns absolute paths 483s when files with ruby interpreters are passed 483s picks all the ruby files 483s when a hidden directory path is passed 483s finds files under the specified directory 483s when input is passed on stdin 483s includes the file 483s when files with a ruby extension are passed 483s picks all the ruby files 483s when local AllCops/Include lists two patterns 483s picks two files 483s when a subdirectory AllCops/Include only lists one pattern 483s picks two files 483s when no argument is passed 483s finds files under the current directory 483s when a pattern is passed 483s finds files which match the pattern 483s when a hidden directory path is passed 483s finds files under the specified directory 483s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 483s when it's forced to adhere file exclusion configuration 483s excludes them 483s normally 483s does not exclude them 483s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 483s includes them 483s when a file with a ruby filename is passed 483s picks all the ruby files 483s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 483s includes them 483s when a directory path is passed 483s finds files under the specified directory 483s when same paths are passed 483s does not return duplicated file paths 483s when a non-ruby file is passed 483s doesn't pick the file 483s #target_files_in_dir 483s picks files specified to be included in config 483s does not pick files with no extension and no ruby shebang 483s does not pick files specified to be excluded in config 483s picks ruby executable files with no extension 483s picks files with extension .rb 483s does not pick directories 483s w/ --fail-fast option 483s works with the expected number of .rb files 483s when an exception is raised while reading file 483s and debug mode is disabled 483s outputs nothing 483s and debug mode is enabled 483s outputs error message 483s #find(..., :all_file_types) 483s does not find hidden files 483s returns absolute paths 483s when a non-ruby file is passed 483s picks the file 483s when files with ruby interpreters are passed 483s picks all the ruby files 483s when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments 483s includes them 483s when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments 483s includes them 483s when a hidden directory path is passed 483s finds files under the specified directory 483s when a file with a ruby filename is passed 483s picks all the ruby files 483s when no argument is passed 483s finds files under the current directory 483s when a pattern is passed 483s finds files which match the pattern 483s when same paths are passed 483s does not return duplicated file paths 483s when input is passed on stdin 483s includes the file 483s when a directory path is passed 483s finds files under the specified directory 483s when some paths are specified in the configuration Exclude and they are explicitly passed as arguments 483s normally 484s does not exclude them 484s when it's forced to adhere file exclusion configuration 484s excludes them 484s when files with a ruby extension are passed 484s picks all the ruby files 484s when local AllCops/Include lists two patterns 484s picks all the ruby files 484s when a subdirectory AllCops/Include only lists one pattern 484s picks all the ruby files 484s #find_files 484s works also if a folder is named "{}" 484s does not search excluded top level directories 484s resolves symlinks when looking for excluded directories 484s works also if a folder is named "**" 484s prevents infinite loops when traversing symlinks 484s can exclude symlinks as well as directories 484s works also if a folder is named "," 484s 484s RuboCop::Cop::Style::Sample 484s behaves like accepts 484s accepts shuffle.slice(3, 3) 484s behaves like offense 484s registers an offense for shuffle[0...3] 484s behaves like accepts 484s accepts shuffle[foo..3] 484s behaves like offense 484s registers an offense for shuffle.slice(0) 484s behaves like accepts 484s accepts shuffle.slice(foo, bar) 484s behaves like accepts 484s accepts shuffle.at(foo) 484s behaves like offense 484s registers an offense for shuffle[0..3] 484s behaves like offense 484s registers an offense for shuffle.slice(0, 3) 484s behaves like accepts 484s accepts shuffle[2] 484s behaves like accepts 484s accepts shuffle[foo, bar] 484s behaves like accepts 484s accepts shuffle.slice(2..3) 484s behaves like accepts 484s accepts shuffle[foo..bar] 484s behaves like accepts 484s accepts shuffle 484s behaves like offense 484s registers an offense for shuffle.last(bar) 484s behaves like offense 484s registers an offense for shuffle.first(2) 484s behaves like accepts 484s accepts shuffle.map { |e| e } 484s behaves like accepts 484s accepts shuffle[foo, 3] 484s behaves like accepts 484s accepts shuffle[2..3] 484s behaves like accepts 484s accepts shuffle(random: Random.new) 484s Ruby >= 2.6 484s behaves like accepts 484s accepts shuffle[3...] 484s behaves like accepts 484s accepts shuffle[3..] 484s behaves like offense 484s registers an offense for shuffle(random: foo).last(bar) 484s behaves like offense 484s registers an offense for shuffle.slice(0..3) 484s behaves like accepts 484s accepts shuffle(random: Random.new)[2, 3] 484s behaves like accepts 484s accepts shuffle.at(2) 484s behaves like offense 484s registers an offense for shuffle[0, 3] 484s behaves like accepts 484s accepts shuffle.join([5, 6, 7]) 484s behaves like offense 484s registers an offense for shuffle.first(foo) 484s behaves like offense 484s registers an offense for shuffle.last(3) 484s behaves like accepts 484s accepts shuffle.slice(foo, 3) 484s behaves like accepts 484s accepts shuffle.slice(-4..-3) 484s behaves like accepts 484s accepts shuffle.slice(foo..3) 484s behaves like accepts 484s accepts shuffle.slice(2) 484s behaves like offense 484s registers an offense for shuffle.at(-1) 484s behaves like offense 484s registers an offense for shuffle(random: Random.new).first(2) 484s behaves like offense 484s registers an offense for shuffle.first 484s Ruby >= 2.7 484s behaves like offense 484s registers an offense for shuffle[...3] 484s behaves like accepts 484s accepts shuffle(random: Random.new).find(&:odd?) 484s behaves like accepts 484s accepts shuffle.slice(foo..bar) 484s behaves like offense 484s registers an offense for shuffle.at(0) 484s behaves like offense 484s registers an offense for shuffle[0] 484s behaves like accepts 484s accepts shuffle[2..-3] 484s behaves like offense 484s registers an offense for shuffle.slice(0...3) 484s behaves like offense 484s registers an offense for shuffle.slice(-1) 484s behaves like offense 484s registers an offense for shuffle.last 484s behaves like accepts 484s accepts shuffle[3, 3] 484s behaves like accepts 484s accepts sample 484s behaves like accepts 484s accepts shuffle(random: Random.new)[2] 484s behaves like accepts 484s accepts shuffle.slice(2..-3) 484s behaves like accepts 484s accepts shuffle[-4..-3] 484s behaves like offense 484s registers an offense for shuffle[-1] 484s behaves like accepts 484s accepts shuffle[foo] 484s behaves like offense 484s registers an offense for shuffle(random: Random.new).first 484s behaves like accepts 484s accepts shuffle.slice(foo) 484s behaves like offense 484s registers an offense for shuffle(random: Random.new)[0..3] 484s 484s RuboCop::Cop::Style::Alias 484s when EnforcedStyle is prefer_alias_method 484s does not register an offense for alias_method 484s registers an offense for alias with bareword args 484s does not register an offense for alias in an instance_eval block 484s does not register an offense for alias with gvars 484s registers an offense for alias with symbol args 484s when EnforcedStyle is prefer_alias 484s does not register an offense for alias_method in a block 484s does not register an offense for alias_method in self.method def 484s does not register an offense for alias_method with non-literal constant argument 484s registers an offense for alias with symbol args 484s does not register an offense for alias_method with explicit receiver 484s registers an offense for alias_method in a module block 484s registers an offense for alias_method in a class block 485s registers an offense for alias_method at the top level 485s does not register an offense for alias_method with non-literal method call argument 485s does not register an offense for alias in an instance_eval block 485s does not register an offense for alias_method in a method def 485s does not register an offense for alias with bareword args 485s 485s RuboCop::Cop::Lint::AmbiguousAssignment 485s does not register an offense when no mistype assignments 485s registers an offense when using `*` with `X` 485s does not register an offense when no mistype assignments 485s registers an offense when using `-` with `@x` 485s registers an offense when using `-` with `$x` 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s registers an offense when using `-` with `x` 485s does not register an offense when no mistype assignments 485s registers an offense when using `!` with `x` 485s does not register an offense when no mistype assignments 485s registers an offense when using `*` with `$x` 485s registers an offense when using `+` with `x` 485s registers an offense when using `!` with `$x` 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s registers an offense when using `!` with `X` 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s registers an offense when using `!` with `@@x` 485s registers an offense when using `+` with `@x` 485s registers an offense when using `+` with `@@x` 485s does not register an offense when no mistype assignments 485s registers an offense when using `+` with `$x` 485s registers an offense when using `*` with `x` 485s registers an offense when using `+` with `X` 485s registers an offense when using `!` with `@x` 485s registers an offense when using `*` with `@x` 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s registers an offense when using `-` with `X` 485s registers an offense when using `-` with `@@x` 485s registers an offense when using `*` with `@@x` 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s does not register an offense when no mistype assignments 485s 485s RuboCop::Cop::Style::TrailingCommaInArrayLiteral 485s with multi-line list of values 485s when EnforcedStyleForMultiline is consistent_comma 485s accepts a multiline word array 485s accepts trailing comma 485s accepts a multiline array with items on a single line andtrailing comma 485s registers an offense for literal with two of the values on the same line and no trailing comma 485s accepts two values on the same line 485s accepts a multiline array with a single item and trailing comma 485s when closing bracket is on same line as last value 485s registers an offense for no trailing comma 485s when EnforcedStyleForMultiline is comma 485s accepts a multiline word array 485s registers an offense for a literal with two of the values on the same line and a trailing comma 485s accepts trailing comma 485s accepts an empty array being passed as a method argument 485s accepts a multiline array with a single item and trailing comma 485s accepts literal with two of the values on the same line 485s when closing bracket is on same line as last value 485s accepts literal with no trailing comma 485s when EnforcedStyleForMultiline is no_comma 485s accepts a literal with no trailing comma 485s registers an offense for trailing comma 485s accepts HEREDOC with commas 485s autocorrects unwanted comma where HEREDOC has commas 485s with single line list of values 485s when EnforcedStyleForMultiline is no_comma 485s accepts rescue clause 485s accepts single element literal without trailing comma 485s accepts empty literal 485s accepts literal without trailing comma 485s registers an offense for trailing comma 485s when EnforcedStyleForMultiline is comma 486s accepts rescue clause 486s registers an offense for trailing comma 486s accepts single element literal without trailing comma 486s accepts empty literal 486s accepts literal without trailing comma 486s when EnforcedStyleForMultiline is consistent_comma 486s accepts literal without trailing comma 486s registers an offense for trailing comma 486s accepts single element literal without trailing comma 486s accepts rescue clause 486s accepts empty literal 486s 486s RuboCop::Runner 486s how formatter is invoked 486s #file_started 487s sends a file path 487s sends file specific information hash 487s the passed path 489s is frozen 489s #started 489s sends all file paths 489s the passed files paths 490s is frozen 490s #finished 490s when RuboCop is interrupted by user 491s sends only processed file paths 491s when RuboCop finished inspecting all files normally 493s sends all file paths 493s the passed files paths 494s is frozen 494s #file_finished 495s sends an array of detected offenses for the file 497s sends a file path 497s the passed path 498s is frozen 498s invocation order 500s is called in the proper sequence 500s 500s RuboCop::Cop::Lint::EmptyClass 500s does not register an offense when metaclass is not empty 500s does not register an offense when empty has a parent 500s registers an offense for empty object metaclass 500s registers an offense for empty class 500s does not register an offense when class is not empty 500s registers an offense when empty metaclass contains only comments 500s registers an offense for empty class metaclass 500s when AllowComments is true 500s does not register an offense when empty class contains only comments 500s does not register an offense when empty metaclass contains only comments 500s 500s RuboCop::Cop::Lint::RequireRangeParentheses 500s does not register an offense when begin and end of the range are on the same line 500s does not register an offense when using `nil..42` 500s does not register an offense when using `42..nil` 500s registers an offense when the end of the range (`..`) is line break 500s registers an offense when the end of the range (`...`) is line break 500s does not register an offense when the end of the range (`..`) is line break and is enclosed in parentheses 500s Ruby >= 2.7 500s does not register an offense when using beginless range only 500s Ruby >= 2.6 500s does not register an offense when using endless range only 500s 500s RuboCop::Cop::Style::EmptyMethod 500s when configured with expanded style 500s relation with Layout/LineLength 500s still corrects even if the method is longer than the configured Max 500s with an empty instance method definition 500s allows multi line method 500s allows multi line method with blank line 500s registers an offense for single line method 500s with an empty class method definition 500s allows multi line method with a blank line 500s registers an offense for single line method 500s allows empty multi line method 500s with a non-empty instance method definition 500s allows multi line method with a comment 500s allows single line method 500s allows multi line method 500s when method is nested in class scope 500s registers an offense for single line method 500s with a non-empty class method definition 500s allows multi line method with comment 500s allows multi line method 500s allows single line method 500s when configured with compact style 500s with a non-empty class method definition 500s allows multi line method with comment 500s allows multi line method 500s allows single line method 500s with an empty instance method definition 500s registers an offense for method with arguments without parens 500s registers an offense for method with closing paren on following line 500s allows single line method 500s registers an offense for empty method 500s registers an offense for method with blank line 501s registers an offense for method with arguments 501s with a non-empty instance method definition 501s allows single line method 501s allows multi line method 501s allows multi line method with comment 501s with an empty class method definition 501s registers an offense for empty method 501s allows single line method 501s registers an offense for method with blank line 501s registers an offense for empty method with arguments 501s relation with Layout/LineLength 501s when that cop is disabled 501s corrects to long lines 501s when the correction would exceed the configured maximum 501s reports an offense but does not correct 501s 501s RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters 501s accepts other percent literals 501s accepts execute-string literals 501s for w type and ["(", ")"] delimiters 501s accepts spaces between entries 501s accepts multi-line literals within a method 501s registers an offense for unnecessary spaces 501s registers an offense for literals with escaped and other spaces 501s accepts newlines and additional following alignment spaces 501s registers an offense for spaces after first delimiter 501s accepts literals with escaped spaces 501s accepts multi-line literals 501s accepts literals without additional spaces 501s registers an offense for spaces before final delimiter 501s with newline in blank percent literals 501s registers and corrects an offense 501s with space in blank percent literals 501s registers and corrects an offense 501s with spaces in blank percent literals 501s registers and corrects an offense 501s for i type and ["!", "!"] delimiters 501s accepts literals with escaped spaces 501s registers an offense for unnecessary spaces 501s accepts newlines and additional following alignment spaces 501s accepts literals without additional spaces 501s registers an offense for literals with escaped and other spaces 501s registers an offense for spaces after first delimiter 501s registers an offense for spaces before final delimiter 501s accepts spaces between entries 501s accepts multi-line literals 501s accepts multi-line literals within a method 501s with space in blank percent literals 501s registers and corrects an offense 501s with spaces in blank percent literals 501s registers and corrects an offense 501s with newline in blank percent literals 501s registers and corrects an offense 501s for w type and ["!", "!"] delimiters 501s accepts spaces between entries 501s accepts literals with escaped spaces 501s registers an offense for spaces after first delimiter 501s accepts newlines and additional following alignment spaces 501s registers an offense for spaces before final delimiter 501s accepts multi-line literals 501s registers an offense for literals with escaped and other spaces 501s registers an offense for unnecessary spaces 501s accepts literals without additional spaces 501s accepts multi-line literals within a method 501s with spaces in blank percent literals 501s registers and corrects an offense 501s with newline in blank percent literals 501s registers and corrects an offense 501s with space in blank percent literals 501s registers and corrects an offense 501s for I type and ["[", "]"] delimiters 501s accepts multi-line literals within a method 501s registers an offense for spaces after first delimiter 501s registers an offense for spaces before final delimiter 501s registers an offense for unnecessary spaces 501s accepts newlines and additional following alignment spaces 501s accepts literals with escaped spaces 501s accepts multi-line literals 501s registers an offense for literals with escaped and other spaces 501s accepts literals without additional spaces 501s accepts spaces between entries 501s with space in blank percent literals 501s registers and corrects an offense 501s with spaces in blank percent literals 501s registers and corrects an offense 501s with newline in blank percent literals 501s registers and corrects an offense 501s for i type and ["[", "]"] delimiters 501s accepts newlines and additional following alignment spaces 501s accepts literals without additional spaces 501s registers an offense for literals with escaped and other spaces 502s registers an offense for spaces after first delimiter 502s accepts literals with escaped spaces 502s accepts spaces between entries 502s accepts multi-line literals 502s registers an offense for spaces before final delimiter 502s registers an offense for unnecessary spaces 502s accepts multi-line literals within a method 502s with newline in blank percent literals 502s registers and corrects an offense 502s with space in blank percent literals 502s registers and corrects an offense 502s with spaces in blank percent literals 502s registers and corrects an offense 502s for x type and ["[", "]"] delimiters 502s accepts literals without additional spaces 502s registers an offense for literals with escaped and other spaces 502s registers an offense for spaces before final delimiter 502s registers an offense for unnecessary spaces 502s accepts literals with escaped spaces 502s accepts multi-line literals 502s accepts multi-line literals within a method 502s accepts spaces between entries 502s accepts newlines and additional following alignment spaces 502s registers an offense for spaces after first delimiter 502s with space in blank percent literals 502s registers and corrects an offense 502s with spaces in blank percent literals 502s registers and corrects an offense 502s with newline in blank percent literals 502s registers and corrects an offense 502s for w type and ["{", "}"] delimiters 502s accepts spaces between entries 502s accepts multi-line literals within a method 502s accepts multi-line literals 502s registers an offense for spaces after first delimiter 502s registers an offense for unnecessary spaces 502s accepts literals without additional spaces 502s accepts newlines and additional following alignment spaces 502s accepts literals with escaped spaces 502s registers an offense for literals with escaped and other spaces 502s registers an offense for spaces before final delimiter 502s with space in blank percent literals 502s registers and corrects an offense 502s with newline in blank percent literals 502s registers and corrects an offense 502s with spaces in blank percent literals 502s registers and corrects an offense 502s for W type and ["(", ")"] delimiters 502s registers an offense for spaces before final delimiter 502s accepts spaces between entries 502s accepts multi-line literals within a method 502s registers an offense for spaces after first delimiter 502s accepts literals without additional spaces 502s accepts literals with escaped spaces 502s registers an offense for literals with escaped and other spaces 502s accepts newlines and additional following alignment spaces 502s registers an offense for unnecessary spaces 502s accepts multi-line literals 502s with spaces in blank percent literals 502s registers and corrects an offense 502s with space in blank percent literals 502s registers and corrects an offense 502s with newline in blank percent literals 502s registers and corrects an offense 502s for x type and ["(", ")"] delimiters 502s accepts newlines and additional following alignment spaces 502s accepts multi-line literals within a method 502s registers an offense for literals with escaped and other spaces 502s accepts multi-line literals 502s accepts literals without additional spaces 502s registers an offense for unnecessary spaces 502s registers an offense for spaces before final delimiter 502s accepts spaces between entries 502s registers an offense for spaces after first delimiter 502s accepts literals with escaped spaces 502s with space in blank percent literals 502s registers and corrects an offense 502s with newline in blank percent literals 502s registers and corrects an offense 502s with spaces in blank percent literals 502s registers and corrects an offense 502s for I type and ["!", "!"] delimiters 502s accepts spaces between entries 503s registers an offense for spaces after first delimiter 503s accepts literals with escaped spaces 503s accepts newlines and additional following alignment spaces 503s registers an offense for unnecessary spaces 503s accepts literals without additional spaces 503s registers an offense for spaces before final delimiter 503s accepts multi-line literals within a method 503s accepts multi-line literals 503s registers an offense for literals with escaped and other spaces 503s with space in blank percent literals 503s registers and corrects an offense 503s with newline in blank percent literals 503s registers and corrects an offense 503s with spaces in blank percent literals 503s registers and corrects an offense 503s for x type and ["!", "!"] delimiters 503s accepts literals with escaped spaces 503s accepts spaces between entries 503s accepts multi-line literals 503s registers an offense for unnecessary spaces 503s accepts multi-line literals within a method 503s accepts literals without additional spaces 503s registers an offense for spaces after first delimiter 503s registers an offense for literals with escaped and other spaces 503s registers an offense for spaces before final delimiter 503s accepts newlines and additional following alignment spaces 503s with newline in blank percent literals 503s registers and corrects an offense 503s with space in blank percent literals 503s registers and corrects an offense 503s with spaces in blank percent literals 503s registers and corrects an offense 503s for w type and ["[", "]"] delimiters 503s registers an offense for unnecessary spaces 503s accepts multi-line literals 503s registers an offense for literals with escaped and other spaces 503s accepts newlines and additional following alignment spaces 503s registers an offense for spaces before final delimiter 503s registers an offense for spaces after first delimiter 503s accepts literals with escaped spaces 503s accepts multi-line literals within a method 503s accepts spaces between entries 503s accepts literals without additional spaces 503s with spaces in blank percent literals 503s registers and corrects an offense 503s with newline in blank percent literals 503s registers and corrects an offense 503s with space in blank percent literals 503s registers and corrects an offense 503s for i type and ["(", ")"] delimiters 503s registers an offense for spaces after first delimiter 503s registers an offense for spaces before final delimiter 503s accepts literals with escaped spaces 503s registers an offense for unnecessary spaces 504s accepts spaces between entries 504s accepts newlines and additional following alignment spaces 504s accepts literals without additional spaces 504s accepts multi-line literals within a method 504s registers an offense for literals with escaped and other spaces 504s accepts multi-line literals 504s with newline in blank percent literals 504s registers and corrects an offense 504s with space in blank percent literals 504s registers and corrects an offense 504s with spaces in blank percent literals 504s registers and corrects an offense 504s for x type and ["{", "}"] delimiters 504s accepts literals without additional spaces 504s accepts multi-line literals 504s registers an offense for unnecessary spaces 504s registers an offense for spaces after first delimiter 504s accepts newlines and additional following alignment spaces 504s registers an offense for spaces before final delimiter 504s accepts multi-line literals within a method 504s registers an offense for literals with escaped and other spaces 504s accepts literals with escaped spaces 504s accepts spaces between entries 504s with space in blank percent literals 504s registers and corrects an offense 504s with newline in blank percent literals 504s registers and corrects an offense 504s with spaces in blank percent literals 504s registers and corrects an offense 504s for I type and ["(", ")"] delimiters 504s accepts newlines and additional following alignment spaces 504s accepts multi-line literals 504s accepts literals with escaped spaces 504s accepts spaces between entries 504s registers an offense for unnecessary spaces 504s accepts multi-line literals within a method 504s registers an offense for spaces after first delimiter 504s accepts literals without additional spaces 504s registers an offense for literals with escaped and other spaces 504s registers an offense for spaces before final delimiter 504s with space in blank percent literals 504s registers and corrects an offense 504s with spaces in blank percent literals 504s registers and corrects an offense 504s with newline in blank percent literals 504s registers and corrects an offense 504s for W type and ["[", "]"] delimiters 504s registers an offense for unnecessary spaces 504s accepts newlines and additional following alignment spaces 504s accepts multi-line literals within a method 504s accepts literals with escaped spaces 504s accepts multi-line literals 504s registers an offense for spaces after first delimiter 504s registers an offense for spaces before final delimiter 504s registers an offense for literals with escaped and other spaces 504s accepts literals without additional spaces 504s accepts spaces between entries 504s with spaces in blank percent literals 504s registers and corrects an offense 504s with newline in blank percent literals 504s registers and corrects an offense 504s with space in blank percent literals 504s registers and corrects an offense 504s for W type and ["!", "!"] delimiters 504s registers an offense for literals with escaped and other spaces 504s accepts literals without additional spaces 504s accepts literals with escaped spaces 504s accepts multi-line literals 504s accepts spaces between entries 504s accepts newlines and additional following alignment spaces 505s registers an offense for spaces after first delimiter 505s accepts multi-line literals within a method 505s registers an offense for spaces before final delimiter 505s registers an offense for unnecessary spaces 505s with spaces in blank percent literals 505s registers and corrects an offense 505s with space in blank percent literals 505s registers and corrects an offense 505s with newline in blank percent literals 505s registers and corrects an offense 505s for i type and ["{", "}"] delimiters 505s accepts multi-line literals within a method 505s accepts literals with escaped spaces 505s registers an offense for spaces before final delimiter 505s accepts spaces between entries 505s registers an offense for literals with escaped and other spaces 505s registers an offense for unnecessary spaces 505s accepts newlines and additional following alignment spaces 505s accepts literals without additional spaces 505s registers an offense for spaces after first delimiter 505s accepts multi-line literals 505s with spaces in blank percent literals 505s registers and corrects an offense 505s with space in blank percent literals 505s registers and corrects an offense 505s with newline in blank percent literals 505s registers and corrects an offense 505s for I type and ["{", "}"] delimiters 505s accepts newlines and additional following alignment spaces 505s accepts multi-line literals within a method 505s accepts spaces between entries 505s registers an offense for literals with escaped and other spaces 505s accepts literals without additional spaces 505s registers an offense for spaces after first delimiter 505s accepts multi-line literals 505s accepts literals with escaped spaces 505s registers an offense for spaces before final delimiter 505s registers an offense for unnecessary spaces 505s with newline in blank percent literals 505s registers and corrects an offense 505s with spaces in blank percent literals 505s registers and corrects an offense 505s with space in blank percent literals 505s registers and corrects an offense 505s for W type and ["{", "}"] delimiters 505s accepts spaces between entries 505s accepts multi-line literals 506s registers an offense for spaces after first delimiter 506s registers an offense for spaces before final delimiter 506s accepts literals without additional spaces 506s accepts multi-line literals within a method 506s accepts literals with escaped spaces 506s registers an offense for unnecessary spaces 506s accepts newlines and additional following alignment spaces 506s registers an offense for literals with escaped and other spaces 506s with newline in blank percent literals 506s registers and corrects an offense 506s with spaces in blank percent literals 506s registers and corrects an offense 506s with space in blank percent literals 506s registers and corrects an offense 506s 506s RuboCop::Formatter::JSONFormatter 506s #file_finished 506s adds detected offense count in summary 506s adds value of #hash_for_file to #output_hash[:files] 506s #finished 506s outputs #output_hash as JSON 506s sets inspected file count in summary 506s #started 506s sets target file count in summary 506s #hash_for_file 506s sets relative file path for :path key 506s sets an array of #hash_for_offense values for :offenses key 506s #hash_for_location 506s sets line value for :line key 506s sets length value for :length key 506s sets column value for :column key 506s when the location is pseudo 506s returns a valid hash 506s #hash_for_offense 506s sets value of #hash_for_location for :location key 506s sets Offense#correctable? value for :correctable key 506s sets Offense#severity value for :severity key 506s sets Offense#corrected? value for :corrected key 506s sets Offense#cop_name value for :cop_name key 506s sets Offense#message value for :message key 506s 506s RuboCop::Cop::Style::ExpandPathArguments 506s does not register an offense when using `File.expand_path(__FILE__)` 506s registers an offense when using `File.expand_path('.', __FILE__)` 506s registers an offense when using `Pathname(__FILE__).parent.expand_path` 506s does not register an offense when using `File.expand_path('..', __dir__)` 506s does not register an offense when using `File.expand_path(__dir__)` 506s registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` 506s registers an offense when using `File.expand_path('..', __FILE__)` 506s does not register an offense when using `Pathname(__dir__).expand_path` 506s registers an offense when using `File.expand_path('../../..', __FILE__)` 506s does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` 506s registers an offense when using `File.expand_path('../../lib', __FILE__)` 506s does not register an offense when using `File.expand_path(path, __FILE__)` 506s registers an offense when using `Pathname.new(__FILE__).parent.expand_path` 506s registers an offense when using `File.expand_path('./../..', __FILE__)` 507s registers an offense when using `::File.expand_path('./../..', __FILE__)` 507s registers an offense when using `File.expand_path('../..', __FILE__)` 507s 507s RuboCop::Cop::Layout::FirstHashElementIndentation 507s when EnforcedStyle is align_braces 507s accepts correctly indented first pair 507s accepts single line hash 507s accepts an empty hash 507s accepts several pairs per line 507s accepts a first pair on the same line as the left brace 507s registers an offense and corrects incorrectly indented } 507s registers an offense for incorrectly indented hash that is the value of a single pair hash 507s 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 507s when 'consistent' style is used 507s registers an offense and corrects incorrect indentation 507s when 'special_inside_parentheses' style is used 507s registers an offense and corrects incorrect indentation 507s when the HashAlignment style is separator for : 507s registers an offense and corrects incorrectly indented first pair with : 507s accepts correctly indented first pair 507s registers an offense and corrects incorrectly indented } 507s when hash is right hand side in assignment 507s accepts an empty hash 507s accepts a first pair on the same line as the left brace 507s registers an offense and corrects incorrectly indented first pair 507s accepts correctly indented first pair 507s accepts several pairs per line 507s accepts single line hash 507s when indentation width is overridden for this cop 507s accepts correctly indented first pair 507s registers an offense and corrects incorrectly indented first pair 507s when the HashAlignment style is separator for => 507s registers an offense and corrects incorrectly indented } 507s registers an offense and corrects incorrectly indented first pair with => 507s accepts correctly indented first pair 507s when hash is method argument 507s and arguments are surrounded by parentheses 507s and EnforcedStyle is special_inside_parentheses 507s 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 507s accepts special indentation for first argument 507s accepts normal indentation for hash within hash 507s registers an offense and corrects 'consistent' indentation 507s registers an offense and corrects 'align_braces' indentation 507s registers an offense for incorrectly indented hash that is the value of a single pair hash 507s accepts indent based on the preceding left parenthesiswhen the right brace and its following pair is on the same line 507s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 507s accepts special indentation for second argument 507s when using safe navigation operator 507s registers an offense and corrects 'consistent' indentation 507s and EnforcedStyle is consistent 507s accepts normal indentation for second argument 507s registers an offense for incorrectly indented hash that is the value of a single pair hash 507s 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 507s registers an offense and corrects incorrect indentation 507s 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 507s accepts normal indentation for first argument 507s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 507s and argument are not surrounded by parentheses 507s accepts braceless hash 507s registers an offense for incorrectly indented multi-line hash with braces 507s 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 507s accepts indent based on the left brace when the outer hash key and the left brace is not on the same line 507s 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 507s accepts a correctly indented multi-line hash with braces 507s accepts single line hash with braces 507s 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 507s when hash is argument to setter 507s registers an offense and corrects incorrectly indented first pair 507s accepts correctly indented first pair 507s when hash is operand 508s registers an offense and corrects incorrectly indented } 508s registers an offense and corrects incorrectly indented first pair 508s accepts correctly indented first pair 508s 508s RuboCop::Cop::Style::OperatorMethodCall 508s registers an offense when using `foo.-(bar)` 508s registers an offense when using `foo.<=> bar` 508s does not register an offense when using `foo * bar` 508s registers an offense when using `foo.>> bar` 508s does not register an offense when using `foo !~ bar` 508s does not register an offense when using `foo.-@bar` 508s registers an offense when chaining `foo.bar.===(baz).round(2)` 508s does not register an offense when using `foo < bar` 508s does not register an offense when using `foo % bar` 508s does not register an offense when using `foo & bar` 508s registers an offense when using `foo.+ bar` 508s does not register an offense when using `foo.+@bar` 508s registers an offense when chaining `foo.bar.<<(baz).round(2)` 508s registers an offense when using `foo.^ bar` 508s registers an offense when using `foo.%(bar)` 508s registers an offense when using `foo.=== bar` 508s registers an offense when chaining `foo.bar.%(baz).round(2)` 508s registers an offense when chaining `foo.bar.~(baz).round(2)` 508s registers an offense when chaining `foo.bar.^(baz).round(2)` 508s does not register an offense when using `foo.+@bar.to_s` 508s registers an offense when using `foo.>= bar` 508s does not register an offense when using `Foo.+(bar)` 508s does not register an offense when using `foo === bar` 508s registers an offense when using `foo.& bar` 508s registers an offense when chaining `foo.bar.*(baz).round(2)` 508s registers an offense when using `foo.<=(bar)` 508s does not register an offense when using `foo / bar` 508s does not register an offense when using `foo.`bar` 508s registers an offense when using `foo.<< bar` 508s registers an offense when chaining `foo.bar.<=(baz).round(2)` 508s registers an offense when using `foo.% bar` 508s registers an offense when using `foo./ bar` 508s registers an offense when using `foo.<(bar)` 508s registers an offense when using `foo.**(bar)` 508s registers an offense when chaining `foo.bar.!(baz).round(2)` 508s registers an offense when using `foo.*(bar)` 508s registers an offense when using `foo.<<(bar)` 508s registers an offense when using `foo.+(bar)` 508s does not register an offense when using `foo != bar` 508s registers an offense when chaining `foo.bar.>(baz).round(2)` 508s does not register an offense when using `foo =~ bar` 509s registers an offense when chaining `foo.bar.=~(baz).round(2)` 509s registers an offense when using `foo.!(bar)` 509s registers an offense when chaining `foo.bar.!=(baz).round(2)` 509s registers an offense when chaining `foo.bar./(baz).round(2)` 509s registers an offense when using `foo.!~(bar)` 509s registers an offense when using `foo.| bar` 509s registers an offense when using `foo.!= bar` 509s registers an offense when using `foo.&(bar)` 509s registers an offense when chaining `foo.bar.<(baz).round(2)` 509s does not register an offense when using `foo | bar` 509s registers an offense when chaining `foo.bar.+(baz).round(2)` 509s does not register an offense when using `foo - bar` 509s registers an offense when using `foo.==(bar)` 509s does not register an offense when using `foo << bar` 509s registers an offense when using `foo.>>(bar)` 509s registers an offense when chaining `foo.bar.>=(baz).round(2)` 509s registers an offense when using `foo.<=>(bar)` 509s registers an offense when using `foo.<= bar` 509s does not register an offense when using `foo > bar` 509s registers an offense when using `foo./(bar)` 509s registers an offense when using `foo.=~ bar` 509s registers an offense when chaining `foo.bar.&(baz).round(2)` 509s does not register an offense when using `foo.!@bar` 509s registers an offense when chaining `foo.bar.-(baz).round(2)` 509s registers an offense when using `foo.> bar` 509s does not register an offense when using `foo ** bar` 509s registers an offense when using `foo.< bar` 509s registers an offense when using `foo.~(bar)` 509s registers an offense when chaining `foo.bar.<=>(baz).round(2)` 509s does not register an offense when using `foo <= bar` 509s registers an offense when chaining `foo.bar.**(baz).round(2)` 509s does not register an offense when using `foo + bar` 509s registers an offense when chaining `foo.bar.!~(baz).round(2)` 509s registers an offense when using `foo.* bar` 509s does not register an offense when using `foo >> bar` 509s registers an offense when using `foo.===(bar)` 509s registers an offense when using `foo.>(bar)` 509s does not register an offense when using `foo >= bar` 509s registers an offense when using `foo.!=(bar)` 509s registers an offense when using `foo.|(bar)` 509s registers an offense when using `foo.- bar` 509s registers an offense when using `foo.~ bar` 509s does not register an offense when using `foo ~ bar` 509s registers an offense when using `foo.=~(bar)` 509s registers an offense when using `foo.== bar` 509s registers an offense when using `foo.** bar` 509s registers an offense when chaining `foo.bar.==(baz).round(2)` 509s does not register an offense when using `foo ^ bar` 509s does not register an offense when using `foo.~@bar` 509s registers an offense when chaining `foo.bar.>>(baz).round(2)` 509s registers an offense when using `foo.!~ bar` 509s does not register an offense when using `foo <=> bar` 509s registers an offense when chaining `foo.bar.|(baz).round(2)` 509s does not register an offense when using `obj.!` 510s does not register an offense when using `foo ! bar` 510s registers an offense when using `foo.>=(bar)` 510s does not register an offense when using `foo == bar` 510s registers an offense when using `foo.! bar` 510s registers an offense when using `foo.^(bar)` 510s 510s isolated environment 511s is not affected by a config file above the work directory 511s 511s RuboCop::Formatter::SimpleTextFormatter 511s #report_summary 511s when 2 offenses detected 511s handles pluralization correctly 511s when 2 offenses are corrected and 2 offenses autocorrectable 511s handles pluralization correctly 511s when no files inspected 511s handles pluralization correctly 511s when a file inspected and no offenses detected 511s handles pluralization correctly 511s when a offense detected 511s handles pluralization correctly 511s when 2 offenses detected and 2 offenses autocorrectable 511s handles pluralization correctly 511s when an offense is corrected 511s prints about correction 511s when 2 offenses are corrected 511s handles pluralization correctly 511s when a offense detected and a offense autocorrectable 511s handles pluralization correctly 511s #report_file 511s behaves like report for severity 511s when the offense is not corrected 511s prints message as-is 511s the file is outside of the current working directory 511s prints as absolute path 511s when the offense is marked as todo 511s prints [Todo] along with message 511s the file is under the current working directory 511s prints as relative path 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s when the offense is correctable 511s prints message as-is 511s behaves like report for severity 511s when the offense is marked as todo 511s prints [Todo] along with message 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s the file is outside of the current working directory 511s prints as absolute path 511s the file is under the current working directory 511s prints as relative path 511s when the offense is correctable 511s prints message as-is 511s when the offense is not corrected 511s prints message as-is 511s behaves like report for severity 511s the file is under the current working directory 511s prints as relative path 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s when the offense is marked as todo 511s prints [Todo] along with message 511s when the offense is not corrected 511s prints message as-is 511s the file is outside of the current working directory 511s prints as absolute path 511s when the offense is correctable 511s prints message as-is 511s behaves like report for severity 511s the file is outside of the current working directory 511s prints as absolute path 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s when the offense is correctable 511s prints message as-is 511s the file is under the current working directory 511s prints as relative path 511s when the offense is marked as todo 511s prints [Todo] along with message 511s when the offense is not corrected 511s prints message as-is 511s behaves like report for severity 511s the file is outside of the current working directory 511s prints as absolute path 511s when the offense is not corrected 511s prints message as-is 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s when the offense is marked as todo 511s prints [Todo] along with message 511s the file is under the current working directory 511s prints as relative path 511s when the offense is correctable 511s prints message as-is 511s behaves like report for severity 511s when the offense is marked as todo 511s prints [Todo] along with message 511s the file is outside of the current working directory 511s prints as absolute path 511s when the offense is not corrected 511s prints message as-is 511s the file is under the current working directory 511s prints as relative path 511s when the offense is correctable 511s prints message as-is 511s when the offense is automatically corrected 511s prints [Corrected] along with message 511s 511s RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords 511s with complex method definition - registers many offenses 511s with complex begin-end - registers many offenses 511s accepts `begin` and `rescue` are on the same line 511s accepts last `rescue` and `end` are on the same line 511s accepts `def` and `rescue` are on the same line 511s accepts empty lines around begin body 511s accepts empty begin 511s accepts empty method definition 511s accepts no empty line 511s registers an offense for rescue section starting with a blank 511s registers an offense for rescue section ending for method definition a blank 511s registers an offense for above rescue keyword with a blank 511s accepts `rescue` and `end` are on the same line 511s registers an offense for rescue section ending with a blank 511s 511s RuboCop::Cop::Lint::EmptyInterpolation 511s finds interpolations in string-like contexts 512s accepts non-empty interpolation 512s registers an offense and corrects #{} in interpolation 512s registers an offense and corrects #{ } in interpolation 512s 512s RuboCop::Cop::InternalAffairs::SingleLineComparison 512s does not register an offense when the receivers are not a match 512s registers and corrects an offense when comparing `source_range.last_line` with `source_range.first_line` 512s registers and corrects an offense when comparing `loc.last_line` with `loc.line` 512s registers and corrects an offense when comparing `loc.last_line` with `loc.first_line` 512s registers and corrects an offense when comparing `source_range.first_line` with `source_range.last_line` 512s registers and corrects an offense when comparing `last_line` with `first_line` 512s registers and corrects an offense when negative comparing `first_line` with `last_line` 512s registers and corrects an offense when comparing `loc.first_line` with `loc.last_line` 512s registers and corrects an offense when comparing `first_line` with `last_line` 512s registers and corrects an offense when negative comparing `last_line` with `first_line` 512s does not register an offense when comparing the same line 512s registers and corrects an offense when comparing `loc.line` with `loc.last_line` 512s 512s RuboCop::Cop::Bundler::OrderedGems 512s When a gem that starts with a capital letter is sorted 512s does not register an offense 512s When gem groups is separated by multiline comment 512s with TreatCommentsAsGroupSeparators: true 512s accepts 512s with TreatCommentsAsGroupSeparators: false 512s registers an offense 512s When gems are alphabetically sorted 512s does not register any offenses 512s When gems have an inline comment, and not sorted 512s registers an offense 512s When gems are asciibetically sorted irrespective of _ 512s does not register an offense 512s When each individual group of line is not sorted 512s registers some offenses 512s when a gem is referenced from a variable 512s ignores the line 512s resets the sorting to a new block 512s When a gem is sorted but not so when disregarding _- 512s by default 512s registers an offense 512s when ConsiderPunctuation is true 512s does not register an offense 512s When each individual group of line is sorted 512s does not register any offenses 512s When a gem declaration takes several lines 512s registers an offense 512s When the gemfile is empty 512s does not register any offenses 512s When there are duplicated gems in group 512s registers an offense 512s When a gem that starts with a capital letter is not sorted 512s registers an offense 512s When gems are not alphabetically sorted 512s registers an offense 512s 512s RuboCop::Cop::Layout::MultilineOperationIndentation 512s when EnforcedStyle is indented 512s registers an offense and corrects aligned operators in assignment 512s registers an offense and corrects no indentation of second line 512s accepts indentation of next unless condition 512s accepts two spaces indentation of second line 512s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 512s accepts an expression where the first operand spans multiple lines 512s accepts indentation of assignment 513s accepts special indentation of for expression 513s registers an offense for a 2 space indentation of unless condition 513s registers an offense and corrects correct + unrecognized style 513s registers an offense and corrects wrong indentation of for expression 513s registers an offense and corrects aligned operands in if conditions 513s accepts indented operands inside and outside a block 513s accepts indentation of return unless condition 513s accepts double indentation of while condition 513s registers an offense and corrects one space indentation of second line 513s accepts indented operands in unless body 513s accepts indented operands in ordinary statement 513s accepts indented operands in if condition 513s accepts double indentation of until condition 513s accepts normal indentation of method parameters 513s accepts indentation of next if condition 513s accepts double indentation of if condition 513s registers an offense for a 2 space indentation of until condition 513s accepts indentation of return if condition 513s accepts indented operands in until body 513s registers an offense for a 2 space indentation of if condition 513s registers an offense and corrects three space indentation of second line 513s accepts any indentation of method parameters 513s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 513s accepts indented operands in if body 513s accepts indented operands in an array 513s does not check method calls 513s registers an offense and corrects aligned code on LHS of equality operator 513s accepts alignment inside a grouped expression 513s accepts no extra indentation of third line 513s registers an offense for a 2 space indentation of while condition 513s accepts indented operands in for body 513s accepts double indentation of unless condition 513s accepts normal indentation inside grouped expression 513s registers an offense and corrects extra indentation of third line 513s accepts two spaces indentation in assignment of array element 513s accepts two spaces indentation in assignment of local variable 513s accepts unary operations 513s accepts the indentation of a broken string 513s accepts indented operands in while body 513s accepts any indentation of parameters to #[] 513s when indentation width is overridden for this cop 514s accepts indented operands in until body 514s accepts indentation of until condition which is offset by a single normal indentation step 514s accepts indentation of unless condition which is offset by a single normal indentation step 514s registers an offense for a 4 space indentation of until condition 514s accepts indentation of while condition which is offset by a single normal indentation step 514s accepts indented operands in if condition 514s accepts indented operands in unless body 514s registers an offense for a 4 space indentation of if condition 514s accepts indented operands in while body 514s registers an offense for a 4 space indentation of while condition 514s registers an offense and corrects 514s accepts indented operands in if body 514s accepts indentation of if condition which is offset by a single normal indentation step 514s registers an offense for a 4 space indentation of unless condition 514s when EnforcedStyle is aligned 514s registers an offense and corrects three space indentation of second line 514s accepts alignment inside a grouped expression 514s accepts indented operands in an array 514s registers an offense and corrects misaligned operands in unless condition 514s accepts indented operands inside and outside a block 514s accepts aligned operands in if condition 514s accepts two spaces indentation of second line 514s registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array 514s accepts any indentation of parameters to #[] 514s accepts two spaces indentation in assignment of array element 514s accepts an expression where the first operand spans multiple lines 514s accepts indented operands in ordinary statement 514s registers an offense and corrects an unindented multiline operation that is the left operand in another operation 514s registers an offense and corrects indented operands in if condition 514s accepts unary operations 514s registers an offense and corrects extra indentation of third line 514s registers an offense and corrects indented second part of string 514s registers an offense and corrects indented operand in second argument 514s accepts indented operands in for body 514s registers an offense and corrects one space indentation of second line 514s accepts indented operands with ternary operators 514s accepts no extra indentation of third line 514s registers an offense for misaligned operands in if condition 514s accepts indented operands inside block + assignment 514s registers an offense for misaligned operands in until condition 514s registers an offense and corrects unaligned operands in op-assignment 514s accepts two spaces indentation in assignment of local variable 514s registers an offense and corrects misaligned string operand when the first operand has backslash continuation 514s registers an offense for misaligned operands in while condition 514s registers an offense for misaligned operands in unless condition 514s accepts aligned operands in assignment 514s accepts indented code on LHS of equality operator 514s registers an offense and corrects no indentation of second line 514s does not check method calls 514s accepts aligned or:ed operands in assignment 514s registers an offense and corrects misaligned string operand when plus is used 514s 514s RuboCop::Cop::Style::StringConcatenation 514s registers an offense and corrects for string concatenation 514s correctly handles strings with special characters 514s correctly handles nested concatenable parts 514s registers an offense and corrects for string concatenation as part of other expression 514s does not register an offense when using `+` with all non string arguments 514s nested interpolation 514s registers an offense and corrects 514s heredoc 514s registers an offense but does not correct when string concatenation with multiline heredoc text 514s registers an offense but does not correct 514s double quotes inside string 514s registers an offense and corrects with double quotes 514s registers an offense and corrects with percentage quotes 514s empty quotes 514s registers offense and corrects 514s multiline 514s if condition 514s registers an offense but does not correct 514s string continuation 514s does not register an offense 514s simple expressions 514s registers an offense and corrects 514s multiline block 514s registers an offense but does not correct 514s inline block 514s registers an offense but does not correct 514s Mode = conservative 514s when first operand is not string literal 514s does not register offense 514s when first operand is string literal 514s registers offense 514s double quotes inside string surrounded single quotes 514s registers an offense and corrects with double quotes 514s 514s RuboCop::Cop::Lint::DeprecatedConstants 514s registers and corrects an offense when using `::TRUE` 514s registers and corrects an offense when using deprecated methods that have no deprecated version 514s registers and corrects an offense when using `FALSE` 514s registers and corrects an offense when using `::NIL` 514s registers and corrects an offense when using `NIL` 514s does not register an offense when not using deprecated constant 514s registers and corrects an offense when using `::FALSE` 514s registers and corrects an offense when using `::Triple::Nested::Constant` 514s does not register an offense when using `__ENCODING__ 515s registers and corrects an offense when using `TRUE` 515s registers and corrects an offense when using deprecated methods that have no alternative 515s Ruby <= 2.7 515s does not register an offense when using `Random::DEFAULT` 515s Ruby >= 2.6 515s registers and corrects an offense when using `Net::HTTPServerException` 515s Ruby <= 2.5 515s does not register an offense when using `Net::HTTPServerException` 515s Ruby >= 3.0 517s registers and corrects an offense when using `::Random::DEFAULT` 517s registers and corrects an offense when using `Random::DEFAULT` 517s 517s RuboCop::Cop::Layout::ConditionPosition 517s accepts ternary ops 517s registers an offense and corrects for condition on the next line 517s accepts condition on a different line for modifiers 517s accepts condition on the same line 517s accepts condition on a different line for modifiers 517s accepts condition on a different line for modifiers 517s registers an offense and corrects for condition on the next line 517s registers an offense and corrects for condition on the next line 517s accepts condition on a different line for modifiers 517s accepts condition on the same line 517s registers an offense and corrects for elsif condition on the next line 517s registers an offense and corrects for condition on the next line 517s accepts condition on the same line 517s accepts condition on the same line 517s 517s RuboCop::Cop::Layout::SpaceBeforeSemicolon 517s does not register an offense for no space before semicolons 517s registers an offense and corrects more than one space before a semicolon 517s registers an offense and corrects space before semicolon 517s inside block braces 517s when EnforcedStyle for SpaceInsideBlockBraces is space 517s accepts a space between an opening brace and a semicolon 517s behaves like common behavior 517s accepts no space between an opening brace and a semicolon 517s when EnforcedStyle for SpaceInsideBlockBraces is no_space 517s registers an offense and corrects a space between an opening brace and a semicolon 517s behaves like common behavior 517s accepts no space between an opening brace and a semicolon 517s heredocs 517s registers an offense and corrects 517s 517s RuboCop::Cop::InternalAffairs::MethodNameEqual 517s registers an offense when using `#method == :do_something` 517s does not register an offense when using `#method?` 517s registers an offense when using `#method == other_node.do_something` 517s 517s RuboCop::Cop::Style::VariableInterpolation 517s registers an offense for interpolated regexp back references 517s registers an offense for interpolated instance variables 517s registers an offense for interpolated regexp nth back references 517s registers an offense for interpolated global variables in string 517s registers an offense for interpolated global variables in backticks 517s registers an offense for interpolated class variables 517s registers an offense for interpolated global variables in symbol 517s registers an offense for interpolated global variables in regexp 517s does not register an offense for variables in expressions 517s 517s RuboCop::Cop::Style::CommentedKeyword 517s registers an offense and corrects when commenting on indented keywords 517s does not register an offense for certain comments 517s checks a long comment in less than one second 517s accepts keyword letter sequences that are not keywords 517s does not register an offense if there are no comments after keywords 517s registers an offense and corrects when commenting on the same line as `end` 517s registers an offense and corrects when commenting on the same line as `begin` 517s registers an offense and corrects when commenting on the same line as `module` 517s registers an offense and corrects when commenting on the same line as `def` 517s registers an offense and corrects when commenting after keyword with spaces 517s does not register an offense if AST contains # symbol 517s registers an offense and corrects when commenting on the same line as `class` 517s registers an offense and corrects for one-line cases 517s 517s RuboCop::Cop::Lint::TopLevelReturnWithArgument 517s Code segment with only top-level return statement 517s expects offense from the return with arguments 517s expects no offense from the return without arguments 517s expects multiple offenses from the return with arguments statements 517s Code segment with method-level return statements 517s expects offense when method-level & top-level return co-exist 517s Code segment with block level returns other than the top-level return 517s expects no offense from the return without arguments 517s expects offense from the return with arguments 517s Code segment with inline if along with top-level return 518s expects no offense from the return without arguments 518s expects multiple offense from the return with arguments 518s Code segment containing semi-colon separated statements 518s expects an offense from the return with arguments and multi-line code 518s expects no offense from the return with arguments and multi-line code 518s 518s RuboCop::Cop::Naming::InclusiveLanguage 518s symbols 518s when CheckSymbols is true 518s registers an offense 518s when CheckSymbols is false 518s does not register an offense 518s strings 518s does not register offenses and not raise `ArgumentError` for invalid byte sequence in UTF-8 518s registers an offense in a heredoc 518s registers an offense for a multiline string 518s registers an offense for an interpolated string 518s when CheckStrings config is false 518s does not register offenses for strings 518s constants 518s when CheckConstants config is true 518s registers offenses for constants 518s when CheckConstants config is false 518s does not register offenses for constants 518s flagged term matching 518s registers an offense when using a flagged term with mixed case 518s registers an offense when using a flagged term 518s registers an offense for a partial word match 518s multiple offenses on a line 518s registers an offense for each word 518s regex 518s registers an offense for a flagged term matched with a regexp 518s disable default flagged term 518s ignores flagged terms that are set to nil 518s WholeWord: true 518s only flags when the term is a whole word 518s variables 518s when CheckVariables config is true 518s registers offenses for global variables 518s registers offenses for instance variables 518s registers offenses for class variables 518s when CheckVariables config is false 518s does not register offenses for variables 518s allowed use 518s does not register an offense for an allowed use 518s offense after an allowed use 518s registers an offense at the correct location 518s identifiers 518s when CheckIdentifiers config is true 518s registers an offense 518s when CheckIdentifiers config is false 518s does not register offenses for identifiers 518s suggestions 518s flagged term with three or more suggestions 518s includes all suggestions in the message 518s flagged term with one suggestion 518s includes the suggestion in the offense message 518s flagged term with two suggestions 518s includes both suggestions in the offense message 518s comments 518s registers an offense in a single line comment 518s registers an offense in a block comment 518s when CheckComments is false 518s does not register an offense 518s filepath 518s multiple offenses in filename 518s registers an offense with all problematic words 518s CheckFilepaths is false 518s does not register an offense 518s offense in directory name 518s registers an offense for a director 518s one offense in filename 518s registers an offense 518s 518s RuboCop::Cop::Style::MissingElse 518s configured to warn only on empty if 518s >= Ruby 2.7 518s does not register an offense 518s given a case statement 518s with no else-clause 518s doesn't register an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s given an unless-statement 518s with a completely empty else-clause 518s doesn't register an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s with no else-clause 518s registers an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s given an if-statement 518s with an else-clause with side-effects 518s doesn't register an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s with no else-clause 518s registers an offense 518s configured to warn only on empty case 518s given an if-statement 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s with no else-clause 518s doesn't register an offense 518s given an unless-statement 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with no else-clause 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s given a case statement 518s with no else-clause 518s registers an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s >= Ruby 2.7 518s does not register an offense 518s UnlessElse disabled 518s given an if-statement 518s with no else-clause 518s registers an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s given a case statement 518s with an else-clause with side-effects 518s doesn't register an offense 518s with no else-clause 518s registers an offense 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s given an unless-statement 518s with an else-clause containing only the literal nil 518s doesn't register an offense 518s with no else-clause 518s registers an offense 518s with an else-clause with side-effects 518s doesn't register an offense 518s with a completely empty else-clause 518s doesn't register an offense 518s >= Ruby 2.7 518s does not register an offense 518s UnlessElse enabled 518s given an if-statement 518s with no else-clause 519s registers an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s >= Ruby 2.7 519s does not register an offense 519s given an unless-statement 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with no else-clause 519s doesn't register an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s given a case statement 519s with no else-clause 519s registers an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s EmptyElse enabled and set to warn on empty 519s given an unless-statement 519s with no else-clause 519s registers an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s given a case statement 519s with an else-clause with side-effects 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s with no else-clause 519s registers an offense 519s >= Ruby 2.7 519s does not register an offense 519s given an if-statement 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with no else-clause 519s registers an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s EmptyElse enabled and set to warn on nil 519s given an unless-statement 519s with an else-clause with side-effects 519s doesn't register an offense 519s with no else-clause 519s registers an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s given a case statement 519s with no else-clause 519s registers an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s given an if-statement 519s with no else-clause 519s registers an offense 519s with an else-clause containing only the literal nil 519s doesn't register an offense 519s with an else-clause with side-effects 519s doesn't register an offense 519s with a completely empty else-clause 519s doesn't register an offense 519s >= Ruby 2.7 519s does not register an offense 519s 519s RuboCop::Cop::Layout::SpaceInsideBlockBraces 519s registers an offense and corrects right brace without inner space 519s accepts left brace without outer space 519s registers an offense and corrects left brace without inner space 519s register offenses and correct both braces without inner space 519s accepts braces surrounded by spaces 519s registers an offense and corrects both left and right brace without inner space after success 519s with passed in parameters 519s accepts new lambda syntax 519s and space before block parameters not allowed 519s registers an offense and corrects left brace with inner space 519s accepts left brace without inner space 519s accepts new lambda syntax 519s for single-line blocks 519s accepts left brace with inner space 519s registers an offense and corrects left brace without inner space 519s for multi-line blocks 519s registers an offense and corrects left brace without inner space 519s accepts left brace with inner space 519s and BlockDelimiters cop enabled 519s registers an offense and corrects for single-line blocks 519s registers an offense and corrects multi-line blocks 519s configured with no_space 519s accepts braces without spaces inside 519s accepts left brace without outer space 519s registers an offense and corrects left brace with inner space 519s registers an offense and corrects both left and right brace with inner space after success 519s registers an offense and corrects right brace with inner space 519s with passed in parameters 519s and space before block parameters not allowed 519s registers an offense when braces are not aligned in multiline block 519s accepts when braces are aligned in multiline block with bracket 519s registers an offense when braces are not aligned in multiline block with bracket 519s registers an offense and corrects left brace with inner space 519s accepts new lambda syntax 519s accepts when braces are aligned in multiline block 519s and space before block parameters allowed 519s accepts left brace with inner space 519s registers an offense and corrects left brace without inner space 519s accepts new lambda syntax 519s with invalid value for EnforcedStyleForEmptyBraces 519s fails with an error 519s with space inside empty braces allowed 519s accepts empty braces with space inside 519s registers an offense and corrects empty braces with no space inside 519s with space inside empty braces not allowed 519s accepts empty braces with line break inside 519s accepts multiline braces with content 519s accepts braces with something inside 519s accepts braces that are not empty 519s registers an offense and corrects empty braces with space inside 520s accepts empty braces with comment and line break inside 520s accepts empty braces with no space inside 520s Ruby >= 2.7 520s registers an offense for numblocks without inner space 520s 520s RuboCop::Cop::Lint::EachWithObjectArgument 520s registers an offense for float argument 520s accepts a string argument 520s registers an offense for bignum argument 520s accepts two arguments 520s accepts a variable argument 520s registers an offense for fixnum argument 520s when using safe navigation operator 520s registers an offense for fixnum argument 520s 520s RuboCop::Cop::Style::GlobalVars 520s does not register an offense for built-in variable $-0 520s does not register an offense for built-in variable $ORS 520s does not register an offense for built-in variable $= 520s does not register an offense for built-in variable $stdin 520s does not register an offense for built-in variable $stderr 520s does not register an offense for built-in variable $0 520s does not register an offense for built-in variable $MATCH 520s does not register an offense for built-in variable $LOADED_FEATURES 520s does not register an offense for built-in variable $/ 520s does not register an offense for built-in variable $IGNORECASE 520s does not register an offense for built-in variable $" 520s does not register an offense for built-in variable $PREMATCH 520s does not register an offense for built-in variable $DEBUG 520s does not register an offense for built-in variable $CHILD_STATUS 520s does not register an offense for built-in variable $JRUBY_VERSION 520s does not register an offense for built-in variable $$ 520s registers an offense for $custom 520s does not register an offense for built-in variable $-l 520s does not register an offense for built-in variable $: 520s does not register an offense for built-in variable $-p 520s does not register an offense for built-in variable $& 520s does not register an offense for built-in variable $SAFE 520s does not register an offense for built-in variable $PROCESS_ID 520s does not register an offense for built-in variable $INPUT_LINE_NUMBER 520s does not register an offense for built-in variable $? 520s does not register an offense for built-in variable $PROGRAM_NAME 520s does not register an offense for built-in variable $JRUBY_REVISION 520s does not register an offense for built-in variable $, 520s does not register an offense for built-in variable $stdout 520s does not register an offense for built-in variable $PID 520s allows user permitted variables 520s does not register an offense for backrefs like $1 520s does not register an offense for built-in variable $-v 520s does not register an offense for built-in variable $-I 520s does not register an offense for built-in variable $-d 520s does not register an offense for built-in variable $RS 520s does not register an offense for built-in variable $_ 520s does not register an offense for built-in variable $` 520s does not register an offense for built-in variable $ARGV 520s does not register an offense for built-in variable $FILENAME 520s does not register an offense for built-in variable $LAST_READ_LINE 520s does not register an offense for built-in variable $DEFAULT_INPUT 520s does not register an offense for built-in variable $LAST_PAREN_MATCH 520s does not register an offense for built-in variable $+ 520s does not register an offense for built-in variable $FIELD_SEPARATOR 520s does not register an offense for built-in variable $\ 520s does not register an offense for built-in variable $FS 520s does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR 520s does not register an offense for built-in variable $OFS 520s does not register an offense for built-in variable $DEFAULT_OUTPUT 520s does not register an offense for built-in variable $~ 520s does not register an offense for built-in variable $' 520s does not register an offense for built-in variable $@ 520s does not register an offense for built-in variable $POSTMATCH 520s does not register an offense for built-in variable $. 520s does not register an offense for built-in variable $-w 520s does not register an offense for built-in variable $* 520s does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR 520s does not register an offense for built-in variable $! 520s does not register an offense for built-in variable $NR 520s does not register an offense for built-in variable $-a 520s does not register an offense for built-in variable $< 520s does not register an offense for built-in variable $; 520s does not register an offense for built-in variable $ERROR_INFO 520s does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR 520s does not register an offense for built-in variable $ERROR_POSITION 520s does not register an offense for built-in variable $> 520s does not register an offense for built-in variable $CLASSPATH 520s does not register an offense for built-in variable $ENV_JAVA 520s does not register an offense for built-in variable $-i 520s does not register an offense for built-in variable $-F 520s does not register an offense for built-in variable $LOAD_PATH 520s does not register an offense for built-in variable $LAST_MATCH_INFO 520s does not register an offense for built-in variable $VERBOSE 520s 520s RuboCop::Cop::Style::RedundantSelf 520s does not report an offense when lvasgn name is used in `unless` 520s reports an offense when a different lvasgn name is used in `if` 520s does not report an offense when self receiver in a method argument and lvalue have the same name 520s does not report an offense when masgn name is used in `until` 521s does not report an offense when receiver and multiple assigned lvalue have the same name 521s accepts a self receiver on an lvalue of a plus-assignment 521s does not report an offense when lvasgn name is used in `while` 521s does not report an offense when lvasgn name is used in `if` 521s does not report an offense when lvasgn name is used in `until` 521s does not report an offense when masgn name is used in `while` 521s does not report an offense when masgn name is used in `unless` 521s accepts a self receiver on an lvalue of mlhs arguments 521s accepts a self receiver of .() 521s accepts a self receiver for methods named like ruby keywords 521s accepts a self receiver of methods also defined on `Kernel` 521s accepts a self receiver on an lvalue of an assignment 521s reports an offense when a different masgn name is used in `if` 521s accepts a self receiver on an lvalue of an and-assignment 521s reports an offense a self receiver of .call 521s accepts a self receiver used to distinguish from constant 521s does not report an offense when receiver and lvalue have the same name 521s does not report an offense when lvasgn name is nested below `if` 521s reports an offense a self receiver on an rvalue 521s does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name 521s accepts when nested receiver and lvalue have the name name 521s accepts a self receiver on an lvalue of an or-assignment 521s does not report an offense when masgn name is used in `if` 521s accepts a self receiver with the square bracket operator 521s accepts a self receiver with the double less-than operator 521s accepts a self receiver used to distinguish from argument of block 521s accepts a self receiver on an lvalue of a parallel assignment 521s class methods 521s accepts a self receiver used to distinguish from optional argument 521s accepts a self receiver used to distinguish from blockarg 521s accepts a self receiver used to distinguish from local variable 521s accepts a self receiver used to distinguish from argument 521s Ruby 2.7 521s registers offense for self usage in numblocks 521s with ruby >= 2.7 521s with pattern matching 521s accepts a self receiver in a nested pattern` 521s accepts a self receiver in a `if-guard` 521s accepts a self receiver in a conditional pattern 521s accepts a self receiver on a `hash-pattern` 521s registers an offense when using self with a different match var 521s accepts a self receiver with a `match-alt` 521s accepts a self receiver on an `match-var` 521s accepts a self receiver on a `array-pattern` 521s registers an offense when using a self receiver with a pin 521s instance methods 521s accepts a self receiver used to distinguish from optional argument 521s accepts a self receiver used to distinguish from an argument when an inner method is defined 521s accepts a self receiver used to distinguish from local variable 521s accepts a self receiver used to distinguish from argument 521s accepts a self receiver used to distinguish from an argument 521s accepts a self receiver used to distinguish from blockarg 521s 521s RuboCop::Cop::Style::EmptyBlockParameter 521s registers an offense for an empty block parameter with {} style 521s registers an offense for an empty block parameter with lambda 521s accepts an empty block parameter with a lambda 521s accepts a block that is do-end style without parameter 521s accepts a non-empty block parameter with do-end style 521s registers an offense for an empty block parameter with super 521s accepts a non-empty block parameter with {} style 521s registers an offense for an empty block parameter with do-end style 521s accepts a block that is {} style without parameter 521s 521s RuboCop::Cop::Lint::NonLocalExitFromIterator 521s allows return with value 522s allows return in define_method 522s allows return in define_singleton_method 522s when block is lambda 522s allows 522s when the return is within a nested method definition 522s allows return in a class method definition 522s allows return in an instance method definition 522s when block in middle of nest is followed by method chain 522s registers offenses 522s when block is not followed by method chain 522s allows 522s when block is followed by method chain 522s and has no argument 522s allows 522s and has single argument 522s registers an offense 522s and has multiple arguments 522s registers an offense 522s when lambda is inside of block followed by method chain 522s allows 522s 522s RuboCop::Cop::Style::EmptyHeredoc 522s registers an offense when using empty `<<~EOS` heredoc 522s registers an offense when using empty heredoc single argument 522s registers an offense when using empty `<<-EOS` heredoc 522s registers an offense when using empty heredoc argument with other argument 522s registers an offense when using empty `<= Ruby 2.7 522s when using dig with arguments forwarding 522s does not register an offense 522s dig over literal 522s with single argument 522s registers an offense and corrects unsuitable use of dig 522s when using dig with splat operator 523s does not register an offense 523s with multiple arguments 523s does not register an offense 523s when without a receiver 523s does not register an offense 523s 523s RuboCop::Cop::Naming::ClassAndModuleCamelCase 523s registers an offense for underscore in class and module name 523s allows module_parent method 523s is not fooled by qualified names 523s accepts CamelCase names 523s custom allowed names 523s does not register offense for multiple allowed names 523s 523s RuboCop::Cop::Lint::UselessAccessModifier 523s behaves like repeated visibility modifiers 523s registers an offense when `private` is repeated 523s when class is empty save modifier 523s registers an offense and corrects 523s behaves like non-repeated visibility modifiers 523s registers an offense and corrects even when `public` is not repeated 523s doesn't register an offense when `protected` is not repeated 523s doesn't register an offense when `private` is not repeated 523s behaves like def in new block 523s registers an offense if no method is defined in Module.new 523s doesn't register an offense if a method is defined in Module.new 523s behaves like at the end of the body 523s registers an offense for trailing `private` 523s behaves like conditionally defined method 523s doesn't register an offense for if 523s doesn't register an offense for unless 523s behaves like repeated visibility modifiers 523s registers an offense when `public` is repeated 523s behaves like at the top of the body 523s registers an offense and corrects for `public` 523s doesn't register an offense for `private` 523s doesn't register an offense for `protected` 523s when passing method as symbol 523s does not register an offense 523s behaves like nested modules 523s doesn't register an offense for nested classs 523s unused modifiers 523s registers an offense with a nested class 523s registers an offense when inside a nested class 523s registers an offense when outside a nested class 523s behaves like conditionally defined method 523s doesn't register an offense for if 523s doesn't register an offense for unless 523s behaves like method defined with define_method 523s doesn't register an offense if a -> is passed 523s doesn't register an offense if a proc is passed 523s doesn't register an offense if a block is passed 523s doesn't register an offense if a lambda is passed 523s behaves like methods defined in an iteration 523s doesn't register an offense for map 523s doesn't register an offense for each 523s behaves like repeated visibility modifiers 523s registers an offense when `protected` is repeated 523s behaves like nested in a begin..end block 523s doesn't flag an access modifier from surrounding scope 524s still flags repeated `protected` 524s when using inline modifiers 524s does not register an offense 524s behaves like method defined with define_method 524s doesn't register an offense if a proc is passed 524s doesn't register an offense if a -> is passed 524s doesn't register an offense if a lambda is passed 524s doesn't register an offense if a block is passed 524s behaves like method named by access modifier name 524s does not register an offense for `public` 524s behaves like unused visibility modifiers 524s registers an offense and corrects when visibility is immediately changed without any intervening defs 524s behaves like nested modules 524s doesn't register an offense for nested modules 524s unused modifiers 524s registers an offense when inside a nested module 524s registers an offense with a nested module 524s registers an offense when outside a nested module 524s when using ActiveSupport behavior when Rails is not eabled 524s reports offenses and corrects 524s behaves like method named by access modifier name 524s does not register an offense for `private` 524s behaves like methods defined in an iteration 524s doesn't register an offense for map 524s doesn't register an offense for each 524s behaves like at the end of the body 524s registers an offense for trailing `public` 524s behaves like def in new block 524s registers an offense if no method is defined in ::Struct.new 524s doesn't register an offense if a method is defined in ::Struct.new 524s behaves like def in new block 524s doesn't register an offense if a method is defined in Class.new 524s registers an offense if no method is defined in Class.new 524s when an access modifier is followed by a class method defined on constant 524s registers an offense and corrects 524s behaves like def in new block 524s doesn't register an offense if a method is defined in Module.new 524s registers an offense if no method is defined in Module.new 524s behaves like def in new block 524s doesn't register an offense if a method is defined in ::Class.new 524s registers an offense if no method is defined in ::Class.new 524s when using ActiveSupport's `concerning` method 524s still points out redundant uses within the block 524s is aware that this creates a new scope 524s Ruby 2.7 524s still points out redundant uses within the block 524s behaves like nested in a begin..end block 524s doesn't flag an access modifier from surrounding scope 524s still flags repeated `private` 524s behaves like method named by access modifier name 524s does not register an offense for `public` 524s when only a constant or local variable is defined after the modifier 524s registers an offense and corrects 524s registers an offense and corrects 524s when using a known method-creating method 524s still points out redundant uses within the module 524s is aware that this creates a new method 524s behaves like nested in a begin..end block 524s still flags repeated `protected` 524s doesn't flag an access modifier from surrounding scope 524s behaves like nested modules 524s doesn't register an offense for nested modules 524s unused modifiers 524s registers an offense when outside a nested module 524s registers an offense when inside a nested module 524s registers an offense with a nested module 524s behaves like conditionally defined method 524s doesn't register an offense for unless 524s doesn't register an offense for if 524s when private_class_method is used without arguments 524s registers an offense and corrects 524s behaves like method defined using class_eval 524s doesn't register an offense if a method is defined 524s registers an offense if no method is defined 524s inside a class 524s registers two offenses when a modifier is inside and outside the block and no method is defined 524s registers an offense when a modifier is outside the block and a method is defined only inside the block 524s behaves like unused visibility modifiers 525s registers an offense and corrects when visibility is immediately changed without any intervening defs 525s behaves like method defined on a singleton class 525s inside a class 525s registers an offense even if a non-singleton-class method is defined 525s doesn't register an offense if the modifier is the same as outside the meta-class 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s registers an offense if no method is defined after the modifier 525s outside a class 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s registers an offense if no method is defined after the modifier 525s when a def is an argument to a method call 525s does not register an offense 525s when an access modifier has no methods 525s registers an offense and corrects 525s behaves like nested in a begin..end block 525s doesn't flag an access modifier from surrounding scope 525s still flags repeated `private` 525s behaves like method defined with define_method 525s doesn't register an offense if a proc is passed 525s doesn't register an offense if a -> is passed 525s doesn't register an offense if a lambda is passed 525s doesn't register an offense if a block is passed 525s behaves like method named by access modifier name 525s does not register an offense for `protected` 525s when private_class_method is used with arguments 525s does not register an offense 525s behaves like method defined on a singleton class 525s outside a class 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s registers an offense if no method is defined after the modifier 525s inside a class 525s doesn't register an offense if a method is defined 525s registers an offense even if a non-singleton-class method is defined 525s registers an offense if no method is defined 525s doesn't register an offense if the modifier is the same as outside the meta-class 525s registers an offense if no method is defined after the modifier 525s behaves like methods defined in an iteration 525s doesn't register an offense for map 525s doesn't register an offense for each 525s behaves like repeated visibility modifiers 525s registers an offense when `protected` is repeated 525s behaves like repeated visibility modifiers 525s registers an offense when `private` is repeated 525s behaves like method defined on a singleton class 525s inside a class 525s registers an offense if no method is defined after the modifier 525s registers an offense even if a non-singleton-class method is defined 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s doesn't register an offense if the modifier is the same as outside the meta-class 525s outside a class 525s registers an offense if no method is defined after the modifier 525s registers an offense if no method is defined 525s doesn't register an offense if a method is defined 525s when an access modifier has no effect 525s registers an offense and corrects 525s behaves like method defined using instance_eval 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s inside a class 525s registers two offenses when a modifier is inside and outside the and no method is defined 525s registers an offense when a modifier is outside the block and a method is defined only inside the block 525s behaves like def in new block 525s registers an offense if no method is defined in ::Class.new 525s doesn't register an offense if a method is defined in ::Class.new 525s behaves like at the end of the body 525s registers an offense for trailing `public` 525s behaves like nested in a begin..end block 525s still flags repeated `public` 525s behaves like method named by access modifier name 525s does not register an offense for `private` 525s behaves like def in new block 525s registers an offense if no method is defined in Class.new 525s doesn't register an offense if a method is defined in Class.new 525s when there are consecutive access modifiers 525s registers an offense and corrects 525s when an access modifier is followed by attr_* 525s does not register an offense 525s behaves like def in new block 525s registers an offense if no method is defined in Struct.new 525s doesn't register an offense if a method is defined in Struct.new 525s behaves like def in new block 525s registers an offense if no method is defined in ::Module.new 525s doesn't register an offense if a method is defined in ::Module.new 525s behaves like method defined using instance_eval 525s doesn't register an offense if a method is defined 525s registers an offense if no method is defined 525s inside a class 525s registers an offense when a modifier is outside the block and a method is defined only inside the block 525s registers two offenses when a modifier is inside and outside the and no method is defined 525s behaves like at the end of the body 525s registers an offense for trailing `protected` 525s behaves like at the end of the body 526s registers an offense for trailing `protected` 526s behaves like conditionally defined method 526s doesn't register an offense for if 526s doesn't register an offense for unless 526s behaves like method defined using class_eval 526s registers an offense if no method is defined 526s doesn't register an offense if a method is defined 526s inside a class 526s registers two offenses when a modifier is inside and outside the block and no method is defined 526s registers an offense when a modifier is outside the block and a method is defined only inside the block 526s when multiple class definitions in file but only one has offense 526s registers an offense and corrects 526s behaves like method defined with define_method 526s doesn't register an offense if a -> is passed 526s doesn't register an offense if a block is passed 526s doesn't register an offense if a proc is passed 526s doesn't register an offense if a lambda is passed 526s behaves like def in new block 526s registers an offense if no method is defined in ::Struct.new 526s doesn't register an offense if a method is defined in ::Struct.new 526s behaves like method defined on a singleton class 526s outside a class 526s registers an offense if no method is defined after the modifier 526s registers an offense if no method is defined 526s doesn't register an offense if a method is defined 526s inside a class 526s doesn't register an offense if a method is defined 526s registers an offense even if a non-singleton-class method is defined 526s doesn't register an offense if the modifier is the same as outside the meta-class 526s registers an offense if no method is defined 526s registers an offense if no method is defined after the modifier 526s when using the class_methods method from ActiveSupport::Concern 526s is aware that this creates a new scope 526s behaves like nested modules 526s doesn't register an offense for nested classs 526s unused modifiers 526s registers an offense when inside a nested class 526s registers an offense with a nested class 526s registers an offense when outside a nested class 526s behaves like def in new block 526s doesn't register an offense if a method is defined in Struct.new 526s registers an offense if no method is defined in Struct.new 526s behaves like methods defined in an iteration 526s doesn't register an offense for map 526s doesn't register an offense for each 526s behaves like def in new block 526s doesn't register an offense if a method is defined in ::Module.new 526s registers an offense if no method is defined in ::Module.new 526s behaves like non-repeated visibility modifiers 526s doesn't register an offense when `protected` is not repeated 526s doesn't register an offense when `private` is not repeated 526s registers an offense and corrects even when `public` is not repeated 526s behaves like nested in a begin..end block 526s still flags repeated `public` 526s behaves like at the top of the body 526s doesn't register an offense for `private` 526s registers an offense and corrects for `public` 526s doesn't register an offense for `protected` 526s behaves like method named by access modifier name 526s does not register an offense for `protected` 526s behaves like repeated visibility modifiers 526s registers an offense when `public` is repeated 526s behaves like at the end of the body 526s registers an offense for trailing `private` 526s 526s RuboCop::Cop::Style::Next 526s does not blow up on empty body while block 526s handles nested autocorrections 526s does not crash with an empty body branch 526s keeps comments when autocorrecting 526s allows loops with conditions at the end with ternary op 526s does not blow up on empty body for block 526s does not crash with empty brackets 526s allows super nodes 526s does not blow up on empty body until block 526s allows empty blocks 526s doesn't reindent heredoc bodies when autocorrecting 526s handles `then` when autocorrecting 526s behaves like iterators 526s registers an offense for unless inside of downto 526s registers an offense for unless inside of select 526s registers an offense for unless inside of loop 526s allows loops with unless being the entire body with else 526s allows loops with conditional break 526s registers an offense for unless inside of map 527s registers an offense for unless inside of for 527s registers an offense when line break before condition 527s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 527s allows loops with conditional return 527s registers an offense for unless inside of nested iterators 527s reports an offense for unless whose body has 3 lines 527s allows loops with unless with else at the end 527s registers an offense for unless inside of reject 527s registers an offense for unless inside of select! 527s registers an offense for unless inside of times 527s registers an offense for unless inside of reject! 527s registers an offense for unless inside of nested iterators 527s registers an offense for unless inside of each 527s registers an offense for unless inside of each_with_object 527s registers an offense for unless inside of collect 527s allows loops with unless with else, nested in another condition 527s autocorrects a misaligned end 527s EnforcedStyle: always 527s registers an offense for modifier unless 527s EnforcedStyle: skip_modifier_ifs 527s allows modifier unless 527s Ruby 2.7 527s registers an offense for unless inside of downto numblock 527s MinBodyLength: 3 527s accepts if whose body has 1 line 527s behaves like iterators 527s registers an offense for if inside of collect 527s registers an offense for if inside of each_with_object 527s reports an offense for if whose body has 3 lines 527s allows loops with conditional return 527s allows loops with if being the entire body with else 527s registers an offense for if inside of times 527s registers an offense for if inside of loop 527s registers an offense for if inside of select 527s registers an offense for if inside of reject 527s registers an offense for if inside of reject! 527s registers an offense for if inside of map 527s allows loops with conditional break 527s registers an offense when line break before condition 527s autocorrects a misaligned end 527s registers an offense for if inside of for 527s registers an offense for if inside of select! 527s registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition 527s allows loops with if with else, nested in another condition 527s registers an offense for if inside of nested iterators 527s registers an offense for if inside of nested iterators 527s registers an offense for if inside of downto 527s registers an offense for if inside of each 527s allows loops with if with else at the end 527s EnforcedStyle: always 527s registers an offense for modifier if 527s EnforcedStyle: skip_modifier_ifs 527s allows modifier if 527s Ruby 2.7 527s registers an offense for if inside of downto numblock 527s Invalid MinBodyLength 527s fails with an error 527s 527s RuboCop::Cop::Layout::LineContinuationSpacing 527s EnforcedStyle: no_space 527s registers an offense when one space in front of backslash 527s ignores when too much space in front of backslash after `__END__` 527s registers no offense with zero spaces in front of backslash 528s registers an offense when many spaces in front of backslash 528s ignores heredocs and comments 528s marks the offense correctly when offense is not in first line 528s ignores empty code 528s EnforcedStyle: space 528s registers no offense with one space in front of backslash 528s ignores when too much space in front of backslash after `__END__` 528s registers an offense when no space in front of backslash 528s ignores empty code 528s marks the offense correctly when offense is not in first line 528s registers an offense when too much space in front of backslash 528s ignores heredocs and comments 528s 528s RuboCop::Cop::Security::Open 528s accepts open with a string that interpolates a literal 528s registers an offense for open with dynamic string that is not prefixed 528s registers an offense for `URI.open` with a block 528s accepts File.open as method 528s registers an offense for open with mode argument 528s registers an offense for `::URI.open` with string that starts with a pipe 528s accepts open with string that has a prefixed interpolation 528s registers an offense for open with string that starts with a pipe 528s accepts open with a literal string starting with a pipe 528s registers an offense for open 528s accepts open on a literal string 528s accepts open with prefix string literal plus something 528s accepts open as variable 528s registers an offense for open with a block 528s accepts open with no arguments 528s registers an offense for `URI.open` with string that starts with a pipe 528s 528s RuboCop::Cop::InternalAffairs::EmptyLineBetweenExpectOffenseAndCorrection 528s does not register an offense when using empty line between `expect_offense` and `expect_correction` with heredoc argument 528s does not register an offense when using only `expect_offense` 528s does not register an offense when using empty line between `expect_offense` and `expect_no_corrections` 528s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction`with variable argument 528s registers and corrects an offense when using no empty line between `expect_offense` and `expect_correction` with heredoc argument 528s registers and corrects an offense when using no empty line between `expect_offense` and `expect_no_corrections` 528s does not register an offense when using empty line between `expect_offense` and `expect_correction`with variable argument 528s 528s RuboCop::Cop::Lint::UselessAssignment 528s when a variable is reassigned multiple times in main body of begin then referenced in rescue 528s accepts 528s when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch 528s registers an offense for the assignment in the if branch 528s when a variable is reassigned at the end of loop body and would be referenced in next iteration 528s accepts 528s when a variable is assigned first with ||= and referenced 528s accepts 528s when a block method argument is not used 528s accepts 528s when a variable is reassigned multiple times in rescue and referenced after the begin 528s registers an offense 528s when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced 528s accepts 528s when a method argument is reassigned but not passed to super 528s registers an offense 528s when a variable is assigned with ||= before the last expression of the scope 528s registers an offense 529s when a variable is assigned and passed to a method followed by method taking block 529s accepts 529s when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch 529s registers an offense for the reassignment in the if branch 529s when a variable is assigned in main body of begin with rescue but unreferenced 529s registers an offense 529s when a variable is reassigned multiple times in main body of begin then referenced in ensure 529s accepts 529s when a variable is reassigned multiple times in main body of begin then referenced after the begin 529s accepts 529s when a variable is assigned multiple times but unreferenced 529s registers offenses for each assignment 529s when a variable is assigned in loop body and referenced in post while condition 529s accepts 529s when a splat method argument is not used 529s accepts 529s when a variable is reassigned in single branch if and referenced in the branch 529s registers an offense for the unreferenced assignment 529s when a named capture is unreferenced in top level 529s registers an offense 529s when a keyword splat method argument is used 529s accepts 529s when there is only one AST node and it is unused variable 529s registers an offense 529s when a variable is assigned in 2 identical if branches 529s doesn't think 1 of the 2 assignments is useless 529s when a block argument is not used 529s accepts 529s when a variable is assigned and referenced when defining a module 529s does not register an offense 529s when a unreferenced variable is reassigned in same branch and referenced after the branching 529s registers an offense for the unreferenced assignment 529s when a method argument is reassigned and zero arity super is called 529s accepts 529s when a variable is reassigned at the end of loop body and would be referenced in loop condition 529s accepts 529s when a variable is assigned while being passed to a method taking block 529s and the variable is not used 529s registers an offense 529s and the variable is used 529s accepts 529s when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch 529s registers an offense for the reassignment in the if branch 529s when a setter is invoked with operator assignment in loop body 529s accepts 529s when a variable is assigned with ||= at the last expression of the scope 529s registers an offense 529s when a referenced variable is reassigned but not re-referenced 529s registers an offense for the non-re-referenced assignment 529s when a unreferenced variable is reassigned on the left side of && and referenced after the && 529s registers an offense for the unreferenced assignment 529s when a variable is not used and the name starts with _ 529s accepts 529s when a variable is assigned with multiple assignment and unreferenced 529s registers an offense 529s when a variable is assigned in loop body and unreferenced 529s registers an offense 529s when a variable is reassigned with binary operator assignment and referenced 529s accepts 529s when a unreferenced variable is reassigned on the right side of && and referenced after the && 529s accepts 529s when an unreferenced variable is reassigned in a block 529s accepts 529s when a variable is assigned and unreferenced in a singleton method defined with variable name 529s registers an offense 529s when a keyword splat method argument is not used 529s accepts 529s when a variable is assigned and unreferenced in top level 529s registers an offense 529s when a referenced variable is reassigned in a block 529s accepts 529s when an optional method argument is not used 529s accepts 529s when a variable is reassigned with logical operator assignment and referenced 529s accepts 529s when a block local variable is declared but not assigned 529s accepts 529s when a variable is assigned in each branch of if and referenced in the else branch 529s registers an offense for the assignment in the if branch 529s when an anonymous keyword splat method argument is defined 529s accepts 529s when a variable is assigned with operator assignment in rescue and would be referenced with retry 529s accepts 529s when a variable is shadowed by a block argument and unreferenced 529s registers an offense 529s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced 529s registers an offense 529s when a variable is reassigned in single branch if and referenced after the branching 529s accepts 529s when a method argument is not used 529s accepts 529s when an assignment in a if branch is referenced in another if branch 529s accepts 529s when a variable is assigned in loop body and referenced in post until condition 529s accepts 529s when a variable is reassigned while referencing itself in rhs and referenced 529s accepts 529s when a variable is reassigned in a loop 529s post while loop 529s accepts 529s post until loop 529s accepts 529s for loop 529s accepts 529s until loop 529s accepts 529s while loop 529s accepts 529s when a variable that has same name as outer scope variable is not referenced in a method defined in loop 529s registers an offense 529s when a variable is assigned and unreferenced in a singleton method defined with self keyword 529s registers an offense 529s when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch 530s registers an offense for the reassignment in the if branch 530s when a variable is assigned and unreferenced in a module 530s registers an offense 530s when a block local variable is assigned and unreferenced 530s registers offenses for the assignment 530s inside a `case-match` node 530s does not register an offense when the variable is used 530s when a variable is assigned in main body of begin, rescue and else then referenced after the begin 530s accepts 530s when a variable is assigned in begin and referenced outside 530s accepts 530s when a referenced variable is reassigned but not re-referenced in a method defined in loop 530s registers an offense 530s when a named capture is unreferenced in other than top level 530s registers an offense 530s when a local variable is unreferenced and zero arity super is called 530s registers an offense 530s when a rescued error variable is wrongly tried to be referenced in another rescue body 530s registers an offense 530s when a variable is assigned in single branch if and unreferenced 530s registers an offense 530s when a variable is assigned and unreferenced in a class 530s registers an offense 530s when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin 530s registers offenses for each assignment before ensure 530s when a variable is assigned and assigned again in a modifier condition 530s accepts with parentheses 530s accepts without parentheses 530s when a variable is assigned and unreferenced in a singleton class 530s registers an offense 530s when a variable is reassigned multiple times in ensure with rescue then referenced after the begin 530s registers an offense 530s when a optional keyword method argument is not used 530s accepts 530s when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition 530s registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) 530s when a variable is assigned in each branch of if and referenced after the branching 530s accepts 530s when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced 530s registers an offense for the assignment in rhs 530s when a named capture is referenced 530s accepts 530s when an unreferenced variable is reassigned and re-referenced 530s registers an offense for the unreferenced assignment 530s when a variable is assigned and unreferenced in a method 530s registers an offense 530s when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching 530s accepts 530s when a variable is assigned with operator assignment in top level 530s registers an offense 530s when a variable is reassigned multiple times in rescue with ensure then referenced after the begin 530s registers an offense 530s when a variable is assigned and unreferenced in a class subclassing another class stored in local variable 530s registers an offense 530s similar name suggestion 530s when there's a similar variable-like method invocation 530s suggests the method name 530s when there are only less similar names 530s does not suggest any name 530s when there's a similar method invocation with arguments 530s does not suggest any name 530s when there's a similar name but it's in inner scope 530s does not suggest any name 530s when there's a similar method invocation with explicit receiver 530s does not suggest any name 530s when there's a similar variable 530s suggests the variable name 530s when a variable is assigned on each side of && and referenced after the && 530s accepts 530s when a variable is assigned at the end of rescue and would be referenced with retry 530s accepts 530s when a variable is referenced in rhs of named capture expression 530s accepts 530s 530s RuboCop::Cop::Layout::DefEndAlignment 530s when EnforcedStyleAlignWith is start_of_line 530s accepts matching foo def ... end 530s accepts matching def ... end 530s accepts matching defs ... end 530s registers an offense for mismatched def test end and autocorrects 530s accepts matching foo bar def ... end 530s registers an offense for mismatched foo def test end and autocorrects 530s registers an offense for mismatched def Test.test end and autocorrects 530s accepts matching def ... end 530s when including an anonymous module containing `private def` 530s does not register an offense 530s correct + opposite 530s registers an offense 530s when using refinements and `private def` 530s does not register an offense 530s when EnforcedStyleAlignWith is def 531s registers an offense for mismatched foo def test end and autocorrects 531s registers an offense for mismatched def test end and autocorrects 531s accepts matching defs ... end 531s accepts matching foo def ... end 531s registers an offense for mismatched def Test.test end and autocorrects 531s accepts matching def ... end 531s correct + opposite 531s registers an offense 531s 531s RuboCop::Cop::Style::MultilineInPatternThen 531s >= Ruby 2.7 531s does not register an offense when line break for multiple candidate values of `in` 531s registers an offense for empty `in` statement with `then` 531s registers an offense for multiline (one line in a body) `in` statement with `then` 531s doesn't register an offense for empty `in` statement without `then` 531s doesn't register an offense for multiline `in` statement with `then` followed by other lines 531s does not register an offense for array `when` statement with `then` 531s doesn't register an offense when `then` required for a body of `in` is used 531s does not register an offense for hash `in` statement with `then` 531s autocorrects when the body of `in` branch starts with `then` 531s registers an offense for multiline (two lines in a body) `in` statement with `then` 531s doesn't register an offense for singleline `in` statement with `then` 531s registers an offense when one line for multiple candidate values of `in` 531s doesn't register an offense for multiline `in` statement without `then` 531s 531s RuboCop::Cop::InternalAffairs::InheritDeprecatedCopClass 531s registers an offense when using `Cop` 531s registers an offense when using `RuboCop::Cop::Cop` 531s does not register an offense when not inherited super class 531s does not register an offense when using `Base` 531s 531s RuboCop::Cop::Style::RedundantRegexpCharacterClass 531s with a character class containing a single unicode character property 531s registers an offense and corrects 531s with a character class containing a single character before `{n,m}` quantifier 531s registers an offense and corrects 531s with a character class containing multiple unicode code-points 531s does not register an offense and corrects 531s with a character class containing an interpolation 531s does not register an offense 531s with a character class containing an escaped [ 531s registers an offense and corrects 531s with a character class containing a space meta-character 531s registers an offense and corrects 531s with a character class containing two characters 531s does not register an offense 531s with a regexp containing invalid g escape 531s registers an offense and corrects 531s with a negated character class with a single element 531s does not register an offense 531s with consecutive escaped square brackets inside a character class 531s does not register an offense 531s with a character class containing a single unicode code-point 531s registers an offense and corrects 531s with consecutive escaped square brackets 531s does not register an offense 531s with escaped square brackets surrounding a single character 531s does not register an offense 531s with an interpolated unnecessary-character-class regexp 531s registers an offense and corrects 531s with an array index inside an interpolation 531s does not register an offense 531s with a character class containing escaped character requiring escape outside 531s registers an offense and corrects 531s with a character class containing a negated-space meta-character 531s registers an offense and corrects 531s with a character class containing a space 531s when not using free-spaced mode 531s registers an offense and corrects 531s when using free-spaced mode 531s with a commented single-element character class 531s does not register an offense 531s with a single space character class 531s does not register an offense with only /x 531s does not register an offense with /ix 531s does not register an offense with /iux 531s with an unnecessary-character-class after a comment 531s registers an offense and corrects 531s with a character class containing a single negated unicode character property 531s registers an offense and corrects 531s with a character class containing a single range 531s does not register an offense 531s with a character class containing a character requiring escape outside 531s does not register an offense 531s with a character class containing a negated posix bracket expression 531s does not register an offense 531s with a character class containing set intersection 531s does not register an offense 531s with a redundant character class after an interpolation 531s registers an offense and corrects 531s with a character class containing an escaped ] 531s registers an offense and corrects 531s with a character class containing a single character 531s registers an offense and corrects 531s with %r{} regexp 531s with multiple character classes containing single characters 531s registers an offense and corrects 531s with a character class containing a single character 532s registers an offense and corrects 532s with a character class containing a single character before `+` quantifier 532s registers an offense and corrects 532s with a character class containing a single character before `{n,m}` quantifier 532s registers an offense and corrects 532s with a character class containing a single character inside a group 532s registers an offense and corrects 532s with a character class with first element an escaped ] 532s does not register an offense 532s with a character class containing a single character inside a group 532s registers an offense and corrects 532s with a character class containing an unescaped-# 532s registers an offense and corrects 532s with a character class containing a single character before `+` quantifier 532s registers an offense and corrects 532s with multiple character classes containing single characters 532s registers an offense and corrects 532s with a character class containing an escaped-# 532s registers an offense and corrects 532s with a character class containing an escaped-0 532s does not register an offense (FAILED - 1) 532s with a multi-line interpolation 532s ignores offenses in the interpolated expression 532s with a character class containing an escaped-b 532s does not register an offense 532s with a character class containing a posix bracket expression 532s does not register an offense 532s 532s RuboCop::Cop::Corrector 532s #rewrite 532s allows removal of characters from range ending 532s allows replacement of a range 532s allows insertion before a source range 532s allows insertion after a source range 532s raises a useful error if not given a node or a range 533s accepts a node instead of a range 533s allows removal of characters preceding range 533s allows removal of characters from range beginning 533s allows insertion before and after a source range 533s allows removal of a range 533s when range is from incorrect source 533s raises exception from replace 533s raises exception from remove 533s raises exception from remove_trailing 533s raises exception from insert_before 533s raises exception from remove_leading 533s raises exception from insert_after 533s raises exception from remove_preceding 533s 533s RuboCop::Cop::Style::StringLiterals 533s configured with single quotes preferred 533s can handle character literals 533s registers offense for correct + opposite 533s detects unneeded double quotes within concatenated string 533s accepts double quotes when interpolating a global variable 533s accepts \\\n in a string 533s registers an offense for "\" 533s registers an offense for "\"" 533s accepts double quotes at the start of regexp literals 533s accepts double quotes when unicode control sequence is used 533s accepts single quotes 533s accepts double quotes in interpolation 533s accepts double quotes with some other special symbols 533s accepts single quotes in interpolation 533s does not register an offense for words with non-ascii chars and other control sequences 533s accepts double quotes when interpolating & quotes in multiple lines 533s accepts %q and %Q quotes 533s accepts double quotes when interpolating an instance variable 533s accepts " in a %w 533s accepts double quotes when new line is used 533s registers offense for double quotes when single quotes suffice 533s accepts % quotes 533s accepts double quotes when single quotes are used 534s accepts heredocs 534s accepts double quotes when interpolating a class variable 534s can handle a built-in constant parsed as string 534s accepts double quotes when control characters are used 534s registers an offense for words with non-ascii chars 534s configured with double quotes preferred 534s accepts % quotes 534s accepts single quotes in string with escaped non-' character 534s accepts double quotes 534s does not accept multiple escaped single quotes in single quotes 534s accepts single quotes at the start of regexp literals 534s accepts single quotes in interpolation 534s accepts escaped single quote in string with escaped non-' character 534s accepts heredocs 534s accepts single quotes when they are needed 534s flags single quotes with plain # (not #@var or #{interpolation} or #$global 534s registers offense for escaped single quote in single quotes 534s registers offense for opposite + correct 534s can handle a built-in constant parsed as string 534s accepts %q and %Q quotes 534s accepts single quoted string with backslash 534s accepts ' in a %w 534s registers offense for single quotes when double quotes would be equivalent 534s when configured with a bad value 534s fails 534s when ConsistentQuotesInMultiline is true 534s and EnforcedStyle is double_quotes 534s doesn't register offense for single quotes with embedded double 534s registers an offense for unneeded single quotes in continuation 534s accepts continued strings using all double quotes 534s registers an offense for mixed quote styles in a continued string 534s and EnforcedStyle is single_quotes 534s doesn't choke on heredocs with inconsistent indentation 534s accepts continued strings using all single quotes 534s accepts for double quotes with an escaped normal character 534s doesn't register offense for double quotes with interpolation 534s doesn't register offense for double quotes with embedded single 534s registers an offense for unneeded double quotes in continuation 534s registers an offense for strings with line breaks in them 534s accepts for double quotes with an escaped special character 534s registers an offense for mixed quote styles in a continued string 534s 534s RuboCop::Cop::Style::RedundantPercentQ 534s accepts %Q at the beginning of a double quoted string with interpolation 534s accepts %q at the beginning of a section of a double quoted string with interpolation 534s accepts %Q at the beginning of a section of a double quoted string with interpolation 534s accepts a heredoc string that contains %q 534s accepts %q at the beginning of a double quoted string with interpolation 534s accepts %q containing string interpolation 534s with %q strings 534s registers an offense for a string containing escaped backslashes 534s registers an offense for only single quotes 534s accepts a string with escaped backslash and non-backslash characters 534s accepts regular expressions starting with %q 534s autocorrects for strings that are concatenated with backslash 534s accepts a string with escaped non-backslash characters 534s accepts a string with single quotes and double quotes 534s registers an offense for no quotes 534s registers an offense for only double quotes 534s with %Q strings 534s autocorrects for strings that are concatenated with backslash 534s accepts a dynamic %Q string with double quotes 534s registers an offense for static string with only double quotes 534s accepts a string with double quotes and an escaped normal character 534s accepts regular expressions starting with %Q 534s registers an offense for dynamic string without quotes 534s registers an offense for static string without quotes 534s accepts a string with single quotes and double quotes 534s accepts a string with double quotes and an escaped special character 534s 534s RuboCop::Cop::Lint::RedundantSafeNavigation 534s registers an offense and corrects when `&.` is used inside `if` condition 534s registers an offense and corrects when `&.` is used inside `unless` condition 534s does not register an offense when using `&.` with non-allowed method in condition 534s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 534s registers an offense and corrects when `&.` is used inside complex condition 534s does not register an offense when using `&.` outside of conditions 534s registers an offense and corrects when `&.` is used inside `#{loop_type}` condition 534s does not register an offense when using `&.respond_to?` with `nil` specific method as argument in condition 534s 534s RuboCop::Formatter::FuubarStyleFormatter 534s #with_color 534s when color is enabled 534s outputs coloring sequence code at the beginning and the end 534s when color is disabled 534s outputs nothing 534s #progressbar_color 534s initially 535s is green 535s when convention and error offenses are detected in a file 535s is red 535s when no offenses are detected in a file 535s is still green 535s when an error offense is detected in a file 535s is red 535s and then a convention offense is detected in the next file 535s is still red 535s when a offense is detected in a file and autocorrected 535s is green 535s when a convention offense is detected in a file 535s is yellow 535s 535s RuboCop::Cop::Style::CommandLiteral 535s when PercentLiteralDelimiters is configured with curly braces 535s respects the configuration when autocorrecting 535s when EnforcedStyle is set to mixed 535s a single-line ` string without backticks 535s is accepted 535s a multi-line ` string with backticks 535s registers an offense without autocorrection 535s a multi-line %x string with backticks 535s is accepted 535s a single-line %x string without backticks 535s registers an offense and corrects to backticks 535s a single-line %x string with backticks 535s is accepted 535s when configured to allow inner backticks 535s registers an offense without autocorrection 535s a multi-line ` string without backticks 535s registers an offense and corrects to %x 535s a single-line ` string with backticks 535s registers an offense without autocorrection 535s when configured to allow inner backticks 535s is accepted 535s a multi-line %x string without backticks 535s is accepted 535s when EnforcedStyle is set to percent_x 535s a single-line %x string without backticks 535s is accepted 535s a multi-line %x string without backticks 535s is accepted 535s a multi-line %x string with backticks 535s is accepted 535s a single-line ` string with backticks 535s registers an offense without autocorrection 535s a multi-line ` string without backticks 535s registers an offense and corrects to %x 535s a single-line %x string with backticks 535s is accepted 535s a single-line ` string without backticks 535s registers an offense and corrects to %x 535s a multi-line ` string with backticks 535s registers an offense without autocorrection 535s when EnforcedStyle is set to backticks 535s a single-line ` string with backticks 535s registers an offense without autocorrection 535s when configured to allow inner backticks 535s is accepted 535s a multi-line %x string with backticks 535s is accepted 535s when configured to allow inner backticks 535s registers an offense without autocorrection 535s a single-line %x string without backticks 535s registers an offense and corrects to backticks 535s a single-line ` string without backticks 535s is accepted 535s a multi-line %x string without backticks 535s registers an offense and corrects to backticks 535s a single-line %x string with backticks 535s is accepted 535s when configured to allow inner backticks 535s registers an offense without autocorrection 535s a multi-line ` string without backticks 535s is accepted 535s a multi-line ` string with backticks 535s registers an offense without autocorrection 535s when configured to allow inner backticks 535s is accepted 535s heredoc commands 535s is ignored 535s when PercentLiteralDelimiters only has a default 535s respects the configuration when autocorrecting 535s when PercentLiteralDelimiters is configured and a default exists 535s ignores the default when autocorrecting 535s %x commands with other delimiters than parentheses 535s registers an offense 535s 535s RuboCop::Cop::InternalAffairs::RedundantMessageArgument 535s does not register an offense when formatted `MSG` is passed 535s does not register an offense when `#message` with another node is passed 535s when `#message` is passed 535s registers an offense 535s when `#message` with offending node is passed 535s when there are others keyword arguments 535s registers an offense 535s when message is the only keyword argument 535s registers an offense 535s when `MSG` is passed 535s registers an offense 535s 535s RuboCop::Cop::Layout::EmptyLinesAroundMethodBody 535s registers an offense for class method body ending with a blank 535s registers an offense for class method body starting with a blank 535s is not fooled by single line methods 535s registers an offense for method body ending with a blank 535s registers an offense for method body starting with a blank 536s accepts method body starting with a line with spaces 536s 536s RuboCop::Cop::Style::ZeroLengthPredicate 536s when inspecting a StringIO object 536s when initialized with a string 536s does not register an offense 536s does not register an offense with top-level ::StringIO 536s when initialized without arguments 536s does not register an offense with top-level ::StringIO 536s does not register an offense 536s when inspecting a Tempfile object 536s does not register an offense 536s does not register an offense with top-level ::Tempfile 536s with hashes 536s registers an offense for `0 != hash.size` 536s registers an offense for `0 == hash.size 536s registers an offense for `hash.size != 0` 536s registers an offense for `hash.size == 0` 536s when name of the variable is `size` or `length` 536s accepts comparison 536s accepts inequality check 536s accepts equality check 536s with collection variables 536s registers an offense for `collection.size != 0` 536s registers an offense for `0 == collection.size` 536s registers an offense for `0 != collection.size` 536s registers an offense for `collection.size == 0` 536s with strings 536s registers an offense for `string.size != 0` 536s registers an offense for `0 == string.size` 536s registers an offense for `string.size == 0` 536s registers an offense for `0 != string.size` 536s when inspecting a File::Stat object 536s does not register an offense 536s does not register an offense with ::File 536s with arrays 536s registers an offense for `1 > array.length` 536s registers an offense for `array.size == 0` 536s registers an offense for `array.size > 0` 536s registers an offense for `array.length != 0` 536s registers an offense for `0 == array.length` 536s registers an offense for `array.size < 1` 536s registers an offense for `array.length > 0` 536s registers an offense for `0 == array.size` 536s registers an offense for `1 > array.size` 536s registers an offense for `array.length < 1` 536s registers an offense for `array.size != 0` 536s registers an offense for `array.length == 0` 536s registers an offense for `0 < array.length 536s registers an offense for `0 != array.size` 536s registers an offense for `0 != array.length` 536s registers an offense for `0 < array.size` 536s 536s RuboCop::Cop::Style::ClassVars 536s registers an offense for class variable declaration 536s does not register an offense for class variable usage 536s registers an offense for class variable set in class 536s registers an offense for class variable set on class receiver 536s 536s RuboCop::Cop::Style::NumericLiterals 536s does not count a leading minus sign as a digit 536s registers an offense for an integer with misplaced underscore 536s accepts a short integer without underscore 536s accepts short numbers without underscore 536s accepts long numbers with underscore 536s autocorrects numbers with spaces between leading minus and numbers 536s autocorrects negative floating-point numbers 536s handles numeric literal with exponent 536s autocorrects numeric literal with exponent (large E) and dot 536s autocorrects negative numbers 536s registers an offense for a long undelimited integer 536s ignores non-decimal literals 536s accepts integers with less than three places at the end 536s registers an offense for a float with a long undelimited integer part 536s autocorrects numeric literal with exponent and dot 536s for --auto-gen-config 536s with separators 536s does not disable the cop if the line is disabled 536s disables the cop 536s when the number is only digits 536s sets the right value if one is disabled inline 536s detects right value of MinDigits based on the longest number 536s strict 536s registers an offense for an integer with misplaced underscore 536s when `'3000'` is specified for `AllowedNumbers` 536s does not register an offense 536s registers an offense 536s when `3000` is specified for `AllowedNumbers` 536s does not register an offense 536s registers an offense 536s AllowedPatterns 536s corrects by inserting underscores every 3 digits 536s does not register an offense for numbers that exactly match the pattern 536s registers an offense for numbers that do not exactly match the pattern 536s AllowedPatterns with repetition 536s does not register an offense for numbers that match the pattern 536s 536s RuboCop::Cop::Style::GlobalStdStream 537s registers an offense and corrects when using std stream as const 537s does not register an offense when assigning std stream const to std stream gvar 537s does not register an offense when assigning other const to std stream gvar 537s does not register an offense when using non std stream const 537s 537s RuboCop::Cop::Style::StringHashKeys 537s does not register an offense when not using strings as keys 537s does not register an offense when string key is used in gsub! 537s registers an offense when using strings as keys 537s autocorrects strings as keys into symbols with the correct syntax 537s does not register an offense when string key is used in Open3.pipeline 537s registers an offense when using strings as keys mixed with other keys 537s does not register an offense when string key is used in Open3.capture3 537s does not register an offense when string key is used in gsub 537s does not register an offense when string key is used in IO.popen 537s 537s RuboCop::Cop::Style::RedundantFileExtensionInRequire 537s does not register an offense when requiring filename without an extension 537s registers an offense and corrects when requiring filename ending with `.rb` 537s does not register an offense when requiring filename ending with `.so` 537s does not register an offense when requiring variable as a filename 537s 537s RuboCop::Cop::Commissioner 537s #investigate 537s traverses the AST and invoke cops specific callbacks 537s stores all errors raised by the cops 537s when passed :raise_cop_error option 537s re-raises the exception received while processing 537s traverses the AST with on_send / on_csend 537s for a restricted cop 537s calls on_send for the right method calls 537s on both csend and send 537s calls on_send for the right method calls 537s for unrestricted cops 537s calls on_send all method calls 537s when a cop reports offenses 537s returns all offenses found by the cops 537s when passed :raise_error option 537s re-raises the exception received while processing 537s when given a source with parsing errors 537s only calls on_other_file 537s when given a force 537s passes the input params to all cops/forces that implement their own #investigate method 537s 537s RuboCop::Cop::Style::TrivialAccessors 537s accepts splats 537s registers an offense on writer without braces 537s accepts writer using top level 537s registers an offense on one-liner reader 537s registers an offense on reader with `private` 537s accepts writer with different ivar name 537s accepts reader using top level 537s accepts expressions within writer 537s flags a reader inside a class, inside an instance_eval call 537s registers an offense on instance writer 537s accepts reader nested within a module 537s accepts non-trivial writer 537s accepts writer nested within a module 537s accepts expressions within reader 537s registers an offense on instance reader 537s does not register an offense on DSL-style writer 537s accepts blocks 537s accepts non-trivial reader 537s accepts reader with different ivar name 537s registers an offense on class writer 537s registers an offense on one-liner writer 537s registers an offense on class reader 537s accepts writer in a module 537s accepts writer nested within an instance_eval call 537s registers an offense on reader with braces 537s accepts reader nested within an instance_eval call 537s accepts an initialize method looking like a writer 537s exact name match disabled 537s registers an offense when names mismatch in reader 537s registers an offense when names mismatch in writer 537s allow predicates 537s accepts predicate-like reader 537s with allowed methods 537s accepts allowed reader 537s accepts allowed writer 537s with AllowPredicates: false 537s accepts allowed predicate 537s ignore class methods 537s accepts class writer 537s accepts class reader 537s disallow predicates 537s does not accept predicate-like reader 537s with DSL denied 537s registers an offense on DSL-style writer 537s 537s RuboCop::CommentConfig 537s comment_only_line? 537s when line contains only code 537s returns false 537s returns false 537s returns false 537s returns false 537s when line is empty 537s returns true 537s when line contains only comment 537s returns true 537s returns true 537s when line contains code and comment 537s returns false 537s #extra_enabled_comments 537s has values as arrays of extra enabled cops 537s has keys as instances of Parser::Source::Comment for extra enabled comments 537s #cop_disabled_line_ranges 537s collects line ranges by disabled cops 537s #cop_enabled_at_line? 544s supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all 544s can handle double disable of one cop 544s supports disabling cops with numbers in their name 544s supports disabling single line with a directive at end of line 544s supports enabling/disabling multiple cops along with a comment 545s just ignores unpaired enabling directives 545s does not confuse a cop name including "all" with all cops 545s handles indented single line 546s does not confuse a comment directive embedded in a string literal with a real comment 546s supports enabling/disabling multiple cops in a single directive 547s supports disabling cops on a comment line with an EOL comment 547s supports disabling all lines after a directive 547s supports disabling cops with multiple levels in department name 547s supports disabling cops with multiple uppercase letters 548s supports enabling/disabling cops without a prefix 548s supports disabling multiple lines with a pair of directive 548s 548s RuboCop::Cop::Lint::TripleQuotes 548s does not register an offense for implicit concatenation 548s quintuple quotes 548s registers an offense and corrects 548s triple quotes 548s on one line 548s registers an offense and corrects 548s when only quotes 548s registers an offense and corrects to a single empty quote 548s on multiple lines 548s registers an offense and corrects 548s with only whitespace 548s does not register 548s heredocs 548s does not register an offense 548s string interpolation 548s does not register an offense 548s with nested extra quotes 548s registers an offense and corrects 548s 548s RuboCop::Cop::Style::HashSyntax 548s configured to accept both shorthand and explicit use of hash literal value 548s Ruby >= 3.1 549s does not register an offense when hash key and hash value are the same 549s does not register an offense when hash values are omitted 549s does not register an offense when hash key and hash value are partially the same 549s does not register an offense when hash key and hash value are not the same 549s Ruby <= 3.0 549s does not register an offense when hash key and hash value are the same 549s configured to enforce ruby 1.9 style with no mixed keys 549s UseHashRocketsWithSymbolValues disabled 549s registers an offense when keys start with a digit 549s registers an offense for hash rockets in method calls 549s accepts new syntax when keys are interpolated string 549s accepts new syntax in a hash literal 549s accepts new syntax in method calls 549s registers an offense for mixed syntax when new is possible 549s accepts an empty hash 550s registers offense for hash rocket syntax when new is possible 550s registers an offense when keys have special symbols in them 550s registers an offense when keys have different types and styles 550s accepts hash rockets when keys have different types 550s registers an offense when keys have whitespaces in them 550s ruby < 2.2 552s registers an offense when keys have special symbols and mix styles 552s registers an offense when keys have whitespaces and mix styles 552s accepts hash rockets when keys have whitespaces in them 552s accepts hash rockets when keys start with a digit 552s accepts hash rockets when keys have special symbols in them 552s registers an offense when keys start with a digit and mix styles 552s UseHashRocketsWithSymbolValues enabled 552s registers an offense when keys have whitespaces in them 552s accepts new syntax in a hash literal 552s autocorrects to hash rockets when all elements have symbol value 552s registers an offense when keys have special symbols in them 553s registers an offense for mixed syntax when new is possible 553s registers an offense when any element uses a symbol for the value 553s accepts an empty hash 553s registers an offense when any element has a symbol value in method calls 553s accepts new syntax when keys are interpolated string 553s registers an offense when keys have different types and styles 553s registers an offense when keys start with a digit 553s registers offense for hash rocket syntax when new is possible 553s registers an offense for hash rockets in method calls 553s accepts hash rockets when keys have different types 553s accepts new syntax in method calls 553s ruby < 2.2 553s registers an offense when keys have whitespaces and mix styles 553s accepts hash rockets when keys have special symbols in them 553s accepts hash rockets when keys have whitespaces in them 553s registers an offense when keys have special symbols and mix styles 553s accepts hash rockets when keys start with a digit 553s registers an offense when keys start with a digit and mix styles 553s configured to enforce hash rockets style 553s accepts an empty hash 553s registers offense for Ruby 1.9 style 553s registers an offense for mixed syntax 553s accepts hash rockets in method calls 553s registers an offense for 1.9 style in method calls 553s accepts hash rockets in a hash literal 553s UseHashRocketsWithSymbolValues has no impact 553s does not register an offense when there is a symbol value 553s configured to enforce explicit hash value syntax style 553s Ruby >= 3.1 553s registers and corrects an offense when hash key and hash value are partially the same 553s does not register an offense when hash key and hash value are the same 553s does not register an offense when hash key and hash value are not the same 553s registers and corrects an offense when hash values are omitted 553s Ruby <= 3.0 553s does not register an offense when hash key and hash value are the same 553s configured to enforce no mixed keys 553s registers an offense when keys have whitespaces and mix styles 553s accepts hash rockets in method calls 553s accepts hash rockets when keys start with a digit 553s accepts the hash rocket syntax when new is possible 553s registers an offense when keys have different types and styles 553s accepts old hash rockets style 553s registers an offense when keys start with a digit and mix styles 553s registers an offense when keys have special symbols and mix styles 554s accepts new syntax in method calls 554s accepts hash rockets when keys have whitespaces in them 554s accepts hash rockets when keys have different types 554s autocorrects mixed key hashes 554s accepts new syntax in a hash literal 554s registers an offense for mixed syntax when new is possible 554s accepts hash rockets when keys have special symbols in them 554s accepts an empty hash 554s accepts new hash style 554s configured to enforce ruby19 style 554s with SpaceAroundOperators enabled 554s accepts hash rockets when keys have different types 554s accepts an empty hash 554s registers an offense for mixed syntax when new is possible 554s preserves quotes during autocorrection 554s accepts hash rockets when symbol keys end with = 554s registers offense when keys start with an uppercase letter 554s accepts new syntax in a hash literal 554s registers an offense when symbol keys have strings in them 554s accepts new syntax in method calls 554s accepts hash rockets when symbol characters are not supported 554s autocorrects a missing space when hash is used as argument 554s autocorrects even if it interferes with SpaceAroundOperators 554s registers offense for hash rocket syntax when new is possible 554s registers an offense for hash rockets in method calls 554s if PreferHashRocketsForNonAlnumEndingSymbols is false 554s registers an offense for hash rockets when symbols end with ! 554s registers an offense for hash rockets when symbols end with ? 554s ruby < 2.2 554s accepts hash rockets when symbol keys have string in them 554s when using a return value uses `return` 554s registers an offense and corrects when enclosed in parentheses 554s registers an offense and corrects when not enclosed in parentheses 554s if PreferHashRocketsForNonAlnumEndingSymbols is true 554s accepts hash rockets when symbols end with ! 554s accepts hash rockets when symbols end with ? 554s with SpaceAroundOperators disabled 554s autocorrects even if there is no space around => 554s configured to use hash rockets when symbol values are found 554s registers an offense when any element uses a symbol for the value 554s accepts both hash rockets and ruby19 syntax in the same code 554s accepts hash in ruby19 style with no symbol values 554s registers an offense when any element has a symbol value in method calls 554s accepts ruby19 syntax when no elements have symbol values in method calls 554s accepts an empty hash 554s registers an offense for hashes with elements on multiple lines 554s autocorrects to hash rockets when all elements have symbol value 554s registers an offense when using hash rockets and no elements have a symbol value 554s accepts ruby19 syntax when no elements have symbol values 554s configured to enforce shorthand syntax style 554s Ruby >= 3.1 554s registers and corrects an offense when hash key and hash value (lvar) are the same 554s registers an offense when hash key and hash value are not the same and method with `[]` is called 554s does not register an offense when one line `until` condition follows (without parentheses) 554s does not register an offense when hash key and hash value are the same but the value ends `?` 554s registers and corrects an offense when `Hash[foo: foo]` and an expression follows 554s registers and corrects an offense when hash key and hash value are the same and it in the method bodyand an expression follows 554s does not register an offense when hash pattern matching 554s does not register an offense when `return` with one line `if` condition follows (without parentheses) 554s does not register an offense when symbol hash key and string hash value are the same 554s does not register an offense when hash key and hash value are not the same 554s registers and corrects an offense when `Hash[foo: foo]` 554s registers and corrects an offense when hash key and hash value are the same and it in the method body 554s registers an offense when one line `until` condition follows (with parentheses) 554s does not register an offense when call expr without arguments and with a block follows 554s does not register an offense when symbol hash key and hash value (lvar) are not the same 554s does not register an offense when with parentheses call expr follows 554s does not register an offense when with parentheses call expr follows assignment expr 554s does not register an offense when one line `if` condition follows (without parentheses) 554s does not register an offense when hash key and hash value are partially the same 554s does not register an offense when without parentheses call expr follows 554s registers and corrects an offense when hash key and hash value are the same 554s does not register an offense when lvar hash key and hash value are the same 554s registers and corrects an offense when hash key and hash value are partially the same 554s does not register an offense when hash key and hash value are the same but the value ends `!` 554s registers an offense when one line `if` condition follows (with parentheses) 554s does not register an offense when hash values are omitted 554s does not register an offense when method call hash key and hash value are the same 554s does not register an offense when without parentheses call expr follows after nested method call 554s does not register an offense when call expr with argument and a block follows 554s when hash roket syntax 554s does not register an offense 554s Ruby <= 3.0 554s does not register an offense when hash key and hash value are the same 554s configured to disallow mixing of implicit and explicit hash literal value 554s Ruby >= 3.1 554s does not register an offense when all hash values are omitted 554s registers an offense when some hash values are omitted but they cannot all be omitted 554s does not register an offense when all hash values are present, but no values can be omitted 554s registers an offense when some hash values are omitted but they can all be omitted 555s registers an offense when all hash values are present, but can all be omitted 555s does not register an offense when all hash values are present, but only some values can be omitted 555s Ruby <= 3.0 555s does not register an offense when all hash key and hash values are the same 555s 555s RuboCop::Cop::Layout::EmptyLinesAroundBeginBody 555s registers many offenses with complex begin-end 555s registers an offense for begin body ending with a blank 555s registers an offense for begin body starting in method 555s registers an offense for else body ending 555s registers an offense for begin body starting with rescue 555s registers an offense for ensure body ending 555s registers an offense for begin body ending in method 555s registers an offense for rescue body ending 555s accepts begin block without empty line 555s accepts begin block without empty line in a method 555s registers an offense for begin body starting with a blank 555s 555s RuboCop::Cop::Style::Semicolon 555s registers an offense for semicolon at the end no matter what 555s accepts semicolon after params if so configured 555s registers an offense for range (`1..42`) with semicolon 555s accepts one line empty method definitions 555s accepts semicolon before end if so configured 555s registers an offense for one line method with two statements 555s registers an offense for a semicolon at the beginning of a line 555s registers an offense for range (`1...42`) with semicolon 555s accept semicolons inside strings 555s accepts one line empty module definitions 555s registers an offense for several expressions 555s accepts one line method definitions 555s registers an offense for a single expression 555s accepts one line empty class definitions 555s when AllowAsExpressionSeparator is true 555s accepts several expressions 555s accepts one line method with two statements 555s Ruby >= 2.6 555s registers an offense for endless range with semicolon (irange and erange) 555s registers an offense for endless range with semicolon in the method definition 555s registers an offense for endless range with semicolon (irange only) 555s does not register an offense for endless range without semicolon 555s with a multi-expression line without a semicolon 555s does not register an offense 555s 555s RuboCop::Cop::Style::RedundantArgument 555s does not register an offense when method called with no arguments 555s registers an offense and corrects when method called without parenthesis on variable 555s does not register an offense when method called with no receiver 555s registers an offense and corrects when method called on literals 556s registers an offense and corrects when method called without parenthesis on literals 556s does not register an offense when method called with different argument 556s works with double-quoted strings when configuration is single-quotes 556s does not register an offense when method called with more than one arguments 556s registers an offense and corrects when method called on variable 556s non-builtin method 556s does not register an offense with other argument 556s registers an offense and corrects with configured argument 556s 556s RuboCop::Config 556s #allowed_camel_case_file? 556s when the passed path is a gemspec 556s is expected to equal true 556s when the passed path does not match allowed camel case patterns to include 556s is expected to equal false 556s when the passed path matches allowed camel case patterns to include 556s is expected to equal true 556s #file_to_exclude? 556s when the passed path matches any of patterns to exclude 556s returns true 556s when the passed path does not match any of patterns to exclude 556s returns false 556s #check 556s when a deprecated configuration is detected 556s prints a warning message for the loaded path 556s #patterns_to_exclude 556s when config file has AllCops => Exclude key 556s returns the Exclude value 556s #make_excludes_absolute 556s when config is in root directory 556s generates valid absolute directory 556s when config is in subdirectory 556s generates valid absolute directory 556s #patterns_to_include 556s when config file has AllCops => Include key 556s returns the Include value 556s #validate 556s when the empty section is AllCops 556s raises validation error 556s when the configuration includes an empty section 556s raises validation error 556s when the configuration includes an obsolete EnforcedStyle parameter 556s raises validation error 556s when the configuration includes an obsolete parameter 556s raises validation error 556s when the configuration includes multiple but config does not allow 556s raises validation error 556s when the configuration includes multiple invalid enforced styles 556s raises validation error 556s when the configuration includes an obsolete cop 556s raises validation error 556s when the configuration includes multiple valid enforced styles and one invalid style 556s raises validation error 556s conflicting Safe settings 556s when the configuration includes an unsafe cop that is explicitly declared to have a safe autocorrection 556s raises validation error 556s when the configuration includes an unsafe cop without a declaration of its autocorrection 556s does not raise validation error 556s when the configuration includes Lint/Syntax cop 556s when the configuration matches the default 557s does not raise validation error 557s when the configuration does not match the default 557s raises validation error 557s when all cops are both Enabled and Disabled by default 557s raises validation error 557s when the configuration includes multiple valid enforced styles 557s does not raise validation error 557s when the configuration includes any common parameter 557s does not raise validation error 557s when the configuration is in the base RuboCop config folder 557s is not validated 557s when the configuration includes a valid EnforcedStyle 557s does not raise validation error 557s when the configuration includes obsolete parameters and cops 557s raises validation error 557s when the configuration includes a valid enforced style 557s does not raise validation error 557s when the configuration includes any unrecognized parameter 557s prints a warning message 557s when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter 557s raises validation error 557s when the configuration includes any unrecognized cop name 558s raises an validation error 558s when the configuration includes an invalid enforced style 558s raises validation error 558s when the configuration includes any unrecognized cop name and given `--ignore-unrecognized-cops` option 558s there are no unrecognized cops 558s does not print any warnings 558s there is unrecognized cop 558s prints a warning about the cop 558s when the configuration includes an invalid EnforcedStyle 558s raises validation error 558s when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter 558s raises validation error 558s #for_department 558s accepts a Symbol 558s always returns the department's config 558s whether the cop is enabled 558s when an entire cop department is disabled 558s but an individual cop is enabled 558s the cop setting overrides the department 558s when an nested cop department is disabled 558s but an individual cop is enabled 558s the cop setting overrides the department 558s and an individual cop is not specified 558s the cop setting overrides the department 558s when configuration has no mention of a cop 558s enables the cop that is not mentioned 558s when all cops are explicitly enabled by default 558s enables the cop that is not mentioned 558s when all cops are disabled by default 558s disables the cop that is not mentioned 558s when a cop has configuration but no explicit Enabled setting 558s enables the cop by default 558s when an entire cop department is enabled 558s but an individual cop is disabled 558s still disables the cop 558s #for_badge 558s takes into account the department 558s works if department has no config 558s #deprecation_check 558s when there is AllCops configuration 558s if there are no Excludes or Includes keys 558s does not yield 558s if there are is an Includes key 558s yields 558s if there are is an Excludes key 558s yields 558s when there is no AllCops configuration 558s does not yield 558s #file_to_include? 558s when the passed path matches any of patterns to include 558s returns true 558s when the passed path does not match any of patterns to include 558s returns false 558s #possibly_include_hidden? 558s returns true when Include config includes a toplevel dotfile 558s returns true when Include config only includes regular paths 558s returns true when Include config includes a dotfile in a path 558s returns true when Include config includes a regex 558s 558s RuboCop::Cop::Lint::SafeNavigationChain 558s TargetRubyVersion >= 2.3 559s registers an offense for safe navigation with < operator 559s accepts usages of safe navigation with `-@` method 559s accepts usages of safe navigation with `nil?` method 559s accepts usages of method chain with safe navigation only with argument 559s registers an offense for safe navigation on the right-hand side of the `+` 559s registers an offense for safe navigation on the right-hand side of the `-` 559s registers an offense for ordinary method chain exists after safe navigation method call with a block-pass 559s accepts usages of safe navigation with | operator 559s accepts usages of safe navigation with == operator 559s registers an offense for safe navigation with [] operator 559s registers an offense for safe navigation on the right-hand side of the `/` 559s registers an offense for safe navigation on the right-hand side of the `*` 559s accepts usages of safe navigation with || operator 559s accepts usages of safe navigation with `in?` method 559s registers an offense for ordinary method chain exists after safe navigation method call with a block 559s accepts usages of safe navigation with `+@` method 559s registers an offense for ordinary method call exists after safe navigation method call 559s accepts usages of safe navigation at last only with argument 559s registers an offense for safe navigation with >= operator 560s accepts usages of safe navigation with & operator 560s accepts usages of safe navigation with && operator 560s accepts usages of ordinary method chain 560s accepts usages of safe navigation with `to_d` method 560s registers an offense for ordinary method call exists after safe navigation method call with an argument 560s registers an offense for ordinary method chain exists after safe navigation method call with an argument 560s registers an offense for safe navigation with > operator 560s accepts usages of safe navigation with self assignment method 560s accepts usages of safe navigation with === operator 560s registers an offense for safe navigation with <= operator 560s accepts usages of safe navigation with assignment method 560s accepts usages of method chain with safe navigation only 560s accepts usages of safe navigation with `try` method 560s accepts usages of safe navigation with `present?` method 560s registers an offense for safe navigation with []= operator 560s registers an offense for ordinary method chain exists after safe navigation method call 560s accepts usages of safe navigation with `blank?` method 560s accepts usages of safe navigation at last only 560s accepts usages of ordinary method chain with argument 560s registers an offense for safe navigation with + operator 560s proper highlighting 560s when in a begin 560s when there are methods before 560s when there are methods after 560s when in a method 560s when used with a modifier if 560s >= Ruby 2.7 560s registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter 560s 560s RuboCop::Cop::Lint::BigDecimalNew 560s registers an offense and corrects using `BigDecimal.new()` 560s does not register an offense when using `BigDecimal()` 560s registers an offense and corrects using `::BigDecimal.new()` 560s 560s RuboCop::ConfigRegeneration 560s #options 560s when the todo file is malformed 560s is expected to eq {:auto_gen_config=>true} 560s it parses options from the generation comment 560s is expected to eq {:auto_gen_config=>true, :auto_gen_only_exclude=>true, :auto_gen_timestamp=>false, :exclude_limit=>"100", :offense_counts=>false} 560s when no todo file exists 560s is expected to eq {:auto_gen_config=>true} 560s when there is a blank todo file 560s is expected to eq {:auto_gen_config=>true} 560s 560s RuboCop::Cop::Lint::IncompatibleIoSelectWithFiberScheduler 560s does not register an offense when using `Enumerable#select` 560s registers an offense when using `IO.select` with write argument and using return value but does not autocorrect 560s does not register an offense when using `IO.select` with multiple read arguments 560s registers and corrects an offense when using `IO.select` with single write as `self` and timeout arguments 560s registers an offense when using `IO.select` with read argument and using return value but does not autocorrect 560s registers and corrects an offense when using `IO.select` with single write, `nil`, and timeout arguments 560s registers and corrects an offense when using `IO.select` with single read and timeout arguments 560s does not register an offense when using `IO.select` with read and write arguments 560s registers and corrects an offense when using `IO.select` with single write argument 560s registers and corrects an offense when using `IO.select` with single read as `self` and timeout arguments 560s does not register an offense when using `IO.select` with multiple write arguments 560s registers and corrects an offense when using `IO.select` with single write and timeout arguments 560s registers and corrects an offense when using `::IO.select` with single read argument 560s registers and corrects an offense when using `IO.select` with multiple read argument and specify the first argument only 561s registers and corrects an offense when using `IO.select` with single read argument and specify the first argument only 561s registers and corrects an offense when using `IO.select` with single read, `nil`, and timeout arguments 561s registers and corrects an offense when using `IO.select` with single read argument 561s registers and corrects an offense when using `::IO.select` with single read and timeout arguments 561s 561s RuboCop::Cop::Layout::SpaceAfterComma 561s array index commas without space 561s behaves like trailing comma 561s accepts the last comma 561s behaves like ends with an item 561s registers an offense and does autocorrection 561s method call arg commas without space 561s behaves like ends with an item 561s registers an offense and does autocorrection 561s block argument commas without space 561s behaves like ends with an item 561s registers an offense and does autocorrection 561s behaves like trailing comma 561s accepts the last comma 561s inside hash braces 561s when EnforcedStyle for SpaceInsideBlockBraces is space 561s registers an offense for no space between a comma and a closing brace 561s behaves like common behavior 561s accepts a space between a comma and a closing brace 561s when EnforcedStyle for SpaceInsideBlockBraces is no_space 561s accepts no space between a comma and a closing brace 561s behaves like common behavior 561s accepts a space between a comma and a closing brace 561s 561s RuboCop::Cop::Layout::MultilineAssignmentLayout 561s same_line style 561s registers an offense for masgn with multi-line lhs 561s allows multi-line assignments on the same line 561s ignores arrays 561s registers an offense when the rhs is a different line in setters 561s registers an offense when the rhs is a different line 561s registers an offense when the rhs is a different line in []= 561s configured supported types 561s allows supported types to be configured 561s when supported types is block 561s allows when multi-line assignments using block definition is on the same line 561s registers an offense when multi-line assignments using block definition on separate lines 561s allows multi-line block defines on separate lines 561s allows multi-line assignments when using shovel operator 561s new_line style 561s registers an offense when the rhs is on the same line in setters 561s ignores arrays 561s registers an offense when the rhs is on the same line 561s registers an offense when the rhs is on the same line in []= 561s registers an offense for masgn with multi-line lhs 561s allows multi-line assignments on separate lines 561s when supported types is block 561s allows multi-line assignments when using shovel operator 561s allows multi-line block defines on separate lines 561s registers an offense when multi-line assignments using block definition is on the same line 561s allows multi-line assignments when using block definition on separate lines 561s configured supported types 561s allows supported types to be configured 561s 561s RuboCop::Cop::InternalAffairs::NodeTypePredicate 561s does not register an offense for a predicate node type check 561s comparison node type check 561s registers an offense and autocorrects 561s 561s RuboCop::YAMLDuplicationChecker 561s when yaml has duplicated keys in the second level 561s calls block with keys 561s calls block 561s when yaml has duplicated keys in the top level 561s calls block with keys 561s calls block 561s when yaml does not have any duplication 561s does not call block 561s 561s RuboCop::Cop::Layout::FirstParameterIndentation 561s align_parentheses style 561s no paren method defs 561s ignores with hash args 561s ignores 561s invalid indentation on multi-line defs 561s normal arguments 561s registers an offense and corrects incorrectly indented first element 561s hash arguments static def 561s registers an offense and corrects incorrectly indented first element 561s hash arguments 561s registers an offense and corrects incorrectly indented first element 561s valid indentation on multi-line defs 561s accepts correctly indented first element hash 561s accepts correctly indented first element 561s single line method defs 561s ignores 561s ignores with hash args 561s consistent style 561s valid indentation on static multi-line defs 561s accepts correctly indented first element hash 561s accepts correctly indented first element 561s valid indentation on multi-line defs 561s accepts correctly indented first element hash 561s accepts correctly indented first element 561s single line method defs 561s ignores with hash args 561s ignores 561s no paren method defs 561s ignores with hash args 561s ignores 561s invalid indentation on multi-line defs 561s normal arguments 561s registers an offense and corrects incorrectly indented first element 561s hash arguments static method def 561s registers an offense and corrects incorrectly indented first element 561s hash arguments 561s registers an offense and corrects incorrectly indented first element 561s 561s RuboCop::Cop::Lint::HeredocMethodCallPosition 561s correct cases 562s accepts simple correct case 562s accepts chained correct case 562s ignores if no call 562s incorrect cases 562s simple incorrect case with paren 562s detects 562s with trailing comma in method call 562s detects 562s chained case with multiple line args 562s detects 562s chained case without args 562s detects 562s chained case with parens 562s detects 562s chained case no parens 562s detects 562s simple incorrect case 562s detects 562s 562s RuboCop::Cop::Style::StringMethods 562s registers an offense 562s when using safe navigation operator 562s registers an offense 562s 562s RuboCop::Cop::Layout::EmptyLineAfterMagicComment 562s registers an offense when code that immediately follows typed comment 562s registers offense when frozen_string_literal used with shareable_constant_value without empty line 562s registers an offense for code that immediately follows comment 562s accepts a source file with only a magic comment 562s accepts magic comment with shareable_constant_value 562s registers an offense for documentation immediately following comment 562s accepts magic comment followed by encoding 562s accepts code that separates the comment from the code with a newline 562s accepts an empty source file 562s registers an offense when multiple magic comments without empty line 562s accepts magic comment with typed 562s 562s RuboCop::Cop::Gemspec::DeprecatedAttributeAssignment 562s behaves like deprecated attributes 563s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 563s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 563s registers and corrects an offense when using `spec.rubygems_version =` 563s registers and corrects an offense when using `s.rubygems_version =` 563s behaves like deprecated attributes with addition 563s registers and corrects an offense when using `s.rubygems_version +=` 563s registers and corrects an offense when using `spec.rubygems_version +=` 563s behaves like deprecated attributes 563s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 563s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 563s registers and corrects an offense when using `spec.rubygems_version =` 563s registers and corrects an offense when using `s.rubygems_version =` 563s behaves like deprecated attributes 563s registers and corrects an offense when using `spec.rubygems_version =` 563s registers and corrects an offense when using `s.rubygems_version =` 563s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 563s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 563s behaves like deprecated attributes 563s does not register an offense when using `s.rubygems_version =` outside `Gem::Specification.new` 563s registers and corrects an offense when using `spec.rubygems_version =` 563s registers and corrects an offense when using `s.rubygems_version =` 563s does not register an offense when using `rubygems_version =` and receiver is not `Gem::Specification.new` block variable 563s 563s RuboCop::Cop::Style::BlockDelimiters 563s EnforcedStyle: line_count_based 563s accepts a single line block with braces 563s does not autocorrect do-end if {} would change the meaning 563s registers an offense for a single line block with do-end 563s accepts a multi-line block with do-end 563s accepts a multi-line block that needs braces to be valid ruby 563s does not autocorrect {} if do-end would change the meaning 563s autocorrects do-end for single line blocks to { and } 563s Ruby >= 2.7 563s accepts a single line numblock with braces 563s accepts a multi-line numblock with do-end 563s registers an offense for a single line numblock with do-end 563s accepts a multi-line numblock that needs braces to be valid ruby 563s with a single line do-end block with an inline `rescue` 563s autocorrects properly 563s when there are braces around a multi-line block 563s registers an offense in the simple case 563s registers an offense when combined with attribute assignment 563s does not autocorrect {} if do-end would introduce a syntax error 563s accepts braces if do-end would change the meaning 563s autocorrects { and } to do and end 563s accepts a multi-line functional block with {} if it is an ignored method by regex 563s registers an offense and keep chained block when there is a comment after the closing brace and block body is not empty 563s registers an offense when there is a comment after the closing brace and block body is empty 563s registers an offense when there is a comment after the closing brace and block body is not empty 564s can handle special method names such as []= and done? 564s accepts a multi-line functional block with {} if it is an ignored method 564s registers an offense when there is a comment after the closing brace and using method chain 564s autocorrects adjacent curly braces correctly 564s registers an offense for braces if do-end would not change the meaning 564s EnforcedStyle: semantic 564s accepts a multi-line block with braces when chained 564s accepts a multi-line block with braces when passed to a known functional method 564s autocorrects do-end to {} if it is a functional block 564s autocorrects do-end to {} with appropriate spacing 564s autocorrects do-end to {} if it is a functional block and does not change the meaning 564s accepts a single line block with {} if used in an erange 564s accepts a multi-line functional block with do-end if it is a known procedural method 564s accepts a single line block with {} if used in an array 564s accepts a multi-line block with braces when passed to a method 564s accepts a multi-line block with do-end if it is the return value of its scope 564s accepts a single line block with {} if used in an irange 564s accepts a multi-line functional block with do-end if it is an ignored method by regex 564s allows {} if it is a known functional method 565s accepts a multi-line block with braces if it is the return value of its scope 565s registers an offense for a multi-line block with do-end if the return value is attribute-assigned 565s registers an offense for a multi-line block with braces if the return value is not used 565s autocorrects do-end with `rescue` to {} if it is a functional block 565s accepts a single line block with {} if used in a logical or 565s accepts a single line block with {} if used in a logical and 565s registers an offense for a multi-line block with do-end if the return value is passed to a method 565s accepts a single line block with {} if used in an if statement 565s registers an offense for a multi-line block with do-end if the return value is assigned 565s accepts a single line block with {} followed by a safe navigation method call 565s autocorrects do-end with `ensure` to {} if it is a functional block 566s accepts a multi-line functional block with do-end if it is an ignored method 566s accepts a multi-line block with braces if the return value is assigned 566s allows {} if it is a known procedural method 566s with a procedural one-line block 566s with AllowBracesOnProceduralOneLiners true 566s accepts a single line procedural do-end block 566s accepts a single line procedural block with braces 566s with AllowBracesOnProceduralOneLiners false or unset 566s registers an offense for a single line procedural block 566s accepts a single line block with do-end if it is procedural 566s with a procedural multi-line block 566s autocorrects { and } to do and end 566s autocorrects { and } to do and end with appropriate spacing 566s BracesRequiredMethods 566s other methods 566s autocorrects { and } to do and end 566s allows braces 566s BracesRequiredMethods methods 566s registers an offense with do 566s allows braces 566s EnforcedStyle: always_braces 566s does not autocorrect do-end if {} would change the meaning 566s registers an offense for a multi-line block with do-end 566s registers an offense for a single line block with do-end 566s autocorrects do-end with `ensure` to {} if it is a functional block 566s autocorrects do-end with `rescue` to {} if it is a functional block 566s accepts a multi-line functional block with do-end if it is an ignored method by regex 566s accepts a multi-line functional block with do-end if it is an ignored method 566s registers an offense for multi-line chained do-end blocks 566s accepts a multi-line block that needs braces to be valid ruby 566s accepts a single line block with braces 567s registers an offense for multi-lined do-end blocks when combined with attribute assignment 567s when there are braces around a multi-line block 567s allows when the block is being chained 567s allows when combined with attribute assignment 567s allows in the simple case 567s EnforcedStyle: braces_for_chaining 567s allows do/end inside Hash[] 567s autocorrects do-end with `ensure` to {} if it is a functional block 567s accepts a multi-line block with do-end 567s registers an offense for multi-line chained do-end blocks 567s accepts a multi-line functional block with {} if it is an ignored method 567s accepts a multi-line functional block with {} if it is an ignored method by regex 567s accepts a multi-line block that needs braces to be valid ruby 567s allows chaining to } inside of Hash[] 567s allows when :[] is chained 567s registers an offense for a single line block with do-end 567s disallows {} with no chain inside of Hash[] 567s autocorrects do-end with `rescue` to {} if it is a functional block 567s accepts a single line block with braces 567s Ruby >= 2.7 567s accepts a multi-line numblock with do-end 567s accepts a multi-line numblock that needs braces to be valid ruby 567s accepts a single line numblock with braces 567s registers an offense for a single line numblock with do-end 567s when there are braces around a multi-line block 567s allows when the block is being chained 567s registers an offense in the simple case 567s registers an offense when combined with attribute assignment 567s allows when the block is being chained with attribute assignment 567s with safe navigation 567s registers an offense for multi-line chained do-end blocks 567s 567s RuboCop::Cop::Layout::AccessModifierIndentation 567s when EnforcedStyle is set to outdent 567s accepts private with argument indented to method depth in a class 567s accepts module fn def indented to method depth in a module 567s accepts private def indented to method depth in a module 567s accepts private def indented to method depth in module defined with Module.new 567s registers an offense and corrects module_function indented to method depth in a module 567s accepts private with argument indented to method depth in singleton class 567s registers an offense and corrects misaligned access modifiers in nested classes 567s accepts private with argument indented to method depth in module defined with Module.new 567s accepts private def indented to method depth in singleton class 567s registers an offense and corrects private indented to method depth in singleton class 567s registers an offense and corrects private indented to method depth in a module 567s registers an offense and corrects private indented to method depth in class defined with Class.new 567s accepts private def indented to method depth in class defined with Class.new 567s accepts private with argument indented to method depth in class defined with Class.new 567s accepts module fn with argument indented to method depth in a module 567s registers an offense and corrects private indented to method depth in module defined with Module.new 567s accepts private with argument indented to method depth in a module 567s accepts protected indented to the containing class indent level 567s registers offense and corrects private indented to method depth in a class 567s accepts private def indented to method depth in a class 567s accepts private indented to the containing class indent level 567s when EnforcedStyle is set to indent 567s registers an offense and corrects misaligned protected 567s registers an offense and corrects misaligned private in class defined with Class.new 567s registers an offense and corrects misaligned access modifiers in nested classes 568s registers an offense and corrects opposite + correct alignment 568s registers an offense and corrects misaligned private in a singleton class 568s accepts methods with a body 568s registers an offense and corrects misaligned private in module defined with Module.new 568s registers an offense and corrects misaligned private 568s registers an offense and corrects access modifiers in arbitrary blocks 568s accepts properly indented protected 568s registers an offense and corrects correct + opposite alignment 568s accepts indented access modifiers with arguments in nested classes 568s registers an offense and corrects misaligned private in module 568s accepts an empty class 568s registers an offense and corrects misaligned module_function in module 568s accepts properly indented private in module defined with Module.new 568s accepts properly indented private 568s when indentation width is overridden for this cop only 568s accepts properly indented private 568s when 4 spaces per indent level are used 568s accepts properly indented private 568s 568s RuboCop::Cop::Lint::ToEnumArguments 568s registers an offense when method is called on `self` 568s registers an offense when enumerator is created for another method 568s ignores the block argument 568s does not register an offense when enumerator is created with `__method__` and the correct arguments 568s registers an offense when required arg is missing 568s registers an offense when optional arg is missing 568s registers an offense when arguments are swapped 568s registers an offense when splat arg is missing 568s registers an offense when other values are passed for keyword arguments 568s registers an offense when enumerator is created for `__method__` with missing arguments 568s does not register an offense when enumerator is created with `:m` and the correct arguments 568s does not register an offense when not inside method definition 568s registers an offense when required keyword arg is missing 568s registers an offense when optional keyword arg is missing 568s registers an offense when splat keyword arg is missing 568s does not register an offense when method call has a receiver other than `self` 568s does not register an offense when enumerator is created with `__callee__` and the correct arguments 568s arguments forwarding 568s registers an offense when enumerator is created with non matching arguments 568s does not register an offense when enumerator is created with the correct arguments 568s 568s RuboCop::Cop::Lint::UriRegexp 568s registers an offense and corrects using `::URI.regexp` with argument 568s registers an offense and corrects using `URI.regexp` without argument 568s registers an offense and corrects using `URI.regexp` with argument 568s does not register an offense when using `regexp` with variable receiver 568s registers an offense and corrects using `::URI.regexp` without argument 568s does not register an offense when using `regexp` without receiver 568s array argument 568s registers an offense and corrects using `URI.regexp` with %i arrays 568s registers an offense and corrects using `URI.regexp` with %w arrays 568s registers an offense and corrects using `URI.regexp` with literal arrays 568s 568s RuboCop::Cop::Style::DoubleNegation 568s when `EnforcedStyle: forbidden` 569s registers an offense for `!!` when return location and using `rescue` 569s registers an offense for `!!` when return location and using `rescue` and `ensure` 569s registers an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 569s registers an offense and corrects for `!!` when not a return location 569s registers an offense and corrects for `!!` when return location 569s registers an offense and corrects for `!!` 569s does not register an offense for ! 569s does not register an offense for `not not` 569s registers an offense and corrects for `!!` when using `return` keyword 569s registers an offense for `!!` when return location and using `ensure` 569s when `EnforcedStyle: allowed_in_returns` 569s registers an offense and corrects for `!!` when not a return location 569s does not register an offense for `!!` when return location and using `rescue` 569s registers an offense and corrects for `!!` with multi-line hash at return location 569s does not register an offense for `!!` when return location and using `ensure` 569s does not register an offense for `!!` when return location and using `unless` 569s does not register an offense for `!!` when return location 569s does not register an offense for `!!` when using `return` keyword 569s registers an offense and corrects for `!!` when not return location and using `unless` 569s registers an offense and corrects for `!!` when not return locationand using `case`, `when`, and `else` 569s registers an offense and corrects for `!!` with hash when not return locationand using `case`, `when`, and `else` 569s registers an offense and corrects for `!!` with hash when not return locationand using `if`, `elsif`, and `else` 569s does not register an offense for `!!` with array when return location and using `if`, `elsif`, and `else` 569s does not register an offense for `!!` with array when return location and using `case`, `when`, and `else` 569s registers an offense and corrects for `!!` with single-line hash at return location 569s does not register an offense for `!!` with hash when return location and using `if`, `elsif`, and `else` 569s does not register an offense for `!!` when return location by `define_method` 569s registers an offense and corrects for `!!` with multi-line array at return location 569s registers an offense and corrects for `!!` 569s does not register an offense for `!!` when return location and using `rescue` and `ensure` 569s does not register an offense for `!!` when return location by `define_singleton_method` 569s does not register an offense for `!!` with hash when return location and using `case`, `when`, and `else` 569s registers an offense and corrects for `!!` with array when not return locationand using `case`, `when`, and `else` 569s registers an offense and corrects for `!!` with complex array at return location 569s registers an offense and corrects for `!!` with nested array at return location 569s registers an offense and corrects for `!!` with array when not return locationand using `if`, `elsif`, and `else` 570s does not register an offense for `!!` when return location and using `rescue`, `else`, and `ensure` 570s does not register an offense for ! 570s registers an offense and corrects for `!!` with nested hash at return location 570s does not register an offense for `!!` when return location and using `if`, `elsif`, and `else` 570s registers an offense and corrects for `!!` when not return locationand using `if`, `elsif`, and `else` 570s does not register an offense for `not not` 570s registers an offense and corrects for `!!` with single-line array at return location 570s does not register an offense for `!!` when return location and using `case`, `when`, and `else` 570s Ruby >= 2.7 570s registers an offense and corrects for `!!` when not return locationand using `case`, `in`, and `else` 570s Ruby >= 2.7 570s does not register an offense for `!!` when return location and using `case`, `in`, and `else` 570s 570s RuboCop::Cop::Style::InPatternThen 570s >= Ruby 2.7 570s registers an offense for `in b | c | d;` (alternative pattern) 570s registers an offense for `in b, c | d;` 570s registers an offense for `in b;` 570s accepts `;` separating statements in the body of `in` 570s registers an offense for `in b, c, d;` (array pattern) 570s when inspecting a case statement with an empty branch 570s does not register an offense 570s 570s RuboCop::Cop::Lint::IdentityComparison 570s does not register an offense when rhs is `object_id` without receiver 570s does not register an offense when lhs is `object_id` without receiver 570s registers an offense and corrects when using `==` for comparison between `object_id`s 570s does not register an offense when using `==` for comparison between `object_id` and other 570s does not register an offense when a receiver that is not `object_id` uses `==` 570s does not register an offense when using `==` 570s 570s RuboCop::Cop::Layout::SpaceInsideRangeLiteral 570s accepts multiline range literal with no space in it 570s registers an offense in multiline range literal with space in it 570s accepts no space inside .. literal 570s registers an offense for space inside ... literal 570s accepts no space inside ... literal 570s accepts complex range literal with space in it 570s registers an offense for space inside .. literal 570s 570s RuboCop::Cop::Style::IdenticalConditionalBranches 570s on case with empty when 570s doesn't register an offense 570s on if..else with slightly different trailing lines 570s doesn't register an offense 570s when using pattern matching 570s when one of the case-match branches is empty 570s does not register an offense 570s on case-match without else 570s doesn't register an offense 570s on case-match with empty when 570s doesn't register an offense 570s on case-match with identical trailing lines 570s registers and corrects an offense 570s on case-match with identical leading lines 570s registers and corrects an offense 570s on case-match with identical bodies 570s registers an offense and corrects 570s on case..in with identical bodies and assigning to a variable used in `case` condition 570s doesn't register an offense 570s on case..when with identical bodies and assigning to a variable used in `case` condition 570s doesn't register an offense 570s with a ternary 570s registers an offense 570s on if..elsif with no else 570s doesn't register an offense 570s on case with identical bodies 570s registers an offense and corrects 570s on if..else with identical leading lines 570s registers and corrects an offense 570s on if..else with identical trailing lines 570s registers and corrects an offense 570s when one of the case branches is empty 570s does not register an offense 570s on case without else 570s doesn't register an offense 570s with empty brace 570s does not raise any error 570s on if..else with identical bodies and assigning to a variable used in `if` condition 570s doesn't register an offense 570s on case with identical trailing lines 570s registers and corrects an offense 570s on case with identical leading lines 570s registers and corrects an offense 570s on if..else with identical bodies 570s registers and corrects an offense 570s 570s RuboCop::Cop::Naming::ConstantName 570s allows screaming snake case with POSIX upper case characters 570s registers an offense for snake case in const name 570s allows screaming snake case in multiple const assignment 570s allows screaming snake case in const name 570s does not check if rhs is a non-offensive const assignment 570s does not check names if rhs is a `Struct.new` with conditional assign 570s does not check names if rhs is a method call with block 570s registers an offense for camel case in const name 570s registers an offense for camel case in const namewhen using frozen range assignment 570s does not check if rhs is another constant 570s does not check names if rhs is a method call with conditional assign 570s does not check names if rhs is a `Class.new` 570s does not check names if rhs is a method call 570s checks qualified const names 570s registers offenses for camel case in multiple const assignment 570s registers 1 offense if rhs is offending const assignment 570s does not check names if rhs is a `Class.new` with conditional assign 570s registers an offense for non-POSIX upper case in const name 570s does not check names if rhs is a `Struct.new` 570s registers an offense for camel case in const namewhen using frozen object assignment 570s when a rhs is a conditional expression 570s when conditional branches contain only constants 570s does not check names 570s when conditional branches contain only string values 570s registers an offense 570s when conditional branches contain a value other than a constant 570s does not check names 570s 570s RuboCop::Cop::Layout::TrailingWhitespace 570s registers an offense for a line ending with space 570s registers an offense for trailing whitespace in a heredoc string 570s registers an offense for a tab in a heredoc 570s autocorrects unwanted space 570s registers offenses before __END__ but not after 570s registers an offense for a line ending with tab 570s is not fooled by heredoc containing __END__ within a doc comment 570s is not fooled by __END__ within a documentation comment 570s accepts a line without trailing whitespace 570s is not fooled by heredoc containing __END__ 570s registers an offense for a blank line with space 570s when `AllowInHeredoc` is set to true 570s accepts trailing whitespace in a heredoc string 570s registers an offense for trailing whitespace at the heredoc begin 570s when `AllowInHeredoc` is set to false 570s does not correct trailing whitespace in a static heredoc string 570s corrects by removing trailing whitespace used for indentation in a heredoc string 570s corrects safely trailing whitespace in a heredoc string 571s corrects a whitespace line in a heredoc string that is longer than the indentation 571s 571s RuboCop::Cop::Lint::ConstantResolution 571s registers an offense not qualifying a namespace const 571s registers no offense qualifying a namespace const 571s registers an offense not qualifying a const 571s registers no offense when qualifying a const 571s with Ignore set 571s registers no offense qualifying a namespace const 571s registers no offense when qualifying a const 571s registers an with a namespace const 571s registers an offense not qualifying another const 571s registers no offense with an unqualified const 571s registers no offense when an unqualified namespace const 571s module & class definitions 571s does not register offense 571s with Only set 571s registers an offense when an unqualified namespace const 571s registers no with a namespace const 571s registers no offense qualifying a namespace const 571s registers no offense when qualifying a const 571s registers no offense not qualifying another const 571s registers an offense with an unqualified const 571s 571s RuboCop::Cop::Style::FloatDivision 571s EnforcedStyle is single_coerce 571s registers offense and corrects for left coerce with calculations 571s registers offense and corrects for both coerce 571s does not register offense for right coerce only 571s does not register offense for left coerce only 571s EnforcedStyle is left_coerce 571s registers offense and corrects for both coerce 571s does not register offense for left coerce 571s registers offense and corrects for right coerce with calculations 571s registers offense and corrects for right coerce 571s EnforcedStyle is right_coerce 571s registers offense and corrects for left coerce with calculations 571s registers offense and corrects for both coerce 571s does not register offense for right coerce 571s registers offense and corrects for left coerce 571s EnforcedStyle is fdiv 571s registers offense and corrects for both coerce 571s registers offense and corrects for left coerce with calculations 571s registers offense and corrects for left coerce 571s registers offense and corrects for right coerce 571s does not register offense on usage of fdiv 571s 571s RuboCop::Cop::Style::ExplicitBlockArgument 571s does not register an offense when `yield` is the sole block body 571s registers an offense and corrects when multiple arguments are yielded 571s correctly corrects when the method call has a trailing comma in its argument list 571s registers an offense and corrects when `yield` is inside block of `super` 571s does not register an offense when there is more than one block argument and not all are yielded 571s does not add extra parens to `super` when correcting 571s registers an offense and corrects when block just yields its arguments 571s does not register an offense when `yield` arguments is not a prefix of block arguments 571s adds to the existing arguments when correcting 571s correctly corrects when using safe navigation method call 571s does not register an offense when arguments are yielded in a different order 571s registers an offense and corrects when `yield` inside block has no arguments 571s registers an offense and corrects when method contains multiple `yield`s 571s does not register an offense when `yield` is not inside block 571s does not add extra parens when correcting 571s does not register an offense when code is called outside of a method 571s correctly corrects when method already has an explicit block argument 571s 571s RuboCop::Cop::Naming::BinaryOperatorParameterName 571s works properly even if the argument not surrounded with braces 571s registers an offense and corrects for `#equal?` when argument is not named other 571s does not register an offense for arg named other 571s does not register an offense for arg named _other 571s registers an offense and corrects for `#+` when argument is not named other 571s does not register an offense for === 571s does not register an offense for []= 571s does not register an offense for << 571s registers an offense and corrects when argument is referenced in method body 571s registers an offense and corrects for `#eql?` when argument is not named other 571s does not register an offense for the match operator 571s does not register an offense for [] 572s registers an offense and corrects when assigned to argument in method body 572s does not register an offense for non binary operators 572s does not register an offense for multibyte character method name 572s 572s RuboCop::Cop::Style::EachForSimpleLoop 572s does not register offense for character range 572s does not register offense if range startpoint is not constant 572s does not register offense if range endpoint is not constant 572s when using an exclusive end range 572s does not register offense for range not starting with zero and using param 572s autocorrects the range not starting with zero 572s autocorrects the source with inline block 572s autocorrects the source with multiline block 572s with inline block with parameters 572s autocorrects an offense 572s with multiline block with parameters 572s autocorrects an offense 572s when using an inclusive end range 572s autocorrects the source with multiline block 572s does not register offense for range not starting with zero and using param 572s autocorrects the source with inline block 572s autocorrects the range not starting with zero 572s 572s RuboCop::Cop::Layout::IndentationStyle 572s when EnforcedStyle is tabs 572s accepts a line a tab other than indentation 572s registers and corrects an offense for a line indented with space 572s accepts a line which begins with tab in a heredoc 572s accepts a line which begins with tab in a multiline heredoc 572s registers an offense for a line indented with mixed whitespace 572s accepts a line with tabs between string literals 572s accepts a line with tab in a string 572s registers offenses before __END__ but not after 572s registers and corrects an offense for a line indented with multiple spaces 572s registers and corrects an offense for a line indented with fractional number ofindentation groups by rounding down 572s accepts a line which begins with tab in a string 572s registers and corrects an offense for a line with tab in a string indented with space 572s custom indentation width 572s uses the configured number of spaces to replace with a tab 572s when EnforcedStyle is spaces 572s accepts a line which begins with tab in a heredoc 572s accepts a line with a tab other than indentation 572s accepts a line with a tab between string literals 572s registers and corrects an offense for a line indented with tab 572s registers and corrects an offense for a line indented with multiple tabs 572s registers and corrects an offense for a line indented with mixed whitespaces 573s accepts a line with tab in a string 573s registers and corrects an offense for a line with tab in a string indented with tab 573s registers offenses before __END__ but not after 573s accepts a line which begins with tab in a multiline heredoc 573s accepts a line which begins with tab in a string 573s custom indentation width 573s uses the configured number of spaces to replace a tab 573s 573s RuboCop::Cop::Naming::VariableNumber 573s when CheckMethodNames is false 573s does not register an offense for snake case numbering in method name 573s when configured for non integer 573s registers an offense for snake case numbering in method parameter 573s registers an offense for snake case numbering in method name 573s registers an offense for normal case numbering in method camel case parameter 573s registers an offense for normal case numbering in method name 573s registers an offense for normal case numbering in symbol 573s registers an offense for normal case numbering in method parameter 573s registers an offense for snake case numbering in symbol 573s registers an offense for snake case numbering in method camel case parameter 573s behaves like offense_array 573s registers an offense for ["a_1", "aone"] in non_integer 573s behaves like offense 573s registers an offense for @myAttribute1 in non_integer 573s behaves like accepts 573s accepts emparejó in non_integer 573s behaves like accepts 573s accepts fooBar in non_integer 573s behaves like offense 573s registers an offense for myAttribute_1 in non_integer 573s behaves like offense 573s registers an offense for @myAttribute_1 in non_integer 573s behaves like accepts 573s accepts _1 in non_integer 573s behaves like offense 573s registers an offense for local1 in non_integer 573s behaves like accepts integer symbols 573s accepts integer symbol 573s accepts integer symbol array literal 573s behaves like offense 573s registers an offense for myAttribute1 in non_integer 573s behaves like offense 573s registers an offense for @local_1 in non_integer 573s behaves like offense 573s registers an offense for local_1 in non_integer 573s behaves like accepts 573s accepts localone in non_integer 573s behaves like accepts 573s accepts @__foo__ in non_integer 573s behaves like accepts 573s accepts @@foo in non_integer 573s behaves like accepts 573s accepts _ in non_integer 573s behaves like accepts 573s accepts local_one in non_integer 573s behaves like offense 573s registers an offense for _myLocal1 in non_integer 573s behaves like offense 573s registers an offense for @local1 in non_integer 573s behaves like accepts 573s accepts @foo in non_integer 573s behaves like accepts 573s accepts _foo in non_integer 573s behaves like offense 573s registers an offense for _myLocal_1 in non_integer 573s behaves like accepts 574s accepts local_ in non_integer 574s when configured for snake_case 574s registers an offense for normal case numbering in method parameter 574s registers an offense for normal case numbering in method name 574s does not register an offense for snake case numbering in symbol 574s registers an offense for normal case numbering in method camel case parameter 574s registers an offense for normal case numbering in a global variable name 574s registers an offense for normal case numbering in symbol 574s behaves like accepts 574s accepts aB_1 in snake_case 574s behaves like accepts 574s accepts _foo in snake_case 574s behaves like accepts 574s accepts _1 in snake_case 574s behaves like accepts 574s accepts @foo in snake_case 574s behaves like accepts 574s accepts local_123 in snake_case 574s behaves like offense 574s registers an offense for camelCase1 in snake_case 574s behaves like accepts 574s accepts _ in snake_case 574s behaves like accepts integer symbols 574s accepts integer symbol array literal 574s accepts integer symbol 574s behaves like accepts 574s accepts emparejó in snake_case 574s behaves like accepts 574s accepts @__foo__ in snake_case 574s behaves like accepts 574s accepts local_1 in snake_case 574s behaves like offense 574s registers an offense for _unused1 in snake_case 574s behaves like accepts 574s accepts local_ in snake_case 574s behaves like offense_array 574s registers an offense for ["a1", "a_2"] in snake_case 574s behaves like offense 574s registers an offense for local1 in snake_case 574s behaves like offense 574s registers an offense for @camelCase1 in snake_case 574s behaves like offense 574s registers an offense for aB1 in snake_case 574s behaves like accepts 574s accepts a_1_b in snake_case 574s behaves like accepts 574s accepts a_1_b_1 in snake_case 574s behaves like offense 574s registers an offense for @local1 in snake_case 574s behaves like offense 574s registers an offense for @@local1 in snake_case 574s behaves like accepts 574s accepts local_12 in snake_case 574s when AllowedIdentifiers is set 574s does not register an offense for a local variable name that is allowed 574s does not register an offense for a symbol that is allowed 575s does not register an offense for a instance variable name that is allowed 575s does not register an offense for a class variable name that is allowed 575s does not register an offense for a global variable name that is allowed 575s does not register an offense for a method name that is allowed 575s when CheckSymbols is false 575s does not register an offense for snake case numbering in symbol 575s when AllowedPatterns is set 575s registers an offense for a symbol that does not match an allowed pattern 575s does not register an offense for a symbol that matches an allowed pattern 575s does not register an offense for a method name that matches an allowed pattern 575s registers an offense for a method name that does not match an allowed pattern 575s does not register an offense for a global variable name that matches an allowed pattern 575s registers an offense for a instance variable name that does not match an allowed pattern 575s does not register an offense for a local variable name that matches an allowed pattern 575s registers an offense for a class variable name that does not match an allowed pattern 575s registers an offense for a local variable name that does not match an allowed pattern 575s does not register an offense for a instance variable name that matches an allowed pattern 575s registers an offense for a global variable name that does not match an allowed pattern 575s does not register an offense for a class variable name that matches an allowed pattern 575s when configured for normal 575s registers an offense for snake case numbering in symbol 575s registers an offense for snake case numbering in method camel case parameter 575s does not register an offense for normal case numbering in symbol 575s registers an offense for snake case numbering in method name 575s registers an offense for snake case numbering in a global variable name 575s registers an offense for snake case numbering in method parameter 575s behaves like accepts 575s accepts local_ in normalcase 575s behaves like accepts 575s accepts @__foo__ in normalcase 575s behaves like offense 575s registers an offense for @local_1 in normalcase 575s behaves like offense 575s registers an offense for @myAttribute_1 in normalcase 575s behaves like offense 575s registers an offense for local_1 in normalcase 575s behaves like offense 575s registers an offense for _myLocal_1 in normalcase 575s behaves like accepts 575s accepts sha256 in normalcase 575s behaves like accepts 575s accepts _ in normalcase 575s behaves like accepts 575s accepts user_1_id in normalcase 575s behaves like accepts 575s accepts @foo in normalcase 575s behaves like offense_array 575s registers an offense for ["a_1", "a2"] in normalcase 575s behaves like accepts 575s accepts _foo in normalcase 575s behaves like accepts 575s accepts emparejó in normalcase 575s behaves like offense 575s registers an offense for localFOO_1 in normalcase 575s behaves like accepts 575s accepts target_u2f_device in normalcase 575s behaves like accepts 575s accepts localFOO1 in normalcase 575s behaves like accepts 575s accepts foo10_bar in normalcase 575s behaves like offense 575s registers an offense for sha_256 in normalcase 575s behaves like accepts 575s accepts local1 in normalcase 575s behaves like offense 575s registers an offense for @@local_1 in normalcase 575s behaves like accepts integer symbols 575s accepts integer symbol 575s accepts integer symbol array literal 575s behaves like offense 575s registers an offense for local_FOO_1 in normalcase 575s behaves like accepts 575s accepts _1 in normalcase 575s behaves like offense 575s registers an offense for myAttribute_1 in normalcase 575s behaves like accepts 575s accepts user1_id in normalcase 575s behaves like accepts 575s accepts snake_case in normalcase 575s 575s RuboCop::Cop::Lint::UselessRuby2Keywords 575s with a dynamically defined method 575s does not register an offense when the method has a `restarg` and a `shadowarg` 575s registers an offense for a numblock 575s registers an offense when the method has a `shadowarg` 575s registers an offense for an unnecessary `ruby2_keywords` 575s does not register an offense for an allowed `ruby2_keywords` 575s when `ruby2_keywords` is given a symbol 575s does not register an offense for an allowed def 576s does not register an offense when the `def` is at a different depth 576s registers an offense for an unnecessary `ruby2_keywords` 576s does not register an offense when there is no `def` 576s when `ruby2_keywords` is given a `def` node 576s registers an offense for a method without arguments 576s registers an offense for a method with only positional args 576s registers an offense for a method with only `kwrestarg` 576s does not register an offense for a method with a `restarg` other optional args 576s does not register an offense for a method with a `restarg` other positional args 576s does not register an offense for a method with a `restarg` and no `kwrestarg` 576s registers an offense for a method with a `restarg` and `kwoptarg` 576s registers an offense for a method with a `restarg` and `kwrestarg` 576s registers an offense for a method with only keyword args 576s registers an offense for a method with a `restarg` and keyword args 576s does not register an offense for a method with a `restarg` and `blockarg` 576s 576s RuboCop::Cop::Layout::SpaceAroundBlockParameters 576s when EnforcedStyleInsidePipes is space 576s skips lambda without args 576s registers an offense and corrects block arguments inside Hash#each 576s registers an offense and corrects no space after last parameter 576s skips lambda without parens 576s accepts a block with spaces in the right places 576s registers an offense and corrects missing space before first argument and after last argument 576s registers an offense and corrects space with parens at middle 576s registers an offense and corrects spacing in lambda args 576s registers an offense and corrects multiple spaces after last parameter 576s registers an offense for no space before first parameter 576s registers an offense and corrects multiple spaces before parameter 576s accepts a lambda with spaces in the right places 576s registers an offense and corrects a lambda for no space before first parameter 576s accepts a block with parameters but no body 576s registers an offense and corrects a lambda for no space after last parameter 576s accepts line break after closing pipe 576s registers an offense and corrects a lambda for multiple spacesafter last parameter 576s accepts an empty block 577s registers an offense and corrects extra space before first parameter 577s registers an offense and corrects a lambda for extra spacebefore first parameter 577s registers an offense and corrects no space after closing pipe 577s accepts a block parameter without preceding space 577s trailing comma 577s accepts space after the last comma 577s accepts space both before and after the last comma 577s registers an offense and corrects no space after the last comma 577s when EnforcedStyleInsidePipes is no_space 577s registers an offense and corrects space before first parameter 577s skips lambda without args 577s registers an offense and corrects for space with parens 577s registers an offense and corrects all types of spacing issues for a lambda 577s registers an offense and corrects a lambda for space before first parameter 577s accepts a lambda with spaces in the right places 577s registers an offense and corrects space after last parameter 577s accepts block parameters with surrounding space that includes line breaks 577s registers an offense and corrects all types of spacing issues 577s skips lambda without parens 577s accepts a block parameter without preceding space 577s accepts a block with parameters but no body 577s accepts an empty block 577s registers an offense and corrects no space after closing pipe 577s registers an offense and corrects a lambda for space after the last parameter 577s registers an offense and corrects multiple spaces before parameter 577s accepts line break after closing pipe 577s accepts a block with spaces in the right places 577s trailing comma 577s registers an offense for space after the last comma 577s registers an offense for space before and after the last comma 577s 577s RuboCop::Cop::Metrics::PerceivedComplexity 577s when Max is 2 577s counts stupid nested if and else blocks 577s when AllowedMethods is enabled 577s does not register an offense when defining a class method 577s does not register an offense when defining an instance method 577s does not register an offense when using `define_method` 577s when AllowedPatterns is enabled 577s does not register an offense when defining a class method 577s does not register an offense when using `define_method` 577s does not register an offense when defining an instance method 577s when Max is 1 577s accepts complex code outside of methods 577s registers an offense for or 577s registers an offense for an unless modifier 577s does not count unknown block calls 577s registers an offense for a while block 577s registers an offense for a case/when block without an expression after case 577s registers an offense for a `define_method` 577s registers an offense for a ternary operator 577s accepts a method with no decision points 577s registers an offense for an until block 577s registers an offense for elsif and else blocks 577s accepts an empty method 577s registers an offense for a case/when block 577s deals with nested if blocks containing && and || 577s registers an offense for and 577s counts else in a case with no argument 577s registers an offense for a for block 577s registers an offense for || 577s counts only a single method 577s registers an offense for an if modifier 577s accepts an empty `define_method` 577s registers an offense for && 577s registers an offense for a rescue block 577s counts known iterating block 577s 577s RuboCop::Cop::VariableForce::Variable 577s .new 577s when non variable declaration node is passed 577s raises error 577s #referenced? 577s when the variable has an assignment 577s and the variable is referenced 577s is expected to be truthy 577s and the variable is not yet referenced 577s is expected to be falsey 577s when the variable is not assigned 577s is expected to be falsey 577s and the variable is referenced 577s is expected to be truthy 577s 577s RuboCop::Cop::Style::TrailingCommaInBlockArgs 577s do/end block format 577s does not register an offense when a trailing comma is required 577s registers an offense when a trailing comma is not needed 577s does not register an offense for keyword arguments 578s ignores commas in default argument strings 578s preserves semicolons in block/local variables 578s does not register an offense when more than one argument is present with no trailing comma 578s does not register an offense for default arguments 578s does not register an offense for an empty block 578s does not register an offense when no arguments are present 578s when `lambda` has multiple arguments 578s does not register an offense when more than one argument is present with no trailing comma 578s registers an offense and corrects when a trailing comma isn't needed 578s curly brace block format 578s does not register an offense when no arguments are present 578s does not register an offense when more than one argument is present with no trailing comma 578s registers an offense when a trailing comma is not needed 578s does not register an offense when a trailing comma is required 578s does not register an offense for keyword arguments 578s preserves semicolons in block/local variables 578s ignores commas in default argument strings 578s does not register an offense for default arguments 578s when `->` has multiple arguments 578s does not register an offense 578s 578s RuboCop::Cop::Lint::UnderscorePrefixedVariableName 578s when an underscore-prefixed variable is captured by a block 578s accepts 578s in a method calling `super` without arguments 578s when an underscore-prefixed argument is used explicitly 578s registers an offense 578s when an underscore-prefixed argument is not used explicitly 578s does not register an offense 578s in a method calling `binding` with arguments 578s when an underscore-prefixed argument is used explicitly 578s registers an offense 578s when an underscore-prefixed argument is not used 578s does not register an offense 578s when an underscore-prefixed method argument is used 578s registers an offense 578s when non-underscore-prefixed variable is used 578s does not register an offense 578s when an underscore-prefixed named capture variable is used 578s registers an offense 578s when an underscore-prefixed variable is used 578s registers an offense 578s in a method calling `binding` without arguments 578s when an underscore-prefixed argument is not used explicitly 578s does not register an offense 578s when an underscore-prefixed argument is used explicitly 578s registers an offense 578s in a method calling `super` with arguments 578s when an underscore-prefixed argument is not used 578s does not register an offense 578s when an underscore-prefixed argument is used explicitly 578s registers an offense 578s when an underscore-prefixed block argument is used 578s registers an offense 578s registers an offense 578s when an underscore-prefixed variable in top-level scope is used 578s registers an offense 578s when an underscore-prefixed keyword block argument is used 578s registers an offense 578s when AllowKeywordBlockArguments is set 578s does not register an offense 578s when an underscore-prefixed variable is reassigned 578s does not register an offense 578s 578s RuboCop::Cop::VariableForce::Reference 578s .new 578s when non variable reference node is passed 578s raises error 578s 578s RuboCop::Cop::Layout::MultilineArrayLineBreaks 578s when on same line, separate line from brackets 578s does not add any offenses 578s when nested arrays 578s registers an offense and corrects 578s when two elements on same line 578s registers an offense and corrects 578s when on same line 578s does not add any offenses 578s 578s RuboCop::Cop::Style::TrailingMethodEndStatement 578s register offense with trailing end inside class 578s register offense with trailing end on method with block 578s register offense with trailing end on method with comment 578s register offense with trailing end on 2 line method 578s autocorrects all trailing ends for larger example 578s register offense with trailing end on 3 line method 578s does not register on single line method 578s does not register on single line no op 578s when Ruby 3.0 or higher 578s does not register an offense when using endless method definition 578s does not register an offense when endless method definition signature and body are on different lines 578s 578s RuboCop::Cop::Style::EnvHome 578s does not register an offense when using `ENV['HOME'] = '/home/foo'` 578s does not register an offense when using `ENV.fetch('HOME', default)` 578s does not register an offense when using `Dir.home` 579s registers and corrects an offense when using `ENV['HOME']` 579s registers and corrects an offense when using `ENV.fetch('HOME', nil)` 579s registers and corrects an offense when using `::ENV['HOME']` 579s registers and corrects an offense when using `ENV.fetch('HOME')` 579s 579s RuboCop::Cop::Lint::OrderedMagicComments 579s registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang 579s does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment 579s does not register an offense when using `encoding` magic comment is next of shebang 579s does not register an offense when using `frozen_string_literal` magic comment only 579s registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments 579s does not register an offense when using `encoding` magic comment only 579s registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments 579s does not register an offense when using `encoding` magic comment is first line 579s registers an offense and corrects when `coding` magic comment does not precede all other magic comments 579s 579s RuboCop::Cop::Style::MethodCallWithoutArgsParentheses 579s autocorrects calls that could be empty literals 579s accepts parens in method call with args 579s accepts parens after not 579s registers an offense for parens in method call without args 579s accepts special lambda call syntax 579s registers an offense for `obj.method += func()` 579s accepts parentheses for methods starting with an upcase letter 579s registers an offense for `obj.method &&= func()` 579s registers an offense for `obj.method ||= func()` 579s when AllowedMethods is enabled 579s ignores method listed in AllowedMethods 579s assignment to a variable with the same name 579s accepts parens in default argument assignment 579s accepts parens in shorthand assignment 579s accepts parens in parallel assignment 579s accepts parens in complex assignment 579s accepts parens in local variable assignment 579s when AllowedPatterns is enabled 579s ignores method listed in AllowedMethods 579s method call as argument 579s accepts without parens 579s registers an offense with empty parens 580s registers an empty parens offense for multiple assignment 580s 580s RuboCop::Cop::Lint::StructNewOverride 580s registers an offense using `Struct.new(symbol, string)` 580s registers an offense using `Struct.new(...)` with a block 580s registers an offense using `Struct.new(...)` with multiple overrides 580s registers an offense using `Struct.new(symbol)` 580s does not register an offense with no overrides 580s registers an offense using `::Struct.new(symbol)` 580s registers an offense using `Struct.new(...symbols)` 580s registers an offense using `Struct.new(...)` with an option argument 580s registers an offense using `Struct.new(string, ...symbols)` 580s does not register an offense with an override within a given block 580s 580s RuboCop::Cop::Style::MapCompactWithConditionalBlock 580s With single line block 580s registers an offense and corrects to `select` with modifier form of `if` condition 580s does not register offenses if `compact` is not chained to `map` 580s registers an offense and corrects to `select` with ternary expression 580s registers an offense and corrects to `reject` with ternary expression 580s registers an offense and corrects to `reject` with modifier form of `unless` condition 580s With multiline block 580s registers an offense and corrects to `select` if condition has not else branch 580s registers an offense and corrects to `reject` with `if` condition 580s registers an offense and corrects to `reject` with modifier form of `unless` condition 580s does not register offenses if condition has elsif branch 580s registers an offense and corrects to `reject` with guard clause of `unless` and `next` explicitly nil 580s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value and return nil 580s does not register offenses if `compact` is not chained to `map` 580s registers an offense and corrects to `reject` with guard clause of `unless` and `next` has a value 580s registers an offense and corrects to `select` with guard clause of `if` and next explicitly nil 580s does not register offenses if return value is not same as block argument 580s registers an offense and corrects to `reject` with `unless` condition 580s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value 580s registers an offense and corrects to `reject` if `next value` in else_branch and `nil` in if_branch 580s registers an offense and corrects to `select` with ternary expression 580s registers an offense and corrects to `select` with `if` condition 580s registers an offense and corrects to `select` with multi-line `if` condition 580s registers an offense and corrects to `select` with modifier form of `if` condition 580s registers an offense and corrects to `reject` with guard clause of `unless` 580s registers an offense and corrects to `select` with guard clause of `if` 580s registers an offense and corrects to `select` with guard clause of `if` and `next` has a value and return nil 580s does not register offenses if there are multiple guard clauses 580s registers an offense and corrects to `select` if `next value` in if_branch and `nil` in else_branch 581s registers an offense and corrects to `reject` with ternary expression 581s 581s RuboCop::Cop::Style::NegatedIf 581s does not blow up for ternary ops 581s does not blow up on a negated ternary operator 581s does not blow up for empty unless condition 581s does not blow up for empty if condition 581s with “prefix” style 581s registers an offense for prefix 581s does not register an offense for postfix 581s with “postfix” style 581s registers an offense for postfix 581s does not register an offense for prefix 581s with “both” style 581s accepts an if where only part of the condition is negated 581s accepts an if/else with negative condition 581s registers an offense for if with exclamation point condition 581s accepts an if where the condition is doubly negated 581s registers an offense for if with "not" condition 581s is not confused by negated elsif 581s autocorrects by replacing parenthesized if not with unless 581s 581s RuboCop::Cop::Lint::LiteralInInterpolation 581s accepts interpolation of xstr 581s does not register an offense when space literal at the end of heredoc line 581s accepts empty interpolation 581s handles double quotes in single quotes when autocorrecting 581s handles backslash in double quotes when autocorrecting 581s handles nested interpolations when autocorrecting 582s handles backslash in single quotes when autocorrecting 582s accepts interpolation of erange where endpoints are not literals 582s accepts interpolation of irange where endpoints are not literals 582s behaves like literal interpolation 582s registers an offense only for final %w[v1] in interpolation 582s removes interpolation around multiple %w[v1] 582s registers an offense for %w[v1] in interpolation and removes interpolation around it 582s removes interpolation around %w[v1] when there is more text 582s when there is non-literal and literal interpolation 582s when literal interpolation is before non-literal 582s only removes interpolation around literal 582s when literal interpolation is after non-literal 582s only removes interpolation around literal 582s behaves like literal interpolation 582s registers an offense for 1...2 in interpolation and removes interpolation around it 582s removes interpolation around 1...2 when there is more text 582s removes interpolation around multiple 1...2 582s registers an offense only for final 1...2 in interpolation 582s when there is non-literal and literal interpolation 582s when literal interpolation is after non-literal 582s only removes interpolation around literal 582s when literal interpolation is before non-literal 582s only removes interpolation around literal 582s behaves like literal interpolation 582s removes interpolation around %w[v1 v2] when there is more text 582s registers an offense for %w[v1 v2] in interpolation and removes interpolation around it 582s removes interpolation around multiple %w[v1 v2] 582s registers an offense only for final %w[v1 v2] in interpolation 582s when there is non-literal and literal interpolation 582s when literal interpolation is before non-literal 582s only removes interpolation around literal 582s when literal interpolation is after non-literal 582s only removes interpolation around literal 582s behaves like special keywords 582s registers an offense and autocorrects interpolation after __FILE__ 582s accepts strings like __FILE__ 582s behaves like literal interpolation 582s removes interpolation around 2.0 when there is more text 582s registers an offense only for final 2.0 in interpolation 582s registers an offense for 2.0 in interpolation and removes interpolation around it 582s removes interpolation around multiple 2.0 582s when there is non-literal and literal interpolation 582s when literal interpolation is before non-literal 582s only removes interpolation around literal 582s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s registers an offense only for final %i[s1 s2] in interpolation 583s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 583s removes interpolation around multiple %i[s1 s2] 583s removes interpolation around %i[s1 s2] when there is more text 583s when there is non-literal and literal interpolation 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s registers an offense for true in interpolation and removes interpolation around it 583s removes interpolation around true when there is more text 583s removes interpolation around multiple true 583s registers an offense only for final true in interpolation 583s when there is non-literal and literal interpolation 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s behaves like special keywords 583s accepts strings like __ENCODING__ 583s registers an offense and autocorrects interpolation after __ENCODING__ 583s behaves like non-special string literal interpolation 583s registers an offense for "foo" and removes the interpolation and quotes around "foo" 583s behaves like special keywords 583s accepts strings like __END__ 583s registers an offense and autocorrects interpolation after __END__ 583s behaves like literal interpolation 583s removes interpolation around :"symbol" when there is more text 583s removes interpolation around multiple :"symbol" 583s registers an offense only for final :"symbol" in interpolation 583s registers an offense for :"symbol" in interpolation and removes interpolation around it 583s when there is non-literal and literal interpolation 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s registers an offense for 1 in interpolation and removes interpolation around it 583s registers an offense only for final 1 in interpolation 583s removes interpolation around 1 when there is more text 583s removes interpolation around multiple 1 583s when there is non-literal and literal interpolation 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s removes interpolation around multiple {"a" => "b"} 583s registers an offense only for final {"a" => "b"} in interpolation 583s registers an offense for {"a" => "b"} in interpolation and removes interpolation around it 583s removes interpolation around {"a" => "b"} when there is more text 583s when there is non-literal and literal interpolation 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s registers an offense for 0xaabb in interpolation and removes interpolation around it 583s removes interpolation around multiple 0xaabb 583s registers an offense only for final 0xaabb in interpolation 583s removes interpolation around 0xaabb when there is more text 583s when there is non-literal and literal interpolation 583s when literal interpolation is after non-literal 583s only removes interpolation around literal 583s when literal interpolation is before non-literal 583s only removes interpolation around literal 583s behaves like literal interpolation 583s removes interpolation around 0o377 when there is more text 583s registers an offense for 0o377 in interpolation and removes interpolation around it 583s removes interpolation around multiple 0o377 583s registers an offense only for final 0o377 in interpolation 583s when there is non-literal and literal interpolation 583s when literal interpolation is after non-literal 584s only removes interpolation around literal 584s when literal interpolation is before non-literal 584s only removes interpolation around literal 584s behaves like literal interpolation 584s registers an offense only for final [] in interpolation 584s registers an offense for [] in interpolation and removes interpolation around it 584s removes interpolation around multiple [] 584s removes interpolation around [] when there is more text 584s when there is non-literal and literal interpolation 584s when literal interpolation is after non-literal 584s only removes interpolation around literal 584s when literal interpolation is before non-literal 584s only removes interpolation around literal 584s behaves like literal interpolation 584s registers an offense only for final :symbol in interpolation 584s removes interpolation around multiple :symbol 584s removes interpolation around :symbol when there is more text 584s registers an offense for :symbol in interpolation and removes interpolation around it 584s when there is non-literal and literal interpolation 584s when literal interpolation is after non-literal 584s only removes interpolation around literal 584s when literal interpolation is before non-literal 584s only removes interpolation around literal 584s behaves like literal interpolation in words literal 584s accepts interpolation of a symbol literal with space in %W[] 584s accepts interpolation of a string literal with space in %W[] 584s removes interpolation of an array containing a symbol literal without space in %W[] 585s accepts interpolation of an array literal containing a string with space in %W[] 585s removes interpolation of a string literal without space in %W[] 585s removes interpolation of an array containing a string literal without space in %W[] 585s accepts interpolation of an array literal containing a symbol with space in %W[] 585s removes interpolation of a symbol literal without space in %W[] 585s behaves like literal interpolation 585s registers an offense for 1.2e-3 in interpolation and removes interpolation around it 585s removes interpolation around 1.2e-3 when there is more text 585s registers an offense only for final 1.2e-3 in interpolation 585s removes interpolation around multiple 1.2e-3 585s when there is non-literal and literal interpolation 585s when literal interpolation is after non-literal 585s only removes interpolation around literal 585s when literal interpolation is before non-literal 585s only removes interpolation around literal 585s behaves like literal interpolation 585s removes interpolation around 1_123 when there is more text 585s registers an offense for 1_123 in interpolation and removes interpolation around it 585s registers an offense only for final 1_123 in interpolation 585s removes interpolation around multiple 1_123 585s when there is non-literal and literal interpolation 585s when literal interpolation is after non-literal 585s only removes interpolation around literal 585s when literal interpolation is before non-literal 585s only removes interpolation around literal 585s behaves like literal interpolation 585s registers an offense only for final nil in interpolation 585s removes interpolation around nil when there is more text 585s removes interpolation around multiple nil 585s registers an offense for nil in interpolation and removes interpolation around it 585s when there is non-literal and literal interpolation 585s when literal interpolation is after non-literal 585s only removes interpolation around literal 585s when literal interpolation is before non-literal 585s only removes interpolation around literal 585s behaves like non-special string literal interpolation 585s registers an offense for 'foo' and removes the interpolation and quotes around 'foo' 585s behaves like literal interpolation 585s registers an offense for ["a", "b"] in interpolation and removes interpolation around it 585s removes interpolation around ["a", "b"] when there is more text 585s removes interpolation around multiple ["a", "b"] 585s registers an offense only for final ["a", "b"] in interpolation 585s when there is non-literal and literal interpolation 585s when literal interpolation is before non-literal 585s only removes interpolation around literal 585s when literal interpolation is after non-literal 585s only removes interpolation around literal 585s behaves like literal interpolation in words literal 585s removes interpolation of a string literal without space in %I[] 585s accepts interpolation of a string literal with space in %I[] 585s removes interpolation of a symbol literal without space in %I[] 585s accepts interpolation of an array literal containing a string with space in %I[] 585s removes interpolation of an array containing a string literal without space in %I[] 585s accepts interpolation of a symbol literal with space in %I[] 585s accepts interpolation of an array literal containing a symbol with space in %I[] 585s removes interpolation of an array containing a symbol literal without space in %I[] 585s behaves like literal interpolation 585s registers an offense only for final 123_456_789_123_456_789 in interpolation 585s removes interpolation around multiple 123_456_789_123_456_789 585s registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it 585s removes interpolation around 123_456_789_123_456_789 when there is more text 585s when there is non-literal and literal interpolation 585s when literal interpolation is after non-literal 586s only removes interpolation around literal 586s when literal interpolation is before non-literal 586s only removes interpolation around literal 586s in string-like contexts 586s removes interpolation in backticks 586s removes interpolation in regular expressions 586s removes interpolation in symbols 586s behaves like special keywords 586s registers an offense and autocorrects interpolation after __LINE__ 586s accepts strings like __LINE__ 586s behaves like literal interpolation 586s removes interpolation around -1 when there is more text 586s removes interpolation around multiple -1 586s registers an offense only for final -1 in interpolation 586s registers an offense for -1 in interpolation and removes interpolation around it 586s when there is non-literal and literal interpolation 586s when literal interpolation is before non-literal 586s only removes interpolation around literal 586s when literal interpolation is after non-literal 586s only removes interpolation around literal 586s behaves like literal interpolation 586s removes interpolation around multiple %I[s1 s2] 586s registers an offense for %I[s1 s2] in interpolation and removes interpolation around it 586s removes interpolation around %I[s1 s2] when there is more text 586s registers an offense only for final %I[s1 s2] in interpolation 586s when there is non-literal and literal interpolation 586s when literal interpolation is after non-literal 586s only removes interpolation around literal 586s when literal interpolation is before non-literal 586s only removes interpolation around literal 586s behaves like literal interpolation 586s registers an offense only for final %i[ s1 s2 ] in interpolation 586s removes interpolation around %i[ s1 s2 ] when there is more text 586s removes interpolation around multiple %i[ s1 s2 ] 586s registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it 586s when there is non-literal and literal interpolation 586s when literal interpolation is after non-literal 586s only removes interpolation around literal 586s when literal interpolation is before non-literal 586s only removes interpolation around literal 586s behaves like literal interpolation 587s removes interpolation around false when there is more text 587s registers an offense only for final false in interpolation 587s removes interpolation around multiple false 587s registers an offense for false in interpolation and removes interpolation around it 587s when there is non-literal and literal interpolation 587s when literal interpolation is after non-literal 587s only removes interpolation around literal 587s when literal interpolation is before non-literal 587s only removes interpolation around literal 587s behaves like literal interpolation 587s removes interpolation around multiple %i[s1 s2] 587s registers an offense for %i[s1 s2] in interpolation and removes interpolation around it 587s removes interpolation around %i[s1 s2] when there is more text 587s registers an offense only for final %i[s1 s2] in interpolation 587s when there is non-literal and literal interpolation 587s when literal interpolation is before non-literal 587s only removes interpolation around literal 587s when literal interpolation is after non-literal 587s only removes interpolation around literal 587s behaves like literal interpolation 587s removes interpolation around %w[] when there is more text 587s registers an offense only for final %w[] in interpolation 587s removes interpolation around multiple %w[] 587s registers an offense for %w[] in interpolation and removes interpolation around it 587s when there is non-literal and literal interpolation 587s when literal interpolation is after non-literal 587s only removes interpolation around literal 587s when literal interpolation is before non-literal 587s only removes interpolation around literal 587s behaves like literal interpolation 587s registers an offense only for final 1..2 in interpolation 587s removes interpolation around multiple 1..2 587s removes interpolation around 1..2 when there is more text 587s registers an offense for 1..2 in interpolation and removes interpolation around it 587s when there is non-literal and literal interpolation 587s when literal interpolation is before non-literal 587s only removes interpolation around literal 587s when literal interpolation is after non-literal 588s only removes interpolation around literal 588s 588s RuboCop::Cop::InternalAffairs::NodeMatcherDirective 588s registers an offense if the matcher has multiple directives 588s inserts a blank line between multiple pattern matchers 588s inserts a blank line between multiple multi-line pattern matchers 588s does not register an offense if the node matcher already has a directive 588s registers an offense if the matcher does not have a directive but has preceding comments 588s retains indentation properly when inserting 588s retains indentation properly when correcting 588s retains indentation properly when correcting 588s retains indentation properly when inserting 588s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 588s inserts a blank line between multiple pattern matchers 588s autocorrects with the right arguments if the pattern references a non-contiguous argument 588s does not register an offense if the directive is in a comment block 588s does not register an offense if called with a dynamic method name 588s autocorrects with the right arguments if the pattern includes arguments 588s does not insert a blank line if one already exists 588s does not register an offense if called with a dynamic method name 588s autocorrects with the right arguments if the pattern includes arguments 588s registers an offense if the directive name does not match the actual name 588s registers an offense if the matcher does not have a directive 588s inserts a blank line between multiple multi-line pattern matchers 588s does not register an offense if the directive is in a comment block 589s registers an offense if the matcher does not have a directive and a method call is used for a pattern argument 589s does not insert a blank line if one already exists 589s registers an offense if the matcher does not have a directive but has preceding comments 589s registers an offense if the directive name does not match the actual name 589s registers an offense if the matcher has multiple directives 589s does not register an offense if the node matcher already has a directive 589s registers an offense if the matcher does not have a directive 589s autocorrects with the right arguments if the pattern references a non-contiguous argument 589s 589s RuboCop::Cop::Style::OptionHash 589s registers an offense 589s when the last argument is an options hash named something else 589s does not register an offense 589s when the argument name is in the list of suspicious names 589s registers an offense 589s when passing options hash to super 589s does not register an offense when code exists before call to super 589s does not register an offense 589s does not register an offense when call to super is in a nested block 589s when there are no arguments 589s does not register an offense 589s permitted list 589s ignores if the method is permitted 589s when the last argument is a non-options-hash optional hash 589s does not register an offense 589s 589s RuboCop::Cop::Style::CollectionMethods 589s registers an offense for inject with block 589s accepts collect without a block 589s registers an offense for member? with block 589s registers an offense for collect with an argument and proc param 589s registers an offense for find_all with an argument and proc param 589s registers an offense for detect with block 589s registers an offense for find_all with proc param 589s registers an offense for member? with proc param 589s registers an offense for detect with proc param 589s accepts find_all without a block 589s registers an offense for member? with an argument and proc param 589s registers an offense for find_all with block 589s registers an offense for detect with an argument and proc param 589s accepts member? without a block 589s accepts detect without a block 589s registers an offense for inject with an argument and proc param 589s accepts inject without a block 589s registers an offense for collect with block 590s registers an offense for collect with proc param 590s registers an offense for inject with proc param 590s Ruby 2.7 590s registers an offense for member? with numblock 590s Ruby 2.7 590s registers an offense for detect with numblock 590s for methods that accept a symbol as implicit block 590s registers an offense with an argument and final symbol param 590s registers an offense with a final symbol param 590s Ruby 2.7 590s registers an offense for collect with numblock 590s Ruby 2.7 590s registers an offense for inject with numblock 590s for methods that do not accept a symbol as implicit block 590s does not register an offense for a final symbol param with extra args 590s does not register an offense for a final symbol param 590s Ruby 2.7 590s registers an offense for find_all with numblock 590s 590s RuboCop::Cop::Style::StabbyLambdaParentheses 590s require_parentheses 590s registers an offense for a stabby lambda without parentheses 590s does not register an offense for a stabby lambda with parentheses 590s behaves like common 590s does not check a stabby lambda without arguments 590s does not check the old lambda syntax 590s does not check a method call named lambda 590s require_no_parentheses 590s registers an offense for a stabby lambda with parentheses 590s behaves like common 590s does not check the old lambda syntax 590s does not check a method call named lambda 590s does not check a stabby lambda without arguments 590s 590s RuboCop::Cop::Lint::AmbiguousRegexpLiteral 590s Ruby <= 2.7 590s with `match_with_lvasgn` node 590s without parentheses 590s registers an offense and corrects 590s with different parentheses 590s does not register an offense 590s with parentheses 590s does not register an offense 590s without parentheses 590s registers an offense and corrects when sending method chain to regexp 590s registers an offense and corrects when sending method to regexp without argument 590s registers an offense and corrects when using nested method arguments without parentheses 590s registers an offense and corrects when single argument 590s registers an offense and corrects when using regexp without method call in a nested structure 590s registers an offense and corrects when sending method to regexp with argument 590s registers an offense and corrects when multiple arguments 590s registers an offense and corrects when sending method without receiver takes a regexp argument 590s registers an offense and corrects when nesting 590s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 590s registers an offense and corrects when using block argument 590s with parentheses 590s accepts 590s Ruby >= 3.0 590s with parentheses 590s accepts 590s without parentheses 590s registers an offense and corrects when nesting 590s registers an offense and corrects when single argument 590s registers an offense and corrects when using regexp without method call in a nested structure 590s registers an offense and corrects when using nested method arguments without parentheses 590s registers an offense and corrects when sending method to regexp without argument 590s registers an offense and corrects when sending method chain to regexp 590s registers an offense and corrects when using block argument 590s registers an offense and corrects when sending method without receiver takes a regexp argument 590s registers an offense and corrects when sending method inside parens without receiver takes a regexp argument 590s registers an offense and corrects when multiple arguments 590s registers an offense and corrects when sending method to regexp with argument 590s with `match_with_lvasgn` node 590s with different parentheses 590s does not register an offense 590s without parentheses 590s registers an offense and corrects 590s with parentheses 590s does not register an offense 590s 590s RuboCop::Cop::Style::AutoResourceCleanup 591s registers an offense for File.open without block 591s does not register an offense for File.open with immediate close 591s does not register an offense for File.open with block 591s does not register an offense for File.open with block-pass 591s 591s RuboCop::DirectiveComment 591s #match_captures 591s when todo 591s is expected to eq ["todo", "all", nil, nil] 591s when typo 591s is expected to be nil 591s when enable 591s is expected to eq ["enable", "Foo/Bar", nil, "Foo/"] 591s when disable 591s is expected to eq ["disable", "all", nil, nil] 591s #all_cops? 591s when mentioned all 591s is expected to equal true 591s when mentioned specific cops 591s is expected to equal false 591s #in_directive_department? 591s when cop department disabled 591s is expected to equal true 591s when another department disabled 591s is expected to equal false 591s when cop disabled 591s is expected to equal false 591s #line_number 591s returns line number for directive 591s #department_names 591s when only cop specified 591s is expected to eq [] 591s when department and cops specified 591s is expected to eq ["Foo"] 591s when only department specified 591s is expected to eq ["Foo"] 591s when all cops mentioned 591s is expected to eq [] 591s when couple departments specified 591s is expected to eq ["Foo", "Baz"] 591s #disabled_all? 591s when disabled specific cops 591s is expected to equal false 591s when enabled specific cops 591s is expected to equal false 591s when enabled all cops 591s is expected to equal false 591s when disabled all cops 591s is expected to equal true 591s #cop_names 591s when all cops mentioned 591s is expected to eq ["all_names"] 591s when only department specified 591s is expected to eq ["Foo/Bar", "Foo/Baz"] 591s when department and cops specified 591s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Cop"] 591s when redundant directive cop department specified 591s is expected to eq ["Lint/One", "Lint/Two"] 591s when couple departments specified 591s is expected to eq ["Foo/Bar", "Foo/Baz", "Baz/Bar"] 591s when only cop specified 591s is expected to eq ["Foo/Bar"] 591s #single_line? 591s when does NOT relate to single line 591s is expected to equal false 591s when relates to single line 591s is expected to equal true 591s #enabled? 591s when todo 591s is expected to equal false 591s when disable 591s is expected to equal false 591s when enable 591s is expected to equal true 591s #match? 591s when cop names are same but have duplicated names 591s is expected to equal true 591s when disabled all cops 591s is expected to equal true 591s when there are no cop names 591s is expected to equal false 591s when cop names are same but in a different order 591s is expected to equal true 591s when cop names are same as in the comment 591s is expected to equal true 591s when cop names are superset of names 591s is expected to equal false 591s when cop names are subset of names 591s is expected to equal false 591s #directive_count 591s when few cops used 591s is expected to eq 2 591s when few department used 591s is expected to eq 3 591s when cops and departments used 591s is expected to eq 4 591s #overridden_by_department? 591s when there are no departments 591s is expected to equal false 591s when cop is overridden by it's department 591s is expected to equal true 591s when there are no cops 591s is expected to equal false 591s when cop is not overridden by it's department 591s is expected to equal false 591s .before_comment 591s when line has NO code 591s is expected to eq "" 591s when line has code 591s is expected to eq "def foo " 591s #disabled? 591s when todo 591s is expected to equal true 591s when disable 591s is expected to equal true 591s when enable 591s is expected to equal false 591s #enabled_all? 591s when enabled all cops 591s is expected to equal true 591s when enabled specific cops 591s is expected to equal false 591s when disabled all cops 591s is expected to equal false 591s when disabled specific cops 591s is expected to equal false 591s 591s RuboCop::Cop::Style::ClassEqualityComparison 591s does not register an offense when using `instance_of?` 591s registers an offense and corrects when comparing class using `==` for equality 591s registers an offense and corrects when comparing double quoted class name for equality 591s registers an offense and corrects when comparing class using `equal?` for equality 591s registers an offense and corrects when comparing `Module#name` for equality 591s registers an offense and corrects when comparing class using `eql?` for equality 591s registers an offense and corrects when comparing single quoted class name for equality 591s with String comparison in module 591s registers and corrects an offense 591s when AllowedMethods is enabled 591s does not register an offense when comparing class for equality 591s when AllowedPatterns is enabled 591s does not register an offense when comparing class for equality 591s with instance variable comparison in module 591s registers and corrects an offense 591s 591s RuboCop::Cop::Style::EmptyLiteral 591s Empty Array 591s does not register an offense for ::Array.new with block 591s does not register Array.new with block in other block 591s does not register an offense Array.new with block 591s autocorrects Array.new in block in block 591s registers an offense for Array.new 591s registers an offense for ::Array.new 591s registers an offense for Array.new() 591s does not register an offense for Array.new(3) 591s Empty String 591s registers an offense for String.new() 591s registers an offense for String.new 591s does not register an offense for String.new("top") 591s does not register an offense for ::String.new("top") 591s registers an offense for ::String.new 591s when Style/FrozenStringLiteral is enabled 591s and there is a frozen_string_literal: false comment 591s registers an offense and corrects 591s and there is no magic comment 591s does not register an offense 591s when double-quoted string literals are preferred 591s registers an offense for ::String.new 592s registers an offense for String.new 592s when frozen string literals is enabled 592s does not register an offense for String.new 592s Empty Hash 592s autocorrects Hash.new to {} as the first parameter to a method 592s registers an offense for Hash.new() 592s autocorrects Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super 592s does not register an offense for ::Hash.new { block } 592s does not register an offense for ::Hash.new(3) 592s autocorrects Hash.new in block 592s does not register an offense for Hash.new(3) 592s autocorrects Hash.new to {} and wraps it in parentheses when it is the only argument to super 592s does not register an offense for Hash.new { block } 592s registers an offense for ::Hash.new 592s autocorrects Hash.new to {} in various contexts 592s autocorrects Hash.new to {} as the only parameter to a method 592s registers an offense for Hash.new 592s Ruby 2.7 592s does not register an offense for ::Hash.new { _1[_2] = [] } 592s does not register an offense for Hash.new { _1[_2] = [] } 592s 592s RuboCop::Cop::Style::SymbolArray 592s when EnforcedStyle is brackets 592s does not register an offense for arrays of symbols 593s autocorrects an array has interpolations 593s autocorrects multiline %i array 593s registers an offense for empty array starting with %i 593s autocorrects an array starting with %i 593s registers an offense for array starting with %i 593s when EnforcedStyle is percent 593s autocorrects arrays of symbols with new line 593s uses %I when appropriate 593s does not register an offense for array starting with %i 593s does not register an offense if symbol contains whitespace 593s registers an offense in a non-ambiguous block context 593s detects when the cop must be disabled to avoid offenses 593s detects right value for MinSize to use for --auto-gen-config 593s registers an offense for arrays of symbols 593s autocorrects arrays of symbols with embedded newlines and tabs 593s does not register an offense for array with non-syms 593s autocorrects arrays of one symbol 593s doesn't break when a symbol contains ) 593s when PreferredDelimiters is specified 593s autocorrects an array in multiple lines 593s autocorrects an array using partial newlines 593s autocorrects an array with delimiters 593s with non-default MinSize 593s does not autocorrect array of one symbol if MinSize > 1 593s 593s RuboCop::Cop::Naming::BlockForwarding 593s when `EnforcedStyle: explicit 593s Ruby >= 3.1 593s does not register an offense when defining without block argument method 593s does not register an offense when using explicit block forwarding without method body 593s registers and corrects an offense when using anonymous block forwarding 593s registers and corrects an offense when using anonymous block forwarding in singleton method 593s registers and corrects an offense when using `yield` in method body 593s registers and corrects an offense when using symbol proc argument in method body 594s does not register an offense when assigning the block arg 594s registers and corrects and corrects an offense when using anonymous block forwarding without method body 594s does not register an offense when using explicit block forwarding 594s when `BlockForwardingName: proc 594s registers and corrects an offense when using anonymous block forwarding 594s when `BlockForwardingName: block` is already in use 594s registers and no corrects an offense when using anonymous block forwarding 594s when `EnforcedStyle: anonymous 594s Ruby >= 3.1 594s does not register an offense when using anonymous block forwarding without method body 594s does not register an offense when defining no arguments method 594s registers and corrects an offense when using explicit block forwarding in singleton method 594s registers and corrects an offense when using explicit block forwarding without method body 594s does not register an offense when using block argument as a variable 594s registers and corrects an only explicit block forwarding when using multiple proc arguments 594s registers and corrects an offense when using symbol proc argument in method body 594s does not register an offense when defining kwoptarg with block args method 594s registers and corrects an offense when using `yield` in method body 594s does not register an offense when assigning the block arg 594s registers and corrects an offense when using explicit block forwarding 594s does not register an offense when defining kwarg with block args method 594s does not register an offense when defining without block argument method 594s registers and corrects an offense when using explicit block forwarding without method definition parentheses 594s does not register an offense when using anonymous block forwarding 594s Ruby < 3.0 594s does not register an offense when not using anonymous block forwarding 594s 594s RuboCop::Cop::Style::DocumentationMethod 594s when declaring methods outside a class 594s without documentation comment 594s when method is private 594s does not register an offense with inline `private` 594s does not register an offense 594s does not register an offense with `end` on the same line 594s does not register an offense with inline `private` and `end` 594s when required for non-public methods 594s registers an offense 594s registers an offense with inline `private` and `end` 594s registers an offense with `end` on the same line 594s registers an offense with inline `private` 594s when method is protected 594s does not register an offense with inline `protected` 594s does not register an offense 594s when required for non-public methods 594s registers an offense with inline `protected` 594s registers an offense 594s when method is public 594s registers an offense when method is public, but there were private methods before 594s registers an offense with `end` on the same line 594s registers an offense 594s with documentation comment 594s does not register an offense with `end` on the same line 594s does not register an offense 594s with both public and private methods 594s when the public method has documentation 594s does not register an offense 594s when required for non-public methods 594s registers an offense 594s when the public method has no documentation 594s registers an offense 594s when declaring methods for class instance 594s with documentation comment 594s does not register an offense 594s does not register an offense with `end` on the same line 594s when method is private 594s does not register an offense with inline `private` and `end` 595s does not register an offense with inline `private` 595s does not register an offense with `end` on the same line 595s does not register an offense 595s when required for non-public methods 595s registers an offense 595s registers an offense with inline `private` and `end` 595s registers an offense with `end` on the same line 595s registers an offense with inline `private` 595s with both public and private methods 595s when the public method has documentation 595s does not register an offense 595s when the public method has no documentation 595s registers an offense 595s when required for non-public methods 595s registers an offense 595s without documentation comment 595s registers an offense 595s registers an offense with `end` on the same line 595s when declaring methods in a class 595s without documentation comment 595s when method is private 595s does not register an offense with inline `private` and `end` 595s does not register an offense with `end` on the same line 595s does not register an offense 595s does not register an offense with inline `private` 595s when required for non-public methods 595s registers an offense with `end` on the same line 595s registers an offense with inline `private` and `end` 595s registers an offense 595s registers an offense with inline `private` 595s when method is public 595s registers an offense with `end` on the same line 595s registers an offense 595s with directive comment 595s registers an offense 595s with documentation comment 595s when method is public 595s does not register an offense 595s does not register an offense with `end` on the same line 595s with annotation comment 595s registers an offense 595s with both public and private methods 595s when required for non-public methods 595s registers an offense 595s when the public method has documentation 595s does not register an offense 595s when the public method has no documentation 595s registers an offense 595s when declaring methods in a module 595s with both public and private methods 595s when the public method has documentation 595s does not register an offense 595s when required for non-public methods 595s registers an offense 595s when the public method has no documentation 595s registers an offense 595s without documentation comment 595s when method is module_function 595s registers an offense for inline def 595s registers an offense for separate def 595s when method is public 595s registers an offense with `end` on the same line 595s registers an offense 595s when method is private 595s does not register an offense with inline `private` and `end` 595s does not register an offense with `end` on the same line 595s does not register an offense with inline `private` 595s does not register an offense 595s when required for non-public methods 595s registers an offense with inline `private` and `end` 596s registers an offense with inline `private` 596s registers an offense 596s registers an offense with `end` on the same line 596s with documentation comment 596s when method is module_function 596s does not register an offense for inline def 596s does not register an offense for separate def 596s when method is public 596s does not register an offense with `end` on the same line 596s does not register an offense 596s 596s RuboCop::Cop::Style::RedundantReturn 596s reports an offense for defs with only a return 596s reports an offense for defs ending with return 596s does not blow up on empty if body 596s accepts return in a non-final position 596s reports an offense for def with only a return 596s autocorrects by removing redundant returns 596s reports an offense for def ending with return 596s reports an offense for def ending with return with splat argument 596s does not blow up on empty method body 596s when return is inside an if-branch 596s registers an offense and autocorrects 596s when multi-value returns are allowed 596s accepts defs ending with return 597s accepts def with only a return 597s accepts defs with only a return 597s accepts def ending with return 597s when multi-value returns are not allowed 597s autocorrects by making an implicit hash explicit 597s autocorrects by removing return when using an explicit hash 597s reports an offense for defs with only a return 597s reports an offense for def ending with return 597s reports an offense for def with only a return 597s reports an offense when multiple return values have a parenthesized return value 597s reports an offense for defs ending with return 597s when return has no arguments 597s behaves like common behavior 597s registers an offense for return and autocorrects replacing return with nil 597s behaves like common behavior 597s registers an offense for return() and autocorrects replacing return() with nil 597s when case nodes are empty 597s accepts empty when nodes 597s when return is inside a when-branch 597s registers an offense and autocorrects 597s when return is inside begin-end body 597s registers an offense and autocorrects 597s when rescue and return blocks present 597s registers an offense and autocorrects when rescue has else clause 597s registers an offense and autocorrects when inside function or rescue block 597s 597s RuboCop::Cop::Style::KeywordParametersOrder 597s does not register an offense when there are no `kwoptarg`s before `kwarg`s 597s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`s 597s registers an offense and corrects when `kwoptarg` is before `kwarg` and argument parentheses omitted 597s registers an offense and corrects when multiple `kwoptarg` are before `kwarg` and argument parentheses omitted 597s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `kwrestarg` and argument parentheses omitted 597s registers an offense and corrects when multiple `kwoptarg`s are interleaved with `kwarg`sand last argument is `blockarg` and argument parentheses omitted 597s registers an offense and corrects when `kwoptarg` is before `kwarg` 597s when using block keyword parameters 597s does not register an offense when there are no `kwoptarg`s before `kwarg`s 597s registers an offense and corrects when `kwoptarg` is before `kwarg` 597s 597s RuboCop::Cop::Style::EmptyLambdaParameter 597s registers an offense for an empty block parameter with a lambda 597s does not crash on a super 597s accepts a keyword lambda 597s 597s RuboCop::Cop::Lint::Syntax 597s .offenses_from_processed_source 597s with a diagnostic error 597s returns an offense 598s with --autocorrect --disable-uncorrectable options 598s returns an offense 598s with --display-cop-names option 598s returns an offense with cop name 598s with a parser error 598s returns an offense 598s with --display-cop-names option 598s returns an offense with cop name 598s 598s RuboCop::Cop::Style::CombinableLoops 598s when looping method 598s does not register an offense when different loop methods are used over the same collection 598s does not register an offense when each branch contains the same single loop over the same collection 598s registers an offense when looping over the same data as previous loop 598s does not register an offense when the same loop method is used over different collections 598s does not register an offense for when the same method with different arguments and safe navigation 598s does not register an offense for when the same method with different arguments 598s does not register an offense when the same loops are interleaved with some code 598s Ruby 2.7 598s registers an offense when looping over the same data as previous loop in numblocks 598s when for loop 598s does not register an offense when each branch contains the same single loop over the same collection 598s does not register an offense when the same loops are interleaved with some code 598s registers an offense when looping over the same data as previous loop 598s does not register an offense when the same loop method is used over different collections 598s 598s RuboCop::CLI --autocorrect 598s does not crash when using Lint/SafeNavigationWithEmpty and Layout/EmptyLinesAroundBlockBody 601s can correct two problems in the same place 602s does not correct SpaceAroundOperators in a hash that would be changed back 604s honors Exclude settings in individual cops 605s corrects `Style/InverseMethods` offenses when specifying `IncludeSemanticChanges: false` of `Style/NonNilCheck` and `EnforcedStyle: comparison` of `Style/NilComparison` 607s corrects code with indentation problems 608s consistently quotes symbol keys in a hash using `Lint/SymbolConversion` with `EnforcedStyle: consistent` and `Style/QuotedSymbols` 609s corrects indentation for a begin/rescue/else/ensure/end block properly 610s can correct HashSyntax when --only is used 611s corrects Style/Next and Style/SafeNavigation offenses 612s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` and `Layout/FirstHashElementIndentation` 613s corrects `Layout/DotPosition` and `Style/RedundantSelf` offenses 615s plays nicely with default cops in complex ExtraSpacing scenarios 616s can correct indentation and another thing 618s does not crash when using `Layout/CaseIndentation` and `Layout/ElseAlignment` 619s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Lint/AmbiguousOperator` 621s corrects Tab and IndentationConsistency offenses 623s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/NestedParenthesizedCalls` 624s corrects `Style/TernaryParentheses` offenses and accepts `Lint/ParenthesesAsGroupedExpression` 626s corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged 627s corrects `Style/RedundantBegin` with `Style/MultilineMemoization` 629s corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses 630s corrects `Naming/RescuedExceptionsVariableName` and `, `Style/RescueStandardError`and `Lint/OverwriteByRescue` offenses 631s corrects Style/InverseMethods and Style/Not offenses 632s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Style/RescueModifier` 633s 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 634s corrects IndentationWidth and IndentationConsistency offenseswithout correcting `Style/TrailingBodyOnClass` 637s corrects RedundantBegin offenses and fixes indentation etc 639s can correct two empty lines at end of class body 641s can correct MethodDefParentheses and other offense 643s corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` 644s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedHashRocketStyle: separator` of `Layout/HashAlignment` 645s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `Layout/SpaceBeforeFirstArg` 646s does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets 648s corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense 649s can correct TrailingEmptyLines and TrailingWhitespace offenses 651s corrects RedundantCopDisableDirective offenses 652s corrects `Lint/UnusedMethodArgument` with `Style/ExplicitBlockArgument` 654s corrects IndentationWidth and IndentationConsistency offenses 656s corrects InitialIndentation offenses 658s can change block comments and indent them 659s does not say [Corrected] if correction is not possible 660s corrects Lint/ParenthesesAsGroupedExpression and offenses and accepts Style/RedundantParentheses 661s can correct SpaceAfterComma and HashSyntax offenses 662s can correct WordArray and SpaceAfterComma offenses 664s can correct IndentHash offenses with separator style 665s corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` 667s can correct a problems and the problem it creates 668s can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses 669s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` (`EnforcedColonStyle` is array) 670s properly autocorrects when `Style/TernaryParentheses` requires parentheses that `Style/RedundantParentheses` would otherwise remove 671s corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses 672s 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 673s says [Correctable] if correction is unsafe 675s corrects properly when both `Style/MapToHash` and `Style/HashTransformKeys`or `Style/HashTransformValues` registers 676s properly corrects when `Style/SoleNestedConditional` and one of `Style/NegatedIf` or `Style/NegatedUnless` detect offenses 677s corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` 679s 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` 680s 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` 681s handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces 683s corrects when specifying `EnforcedStyle: with_first_argument` of `Layout/ArgumentAlignment` and `EnforcedColonStyle: separator` of `Layout/HashAlignment` 684s can correct single line methods 685s corrects Layout/RedundantLineBreak and Layout/SingleLineBlockChain offenses 686s does not crash Lint/SafeNavigationWithEmpty and offenses and accepts Style/SafeNavigation when checking `foo&.empty?` in a conditional 687s does not correct ExtraSpacing in a hash that would be changed back 689s 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` 693s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation` 694s corrects `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` with `EnforcedStyle: conditionals` of `Style/AndOr` 696s can be disabled for any cop in configuration 696s corrects `Style/IfUnlessModifier` with `Style/SoleNestedConditional` 697s can correct empty line inside special form of nested modules 698s corrects SymbolProc and SpaceBeforeBlockBraces offenses 700s corrects `EnforcedStyle: line_count_based` of `Style/BlockDelimiters` with `Style/CommentedKeyword` and `Layout/BlockEndNewline` 700s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together 702s breaks line at the beginning of trailing class/module body without removing a semicolon in the bodywhen using `Style/TrailingBodyOnClass` and `Style/TrailingBodyOnModule` 703s corrects `Style/SoleNestedConditional` with `Style/InverseMethods` and `Style/IfUnlessModifier` 703s 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` 705s avoids adding extra spaces when both `Style/Semicolon` and `Style/SingleLineMethods`both apply 705s corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses 706s corrects when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `Layout/HashAlignment` 708s corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceInsideBlockBraces together 709s can correct two problems with blocks 710s can correct HashSyntax and SpaceAroundOperators offenses 710s corrects only IndentationWidth without crashing 711s corrects `Layout/DotPosition` and `Layout/SingleLineBlockChain` offenses 713s does not hang SpaceAfterPunctuation and SpaceInsideParens 713s caching 713s with an offense in the cache 714s corrects offenses 714s with no offenses in the cache 715s doesn't correct offenses 715s when BlockDelimiters has braces_for_chaining style 716s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 716s when BlockDelimiters has line_count_based style 718s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 718s space_inside_bracket cops 718s when array style is no_space & reference style is space 720s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 720s when array style is space & reference style is no space 721s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 721s when array style is compact & reference style is no_space 722s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 722s when array style is compact & reference style is space 724s corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets 724s trailing comma cops 724s when the style is `comma` 725s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 725s when the style is `consistent_comma` 726s corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma 726s when BlockDelimiters has semantic style 727s corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses 727s 727s RuboCop::Cop::Style::Not 727s parenthesizes when `not` would change the meaning of a binary exp 728s autocorrects "not" followed by parens with ! 728s autocorrects "not" with ! 728s parenthesizes when `not` is applied to or 728s uses the reverse operator when `not` is applied to a comparison 728s parenthesizes when `not` is applied to and 728s registers an offense for not 728s parenthesizes when `not` is applied to a ternary op 728s does not register an offense for ! 728s 728s RuboCop::Cop::Layout::SpaceAfterMethodName 728s registers offense and corrects class def with space before parenthesis 728s accepts a def with arguments but no parentheses 728s registers offense and corrects assignment def with space before parenthesis 728s accepts class method def with arguments but no parentheses 728s accepts an assignment def with arguments but no parentheses 728s accepts a def without arguments 728s accepts a defs without arguments 728s registers an offense and corrects def with space before the parenthesis 728s 728s RuboCop::ConfigStore 728s .for 728s always uses config specified in command line 728s when no config specified in command line 728s gets config path and config from cache if available 728s searches for config path if not available in cache 728s when --force-default-config option is specified 728s uses default config without searching for config path 728s 728s RuboCop::Cop::Style::NestedTernaryOperator 728s registers an offense and corrects for a nested ternary operator expression with block 728s can handle multiple nested ternaries 728s registers an offense and corrects for a nested ternary operator expression with no parentheses on the outside 728s registers an offense and corrects for a nested ternary operator expression 728s accepts a non-nested ternary operator within an if 728s 728s RuboCop::Cop::Style::FileWrite 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') with heredoc 728s registers an offense for and corrects `File.open(filename, 'w+b').write(content)` 728s registers an offense for and corrects the `File.open` with inline write block (mode 'wb') 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') with heredoc 728s registers an offense for and corrects `::File.open(filename, 'wb').write(content)` 728s registers an offense for and corrects `::File.open(filename, 'wt').write(content)` 728s registers an offense for and corrects the `File.open` with inline write block (mode 'w') 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') 728s registers an offense for and corrects the `File.open` with inline write block (mode 'w+') 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+b') 728s registers an offense for and corrects the `File.open` with inline write block (mode 'w+t') 728s does not register an offense for the `File.open` with multiline write block when not writing to the block variable 728s registers an offense for and corrects the `File.open` with inline write block (mode 'w+b') 728s registers an offense for and corrects `File.open(filename, 'wb').write(content)` 728s registers an offense for and corrects `::File.open(filename, 'w+').write(content)` 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+t') with heredoc 728s registers an offense for and corrects `File.open(filename, 'wt').write(content)` 728s registers an offense for and corrects `::File.open(filename, 'w+t').write(content)` 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') with heredoc 728s registers an offense for and corrects `File.open(filename, 'w+t').write(content)` 728s registers an offense for and corrects `::File.open(filename, 'w+b').write(content)` 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') with heredoc 728s registers an offense for and corrects `::File.open(filename, 'w').write(content)` 728s registers an offense for and corrects `File.open(filename, 'w').write(content)` 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w') 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'w+') with heredoc 728s registers an offense for and corrects `File.open(filename, 'w+').write(content)` 728s registers an offense for and corrects the `File.open` with inline write block (mode 'wt') 728s does not register an offense when a splat argument is passed to `f.write` 728s registers an offense for and corrects the `File.open` with multiline write block (mode 'wt') 729s registers an offense for and corrects the `File.open` with multiline write block (mode 'wb') 729s 729s RuboCop::Server::CLI 729s when using exclusive `--stop-server` option 729s returns exit status 2 and display an error message 729s when using `--restart-server` option 730s returns exit status 0 and display an information and a warning messages 730s when using `--server-status` option 730s returns exit status 0 and display an information message 730s when using `--server` option 732s returns exit status 0 and display an information message 732s when using `--start-server` option 733s returns exit status 0 and display an information message 733s when using multiple server options 733s returns exit status 2 and display an error message 733s when not using any server options 733s returns exit status 0 733s when using exclusive `--restart-server` option 734s returns exit status 2 and display an error message 734s when using `--no-server` option 734s returns exit status 0 734s when using `--stop-server` option 735s returns exit status 0 and display a warning message 735s when using exclusive `--server-status` option 735s returns exit status 2 and display an error message 735s when using exclusive `--start-server` option 735s returns exit status 2 and display an error message 735s when not using any server options and specifying `--server` in .rubocop file 737s returns exit status 0 and display an information message 737s when using server option with `--cache-root=path` option 737s returns exit status 0 and display an information message 737s when using server option with `--cache-root path` option 737s returns exit status 0 and display an error message 737s when not using any server options and specifying `--server` in `RUBOCOP_OPTS` environment variable 739s returns exit status 0 and display an information message 739s 739s RuboCop::Cop::Style::RedundantCapitalW 739s does not register an offense for array with one element 739s does not register an offense for array of non-words 739s registers no offense for normal arrays of strings with interpolation 739s registers no offense for normal arrays of strings 739s registers no offense for %w without interpolation 739s registers no offense for %W with interpolation 739s registers no offense for arrays with character constants 739s does not register an offense for array containing non-string 739s registers an offense for misused %W with different bracket 739s registers no offense for %w with interpolation-like syntax 739s does not register an offense for array with empty strings 739s registers no offense for %W with special characters 739s registers an offense for misused %W 739s 739s RuboCop::Cop::Lint::NonAtomicFileOperation 739s registers an offense when use `FileTest.exist?` before remove file 739s registers an offense when use `FileTest.exists?` before creating file 739s does not register an offense when using complex conditional with `||` 739s registers an offense when use `FileTest.exist?` before remove file 739s does not register an offense when not a method of file operation 739s does not register an offense when use `FileTest.exist?` before remove recursive file 739s does not register an offense when not checking for the existence 739s registers an offense when use `FileTest.exist?` before force creating file 739s does not register an offense when using complex conditional with `&&` 739s registers an offense when use `FileTest.exist?` before force creating file 739s does not register an offense when using `FileTest.exist?` with `if` condition that has `else` branch 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when use `FileTest.exist?` before creating file with an option not `force` 740s registers an offense when use `FileTest.exist?` before remove file 740s does not register an offense when processing other than file operations 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when using `FileTest.exist?` as a condition for `elsif` 740s registers an offense when use `FileTest.exist?` before force creating file 740s does not register an offense when use `FileTest.exist?` before creating file with an option `force: false` 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when use file existence checks `if` by postfix before removing file 740s registers an offense when use file existence checks `unless` by postfix before creating file 740s registers an offense when use `FileTest.exist?` before force remove file 740s does not register an offense when checking for the existence of different files 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when use `FileTest.exist?` before creating file with an option `force: true` 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when use `FileTest.exist?` before force remove file 740s registers an offense when use `FileTest.exist?` before remove file 740s registers an offense when use `FileTest.exist?` before remove file 740s does not register an offense when not an exist check 740s registers an offense when use `FileTest.exist?` before creating file 740s registers an offense when use `FileTest.exist?` with negated `if` before creating file 740s does not register an offense when use `FileTest.exist?` before remove recursive file 740s 740s RuboCop::Cop::Style::ArgumentsForwarding 740s TargetRubyVersion >= 2.7 740s does not register an offense when different argument names are used 740s does not register an offense when the block arg is overwritten 740s does not register an offense when using the restarg outside forwarding method arguments 740s does not register an offense when body of method definition is empty 740s registers an offense when forwarding to a method in block 740s registers an offense when delegating 740s does not register an offense when assigning the restarg outside forwarding method arguments 740s registers an offense when using restarg and block arg 740s does not register an offense when referencing the restarg outside forwarding method arguments 740s registers an offense when passing restarg and block arg in defs 740s does not register an offense when using arguments forwarding 740s registers an offense when using restarg, kwargs and block arg 740s does not register an offense when different arguments are used 740s registers an offense when the parentheses of arguments are omitted 740s does not register an offense when the kwarg is overwritten 740s does not register an offense when the restarg is overwritten 740s AllowOnlyRestArgument: false 740s registers an offense when using only rest arg 740s registers an offense when using only kwrest arg 740s AllowOnlyRestArgument: true 740s does not register an offense when using only kwrest arg 740s does not register an offense when using only rest arg 740s TargetRubyVersion >= 3.1 740s registers an offense when using restarg and anonymous block arg 740s registers an offense when using restarg, kwargs, and anonymous block arg 740s TargetRubyVersion <= 2.6 740s does not register an offense when using restarg with block arg 740s 740s RuboCop::Cop::Lint::MissingSuper 740s callbacks 740s registers no offense when module callback without `super` call 740s registers an offense when method callback is without `super` call 740s does not register an offense when callback has a `super` call 741s registers an offense when class callback without `super` call 741s registers an offense when class callback within `self << class` and without `super` call 741s constructor 741s does not register an offense for the constructor-like method defined outside of a class 741s does not register an offense when there is a `super` call 741s does not register an offense for the class without parent class 741s registers an offense when no `super` call 741s does not register an offense for the class with stateless parent class 741s 741s RuboCop::Cop::Style::Documentation 741s registers an offense for empty module without documentation 741s does not consider comment followed by empty line to be class documentation 741s accepts empty class without documentation 741s accepts namespace class without documentation 741s registers an offense for non-namespace 741s registers an offense for non-empty class with annotation comment 741s does not raise an error for an implicit match conditional 741s accepts non-empty class with documentation 741s accepts non-empty class with comment that ends with an annotation 741s accepts non-empty module with documentation 741s registers an offense for compact-style nested module 741s accepts namespace module which defines constants 741s accepts non-empty class with annotation comment followed by other comment 741s registers an offense for non-empty class with directive comment 741s accepts namespace class which defines constants 741s registers an offense for non-empty class with encoding comment 741s accepts namespace module without documentation 741s registers an offense for non-empty class 741s registers an offense for compact-style nested class 741s registers an offense if the comment line contains code 741s registers an offense for a deeply nested class 742s registers an offense for non-empty cbase class 742s registers offense for non-empty class with frozen string comment 742s without documentation 742s macro-only class 742s registers offense for macro with other methods 742s does not register offense with multiple macros 742s does not register offense with single macro 742s with non-empty module 742s with constants visibility declaration content 742s does not register an offense 742s with non-empty class 742s with constants visibility declaration content 742s does not register an offense 742s sparse and trailing comments 742s ignores comments after module node end 742s ignores sparse comments inside module node 742s ignores comments after class node end 742s ignores sparse comments inside class node 742s with # :nodoc: 742s accepts non-namespace module without documentation 742s registers an offense for nested class without documentation 742s accepts compact-style nested class without documentation 742s registers an offense for nested module without documentation 742s accepts non-namespace class without documentation 742s accepts compact-style nested module without documentation 742s with `all` modifier 742s accepts nested class without documentation 742s on a subclass 742s accepts non-namespace subclass without documentation 742s registers an offense for nested subclass without documentation 742s with `all` modifier 742s accepts nested subclass without documentation 742s when AllowedConstants is configured 742s ignores the constants in the config 742s with `all` modifier 742s accepts nested module without documentation 742s 742s RuboCop::Cop::Lint::PercentStringArray 742s with invalid byte sequence in UTF-8 742s add an offense and corrects when tokens contain quotes 742s accepts if tokens contain invalid byte sequence only 742s detecting quotes or commas in a %w/%W string 742s accepts likely false positive :"#{a}" 742s adds an offense and corrects when tokens contain both types of quotes 742s accepts likely false positive %w(' " ! = # ,) 742s accepts likely false positive %W(#{a} b) 742s adds an offense and corrects when there are no quotes but one comma 742s adds an offense and corrects when tokens contain quotes and are comma separated 742s accepts tokens without quotes or commas 742s accepts likely false positive :"#{a}" 742s adds an offense and corrects when tokens contain quotes and are comma separated 742s accepts likely false positive %w(' ") 742s accepts tokens without quotes or commas 742s accepts likely false positive %w(#{a} b) 742s adds an offense and corrects when one token is quoted but there are no commas 742s adds an offense and corrects when there are no quotes but one comma 742s adds an offense and corrects when tokens contain both types of quotes 742s adds an offense and corrects when one token is quoted but there are no commas 742s accepts likely false positive %W(' " ! = # ,) 742s accepts likely false positive %W(' ") 742s with binary encoded source 742s adds an offense and corrects when tokens contain quotes 742s accepts if tokens contain no quotes 742s 742s RuboCop::Server::Cache 742s .cache_path 742s when cache root path is specified path 742s is the specified path 742s when .rubocop.yml is empty 742s when cache root path is not specified path 742s does not raise an error 742s when ERB pre-processing of the configuration file 742s when cache root path is not specified path 742s does not raise an error 742s when cache root path is not specified as default 742s is the default path 742s when `CacheRootDirectory` configure value is set 742s when cache root path is specified path 742s contains the root from cache root path 742s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is spacified 742s contains the root from `CacheRootDirectory` configure value 742s when cache root path is not specified path 742s contains the root from `CacheRootDirectory` configure value 742s when `RUBOCOP_CACHE_ROOT` environment variable is set 742s when cache root path is not specified path and `XDG_CACHE_HOME` environment variable is specified 742s contains the root from `RUBOCOP_CACHE_ROOT` 742s when cache root path is specified path 742s contains the root from cache root path 742s when cache root path is not specified path 742s contains the root from `RUBOCOP_CACHE_ROOT` 742s when `XDG_CACHE_HOME` environment variable is set 742s when cache root path is not specified path 742s contains the root from `XDG_CACHE_HOME` 742s when cache root path is specified path 742s contains the root from cache root path 742s .pid_running? 743s works properly when concurrency with server stopping and cleaning cache dir 743s 743s RuboCop::Cop::Style::CommentAnnotation 743s with RequireColon configuration set to false 744s accepts a keyword that is somewhere in a sentence 744s accepts a comment that is obviously a code example 744s accepts upper case keyword alone 744s accepts upper case keyword with colon, space and note 744s accepts a keyword that is just the beginning of a sentence 744s lower case keyword 744s registers an offense and upcases 744s upper case keyword with space but no note 744s registers an offense without autocorrection 744s with configured keyword 744s registers an offense for containing a colon after the word 744s upper case keyword with colon but no note 744s registers an offense without autocorrection 744s when a keyword is not in the configuration 744s accepts the word with colon 744s multiline comment 744s only registers an offense on the first line 744s with colon 744s registers an offense and removes colon 744s offenses in consecutive inline comments 744s registers each of them 744s with default RequireColon configuration (colon + space) 744s accepts a keyword that is somewhere in a sentence 744s accepts a comment that is obviously a code example 744s accepts upper case keyword with colon, space and note 744s accepts upper case keyword alone 744s accepts a keyword that is just the beginning of a sentence 744s with configured keyword 744s registers an offense for a missing colon after the word 744s missing space after colon 744s registers an offense and adds space 744s multiline comment 744s only registers an offense on the first line 744s upper case keyword with colon but no note 744s registers an offense without autocorrection 744s upper case keyword with space but no note 744s registers an offense without autocorrection 744s capitalized keyword 744s registers an offense and upcases 744s when a keyword is not in the configuration 744s accepts the word without colon 744s lower case keyword 744s registers an offense and upcases 744s missing colon 744s registers an offense and adds colon 744s offenses in consecutive inline comments 744s registers each of them 744s with multiword keywords 744s registers an offense for each matching keyword 744s 744s RuboCop::Cop::Style::TrailingCommaInArguments 744s with a single argument of anonymous function spanning multiple lines 744s when EnforcedStyleForMultiline is consistent_comma 744s accepts a single argument with no trailing comma 744s with a single argument spanning multiple lines 744s when EnforcedStyleForMultiline is consistent_comma 744s accepts a single argument with no trailing comma 744s with single line list of values 744s when EnforcedStyleForMultiline is comma 744s registers an offense for trailing comma preceded by whitespace in a method call 744s registers an offense for trailing comma in a method call 744s accepts method call without parameters 744s accepts method call without trailing comma when a line break before a method call 744s accepts chained single-line method calls 744s accepts heredoc without trailing comma 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s accepts method call without trailing comma with single element hash parameters at the end 745s accepts method call without trailing comma 745s when using safe navigation operator 745s registers an offense for trailing comma in a method call 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s when EnforcedStyleForMultiline is no_comma 745s accepts heredoc without trailing comma 745s accepts chained single-line method calls 745s registers an offense for trailing comma preceded by whitespace in a method call 745s accepts method call without trailing comma with single element hash parameters at the end 745s accepts method call without trailing comma 745s accepts method call without parameters 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s registers an offense for trailing comma in a method call 745s accepts method call without trailing comma when a line break before a method call 745s when using safe navigation operator 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s registers an offense for trailing comma in a method call 745s when EnforcedStyleForMultiline is consistent_comma 745s accepts chained single-line method calls 745s registers an offense for trailing comma preceded by whitespace in a method call 745s accepts method call without parameters 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s registers an offense for trailing comma in a method call 745s accepts method call without trailing comma when a line break before a method call 745s accepts method call without trailing comma with single element hash parameters at the end 745s accepts method call without trailing comma 745s accepts heredoc without trailing comma 745s when using safe navigation operator 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s registers an offense for trailing comma in a method call 745s with multi-line list of values 745s when EnforcedStyleForMultiline is comma 745s accepts a multiline call with a single argument and trailing comma 745s accepts missing comma after heredoc with comments 745s does not break when a safe method call is chained on the offending more complex one 745s does not break when a safe method call is chained on the offending simple one 745s accepts trailing comma in a method call with hash parameters at the end 745s accepts a method call with two parameters on the same line 745s accepts a trailing comma in a method call with single line hashes 745s registers an offense for no trailing comma in a method call with hash parameters at the end 745s accepts an empty hash being passed as a method argument 745s accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line 745s does not break when a method call is chained on the offending one 745s when closing bracket is on same line as last value 745s accepts a method call with Hash as last parameter split on multiple lines 745s when EnforcedStyleForMultiline is no_comma 745s autocorrects unwanted comma after modified heredoc parameter 745s accepts comma inside a heredoc parameter at the end 745s accepts comma inside a modified heredoc parameter 745s registers an offense for trailing comma in a method call with hash parameters at the end 745s accepts comma inside a heredoc in brackets 745s accepts comma inside a heredoc with comments inside 745s accepts comma inside a heredoc with method and comments inside 746s accepts a method call with hash parameters at the end and no trailing comma 746s when there is string interpolation inside heredoc parameter 746s accepts comma inside a heredoc parameter when on a single line 746s accepts comma inside a heredoc parameter 746s autocorrects unwanted comma inside string interpolation 746s when EnforcedStyleForMultiline is consistent_comma 746s accepts a trailing comma in a method call with a single hash parameter 746s registers an offense for no trailing comma in a method call with hash parameters at the end 746s autocorrects missing comma after a heredoc 746s accepts a multiline call with single argument on multiple lines 746s registers an offense for no trailing comma in a method call withtwo parameters on the same line 746s accepts no trailing comma in a method call with a block parameter at the end 746s accepts a trailing comma in a method call with single line hashes 746s accepts a multiline call with arguments on a single line and trailing comma 746s accepts a multiline call with a single argument and trailing comma 746s accepts a trailing comma in a method call with a single hash parameter to a receiver object 746s accepts trailing comma in a method call with hash parameters at the end 746s when closing bracket is on same line as last value 746s registers an offense for a method call, with a Hash as the last parameter, split on multiple lines 746s 746s RuboCop::ConfigObsoletion::RenamedCop 746s #message 746s when the cop has been moved to a new department 746s is expected to start with "The `Style/MyCop` cop has been moved to `Layout/MyCop`" 746s when the cop has changed names but in a new department 746s is expected to start with "The `Style/MyCop` cop has been renamed to `Layout/NewCop`" 746s when the cop has changed names but in the same department 746s is expected to start with "The `Style/MyCop` cop has been renamed to `Style/NewCop`" 746s 746s RuboCop::Cop::Layout::MultilineHashKeyLineBreaks 746s without line break after opening bracket 746s registers an offense and corrects nested hashes 746s registers an offense and corrects when key starts on same line as another 746s when on same line 746s does not add any offenses 746s with line break after opening bracket 746s registers an offense and corrects when key starts on same line as another 746s when key starts on same line as another with rockets 746s adds an offense 746s when on different lines than brackets but keys on one 746s does not add any offenses 746s when on all keys on one line different than brackets 746s does not add any offenses 746s 746s RuboCop::Cop::Lint::DuplicateRequire 746s registers and corrects an offense when duplicate `require` is detected 746s does not register an offense when using single `require` 746s registers and corrects an offense when duplicate `require_relative` is detected 746s registers and corrects an offense for multiple duplicate requires 746s registers and corrects an offense for duplicate non top-level requires 746s registers and corrects an offense when duplicate requires are interleaved with some other code 746s registers and corrects an offense when duplicate `require` through `Kernel` is detected 746s does not register an offense when calling user-defined `require` method 746s does not register an offense when there are no duplicate `require`s 746s does not register an offense when same feature argument but different require method 746s 746s RuboCop::Cop::Layout::BlockEndNewline 746s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc argument method chain 746s registers an offense and corrects when multiline block `}` is not on its own line and using multiple heredoc arguments 746s registers an offense and corrects when multiline block end is not on its own line 746s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument with method chain 746s accepts a one-liner 746s registers an offense and corrects when multiline block `}` is not on its own line 746s registers an offense and corrects when a multiline block ends with a hash 746s registers an offense and corrects when a multiline block ends with a method call with hash arguments 746s registers an offense and corrects when `}` of multiline block without processing is not on its own line 746s accepts multiline blocks with newlines before the end 746s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 746s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 746s Ruby 2.7 746s registers an offense and corrects when multiline block `}` is not on its own line and using method chain 746s registers an offense and corrects when multiline block `}` is not on its own line and using heredoc argument 746s 746s RuboCop::Cop::Lint::RegexpAsCondition 746s does not register an offense for a regexp literal with `=~` operator 746s does not register an offense for a regexp literal outside conditions 746s registers an offense and corrects for a regexp literal in `if` condition 746s 746s RuboCop::Cop::Style::Strip 746s registers an offense for str.rstrip.lstrip 746s registers an offense for str.lstrip.rstrip 746s 746s RuboCop::Cop::Lint::AmbiguousBlockAssociation 746s behaves like accepts 746s does not register an offense 746s behaves like accepts 746s does not register an offense 746s behaves like accepts 746s does not register an offense 746s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s when AllowedPatterns is enabled 747s does not register an offense for an allowed method 747s registers an offense for other methods 747s behaves like accepts 747s does not register an offense 747s without parentheses 747s rspec expect {}.to change {} 747s registers an offense 747s with receiver 747s registers an offense 747s when using safe navigation operator 747s registers an offense 747s with assignment 747s registers an offense 747s as a hash key 747s registers an offense 747s without receiver 747s registers an offense 747s behaves like accepts 747s does not register an offense 747s when AllowedMethods is enabled 747s does not register an offense for an allowed method 747s registers an offense for other methods 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s behaves like accepts 747s does not register an offense 747s 747s RuboCop::Cop::Lint::ConstantOverwrittenInRescue 747s does not register an offense when using `=>` but correctly assigning to variables 747s registers an offense when overriding an exception with an exception result 747s does not register an offense when not overriding an exception with an exception result 747s 747s RuboCop::Cop::Style::TrailingCommaInHashLiteral 747s with multi-line list of values 747s when EnforcedStyleForMultiline is no_comma 747s accepts comma in comment after last value item 747s accepts literal with no trailing comma 747s accepts comma inside a heredoc parameters at the end 747s registers an offense for trailing comma in literal 747s when EnforcedStyleForMultiline is consistent_comma 747s registers an offense for no trailing comma 747s accepts a multiline hash with pairs on a single line andtrailing comma 747s accepts a multiline hash with a single pair and trailing comma 747s accepts trailing comma after a heredoc 747s accepts trailing comma 747s when closing bracket is on same line as last value 747s registers an offense for literal with no trailing comma 747s when EnforcedStyleForMultiline is comma 747s registers an offense for no trailing comma 747s accepts a multiline hash with a single pair and trailing comma 747s accepts trailing comma after a heredoc 747s accepts trailing comma 747s registers an offense for trailing comma in a comment 747s when closing bracket is on same line as last value 747s accepts literal with no trailing comma 747s with single line list of values 747s when EnforcedStyleForMultiline is consistent_comma 747s accepts empty literal 747s accepts single element literal without trailing comma 747s accepts literal without trailing comma 747s registers an offense for trailing comma in a literal 747s when EnforcedStyleForMultiline is comma 747s registers an offense for trailing comma in a literal 747s accepts literal without trailing comma 747s accepts empty literal 747s accepts single element literal without trailing comma 747s when EnforcedStyleForMultiline is no_comma 747s accepts literal without trailing comma 747s registers an offense for trailing comma in a literal 748s accepts empty literal 748s accepts single element literal without trailing comma 748s 748s RuboCop::Cop::Style::AccessModifierDeclarations 748s when `group` is configured 748s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 748s does not offend when module_function is not inlined 748s does not offend when public is not inlined 748s offends when module_function is inlined with a method 748s does not registers an offense when using #{access_modifier} in a block 748s accepts when #{access_modifier} is a hash literal value 748s does not offend when module_function is not inlined and has a comment 748s accepts when using only #{access_modifier} 748s does not registers an offense when using #{access_modifier} in a block 748s offends when protected is inlined with a method 748s accepts when #{access_modifier} is a hash literal value 748s does not offend when protected is not inlined 748s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 748s does not offend when protected is not inlined and has a comment 748s does not offend when private is not inlined 748s does not registers an offense when using #{access_modifier} in a block 748s does not offend when private is not inlined and has a comment 748s accepts when #{access_modifier} is a hash literal value 748s accepts when using only #{access_modifier} 748s offends when private is inlined with a method 748s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 748s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 748s accepts when using only #{access_modifier} 748s does not offend when public is not inlined and has a comment 748s accepts when #{access_modifier} is a hash literal value 748s accepts when using only #{access_modifier} 748s does not registers an offense when using #{access_modifier} in a block 748s offends when public is inlined with a method 748s do not allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s when method is modified by inline modifier where group modifier already exists 748s registers and autocorrects an offense 748s when method has comments 748s registers and autocorrects an offense 748s when method is modified by inline modifier where group modifier already exists 748s registers and autocorrects an offense 748s when method is modified by inline modifier where group modifier already exists 748s registers and autocorrects an offense 748s when method is modified by inline modifier where group modifier already exists 748s registers and autocorrects an offense 748s when method is modified by inline modifier with disallowed symbol 748s registers and autocorrects an offense 748s allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s when non-existent method is modified by inline modifier with disallowed symbol 748s registers an offense but does not autocorrect it 748s allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s do not allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s when non-existent method is modified by inline modifier with disallowed symbol 748s registers an offense but does not autocorrect it 748s when method has comments 748s registers and autocorrects an offense 748s when non-existent method is modified by inline modifier with disallowed symbol 748s registers an offense but does not autocorrect it 748s when method is modified by inline modifier with disallowed symbol 748s registers and autocorrects an offense 748s when method is modified by inline modifier 748s registers and autocorrects an offense 748s when method is modified by inline modifier with disallowed symbol 748s registers and autocorrects an offense 748s allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s do not allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s do not allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s when method is modified by inline modifier 748s registers and autocorrects an offense 748s when non-existent method is modified by inline modifier with disallowed symbol 748s registers an offense but does not autocorrect it 748s when method is modified by inline modifier with disallowed symbol 748s registers and autocorrects an offense 748s when method has comments 748s registers and autocorrects an offense 748s when method has comments 748s registers and autocorrects an offense 748s when method is modified by inline modifier 748s registers and autocorrects an offense 748s allow access modifiers on symbols 748s accepts when argument to #{access_modifier} is a symbol 748s when method is modified by inline modifier 748s registers and autocorrects an offense 748s when `inline` is configured 748s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 748s does not offend when private is inlined with a symbol 748s offends when private is not inlined and has a comment 748s offends when public is not inlined and has a comment 749s offends when protected is not inlined and has a comment 749s does not offend when public is inlined with a symbol 749s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 749s accepts when #{access_modifier} is a hash literal value 749s does not offend when protected is inlined with a method 749s does not offend when protected is inlined with a symbol 749s does not offend when public is inlined with a method 749s accepts when #{access_modifier} is a hash literal value 749s offends when module_function is not inlined and has a comment 749s offends when private is not inlined 749s offends when protected is not inlined 749s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 749s offends when module_function is not inlined 749s registers an offense for correct + multiple opposite styles of #{access_modifier} usage 749s accepts when #{access_modifier} is a hash literal value 749s offends when public is not inlined 749s accepts when #{access_modifier} is a hash literal value 749s does not offend when private is inlined with a method 749s does not offend when module_function is inlined with a symbol 749s does not offend when module_function is inlined with a method 749s when methods are modified by group modifier 749s registers and autocorrects an offense 749s allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s when methods are modified by group modifier 749s registers and autocorrects an offense 749s do not allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s do not allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s when methods are modified by group modifier 749s registers and autocorrects an offense 749s when methods are modified by group modifier 749s registers and autocorrects an offense 749s do not allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s do not allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s allow access modifiers on symbols 749s accepts when argument to #{access_modifier} is a symbol 749s 749s RuboCop::Cop::Style::DocumentDynamicEvalDefinition 749s registers an offense when using eval-type method with string interpolation without comment docs 749s does not register an offense when using eval-type method with string interpolation with comment docs 749s does not register an offense when using eval-type method without string interpolation 749s does not register an offense when using eval-type method with interpolated string that is not heredoc with comment doc 749s registers an offense when using eval-type method with interpolated string that is not heredoc without comment doc 749s block comment in heredoc 749s does not register an offense when using inline comments 749s does not evaluate comments if there is no interpolation 749s does not register an offense for a matching block comment 749s does not register an offense when using other text 749s does not register an offense when using multiple methods with split comments 749s does not register an offense when using multiple methods 749s registers an offense if the comment does not match the method 749s block comment outside heredoc 749s does not register an offense when using other text 749s does not register an offense for a matching block comment after the heredoc 749s does not register an offense for a matching block comment before the heredoc 749s does not register an offense when using multiple methods 749s registers an offense if the comment does not match the method 749s does not register an offense when using inline comments 749s 749s RuboCop::Cop::Layout::BlockAlignment 749s accepts end aligned with a constant 749s accepts end aligned with a call chain left hand side 749s accepts end aligned with a mass assignment 750s registers an offense for mismatched block end with an and-asgn (&&=) 750s registers an offense for mismatched block end with an or-asgn (||=) 750s accepts end aligned with an or-asgn (||=) 750s accepts end aligned with a global variable 750s registers an offense for mismatched block end with a method call 750s does not raise an error for nested block in a method call 750s registers an offense for mismatched block end with a global variable 750s registers an offense for mismatched block end with a mass assignment 750s registers an offense for mismatched block end with an op-asgn (+=, -=) 750s registers an offense for mismatched block end with a variable 750s accepts end aligned with a variable 750s accepts end aligned with an and-asgn (&&=) 750s registers an offense for mismatched block end with a constant 750s accepts end aligned with an instance variable 750s registers an offense for mismatched block end with a class variable 750s accepts a block end that does not begin its line 750s accepts end aligned with a class variable 750s accepts end aligned with a method call 750s registers an offense for mismatched end with a method call with arguments 750s registers an offense for mismatched end not aligned with the block that is an argument 750s accepts end aligned with a method call with arguments 750s accepts end aligned with an op-asgn (+=, -=) 750s accepts end aligned with the block when the block is a method argument 750s registers an offense for mismatched block end with an instance variable 750s when variables of a mass assignment spans several lines 750s accepts end aligned with the variables 750s registers an offense for end aligned with the block 750s Ruby 2.7 750s registers an offense for mismatched block end with a mass assignment 750s accepts end aligned with a call chain left hand side 750s when the block is terminated by } 750s mentions } (not end) in the message 750s when multiple similar-looking blocks have misaligned ends 750s registers an offense for each of them 750s when the block is defined on the next line 750s registers an offenses for mismatched end alignment 750s accepts end aligned with the block expression 750s on a splatted method call 750s registers an offense and corrects misaligned end braces 750s aligns end with the splat operator 750s on a bit-flipped method call 750s registers an offense and corrects misaligned end brace 750s aligns end with the ~ operator 750s when there is an assignment chain 750s accepts end aligned with the first variable 750s registers an offense for an end aligned with the 2nd variable 750s when the block has arguments 750s registers an offense for mismatched block end 750s on a logically negated method call 750s aligns end with the ! operator 750s registers an offense and corrects 750s when the method part is a call chain that spans several lines 750s accepts two kinds of end alignment 750s accepts pretty alignment style 750s registers offenses for misaligned ends 750s accepts end indented as the start of the block 750s when the block is a logical operand 750s accepts a correctly aligned block end 750s when the block has no arguments 750s registers an offense for mismatched block end 750s when configured to align with do 750s errors when start_of_line aligned 750s allows when do aligned 750s when configured to align with start_of_line 750s allows when start_of_line aligned 750s errors when do aligned 750s and the block is an operand 750s accepts end aligned with a variable 750s on an arithmetically negated method call 750s aligns end with the - operator 750s registers an offense and corrects 750s 750s RuboCop::StringInterpreter 750s .interpret 750s handles hex 750s handles octal 750s handles unicode 750s handles extended unicode 750s behaves like simple escape 750s handles \\n 750s behaves like simple escape 750s handles \\r 750s behaves like simple escape 750s handles \\f 750s behaves like simple escape 750s handles \\s 750s behaves like simple escape 750s handles \\b 750s behaves like simple escape 750s handles \\e 750s behaves like simple escape 750s handles \\a 750s behaves like simple escape 750s handles \\t 750s behaves like simple escape 750s handles \\v 750s 750s RuboCop::Cop::Gemspec::DuplicatedAssignment 751s does not register an offense when `name=` method call is not block value 751s registers an offense when using `name=` twice 751s registers an offense when using `name=` twice with `cbase` 751s does not register an offense when using `spec.add_dependency` twice 751s registers an offense when using `version=` twice 751s registers an offense when using `required_ruby_version=` twice 751s does not register an offense when using `<<` twice 751s 751s RuboCop::Cop::Lint::TrailingCommaInAttributeDeclaration 751s registers an offense when using trailing comma 751s does not register an offense when not using trailing comma 751s 751s RuboCop::Formatter::FileListFormatter 751s #file_finished 751s displays parsable text 751s 751s RuboCop::Cop::Naming::MethodParameterName 751s registers offense when parameter is less than minimum length 751s does not register offense for empty restarg 751s registers offense when parameter with prefix is less than minimum length 751s registers offense when parameter ends in number on class method 751s does not register offense for empty kwrestarg 751s can register multiple offenses in one method definition 751s registers offense for offensive keyword parameters 751s registers offense for offensive default parameter 751s registers offense when parameter contains uppercase characters 751s does not register for method without parameters 751s does not register offense for valid parameter names 751s registers offense when parameter ends in number 751s does not register offense for valid parameter names on self.method 751s does not register offense for valid keyword parameters 751s does not register offense for valid default parameters 751s when using argument forwarding 751s does not register an offense 751s with AllowedNames 751s registers unlisted offensive names 751s accepts specified block param names 751s accepts underscore param names 751s accepts param names prefixed with underscore 751s with AllowNamesEndingInNumbers 751s accept parameters that end in numbers 751s with ForbiddenNames 751s accepts parameter that uses a forbidden name's letters 751s registers offense for parameter listed as forbidden 751s 751s RuboCop::Formatter::ClangStyleFormatter 751s #report_file 751s displays text containing the offending source line 751s when the offense is automatically corrected 751s prints [Corrected] along with message 751s when the offense is correctable 751s prints message as-is 751s when the source contains multibyte characters 751s displays text containing the offending source line 751s when the offense is not corrected 752s prints message as-is 752s when the source line is blank 752s does not display offending source line 752s when the offending source spans multiple lines 752s displays the first line with ellipses 752s 752s RuboCop::Cop::Style::BisectedAttrAccessor 752s does not register an offense when using `attr_accessor` 752s does not register an offense when only one accessor of the name exists 752s registers an offense and corrects when attr and attr_writer exists 752s registers an offense and corrects properly when attr_writer is before attr_reader 752s does not register an offense when accessors are within different visibility scopes 752s registers an offense and corrects when within eigenclass 752s registers an offense and corrects when both accessors of the name exists and accessor contains multiple names 752s registers an offense and corrects when both accessors of the name exists 752s registers an offense for accessors with the same visibility in different scopes 752s registers and corrects in a module 752s registers an offense and corrects when both accessors of the splat exists 752s registers an offense and corrects when both accessors are in the same visibility scope 752s multiple bisected accessors 752s when some attr names are bisected 752s registers and retains non-bisected attrs 752s when all attr names are bisected 752s registers and replaces with attr_accessor 752s 752s RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces 752s can handle interpolation in a braceless hash literal 752s accepts hashes with spaces by default 752s registers an offense for correct + opposite 752s accepts hash literals with no braces 752s registers an offense for hashes with no spaces if so configured 752s on { key: "{" } 752s does not register an offense 752s with space inside empty braces allowed 752s accepts empty braces with space inside 752s registers an offense for empty braces with no space inside 752s when using method argument that both key and value are hash literals 752s registers hashes with no spaces 752s with space inside empty braces not allowed 752s accepts empty braces with no space inside 752s registers an offense for empty braces with space inside 752s with newline inside empty braces not allowed 752s registers an offense 752s when EnforcedStyle is no_space 752s accepts multiline hash 752s accepts multiline hash with comment 752s registers an offense for hashes with spaces 752s accepts hashes with no spaces 752s registers an offense for opposite + correct 752s when using method argument that both key and value are hash literals 752s accepts hashes with no spaces 752s on Hash[{ x: 1 } => [1]] 752s does not register an offense 752s when EnforcedStyle is compact 752s accepts multiline hash 752s registers offenses for hashes with no spaces 752s accepts multiline hash with comment 752s doesn't register an offense for non-nested hashes with spaces 752s registers an offense for nested hashes with spaces 752s registers an offense for opposite + correct 752s offending hash following empty hash 752s registers an offense on both sides 752s 752s RuboCop::Cop::Style::LineEndConcatenation 752s registers offenses only for the appropriate lines in chained concats 752s registers an offense for dynamic string concat with << at line end 752s accepts string concat with a return value of method on a string 752s registers multiple offenses when there are chained << methods 752s registers an offense for dynamic string concat at line end 752s accepts string concat on the same line 752s autocorrects a + with \ to just \ 752s accepts string concat at line end when % literals are involved 752s registers an offense for string concat with << at line end 752s registers multiple offenses when there are chained concatenationscombined with << calls 752s accepts string concat at line end when followed by a comment line 752s accepts string concat at line end when followed by comment 752s accepts string concat with a return value of method on an interpolated string 752s autocorrects a + with trailing whitespace to \ 752s accepts string concat at line end for special strings like __FILE__ 752s registers an offense for string concat with << and \ at line ends 752s registers multiple offenses when there are chained concatenations 753s autocorrects only the lines that should be autocorrected 753s registers an offense for string concat at line end 753s 753s RuboCop::Cop::Lint::EnsureReturn 753s registers an offense when returning multiple values in `ensure` 753s does not register an offense for return outside ensure 753s registers an offense and corrects for return in ensure 753s does not check when ensure block has no body 753s registers an offense and corrects for return with argument in ensure 753s 753s RuboCop::Cop::Style::TrailingBodyOnClass 753s autocorrects with comment after body 753s registers an offense when body trails after class definition 753s registers offense with multi-line class 753s accepts regular class 753s accepts class inheritance 753s when class is not on first line of processed_source 753s autocorrect offense 753s 753s RuboCop::Cop::Style::Proc 753s accepts the Proc.new call without block 753s registers an offense for ::Proc.new 753s registers an offense for a Proc.new call 753s accepts the ::Proc.new call without block 753s Ruby 2.7 753s registers an offense for a Proc.new call 753s 753s RuboCop::Cop::Lint::SelfAssignment 753s does not register an offense when using constant var assignment for constant from another scope 753s does not register an offense when using shorthand-and var assignment 753s registers an offense when using multiple var self-assignment through array 753s does not register an offense when using class var assignment 753s does not register an offense when using global var assignment 753s registers an offense when using class var self-assignment 753s registers an offense when using constant var self-assignment 753s registers an offense when using global var self-assignment 753s does not register an offense when using shorthand-or var assignment 753s does not register an offense when using local var assignment 753s does not register an offense when using multiple var assignment 753s does not register an offense when using instance var assignment 753s does not register an offense when using multiple var assignment through method call 753s registers an offense when using shorthand-or var self-assignment 753s registers an offense when using local var self-assignment 753s registers an offense when using multiple var self-assignment 753s registers an offense when using instance var self-assignment 753s does not register an offense when using constant var or-assignment for constant from another scope 753s registers an offense when using shorthand-and var self-assignment 753s does not register an offense when using multiple var assignment through splat 753s 753s RuboCop::Cop::Layout::CommentIndentation 753s when allow_for_alignment is true 753s registers offenses and corrects before __END__ but not after 753s accepts comments with extra indentation if aligned with comment on previous line 753s registers an offense and corrects 753s near various kinds of brackets 753s is unaffected by closing bracket that does not begin a line 753s accepts correctly indented comments 753s on outer level 753s registers an offense and corrects an incorrectly indented (2) comment 753s accepts a correctly indented comment 753s accepts a comment that follows code 753s registers an offense for each incorrectly indented comment 753s registers an offense and corrects a documentation comment 753s registers an offense and corrects an incorrectly indented (1) comment 753s around program structure keywords 754s accepts correctly indented comments 754s with a blank line following the comment 754s accepts a correctly indented comment 754s when allow_for_alignment is false 754s registers an offense and corrects 754s registers offenses and corrects before __END__ but not after 754s registers an offense for comments with extra indentation 754s near various kinds of brackets 754s accepts correctly indented comments 754s is unaffected by closing bracket that does not begin a line 754s around program structure keywords 754s accepts correctly indented comments 754s with a blank line following the comment 754s accepts a correctly indented comment 754s on outer level 754s registers an offense and corrects a documentation comment 754s accepts a correctly indented comment 754s registers an offense for each incorrectly indented comment 754s registers an offense and corrects an incorrectly indented (2) comment 754s accepts a comment that follows code 754s registers an offense and corrects an incorrectly indented (1) comment 754s 754s RuboCop::Cop::Style::RedundantConditional 754s does not register an offense for if/elsif/else with non-boolean results 754s registers an offense for if/else with negated boolean results 754s registers an offense for ternary with negated boolean results 754s registers an offense for if/elsif/else with boolean results 754s registers an offense for ternary with boolean results 754s does not register an offense for if/else with non-boolean results 754s registers an offense for if/else with boolean results 754s registers an offense for if/elsif/else with negated boolean results 754s allows ternary with non-boolean results 754s 754s RuboCop::Cop::InternalAffairs::MethodNameEndWith 754s registers offense if there is potentially usage of `predicate_method?` 754s does not register offense if argument for end_with? is some other string 754s registers offense if there is potentially usage of `bang_method?` with safe navigation operator 754s registers offense if there is potentially usage of `bang_method?` 754s registers an offense if there is potentially usage of `assignment_method?` 754s registers an offense if `method_name` is a variable and there is potentially usage of `assignment_method?` 754s Ruby >= 2.7 754s registers offense if argument for Symbol#end_with? is '!' 754s registers an offense if method_name is symbol 754s registers an offense if method_name is symbol with safe navigation operator 754s registers offense if argument for Symbol#end_with? is '?' 754s does not register offense if argument for Symbol#end_with? is some other string 754s registers offense if argument for Symbol#end_with? is '!' with safe navigation operator 754s registers offense if argument for Symbol#end_with? is '?' with safe navigation operator 754s 754s RuboCop::Cop::Style::MultilineWhenThen 754s autocorrects when the body of `when` branch starts with `then` 754s doesn't register an offense when `then` required for a body of `when` is used 754s doesn't register an offense for multiline when statement without then 754s does not register an offense for array when statement with then 754s doesn't register an offense for empty when statement without then 754s doesn't register an offense for singleline when statement with then 754s registers an offense for multiline (two lines in a body) when statement with then 754s registers an offense when one line for multiple candidate values of `when` 754s does not register an offense for hash when statement with then 754s doesn't register an offense for multiline when statementwith then followed by other lines 754s does not register an offense when line break for multiple candidate values of `when` 754s registers an offense for multiline (one line in a body) when statement with then 754s registers an offense for empty when statement with then 754s 754s RuboCop::Cop::Style::Copyright 754s does not register an offense when the notice is not the first comment 755s does not register an offense when the notice is in a block comment 755s does not register an offense when the notice is present 755s when the source code file is empty 755s adds an offense 755s when the copyright notice is missing and the source code file starts with an encoding comment 755s adds an offense 755s when the copyright notice comes after any code 755s adds an offense 755s when the copyright notice is missing and the source code file starts with a shebang 755s adds an offense 755s when the copyright notice is missing and the source code file starts with shebang and an encoding comment 755s adds an offense 755s when the copyright notice is missing 755s adds an offense 755s fails to autocorrect if no AutocorrectNotice is given 755s fails to autocorrect when the AutocorrectNotice does not match the Notice pattern 755s 755s RuboCop::Cop::Style::NumberedParametersLimit 755s with Ruby >= 2.7 755s does not register an offense for a normal block with too many parameters 755s does not register an offense for a numblock with fewer than `Max` parameters 755s does not register an offense for a numblock with exactly `Max` parameters 755s sets Max properly for auto-gen-config 755s when there are more than `Max` numbered parameters 755s registers an offense for a single line `numblock` 755s registers an offense for a multiline `numblock` 755s when configuring Max 755s does not register an offense when there are not too many numbered params 755s when Max is 1 755s uses the right offense message 755s 755s RuboCop::Cop::Style::RedundantSortBy 755s autocorrects array.sort_by { |y| y } 755s autocorrects array.sort_by do |x| x end 755s autocorrects array.sort_by { |x| x } 755s Ruby 2.7 755s autocorrects array.sort_by { |x| x } 755s 755s RuboCop::Cop::Style::FormatStringToken 755s ignores regexp 755s ignores http links 755s works inside hashes 755s ignores `%r` regexp 755s ignores xstr 755s supports flags and modifiers 755s ignores placeholder arguments 755s ignores percent escapes 755s ignores time format (when used as argument to strptime) 755s ignores __FILE__ 755s ignores time format when it is stored in a variable 755s ignores time format (when used as argument to strftime) 755s ignores time format and unrelated `format` method using 755s handles dstrs 755s behaves like enforced styles for format string tokens 755s when enforced style is unannotated 755s #correctable_sequence? 755s when enforced style is template 755s #correctable_sequence? 755s configures the enforced style to template after inspecting "%{a}" 755s registers offenses for annotated style 755s supports dynamic string with interpolation 755s detects when the cop must be disabled to avoid offenses 755s behaves like maximum allowed unannotated 755s when MaxUnannotatedPlaceholdersAllowed is 2 755s does not register offenses for dual unannotated 755s does not register offenses for single unannotated 755s when MaxUnannotatedPlaceholdersAllowed is 1 755s does not register offenses for single unannotated 755s registers offense for dual unannotated 755s when enforced style is annotated 755s sets the enforced style to annotated after inspecting "%s" 756s registers offenses for template style 756s detects when the cop must be disabled to avoid offenses 756s supports dynamic string with interpolation 756s #correctable_sequence? 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for dual unannotated 756s does not register offenses for single unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s does not register offenses for single unannotated 756s registers offense for dual unannotated 756s behaves like enforced styles for format string tokens 756s when enforced style is template 756s configures the enforced style to template after inspecting "%{a}" 756s detects when the cop must be disabled to avoid offenses 756s #correctable_sequence? 756s supports dynamic string with interpolation 756s does not register offenses for annotated style 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for dual unannotated 756s does not register offenses for single unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s does not register offenses for single unannotated 756s does not register offenses for dual unannotated 756s when enforced style is unannotated 756s #correctable_sequence? 756s when enforced style is annotated 756s registers offenses for template style 756s supports dynamic string with interpolation 756s sets the enforced style to annotated after inspecting "%s" 756s detects when the cop must be disabled to avoid offenses 756s #correctable_sequence? 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for dual unannotated 756s does not register offenses for single unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s does not register offenses for single unannotated 756s registers offense for dual unannotated 756s when enforced style is unannotated 756s gives a helpful error message 756s behaves like enforced styles for format string tokens 756s when enforced style is annotated 756s sets the enforced style to annotated after inspecting "%s" 756s #correctable_sequence? 756s registers offenses for template style 756s detects when the cop must be disabled to avoid offenses 756s supports dynamic string with interpolation 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for single unannotated 756s does not register offenses for dual unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s registers offense for dual unannotated 756s does not register offenses for single unannotated 756s when enforced style is template 756s supports dynamic string with interpolation 756s configures the enforced style to template after inspecting "%{a}" 756s #correctable_sequence? 756s does not register offenses for annotated style 756s detects when the cop must be disabled to avoid offenses 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s does not register offenses for single unannotated 756s does not register offenses for dual unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for dual unannotated 756s does not register offenses for single unannotated 756s when enforced style is unannotated 756s #correctable_sequence? 756s behaves like enforced styles for format string tokens 756s when enforced style is unannotated 756s #correctable_sequence? 756s when enforced style is annotated 756s #correctable_sequence? 756s sets the enforced style to annotated after inspecting "%s" 756s supports dynamic string with interpolation 756s detects when the cop must be disabled to avoid offenses 756s registers offenses for template style 756s behaves like maximum allowed unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 2 756s does not register offenses for single unannotated 756s does not register offenses for dual unannotated 756s when MaxUnannotatedPlaceholdersAllowed is 1 756s registers offense for dual unannotated 756s does not register offenses for single unannotated 756s when enforced style is template 757s does not register offenses for annotated style 757s configures the enforced style to template after inspecting "%{a}" 757s #correctable_sequence? 757s detects when the cop must be disabled to avoid offenses 757s supports dynamic string with interpolation 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s behaves like enforced styles for format string tokens 757s when enforced style is unannotated 757s #correctable_sequence? 757s when enforced style is template 757s detects when the cop must be disabled to avoid offenses 757s does not register offenses for annotated style 757s configures the enforced style to template after inspecting "%{a}" 757s supports dynamic string with interpolation 757s #correctable_sequence? 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for single unannotated 757s does not register offenses for dual unannotated 757s when enforced style is annotated 757s supports dynamic string with interpolation 757s sets the enforced style to annotated after inspecting "%s" 757s registers offenses for template style 757s detects when the cop must be disabled to avoid offenses 757s #correctable_sequence? 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for single unannotated 757s does not register offenses for dual unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s registers offense for dual unannotated 757s does not register offenses for single unannotated 757s behaves like enforced styles for format string tokens 757s when enforced style is annotated 757s supports dynamic string with interpolation 757s detects when the cop must be disabled to avoid offenses 757s #correctable_sequence? 757s registers offenses for template style 757s sets the enforced style to annotated after inspecting "%s" 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for single unannotated 757s registers offense for dual unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for single unannotated 757s does not register offenses for dual unannotated 757s when enforced style is template 757s supports dynamic string with interpolation 757s does not register offenses for annotated style 757s configures the enforced style to template after inspecting "%{a}" 757s #correctable_sequence? 757s detects when the cop must be disabled to avoid offenses 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for single unannotated 757s does not register offenses for dual unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when enforced style is unannotated 757s #correctable_sequence? 757s behaves like enforced styles for format string tokens 757s when enforced style is template 757s supports dynamic string with interpolation 757s detects when the cop must be disabled to avoid offenses 757s configures the enforced style to template after inspecting "%{a}" 757s does not register offenses for annotated style 757s #correctable_sequence? 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when enforced style is unannotated 757s #correctable_sequence? 757s when enforced style is annotated 757s supports dynamic string with interpolation 757s sets the enforced style to annotated after inspecting "%s" 757s detects when the cop must be disabled to avoid offenses 757s registers offenses for template style 757s #correctable_sequence? 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for single unannotated 757s does not register offenses for dual unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s does not register offenses for single unannotated 757s registers offense for dual unannotated 757s behaves like enforced styles for format string tokens 757s when enforced style is annotated 757s #correctable_sequence? 757s supports dynamic string with interpolation 757s detects when the cop must be disabled to avoid offenses 757s registers offenses for template style 757s sets the enforced style to annotated after inspecting "%s" 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for dual unannotated 757s does not register offenses for single unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 1 757s registers offense for dual unannotated 757s does not register offenses for single unannotated 757s when enforced style is unannotated 757s #correctable_sequence? 757s when enforced style is template 757s detects when the cop must be disabled to avoid offenses 757s does not register offenses for annotated style 757s configures the enforced style to template after inspecting "%{a}" 757s supports dynamic string with interpolation 757s #correctable_sequence? 757s behaves like maximum allowed unannotated 757s when MaxUnannotatedPlaceholdersAllowed is 2 757s does not register offenses for single unannotated 758s does not register offenses for dual unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 1 758s does not register offenses for single unannotated 758s does not register offenses for dual unannotated 758s behaves like enforced styles for format string tokens 758s when enforced style is unannotated 758s #correctable_sequence? 758s when enforced style is annotated 758s supports dynamic string with interpolation 758s sets the enforced style to annotated after inspecting "%s" 758s registers offenses for template style 758s detects when the cop must be disabled to avoid offenses 758s #correctable_sequence? 758s behaves like maximum allowed unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 2 758s does not register offenses for single unannotated 758s does not register offenses for dual unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 1 758s registers offense for dual unannotated 758s does not register offenses for single unannotated 758s when enforced style is template 758s does not register offenses for annotated style 758s supports dynamic string with interpolation 758s configures the enforced style to template after inspecting "%{a}" 758s #correctable_sequence? 758s detects when the cop must be disabled to avoid offenses 758s behaves like maximum allowed unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 1 758s does not register offenses for single unannotated 758s does not register offenses for dual unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 2 758s does not register offenses for single unannotated 758s does not register offenses for dual unannotated 758s behaves like enforced styles for format string tokens 758s when enforced style is annotated 758s #correctable_sequence? 758s sets the enforced style to annotated after inspecting "%s" 758s supports dynamic string with interpolation 758s registers offenses for template style 758s detects when the cop must be disabled to avoid offenses 758s behaves like maximum allowed unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 1 758s registers offense for dual unannotated 758s does not register offenses for single unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 2 758s does not register offenses for dual unannotated 758s does not register offenses for single unannotated 758s when enforced style is template 758s configures the enforced style to template after inspecting "%{a}" 758s detects when the cop must be disabled to avoid offenses 758s does not register offenses for annotated style 758s supports dynamic string with interpolation 758s #correctable_sequence? 758s behaves like maximum allowed unannotated 758s when MaxUnannotatedPlaceholdersAllowed is 2 758s does not register offenses for single unannotated 759s does not register offenses for dual unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 1 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s when enforced style is unannotated 759s #correctable_sequence? 759s behaves like enforced styles for format string tokens 759s when enforced style is annotated 759s detects when the cop must be disabled to avoid offenses 759s sets the enforced style to annotated after inspecting "%s" 759s registers offenses for template style 759s #correctable_sequence? 759s supports dynamic string with interpolation 759s behaves like maximum allowed unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 1 759s registers offense for dual unannotated 759s does not register offenses for single unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 2 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s when enforced style is unannotated 759s #correctable_sequence? 759s when enforced style is template 759s #correctable_sequence? 759s does not register offenses for annotated style 759s configures the enforced style to template after inspecting "%{a}" 759s supports dynamic string with interpolation 759s detects when the cop must be disabled to avoid offenses 759s behaves like maximum allowed unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 2 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 1 759s does not register offenses for single unannotated 759s does not register offenses for dual unannotated 759s behaves like enforced styles for format string tokens 759s when enforced style is annotated 759s supports dynamic string with interpolation 759s sets the enforced style to annotated after inspecting "%s" 759s detects when the cop must be disabled to avoid offenses 759s registers offenses for template style 759s #correctable_sequence? 759s behaves like maximum allowed unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 1 759s registers offense for dual unannotated 759s does not register offenses for single unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 2 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s when enforced style is unannotated 759s #correctable_sequence? 759s when enforced style is template 759s supports dynamic string with interpolation 759s detects when the cop must be disabled to avoid offenses 759s configures the enforced style to template after inspecting "%{a}" 759s #correctable_sequence? 759s does not register offenses for annotated style 759s behaves like maximum allowed unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 1 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s when MaxUnannotatedPlaceholdersAllowed is 2 759s does not register offenses for dual unannotated 759s does not register offenses for single unannotated 759s behaves like enforced styles for format string tokens 759s when enforced style is unannotated 759s #correctable_sequence? 759s when enforced style is annotated 759s sets the enforced style to annotated after inspecting "%s" 759s registers offenses for template style 760s #correctable_sequence? 760s supports dynamic string with interpolation 760s detects when the cop must be disabled to avoid offenses 760s behaves like maximum allowed unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 1 760s registers offense for dual unannotated 760s does not register offenses for single unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 2 760s does not register offenses for single unannotated 760s does not register offenses for dual unannotated 760s when enforced style is template 760s configures the enforced style to template after inspecting "%{a}" 760s supports dynamic string with interpolation 760s #correctable_sequence? 760s detects when the cop must be disabled to avoid offenses 760s does not register offenses for annotated style 760s behaves like maximum allowed unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 1 760s does not register offenses for dual unannotated 760s does not register offenses for single unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 2 760s does not register offenses for dual unannotated 760s does not register offenses for single unannotated 760s behaves like enforced styles for format string tokens 760s when enforced style is template 760s supports dynamic string with interpolation 760s detects when the cop must be disabled to avoid offenses 760s does not register offenses for annotated style 760s #correctable_sequence? 760s configures the enforced style to template after inspecting "%{a}" 760s behaves like maximum allowed unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 1 760s does not register offenses for single unannotated 760s does not register offenses for dual unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 2 760s does not register offenses for single unannotated 760s does not register offenses for dual unannotated 760s when enforced style is annotated 760s registers offenses for template style 760s detects when the cop must be disabled to avoid offenses 760s #correctable_sequence? 760s supports dynamic string with interpolation 760s sets the enforced style to annotated after inspecting "%s" 760s behaves like maximum allowed unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 1 760s registers offense for dual unannotated 760s does not register offenses for single unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 2 760s does not register offenses for dual unannotated 760s does not register offenses for single unannotated 760s when enforced style is unannotated 760s #correctable_sequence? 760s behaves like enforced styles for format string tokens 760s when enforced style is annotated 760s #correctable_sequence? 760s detects when the cop must be disabled to avoid offenses 760s supports dynamic string with interpolation 760s registers offenses for template style 760s sets the enforced style to annotated after inspecting "%s" 760s behaves like maximum allowed unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 1 760s registers offense for dual unannotated 760s does not register offenses for single unannotated 760s when MaxUnannotatedPlaceholdersAllowed is 2 760s does not register offenses for single unannotated 760s does not register offenses for dual unannotated 760s when enforced style is unannotated 760s #correctable_sequence? 760s when enforced style is template 760s does not register offenses for annotated style 760s detects when the cop must be disabled to avoid offenses 760s supports dynamic string with interpolation 760s #correctable_sequence? 761s configures the enforced style to template after inspecting "%{a}" 761s behaves like maximum allowed unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 2 761s does not register offenses for dual unannotated 761s does not register offenses for single unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 1 761s does not register offenses for single unannotated 761s does not register offenses for dual unannotated 761s behaves like enforced styles for format string tokens 761s when enforced style is unannotated 761s #correctable_sequence? 761s when enforced style is annotated 761s sets the enforced style to annotated after inspecting "%s" 761s supports dynamic string with interpolation 761s registers offenses for template style 761s #correctable_sequence? 761s detects when the cop must be disabled to avoid offenses 761s behaves like maximum allowed unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 1 761s does not register offenses for single unannotated 761s registers offense for dual unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 2 761s does not register offenses for single unannotated 761s does not register offenses for dual unannotated 761s when enforced style is template 761s supports dynamic string with interpolation 761s #correctable_sequence? 761s detects when the cop must be disabled to avoid offenses 761s configures the enforced style to template after inspecting "%{a}" 761s does not register offenses for annotated style 761s behaves like maximum allowed unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 2 761s does not register offenses for single unannotated 761s does not register offenses for dual unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 1 761s does not register offenses for single unannotated 761s does not register offenses for dual unannotated 761s when enforced style is annotated 761s gives a helpful error message 761s when AllowedPatterns is enabled 761s does not register an offense for value in nested structure 761s does not register an offense 761s registers an offense for different method call within ignored method 761s when AllowedMethods is disabled 761s registers an offense 761s when AllowedPatterns is disabled 761s registers an offense 761s when AllowedMethods is enabled 761s does not register an offense for value in nested structure 761s does not register an offense 761s registers an offense for different method call within ignored method 761s behaves like enforced styles for format string tokens 761s when enforced style is unannotated 761s #correctable_sequence? 761s when enforced style is template 761s configures the enforced style to template after inspecting "%{a}" 761s detects when the cop must be disabled to avoid offenses 761s #correctable_sequence? 761s does not register offenses for annotated style 761s supports dynamic string with interpolation 761s behaves like maximum allowed unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 1 761s does not register offenses for dual unannotated 761s does not register offenses for single unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 2 761s does not register offenses for dual unannotated 761s does not register offenses for single unannotated 761s when enforced style is annotated 761s #correctable_sequence? 761s supports dynamic string with interpolation 761s detects when the cop must be disabled to avoid offenses 761s registers offenses for template style 761s sets the enforced style to annotated after inspecting "%s" 761s behaves like maximum allowed unannotated 761s when MaxUnannotatedPlaceholdersAllowed is 2 761s does not register offenses for dual unannotated 762s does not register offenses for single unannotated 762s when MaxUnannotatedPlaceholdersAllowed is 1 762s registers offense for dual unannotated 762s does not register offenses for single unannotated 762s when enforced style is template 762s gives a helpful error message 762s behaves like enforced styles for format string tokens 762s when enforced style is annotated 762s detects when the cop must be disabled to avoid offenses 762s sets the enforced style to annotated after inspecting "%s" 762s #correctable_sequence? 762s registers offenses for template style 762s supports dynamic string with interpolation 762s behaves like maximum allowed unannotated 762s when MaxUnannotatedPlaceholdersAllowed is 1 762s does not register offenses for single unannotated 762s registers offense for dual unannotated 762s when MaxUnannotatedPlaceholdersAllowed is 2 762s does not register offenses for single unannotated 762s does not register offenses for dual unannotated 762s when enforced style is template 762s #correctable_sequence? 762s configures the enforced style to template after inspecting "%{a}" 762s does not register offenses for annotated style 762s supports dynamic string with interpolation 762s detects when the cop must be disabled to avoid offenses 762s behaves like maximum allowed unannotated 762s when MaxUnannotatedPlaceholdersAllowed is 2 762s does not register offenses for dual unannotated 762s does not register offenses for single unannotated 762s when MaxUnannotatedPlaceholdersAllowed is 1 762s does not register offenses for dual unannotated 762s does not register offenses for single unannotated 762s when enforced style is unannotated 762s #correctable_sequence? 762s 762s RuboCop::Cop::Style::MultilineMethodSignature 762s when arguments span a single line 762s when defining an instance method 762s registers an offense and corrects when closing paren is on the following line 762s registers an offense and corrects when line break after opening parenthesis 762s when method signature is on a single line 762s does not register an offense for unparameterized method 762s does not register an offense for parameterized method 762s when defining an class method 762s when method signature is on a single line 762s does not register an offense for unparameterized method 762s does not register an offense for parameterized method 762s when arguments span a single line 762s registers an offense and corrects when closing paren is on the following line 762s when arguments span multiple lines 762s when correction would not exceed maximum line length 762s registers an offense and corrects 762s when defining an instance method 762s registers an offense and corrects when `end` is on the same line with last argument 762s registers an offense and corrects when `end` is on the same line with only closing parentheses 762s registers an offense and corrects when `end` is on the following line 762s when defining an class method 762s registers an offense and corrects when `end` is on the following line 762s registers an offense and corrects when `end` is on the same line 762s registers an offense and corrects when `end` is on the same line with only closing parentheses 762s when correction would exceed maximum line length 762s does not register an offense 762s 762s RuboCop::Cop::Layout::SpaceAfterSemicolon 762s registers an offense and corrects semicolon without space after it 762s does not crash if semicolon is the last character of the file 762s inside block braces 762s when EnforcedStyle for SpaceInsideBlockBraces is space 762s registers an offense and corrects no space between a semicolon and a closing brace 762s behaves like common behavior 762s accepts a space between a semicolon and a closing brace 762s when EnforcedStyle for SpaceInsideBlockBraces is no_space 762s accepts no space between a semicolon and a closing brace 762s behaves like common behavior 762s accepts a space between a semicolon and a closing brace 762s 762s RuboCop::Cop::Style::NumberedParameters 762s >= Ruby 2.7 762s EnforcedStyle: disallow 762s does an offense when using numbered parameters even with single-line blocks 762s EnforcedStyle: allow_single_line 762s registers an offense when using numbered parameters with multi-line blocks 762s does not register an offense when using numbered parameters with single-line blocks 762s 762s RuboCop::Cop::Lint::DuplicateRegexpCharacterClassElement 762s with a repeated intersection character class 762s does not register an offense 762s with a repeated range element 762s registers an offense and corrects 762s with a repeated character class element with quantifier 762s registers an offense and corrects 762s with no repeated character class elements 762s does not register an offense 762s with repeated elements in different character classes 762s does not register an offense 762s with multiple regexps with the same interpolation 762s does not register an offense 762s with a range that covers a repeated element character class 762s does not register an offense 762s with a repeated character class element 762s registers an offense and corrects 762s with a repeated character class element inside a group 762s registers an offense and corrects 762s with a repeated character posix character class inside a group 762s registers an offense and corrects 762s with a repeated character class element with interpolation 762s registers an offense and corrects 762s with a repeated character class element and %r{} literal 762s registers an offense and corrects 762s with no repeated character class elements when `"\0\07"` (means `"\u0000\a"`) 762s does not register an offense 762s with repeated character class elements when `"\0\08"` (means `"\u0000\u00008"`) 762s registers an offense 762s 762s RuboCop::Cop::Cop 762s will report registered offenses 762s will set default severity 762s keeps track of offenses 762s will set custom severity if present 762s will warn if custom severity is invalid 763s initially has 0 offenses 763s when disabled by a comment 763s ignore_disable_comments is true 763s will not set offense as disabled 763s ignore_disable_comments is false 763s will set offense as disabled 763s #relevant_file? 763s when the file is an anonymous source 763s is expected to equal true 763s when the file matches the Include configuration 763s is expected to equal true 763s when the file doesn't match the Include configuration 763s is expected to equal false 763s Registry 763s #with_department 763s has each cop in exactly one type 763s has at least one cop per department 763s returns 0 for an invalid type 763s #departments 763s is expected to include :Lint 763s contains every value only once 763s has departments 763s is expected to include :Style 763s .documentation_url 763s for a custom cop class 763s is expected to be nil 763s for a builtin cop class 763s is expected to eq "https://docs.rubocop.org/rubocop/cops_layout.html#layoutblockendnewline" 763s for a cop with a name 763s registers offense with its name 763s with style cops 763s has right name 763s has right department 763s with lint cops 763s has right name 763s has right department 763s setting of Offense#corrected attribute 763s when cop supports autocorrection 763s when offense was not corrected because of an error 763s is set to false 763s when autocorrection is not needed 763s is set to false 763s when offense was corrected 763s is set to true 763s when cop does not support autocorrection 763s is not specified (set to nil) 763s when autocorrect is requested 763s is not specified (set to nil) 763s when disable_uncorrectable is enabled 763s is set to true 763s with no submodule 763s has right name 763s has right department 763s #safe_autocorrect? 763s when cop is declared unsafe 763s is expected to equal false 763s when autocorrection of the cop is declared unsafe 763s is expected to equal false 763s when safety is undeclared 763s is expected to equal true 763s .qualified_cop_name 763s returns the cop name in a different namespace if the provided namespace is incorrect 763s raises an error if the cop name is in more than one namespace 763s adds namespace if the cop name is found in exactly one namespace 763s returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces 763s returns the given cop name if it already has a namespace 763s returns the given cop name if it is not found in any namespace 763s #autocorrect? 763s when the option is given 763s is expected to equal true 763s when cop does not support autocorrection 763s is expected to equal false 763s when disable_uncorrectable is enabled 763s is expected to equal true 763s when the cop is set to not autocorrect 763s is expected to equal false 763s when the option is not given 763s is expected to equal false 763s 763s RuboCop::Cop::Lint::NonDeterministicRequireOrder 763s when not requiring files 763s does not register an offense 763s when requiring files 763s with sorted glob 763s does not register an offense 763s when Ruby 2.7 or lower 763s with direct block glob 763s registers an offense and autocorrects to add .sort.each 763s with top-level ::Dir 763s registers an offense and corrects to add .sort.each 763s with require_relative block passed as parameter 763s registers an offense and autocorrects to add sort 763s with require block passed as parameter 763s registers an offense and autocorrects to add sort 763s with unsorted index 763s registers an offense and autocorrects to add .sort when the numblock has `require` 763s registers an offense with extra logic 763s registers an offense and autocorrects to add .sort when the block has `require_relative` 763s registers an offense and autocorrects to add .sort when the block has `require` 763s with top-level ::Dir 764s registers an offense and corrects to add .sort 764s with require block passed as parameter 764s registers an offense an autocorrects to add sort 764s with require_relative block passed as parameter 764s registers an offense an autocorrects to add sort 764s with unsorted glob 764s registers an offense and autocorrects to add .sort 764s with top-level ::Dir 764s registers an offense and corrects to add .sort 764s with require block passed as parameter 764s registers an offense an autocorrects to add sort 764s when Ruby 3.0 or higher 764s with `Dir.glob` 764s does not register an offense 764s with require block passed as parameter 764s does not register an offense 764s with top-level ::Dir 764s does not register an offense 764s with `sort: false` keyword option 764s does not register an offense 764s with `Dir[]` 764s does not register an offense 764s with require block passed as parameter 764s does not register an offense 764s with extra logic 764s does not register an offense 764s with top-level ::Dir 764s does not register an offense 764s with direct block glob 764s does not register an offense 764s with top-level ::Dir 764s does not register an offense 764s with require block passed as parameter 764s does not register an offense 764s with sorted index 764s does not register an offense 764s 764s RuboCop::Cop::Lint::ImplicitStringConcatenation 764s on adjacent string literals on different lines 764s does not register an offense 764s on adjacent string literals on the same line 764s registers an offense 764s on a string with interpolations 764s does register an offense 764s when in a method call's argument list 764s notes that the strings could be separated by a comma instead 764s when inside an array 764s notes that the strings could be separated by a comma instead 764s when the string literals contain newlines 764s registers an offense 764s does not register an offense for a single string 764s on a single string literal 764s does not register an offense 764s 764s RuboCop::Cop::Metrics::ParameterLists 764s accepts a proc with more than 4 parameters 764s registers an offense for a method def with 5 parameters 764s accepts a method def with 4 parameters 764s does not register an offense when method has no args 764s does not register an offense when method has allowed amount of args with block arg 764s accepts a lambda with more than 4 parameters 765s does not register an offense when method has allowed amount of optargs 765s registers an offense when optargs count exceeds the maximum 765s When CountKeywordArgs is true 765s counts keyword arguments as well 765s When CountKeywordArgs is false 765s does not count keyword arguments 765s does not count keyword arguments without default values 765s 765s RuboCop::Cop::Naming::MethodName 765s accepts for non-ascii characters 765s when configured for camelCase 765s registers an offense for snake case in names 765s accepts unary operator definitions 765s registers an offense for mixed snake case and camel case in attr. 765s accepts one line methods 765s registers an offense for singleton snake_case method within class 765s accepts camel case names in attr. 765s registers an offense for capitalized camel case name in attr. 765s registers an offense for correct + opposite 765s accepts operator definitions 765s registers an offense for mixed snake case and camel case in attr. 765s accepts camel case in singleton method name 765s accepts camel case in instance method name 765s registers an offense for mixed snake case and camel case 765s accepts class emitter method in a class, even when it is defined inside another method 765s registers an offense for snake case name in attr. 765s registers an offense for capitalized camel case 765s registers an offense for camel case methods names in attr. 765s registers an offense for singleton upper case method without corresponding class 765s accepts class emitter method in a class 765s accepts class emitter method in a module 765s accepts class emitter method in a module, even when it is defined inside another method 765s when specifying `AllowedPatterns` 765s does not register an offense for camel case method name in attr. 765s does not register an offense for snake case method name in attr. 765s does not register an offense for snake case method name matching `AllowedPatterns` 765s does not register an offense for camel case method name matching `AllowedPatterns` 765s when configured for snake_case 765s accepts one line methods 765s registers an offense for mixed snake case and camel case in attr. 765s registers an offense for capitalized camel case name in attr. 765s registers an offense for singleton upper case method without corresponding class 765s accepts operator definitions 765s accepts class emitter method in a module, even when it is defined inside another method 765s registers an offense for mixed snake case and camel case 765s accepts unary operator definitions 765s accepts snake case in names 765s accepts class emitter method in a class, even when it is defined inside another method 765s accepts class emitter method in a class 765s registers an offense for camel case methods names in attr. 765s registers an offense for mixed snake case and camel case in attr. 765s registers an offense for camel case in singleton method name 765s registers an offense for camel case in instance method name 765s registers an offense for singleton camelCase method within class 765s accepts snake case in attr. 765s accepts class emitter method in a module 765s registers an offense for opposite + correct 765s registers an offense for capitalized camel case 765s registers an offense for camel case method names in attr. 765s when specifying `AllowedPatterns` 765s does not register an offense for camel case method name in attr. 765s does not register an offense for snake case method name matching `AllowedPatterns` 765s does not register an offense for camel case method name matching `AllowedPatterns` 765s does not register an offense for snake case method name in attr. 765s 765s RuboCop::Cop::Layout::HashAlignment 765s register no offense for superclass call without args 765s accepts several pairs per line 765s accepts pairs that don't start a line 765s accepts single line hash 765s register no offense for yield without args 765s with table alignment configuration 765s registers an offense and corrects misaligned hash rockets 765s registers an offense and corrects for misaligned hash keys 765s accepts an empty hash 765s accepts hashes that use different separators and double splats 765s accepts a multiline array of single line hashes 765s registers an offense for misaligned hash values 765s accepts hashes that use different separators 765s accepts pairs that don't start a line 765s accepts a keyword splat only hash 765s accepts a symbol only hash followed by a keyword splat 766s accepts single line hash 766s accepts aligned hash keys and values 766s accepts several pairs per line 766s when using hash value omission 766s accepts single line hash 766s accepts pairs that don't start a line 766s accepts several pairs per line 766s when using hash value omission 766s accepts aligned hash keys and values 766s with different settings for => and : 766s registers offenses and correct misaligned entries 766s accepts aligned entries 766s with multiple preferred(key and table) alignment configuration 766s accepts an empty hash 766s registers an offense and corrects misaligned hash values, prefer key when least offenses 766s registers an offense and corrects misaligned hash keys with mixed hash style 766s accepts aligned hash keys, by keys 766s accepts aligned hash keys with mixed hash style 766s accepts aligned hash keys, by table 766s accepts aligned hash keys, by both 766s registers an offense and corrects misaligned hash values 766s registers an offense and corrects misaligned hash values, prefer table when least offenses 766s registers an offense and corrects misaligned hash values, works separate for each hash 766s table and key config 766s registers an offense and corrects misaligned hash values, prefer table because it is specified first 766s always inspect last argument hash 766s registers offense and corrects misaligned keys in explicit hash 766s registers an offense and corrects misaligned keys in explicit hash for yield 766s registers an offense and corrects misaligned keys in implicit hash for yield 766s registers an offense and corrects misaligned keys in implicit hash for super 766s registers an offense and corrects misaligned keys in explicit hash for super 766s registers offense and corrects misaligned keys in implicit hash 766s when using hash value omission 766s registers offense and corrects misaligned keys in implicit hash 766s registers offense and corrects misaligned keys in explicit hash 766s ignore explicit last argument hash 766s accepts misaligned keys in explicit hash for super 766s registers an offense and corrects misaligned keys in implicit hash 766s accepts misaligned keys in explicit hash 766s accepts misaligned keys in explicit hash for yield 766s registers an offense and corrects misaligned keys in implicit hash for yield 766s registers an offense and corrects misaligned keys in implicit hash for super 766s when using hash value omission 766s registers an offense and corrects misaligned keys in implicit hash 766s accepts misaligned keys in explicit hash 766s when `EnforcedStyle: with_fixed_indentation` of `ArgumentAlignment` 766s does not register an offense for an empty hash literal 766s registers and corrects an offense when using misaligned keyword arguments 766s does not register an offense using aligned hash argument for `proc.()` 766s register and corrects an offense 766s does not register an offense using aligned hash literal 766s when using hash value omission 766s register and corrects an offense 766s does not register and corrects an offense when using aligned keyword arguments 766s always ignore last argument hash 766s accepts misaligned keys in explicit hash for yield 766s accepts misaligned keys in explicit hash for super 766s accepts misaligned keys in explicit hash 766s accepts misaligned keys in implicit hash for yield 766s accepts misaligned keys in implicit hash 766s accepts misaligned keys in implicit hash for super 766s with invalid configuration 766s fails 766s with default configuration 766s registers an offense and corrects separator alignment 766s registers an offense and corrects misaligned hash keys 766s does not register an offense when value starts on next line 766s registers an offense and corrects alignment when using double splat in an explicit hash 766s registers an offense and corrects mixed hash styles 766s registers an offense and corrects multiline value starts in wrong place 766s registers an offense and corrects alignment when using double splat in braces 766s accepts left-aligned hash keys with single spaces 767s registers an offense and corrects zero or multiple spaces 767s registers an offense and corrects table alignment 767s registers an offense and corrects misaligned mixed multiline hash keys 767s with implicit hash as last argument 767s accepts aligned hash keys 767s registers an offense and corrects right alignment of keys 767s registers an offense and corrects misaligned hash keys 767s accepts an empty hash 767s with table+separator alignment configuration 767s accepts a single method argument entry with colon 767s with `EnforcedColonStyle`: `table` 767s and a double splat argument after a hash key 767s registers an offense on the misaligned key and corrects 767s when using hash value omission 767s and aligned keys 767s does not register an offense and corrects 767s and aligned keys but a double splat argument after 767s does not register an offense on the `kwsplat` 767s when the only item is a kwsplat 767s does not register an offense 767s and a misaligned double splat argument 767s registers an offense and corrects 767s and misaligned keys 767s registers an offense and corrects 767s when using hash value omission 767s accepts several pairs per line 767s accepts pairs that don't start a line 767s accepts single line hash 767s ignore implicit last argument hash 767s accepts misaligned keys in implicit hash 767s registers an offense and corrects misaligned keys in explicit hash 767s accepts misaligned keys in implicit hash for yield 767s registers an offense and corrects misaligned keys in explicit hash for yield 767s accepts misaligned keys in implicit hash for super 767s registers an offense and corrects misaligned keys in explicit hash for super 767s with separator alignment configuration 767s registers an offense and corrects mixed indentation and spacing 767s accepts pairs that don't start a line 767s registers an offense and corrects misaligned hash rockets 767s accepts several pairs per line 767s accepts aligned hash keys 767s accepts hashes with different separators 767s accepts an empty hash 767s accepts single line hash 767s doesn't break code by moving long keys too far left 767s registers an offense and corrects misaligned hash values 767s when using hash value omission 767s accepts aligned hash keys 768s registers an offense and corrects mixed indentation and spacing 768s when using hash value omission 768s accepts pairs that don't start a line 768s accepts several pairs per line 768s accepts single line hash 768s with `EnforcedHashRocketStyle`: `table` 768s and aligned keys but a double splat argument after 768s does not register an offense on the `kwsplat` 768s and a misaligned double splat argument 768s registers an offense and corrects 768s and misaligned keys 768s registers an offense and corrects 768s when the only item is a kwsplat 768s does not register an offense 768s and a double splat argument after a hash key 768s registers an offense on the misaligned key and corrects 768s 768s RuboCop::Cop::Layout::EmptyLineBetweenDefs 768s finds offenses in inner classes 768s accepts a def that is the first of a module 768s registers an offense for multiple one-liners on the same line 768s accepts a nested def 768s accepts a def that follows code and a comment 768s treats lines with whitespaces as blank 768s autocorrects when there are too many new lines 768s registers an offense for adjacent one-liners by default 768s accepts a def that follows a line with code 768s accepts a def that follows an empty line and then a comment 768s doesn't allow more than the required number of newlines 768s accepts the first def without leading empty line in a class 768s EmptyLineBetweenModuleDefs 768s registers offense when no empty lines between module and method definitions 768s when disabled 768s does not register offense 768s endless methods 768s between endless and regular methods 768s registers an offense and corrects 768s between regular and endless methods 768s registers an offense and corrects 768s with AllowAdjacentOneLineDefs: true 768s does not register an offense 768s between endless class method and regular methods 768s registers an offense and corrects 768s between endless class method and regular class methods 768s registers an offense and corrects 768s with AllowAdjacentOneLineDefs: false 768s registers an offense and corrects 768s when there are only comments between defs 768s registers an offense 768s when multiple lines between defs are allowed 768s registers an offense and corrects when there are too many new lines 768s treats lines with whitespaces as blank 768s when AllowAdjacentOneLineDefs is enabled 768s registers an offense for adjacent defs if some are multi-line 768s accepts adjacent one-liners 768s conditional method definitions 768s registers an offense for consecutive defs inside a conditional 768s accepts defs inside a conditional without blank lines in between 768s EmptyLineBetweenClassDefs 768s registers offense when no empty lines between class and method definitions 768s when disabled 768s does not register offense 768s with AllowAdjacentOneLineDefs enabled 768s does not register offense 768s class methods 768s adjacent class methods 768s registers an offense for missing blank line between methods 768s mixed instance and class methods 768s registers an offense for missing blank line between methods 768s when empty lines between classes and modules together 768s registers offense when no empty lines between module and method definitions 768s when a maximum of empty lines is specified 768s finds no offense for no empty line 768s finds an offense for two empty lines 768s finds no offense for one empty line 768s 768s RuboCop::Cop::Style::QuotedSymbols 768s configured with `single_quotes` 768s behaves like enforce single quotes 768s accepts double quotes when control characters are used 768s accepts double quotes when unicode control sequence is used 768s accepts single quoted symbol with an escaped quote 768s registers an offense and corrects for double quotes in hash keys 768s accepts single quotes with double quotes 768s registers an offense and corrects for an escaped quote within double quotes 768s accepts single quotes with line breaks 768s registers an offense and corrects for double quotes without interpolation 768s accepts double quotes when interpolating a class variable 768s accepts double quotes with escape sequences 768s accepts double quotes with some other special symbols 768s accepts double quotes when interpolating an instance variable 768s accepts double quotes with interpolation 768s accepts double quotes when interpolating a global variable 769s accepts single quotes 769s registers an offense and corrects escape characters properly 769s accepts double quotes with line breaks 769s accepts unquoted symbols 769s accepts double quotes with single quotes 769s hash with hashrocket style 769s accepts properly quoted symbols 769s corrects wrong quotes 769s configured with `same_as_string_literals` 769s when Style/StringLiterals is disabled 769s behaves like enforce single quotes 769s accepts double quotes with line breaks 769s accepts single quotes with line breaks 769s registers an offense and corrects escape characters properly 769s accepts unquoted symbols 769s accepts single quotes 769s accepts single quotes with double quotes 769s accepts double quotes with single quotes 769s registers an offense and corrects for double quotes without interpolation 769s accepts double quotes with escape sequences 769s registers an offense and corrects for an escaped quote within double quotes 769s accepts double quotes when interpolating a global variable 769s accepts double quotes when control characters are used 769s registers an offense and corrects for double quotes in hash keys 769s accepts double quotes when unicode control sequence is used 769s accepts double quotes when interpolating a class variable 769s accepts double quotes when interpolating an instance variable 769s accepts single quoted symbol with an escaped quote 769s accepts double quotes with some other special symbols 769s accepts double quotes with interpolation 769s hash with hashrocket style 769s corrects wrong quotes 769s accepts properly quoted symbols 769s when Style/StringLiterals is configured with double_quotes 769s behaves like enforce double quotes 769s accepts unquoted symbols 769s accepts double quotes when interpolating a global variable 769s accepts double quotes when interpolating an instance variable 769s accepts double quotes with interpolation 769s accepts double quotes when interpolating a class variable 769s accepts double quoted symbol with an escaped quote 769s accepts double quotes with line breaks 769s accepts double quotes 769s accepts double quotes with escape sequences 769s registers an offense for single quotes 769s accepts double quotes with single quotes 769s accepts single quotes with line breaks 769s accepts single quotes with double quotes 769s registers an offense and corrects escape characters properly 769s registers an offense and corrects for an escaped quote within single quotes 769s hash with hashrocket style 769s accepts properly quoted symbols 769s corrects wrong quotes 769s when Style/StringLiterals is configured with single_quotes 769s behaves like enforce single quotes 769s accepts double quotes with some other special symbols 770s accepts single quotes with line breaks 770s accepts double quotes when control characters are used 770s accepts single quotes 770s accepts double quotes when interpolating an instance variable 770s accepts double quotes when unicode control sequence is used 770s accepts unquoted symbols 770s accepts double quotes when interpolating a class variable 770s accepts single quoted symbol with an escaped quote 770s registers an offense and corrects escape characters properly 770s registers an offense and corrects for double quotes in hash keys 770s accepts double quotes with escape sequences 770s accepts double quotes with single quotes 770s accepts double quotes with interpolation 770s accepts double quotes with line breaks 770s accepts single quotes with double quotes 770s accepts double quotes when interpolating a global variable 770s registers an offense and corrects for an escaped quote within double quotes 770s registers an offense and corrects for double quotes without interpolation 770s hash with hashrocket style 770s accepts properly quoted symbols 770s corrects wrong quotes 770s configured with `double_quotes` 770s behaves like enforce double quotes 770s registers an offense for single quotes 770s accepts double quoted symbol with an escaped quote 770s accepts single quotes with double quotes 770s accepts double quotes 770s accepts unquoted symbols 770s accepts double quotes with line breaks 770s accepts double quotes when interpolating a global variable 770s accepts double quotes with escape sequences 770s accepts single quotes with line breaks 770s registers an offense and corrects for an escaped quote within single quotes 770s accepts double quotes with single quotes 770s accepts double quotes when interpolating a class variable 770s accepts double quotes with interpolation 770s registers an offense and corrects escape characters properly 770s accepts double quotes when interpolating an instance variable 770s hash with hashrocket style 770s corrects wrong quotes 770s accepts properly quoted symbols 770s 770s RuboCop::Cop::Layout::EmptyLineAfterGuardClause 770s registers and corrects when using guard clause is after `rubocop:enable` comment 770s registers no offenses using heredoc with `and return` before guard condition with empty line 770s registers an offense and corrects only the last guard clause 770s accepts a guard clause when the next line is `else` 770s does not register an offense when there are multiple clauses on the same line 770s registers an offense and corrects when using `and return` before guard condition 770s accepts modifier if 770s accepts a guard clause when the next line is `ensure` 770s accepts a guard clause followed by empty line when guard clause including heredoc 770s registers an offense and corrects a guard clause not followed by empty line 770s registers an offense and corrects a method starting with end_ 770s accepts multiple guard clauses 770s registers an offense and corrects a guard clause is before `begin` 770s accepts a guard clause that is after a multiline heredoc nested argument call 770s registers an offense and corrects a guard clause that is a ternary operator 770s registers and corrects when using guard clause is after `rubocop:disable` comment 770s accepts a guard clause that is after a multiline heredoc with chained calls 770s accepts a guard clause that is after multiline heredoc 770s accepts a guard clause after a single line heredoc 770s accepts a guard clause when the next line is `elsif` 770s accepts a modifier if when the next line is `end` 770s registers an offense and corrects `next` guard clause not followed by empty line 770s registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc 770s registers an offense and corrects when using `or return` before guard condition 770s registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation 770s registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc 770s accepts a guard clause when the next line is `rescue` 771s accepts using guard clause is after `rubocop:enable` comment 771s registers an offense and corrects using heredoc with `and return` before guard condition 771s registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc 771s accepts a guard clause inside oneliner block 771s accepts using guard clause is after `raise` 771s registers an offense when the clause ends with a semicolon but the next clause is on the next line 771s accepts a guard clause when the next line is `rescue`-`else` 771s accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation 771s accepts a guard clause followed by end 771s does not register an offense when the clause ends with a semicolon but is followed by a newline 771s registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument 771s does not register an offense when the clause is not followed by other code 771s 771s RuboCop::RakeTask 771s running tasks 771s allows nested arrays inside formatters, options, and requires 771s will not error when result is not 0 and fail_on_error is false 771s runs with specified options if a block is given 771s uses the default formatter from .rubocop.yml if no formatter option is given 771s runs with default options 771s exits when result is not 0 and fail_on_error is true 771s autocorrect 771s runs with --autocorrect 771s runs with with the options that were passed to its parent task 771s runs with --autocorrect-all 771s defining tasks 771s creates a rubocop task and a rubocop autocorrect task 771s creates a named task and a named autocorrect task 771s creates a rubocop task and a rubocop auto_correct task 771s creates a named task and a named auto_correct task 771s 771s RuboCop::Cop::Style::FormatString 771s when enforced style is sprintf 771s registers an offense for variable argument but does not autocorrect 771s does not register an offense for numbers 771s registers an offense for format 771s registers an offense for variable argument and assignment but does not autocorrect 771s registers an offense for a string followed by something 771s registers an offense for String#% with a hash argument 771s works if the first operand contains embedded expressions 771s registers an offense for format with 2 arguments 771s does not register an offense for ambiguous cases 771s registers an offense for something followed by an array 771s when enforced style is format 771s registers an offense for variable argument but does not autocorrect 771s registers an offense for sprintf 771s registers an offense for sprintf with 2 arguments 771s does not register an offense for ambiguous cases 771s registers an offense for something followed by an array 771s does not autocorrect String#% with variable argument and assignment 771s registers an offense for a string followed by something 771s registers an offense for something followed by a hash 771s does not register an offense for numbers 771s works if the first operand contains embedded expressions 771s when enforced style is percent 771s registers an offense for format with a hash argument 771s accepts format with 1 argument 771s registers an offense for sprintf 772s accepts sprintf with 1 argument 772s accepts sprintf without arguments 772s registers an offense and corrects when using springf with second argument that uses an operator 772s registers an offense for format 772s accepts String#% 772s accepts format without arguments 772s registers an offense for format with 3 arguments 772s registers an offense for sprintf with 3 arguments 772s registers an offense for sprintf with a hash argument 772s 772s RuboCop::Cop::Lint::RedundantCopDisableDirective 772s .check 772s when there are no disabled lines 772s returns no offense 772s when there are disabled lines 772s and there are two offenses 772s and a comment disables 772s one cop twice 772s returns an offense 772s one cop and then all cops 772s returns an offense 772s and there are no offenses 772s and a comment disables 772s when using a directive comment after a non-directive comment 772s returns an offense 772s one cop 772s returns an offense 772s multiple cops, and one of them has offenses 772s returns an offense 772s an unknown cop 772s returns an offense 772s all cops 772s returns an offense 772s itself and another cop 772s disabled on the same range 772s returns no offense 772s and the other cop is disabled a second time 772s returns no offense 772s disabled on different ranges 772s returns no offense 772s multiple cops, with abbreviated names 772s one of them has offenses 772s returns an offense 772s comment is not at the beginning of the file 772s and not all cops have offenses 772s returns an offense 772s multiple cops 772s returns an offense 772s a cop that is disabled in the config 772s returns an offense 772s when that cop was previously enabled 772s returns no offense 772s if that cop has offenses 772s returns an offense 772s itself and all cops 772s disabled on different ranges 772s returns no offense 772s multiple cops, and the leftmost one has no offenses 773s returns an offense 773s misspelled cops 773s returns an offense 773s and there is an offense 773s and a comment disables 773s that cop 773s returns no offense 773s all cops 773s returns no offense 773s that cop but on other lines 773s returns an offense 773s with a disabled department 773s removes cop duplicated by department on previous line 773s does not remove correct department 773s removes cop duplicated by department and leaves free text as a comment 773s removes entire comment 773s removes cop duplicated by department 774s removes redundant department 774s autocorrecting whitespace 774s when there is a blank line before inline comment 774s removes the comment and preceding whitespace 774s when the comment is the first line of the file 774s followed by code 774s removes the comment 774s followed by a newline 774s removes the comment and newline 774s followed by another comment 774s removes the comment and newline 774s when there is only whitespace before the comment 774s leaves the whitespace 774s when the comment is not the first line of the file 774s preserves whitespace before the comment 774s nested inside a namespace 774s preserves indentation 774s inline comment 774s removes the comment and preceding whitespace 774s 774s RuboCop::Cop::Lint::IneffectiveAccessModifier 774s when a `class << self` block is used 774s doesn't register an offense 774s when no access modifier is used 774s doesn't register an offense 774s when `private_class_method` is used 774s when `private_class_method` does not contain the method 774s registers an offense 774s when `private_class_method` contains all private method names 774s doesn't register an offense 774s when `private` is applied to a class method 774s registers an offense 774s when `protected` is applied to a class method 774s registers an offense 774s when there is `begin` before a method definition 774s does not register an offense 774s when there is an intervening instance method 774s still registers an offense 774s 774s RuboCop::Formatter::FormatterSet 774s responds to all formatter API methods 774s #custom_formatter_class 774s can handle top level namespaced constant name 774s returns constant represented by the passed string 774s can handle namespaced constant name 774s when non-existent constant name is passed 774s raises error 774s add_formatter 774s adds a formatter to itself 774s adds a formatter with specified formatter type 774s can add multiple formatters by being invoked multiple times 774s when output path is specified 774s adds a formatter outputs to the specified file 774s when parent directories don't exist 774s creates them 774s when output path is omitted 774s adds a formatter outputs to $stdout 774s #builtin_formatter_class 774s returns class which matches passed alias name exactly 774s returns class which matches single character alias name 774s returns class which matches double character alias name 774s #close_output_files 774s closes all output files 774s does not close non file output 774s formatter API method 774s invokes the same method of all containing formatters 774s 774s RuboCop::Cop::Lint::AssignmentInCondition 774s registers an offense for lvar assignment in while condition 774s registers an offense for assignment after ||= in condition 774s accepts assignment in a block after || 774s registers an offense for clvar assignment in condition 774s registers an offense for assignment methods 774s accepts ||= in condition 774s registers an offense for lvar assignment in condition 774s registers an offense for gvar assignment in condition 774s registers an offense for ivar assignment in condition 774s registers an offense for lvar assignment in until condition 774s registers an offense for = in condition inside a block 774s does not blow up for empty if condition 774s accepts = in a block followed by method call 774s accepts = in a block that is called in a condition 774s registers an offense for assignment after == in condition 774s registers an offense for collection element assignment in condition 774s registers an offense for constant assignment in condition 774s does not blow up for empty unless condition 774s accepts == in condition 774s safe assignment is allowed 774s accepts = in condition surrounded with braces 774s accepts []= in condition surrounded with braces 774s safe assignment is not allowed 774s does not accept []= in condition surrounded with braces 774s does not accept = in condition surrounded with braces 774s 774s RuboCop::Cop::Layout::EmptyLinesAroundModuleBody 774s when EnforcedStyle is empty_lines_special 774s module with empty body 774s without empty line 774s does NOT register offenses 774s with empty line 774s does NOT register offenses 774s when namespace has multiple children 774s requires empty lines for namespace 774s module with constant and child module 774s registers and autocorrects the offenses 774s when first child is a method 774s requires blank line at the beginning and ending of module body 774s source without blank lines 774s registers an offense for module not beginning and ending with a blank line 774s when module has a namespace 774s requires no empty lines for namespace but requires blank line at the beginning and ending of module body 774s source with blank lines 774s autocorrects the offenses 774s source without blank lines 774s registers and autocorrects the offenses 774s module with only constants 774s registers and autocorrects the offenses 774s when first child is NOT a method 774s 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 774s source with blank lines 774s registers an offense for module beginning with a blank line 774s source with comment before method definition 774s registers an offense for module beginning with a blank line 774s source without blank lines 774s registers an offense for module not ending with a blank line 774s when module has a namespace 774s 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 774s source with blank lines 774s registers and autocorrects the offenses 774s source without blank lines 774s registers and autocorrects the offenses 774s source with constants 774s registers and autocorrects the offenses 774s when first child is an access modifier 774s with blank lines at the beginning and ending of module body 774s registers no offense 774s with no blank lines at the beginning and ending of module body 774s registers and corrects an offense 774s when EnforcedStyle is no_empty_lines 774s registers an offense for module body starting with a blank 774s autocorrects beginning and end 774s registers an offense for module body ending with a blank 774s when EnforcedStyle is empty_lines_except_namespace 774s when has multiple child modules 774s requires empty lines for namespace 775s registers offenses for namespace body starting and ending without a blank 775s when only child is class 775s registers offense for namespace body starting with a blank 775s registers offense for namespace body ending with a blank 775s requires no empty lines for namespace 775s when only child is module 775s registers offense for namespace body starting with a blank 775s requires no empty lines for namespace 775s autocorrects beginning and end 775s registers offenses for namespaced module body not starting with a blank 775s registers offense for namespace body ending with a blank 775s registers offenses for namespaced module body not ending with a blank 775s when EnforcedStyle is empty_lines 775s autocorrects beginning and end 775s accepts modules with an empty body 775s registers an offense for module body not ending with a blank 775s registers an offense for module body not starting or ending with a blank 775s 775s RuboCop::Cop::Style::Send 775s with __send__ 775s and with a receiver 775s does not register an offense for an invocation without args 775s does not register an offense for an invocation with args 775s and without a receiver 775s does not register an offense for an invocation without args 775s does not register an offense for an invocation with args 775s with public_send 775s and with a receiver 775s does not register an offense for an invocation without args 775s does not register an offense for an invocation with args 775s and without a receiver 775s does not register an offense for an invocation without args 775s does not register an offense for an invocation with args 775s with send 775s and with a receiver 775s does not register an offense for an invocation without args 775s registers an offense for an invocation with args 775s when using safe navigation operator 775s registers an offense for an invocation with args 775s and without a receiver 775s registers an offense for an invocation with args 775s does not register an offense for an invocation without args 775s 775s RuboCop::Cop::Security::YAMLLoad 775s does not register an offense for YAML.load under a different namespace 775s does not register an offense for YAML.dump 775s registers an offense and corrects load with a literal string 775s registers an offense and corrects a fully qualified ::YAML.load 775s Ruby >= 3.1 775s does not register an offense and corrects a fully qualified `::YAML.load` 775s does not register an offense and corrects load with a literal string 775s 775s RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition 775s does not register an offense when new line after `rescue` with multiline exceptions 775s does not register an offense when new line after modifier `if` with multiline condition 775s does not register an offense when modifier `if` with multiline conditionis the last child of its parent 775s does not register an offense for `if` with single line condition 775s does not register an offense when new line after `when` with multiline condition 775s does not register an offense when new line after modifier `while` with multiline condition 775s does not register an offense when new line after `elsif` with multiline condition 775s registers an offense when no new line after `if` with multiline condition 775s does not register an offense for `while` with single line condition 775s does not register an offense when new line after `if` with multiline condition 775s does not register an offense when `if` at the top level 775s does not register an offense for `when` with singleline condition 775s registers an offense when no new line after `rescue` with multiline exceptions 775s registers an offense when no new line after `while` with multiline condition 775s registers an offense when no new line after `when` with multiline condition 775s registers an offense when no new line after modifier `while` with multiline condition 775s registers an offense when no new line after `elsif` with multiline condition 775s does not register an offense when new line after `while` with multiline condition 775s does not register an offense when modifier `while` with multiline conditionis the last child of its parent 775s registers an offense when no new line after `until` with multiline condition 775s registers an offense when no new line after modifier `if` with multiline condition 775s does not register an offense for `rescue` with singleline exceptions 775s 775s RuboCop::Cop::Security::Eval 775s accepts eval with no arguments 775s registers an offense for eval with string that has an interpolation 775s accepts eval as variable 775s accepts eval as method 775s accepts eval on a literal string 775s registers an offense for eval as function 775s registers an offense for eval as command 775s registers an offense `Binding#eval` 775s accepts eval with a multiline string 775s accepts eval with a string that interpolates a literal 775s with an explicit binding, filename, and line number 775s registers an offense for eval as command 775s registers an offense for eval as function 775s accepts eval on a literal string 775s 775s RuboCop::Cop::Style::RedundantParentheses 775s accepts parentheses when they touch the following keyword 775s registers an offense and corrects for a parenthesized item in a hash where the comma is on a line with the closing parens 775s registers an offense for parens around a receiver of a method call with an argument 775s registers an offense for parens around a negative exponent 775s accepts parentheses when enclosed in parentheses at `while-post` 775s registers an offense for parens around a variable after semicolon 776s accepts parentheses when they touch the preceding keyword 776s registers an offense for parens around an integer exponentiation base 776s accepts parentheses around an erange 776s registers an offense for parens around a literal in array and following newline 776s registers an offense and corrects an array of multiple heredocs 776s registers an offense and corrects when method arguments are unnecessarily parenthesized 776s registers an offense for parens around a block body 776s accepts parentheses when enclosed in parentheses at `until-post` 776s accepts parentheses in yield call with hash 776s accepts parentheses around operator keywords 776s registers an offense for parens around a positive exponent 776s accepts parentheses in super call with hash 776s accepts parentheses around the error passed to rescue 776s accepts parentheses inside an irange 776s registers an offense for parens around last expressions in method body 776s registers an offense for parens around a literal hash value and following newline 776s registers an offense when there is space around the parentheses 776s accepts parentheses around a constant passed to when 776s accepts parentheses inside an erange 776s registers an offense for parens around a literal in array 776s registers an offense for parens around last expressions in block body 776s registers an offense for parens around an interpolated expression 776s registers an offense for parens around a literal hash value 776s accepts parentheses around a method call with unparenthesized arguments 776s registers an offense for parens around method body 776s registers an offense for parens around a float exponentiation base 776s accepts parentheses around an irange 776s behaves like keyword with arguments 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like keyword with arguments 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a variable 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s when the first argument in a method call begins with a hash literal 776s registers an offense if the argument list is parenthesized 776s accepts parentheses if the argument list is not parenthesized 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s behaves like keyword with return value 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a literal 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around an unary operation 776s behaves like redundant 776s registers an offense for parentheses around a literal 776s behaves like redundant 776s registers an offense for parentheses around a constant 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s behaves like keyword with return value 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like plausible 776s accepts parentheses when arguments are unparenthesized 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s pin operator 776s behaves like redundant parentheses 776s registers an offense and corrects a local variable 776s behaves like allowed parentheses 776s accepts parentheses on a method call on a local variable 776s behaves like redundant parentheses 776s registers an offense and corrects an instance variable 776s behaves like allowed parentheses 776s accepts parentheses on a range literal 776s behaves like redundant parentheses 776s registers an offense and corrects a class variable 776s behaves like allowed parentheses 776s accepts parentheses on a method call on an instance variable 776s behaves like allowed parentheses 776s accepts parentheses on a hash literal 776s behaves like allowed parentheses 776s accepts parentheses on a function call with arguments 776s behaves like redundant parentheses 776s registers an offense and corrects a global variable 776s behaves like allowed parentheses 776s accepts parentheses on a function call with no arguments 776s behaves like allowed parentheses 776s accepts parentheses on an array literal 776s behaves like allowed parentheses 776s accepts parentheses on a method call on a global variable 776s behaves like allowed parentheses 776s accepts parentheses on an expression 776s behaves like allowed parentheses 776s accepts parentheses on an int literal 776s behaves like allowed parentheses 776s accepts parentheses on a method call on a class variable 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a method call 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a keyword 776s behaves like redundant 776s registers an offense for parentheses around a literal 776s behaves like redundant 776s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around an unary operation 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around an unary operation 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around a method call 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s when a non-parenthesized call has an arg and a block 777s accepts parens around the arg 777s behaves like redundant 777s registers an offense for parentheses around a variable 777s when a hash literal is the second argument in a method call 777s registers an offense 777s behaves like redundant 777s registers an offense for parentheses around an unary operation 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like redundant 777s registers an offense for parentheses around a method call 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s ternaries 777s when Style/TernaryParentheses has EnforcedStyle: require_no_parentheses 777s registers an offense for parens around ternary condition 777s when Style/TernaryParentheses is not enabled 777s registers an offense for parens around constant ternary condition 777s when Style/TernaryParentheses has EnforcedStyle: require_parentheses 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s when Style/TernaryParentheses has EnforcedStyle: require_parentheses_when_complex 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around a method call 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like plausible 777s accepts parentheses when arguments are unparenthesized 777s behaves like redundant 777s registers an offense for parentheses around a literal 777s behaves like plausible 778s accepts parentheses when arguments are unparenthesized 778s behaves like redundant 778s registers an offense for parentheses around a variable 778s behaves like redundant 778s registers an offense for parentheses around a keyword 778s behaves like keyword with return value 778s behaves like redundant 778s registers an offense for parentheses around a keyword 778s behaves like redundant 778s registers an offense for parentheses around a keyword 778s behaves like redundant 778s registers an offense for parentheses around a keyword 778s behaves like plausible 778s accepts parentheses when arguments are unparenthesized 778s behaves like redundant 778s registers an offense for parentheses around a literal 778s literals in an array 778s when there is a comma on the same line as the closing parentheses 778s registers an offense and corrects when there is no subsequent item 778s registers an offense and corrects when there is a subsequent item 778s registers an offense and corrects when there is a trailing comma 778s registers an offense and corrects when there is assignment 778s when parentheses are used like method argument parentheses 778s accepts parens around the arg 778s 778s RuboCop::Cop::Style::RegexpLiteral 778s %r regex with other delimiters than curly braces 778s registers an offense 778s when PercentLiteralDelimiters is configured with slashes 778s respects the configuration when autocorrecting 778s when `EnforcedStyle: omit_parentheses` of `Style/MethodCallWithArgsParentheses` cop 778s when using `%r` regexp with `EnforcedStyle: slashes` 778s does not register an offense when used as a safe navigation method argument 778s registers an offense when not used as a method argument 778s does not register an offense when used as a method argument 778s when using `%r` regexp with `EnforcedStyle: mixed` 779s does not register an offense when used as a method argument 779s does not register an offense when used as a safe navigation method argument 779s registers an offense when not used as a method argument 779s when regex contains slashes in interpolation 779s ignores the slashes that do not belong // regex 779s when EnforcedStyle is set to percent_r 779s a multi-line %r regex without slashes 779s is accepted 779s a multi-line %r regex with slashes 779s is accepted 779s a single-line `//` regex without slashes 779s registers an offense 779s a single-line %r regex without slashes 779s is accepted 779s a multi-line `//` regex without slashes 779s registers an offense 779s a single-line %r regex with slashes 779s is accepted 779s a multi-line `//` regex with slashes 779s registers an offense 779s a single-line `//` regex with slashes 779s registers an offense 779s when `EnforcedStyle: require_parentheses` of `Style/MethodCallWithArgsParentheses` cop 779s when using `%r` regexp with `EnforcedStyle: mixed` 779s registers an offense when using a regexp starts with a blank 779s registers an offense when not used as a method argument 779s registers an offense when used as a method argument 779s registers an offense when used as a safe navigation method argument 779s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 779s does not register an offense when using a regexp starts with a blank as a method argument 779s when using `%r` regexp with `EnforcedStyle: slashes` 779s registers an offense when using a regexp starts with a blank 779s does not register an offense when using a regexp starts with a blank as a safe navigation method argument 779s registers an offense when used as a safe navigation method argument 779s registers an offense when not used as a method argument 779s registers an offense when used as a method argument 779s does not register an offense when using a regexp starts with a blank as a method argument 779s when EnforcedStyle is set to mixed 779s a multi-line %r regex with slashes 779s is accepted 779s a multi-line `//` regex without slashes 779s registers an offense 779s a single-line `//` regex with slashes 779s registers an offense 779s when configured to allow inner slashes 779s is accepted 779s a single-line `//` regex without slashes 779s is accepted 779s a multi-line %r regex without slashes 779s is accepted 779s a multi-line `//` regex with slashes 779s registers an offense 779s a single-line %r regex with slashes 779s is accepted 779s when configured to allow inner slashes 779s registers an offense 779s a single-line %r regex without slashes 779s registers an offense 779s when PercentLiteralDelimiters is configured with brackets 779s respects the configuration when autocorrecting 779s when EnforcedStyle is set to slashes 779s a multi-line %r regex without slashes 779s registers an offense 779s a multi-line %r regex with slashes 779s is accepted 779s when configured to allow inner slashes 779s registers an offense 779s a single-line %r regex with slashes 779s is accepted 779s when configured to allow inner slashes 779s registers an offense 779s a single-line `//` regex without slashes 779s is accepted 779s a multi-line `//` regex without slashes 779s is accepted 779s a single-line `//` regex with slashes 779s registers an offense 779s when configured to allow inner slashes 779s is accepted 779s a single-line %r regex without slashes 779s registers an offense 779s a single-line `//` regex with slashes and interpolation 779s registers an offense 779s when configured to allow inner slashes 779s is accepted 779s a single-line `%r//` regex with slashes 779s is accepted 779s when configured to allow inner slashes 779s preserves slashes after autocorrection 779s a multi-line `//` regex with slashes 779s registers an offense 779s when configured to allow inner slashes 779s is accepted 779s 779s RuboCop::Cop::Security::MarshalLoad 779s registers an offense for using Marshal.load 779s registers an offense for using Marshal.restore 779s allows using dangerous Marshal methods for deep cloning 780s does not register an offense Marshal methods under another namespace 780s does not register an offense for Marshal.dump 780s 780s RuboCop::Cop::Style::SpecialGlobalVars 780s when style is use_perl_names 780s does not register an offense for backrefs like $1 780s registers an offense for $PROCESS_ID 780s autocorrects #{$LOAD_PATH} to #$: 780s registers an offense for $LOADED_FEATURES 780s registers an offense for $LOAD_PATH 780s registers an offense for $PID 780s registers an offense for $PROGRAM_NAME 780s autocorrects $INPUT_RECORD_SEPARATOR to $/ 780s when style is use_english_names 780s when add require English is disabled 780s autocorrects #$: to #{$LOAD_PATH} 780s registers an offense for $$ 780s generates correct auto-config when mixed styles are used 780s does not register an offense for backrefs like $1 780s registers an offense for $0 780s generates correct auto-config when Perl variable names are used 780s autocorrects #{$!} to #{$ERROR_INFO} 780s registers an offense for $" 780s registers an offense for $: 780s is clear about variables from the English library vs those not 780s autocorrects $/ to $INPUT_RECORD_SEPARATOR 780s when add require English is enabled 780s when English has not been required at top-level 780s does not add for replacement outside of English lib 780s adds require English for $$ 780s adds require English for $$ in nested code 780s adds require English for twice `$*` in nested code 780s when English is already required at top-level 780s leaves require English alone for $$ 780s moves require English above replacement 780s when style is use_builtin_english_names 780s does not register an offenses for builtin names 780s generates correct auto-config when Perl variable names are used 780s does not register an offense for Perl names 780s generates correct auto-config when mixed styles are used 780s autocorrects non-preffered builtin names 780s does not register an offense for backrefs like $1 780s 780s RuboCop::ResultCache 780s cached result that was saved with no command line option 780s when a cache source is read 781s has utf8 encoding 781s when --cache-root is given 781s takes the cache_root from the options 781s when --display-cop-names is given 781s is invalid 781s when --format is given 781s is valid and can be loaded 781s when no option is given 781s is valid and can be loaded 781s when team external_dependency_checksum is the same 781s is valid 781s when team external_dependency_checksum changes 782s is invalid 782s when file permission have changed 782s is invalid 782s when a symlink is present in the cache location 782s and symlink attack protection is disabled 782s permits caching and prints no warning 782s and symlink attack protection is enabled 782s prevents caching and prints a warning 782s when end of line characters have changed 782s is invalid 782s when file contents have changed 782s is invalid 782s when --only is given 782s is invalid 782s when offenses are saved 782s an offense with status corrected_with_todo 782s serializes them with uncorrected status 782s an offense with status uncorrected 782s serializes them with uncorrected status 782s an offense with status unsupported 782s serializes them with unsupported status 782s an offense with status new_status 782s serializes them with new_status status 782s an offense with status corrected 782s serializes them with uncorrected status 782s .cleanup 782s removes the oldest files in the cache if needed 782s #save 782s when the @path is not writable 782s behaves like invalid cache location 782s doesn't raise an exception 782s behaves like invalid cache location 782s doesn't raise an exception 782s when the default internal encoding is UTF-8 782s writes non UTF-8 encodable data to file with no exception 782s the cache path 782s when CacheRootDirectory not set 782s and XDG_CACHE_HOME is not set 782s contains $HOME/.cache 782s and XDG_CACHE_HOME is set 782s contains the given path and UID 782s when CacheRootDirectory is set 783s contains the given root 783s and RUBOCOP_CACHE_ROOT is set 783s contains the root from RUBOCOP_CACHE_ROOT 783s 783s RuboCop::Cop::Style::AsciiComments 783s accepts comments with only ascii chars 783s registers an offense for a comment with non-ascii chars 783s registers an offense for comments with mixed chars 783s when certain non-ascii chars are allowed 783s registers an offense for comments with non-allowed non-ascii chars 783s accepts comment with allowed non-ascii chars 783s 783s RuboCop::Cop::Naming::MemoizedInstanceVariableName 783s does not register an offense when or-assignment-based memoization is used outside a method definition 783s EnforcedStyleForLeadingUnderscores: optional 783s when or-assignment-based memoization is used 783s when defined?-based memoization is used 783s memoized variable matches method name 783s does not register an offense with a leading underscore 783s does not register an offense with a leading `_` for method name 783s does not register an offense without a leading underscore 783s does not register an offense with a leading `_` for both names 783s memoized variable matches method name 783s does not register an offense with a leading `_` for both names 783s does not register an offense with a leading underscore 783s does not register an offense with a leading `_` for method name 783s does not register an offense without a leading underscore 783s EnforcedStyleForLeadingUnderscores: required 783s when defined?-based memoization is used 783s registers an offense when names match but missing a leading _ 783s registers an offense when it has leading `_` but names do not match 783s does not register an offense with a leading `_` for both names 783s with dynamically defined methods 783s when a singleton method is defined inside a module callback 783s when the method does not match 783s registers an offense 783s when the method matches 783s does not register an offense 783s when the variable name does not match the method name 783s registers an offense 783s when the variable name matches the method name 783s does not register an offense 783s when a method is defined inside a module callback 783s when the method does not match 783s registers an offense 783s when the method matches 783s does not register an offense 783s when or-assignment-based memoization is used 783s registers an offense when it has leading `_` but names do not match 783s registers an offense when names match but missing a leading _ 783s does not register an offense with a leading `_` for both names 783s with dynamically defined methods 783s when the variable name matches the method name 783s does not register an offense 783s when a method is defined inside a module callback 783s when the method matches 783s does not register an offense 783s when the method does not match 783s registers an offense 783s when the variable name does not match the method name 783s registers an offense 783s when a singleton method is defined inside a module callback 783s when the method matches 783s does not register an offense 783s when the method does not match 783s registers an offense 783s with default EnforcedStyleForLeadingUnderscores => disallowed 783s when defined?-based memoization is used 783s does not register an offense when some code before defined 783s does not register an offense when some code after assignment 783s registers an offense when memoized variable does not match class method name 783s does not register an offense when there is no assignment 783s registers an offense when memoized variable does not match method name 783s with dynamically defined methods 783s when the variable name matches the method name 783s does not register an offense 783s when the variable name does not match the method name 784s registers an offense 784s when a singleton method is defined inside a module callback 784s when the method does not match 784s registers an offense 784s when the method matches 784s does not register an offense 784s when a method is defined inside a module callback 784s when the method does not match 784s registers an offense 784s when the method matches 784s does not register an offense 784s memoized variable matches method name 784s does not register an offense when method has leading `_` 784s does not register an offense when memoized variable matches predicate method name 784s does not register an offense with a leading `_` for both names 784s does not register an offense 784s does not register an offense when memoized variable matches bang method name 784s non-memoized variable does not match method name 784s does not register an offense 784s when or-assignment-based memoization is used 784s memoized variable does not match class method name 784s registers an offense 784s memoized variable does not match method name for block 784s registers an offense 784s memoized variable does not match method name during assignment 784s registers an offense 784s memoized variable after other code does not match method name 784s registers an offense 784s registers an offense for a predicate method 784s registers an offense for a bang method 784s memoized variable matches method name 784s does not register an offense with a leading `_` for both names 784s does not register an offense when method has leading `_` 784s does not register an offense 784s code follows memoized variable assignment 784s does not register an offense 784s instance variables in initialize methods 784s does not register an offense 784s memoized variable after other code 784s does not register an offense 784s non-memoized variable does not match method name 784s does not register an offense 784s memoized variable matches method name during assignment 784s does not register an offense 784s memoized variable matches method name for block 784s does not register an offense 784s memoized variable matches bang method name 784s does not register an offense 784s memoized variable matches predicate method name 784s does not register an offense 784s with dynamically defined methods 784s when the variable name matches the method name 784s does not register an offense 784s when a singleton method is defined inside a module callback 784s when the method matches 784s does not register an offense 784s when the method does not match 784s registers an offense 784s when a method is defined inside a module callback 784s when the method does not match 784s registers an offense 784s when the method matches 784s does not register an offense 784s when the variable name does not match the method name 784s registers an offense 784s memoized variable does not match method name 784s registers an offense 784s 784s RuboCop::Ext::RegexpNode 784s #each_capture 784s when called with a `named: false` 784s is expected to match [(be an instance of Regexp::Expression::Group::Capture)] 784s when called without argument 784s is expected to match [(be an instance of Regexp::Expression::Group::Capture), (be an instance of Regexp::Expression::Group::Named)] 784s when called with a `named: true` 784s is expected to match [(be an instance of Regexp::Expression::Group::Named)] 784s #parsed_tree 784s with a regexp not containing interpolation 784s returns the expected tree 784s with a regexp containing interpolation 784s returns the expected blanked tree 784s with a regexp containing a multi-line interpolation 784s returns the expected blanked tree 784s with a regexp with subexpressions 784s has location information 784s with an extended mode regexp with comment 784s returns the expected tree 784s 784s RuboCop::Cop::Gemspec::RequiredRubyVersion 784s registers an offense when `required_ruby_version` is blank 784s registers an offense when `required_ruby_version` is an empty array 784s registers an offense when `required_ruby_version` is not specified 784s target ruby version > 2.7 785s registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` 785s registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` 785s registers an offense when `required_ruby_version` is specified in array and is lower than `TargetRubyVersion` 785s recognizes Gem::Requirement and registers offense 785s recognizes a Gem::Requirement with multiple requirements and does not register an offense 785s false negatives 785s does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) 785s does not register an offense when `required_ruby_version` is assigned as a variable (string literal) 785s target ruby version > 2.7 785s does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` 785s does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` 785s does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` 785s registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` 785s registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` 785s does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` 785s does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` 785s target ruby version > 2.6 785s registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` 785s registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` 785s 785s RuboCop::Cop::Lint::NumberedParameterAssignment 785s does not register an offense when using non numbered parameter 785s registers an offense when using `_10` lvar 785s does not register an offense when index assignment 785s registers an offense when using `_0` lvar 785s when Ruby 2.7 or lower 785s registers an offense when using `_2` numbered parameter 785s registers an offense when using `_1` numbered parameter 785s registers an offense when using `_7` numbered parameter 785s registers an offense when using `_9` numbered parameter 785s registers an offense when using `_4` numbered parameter 785s registers an offense when using `_3` numbered parameter 785s registers an offense when using `_5` numbered parameter 785s registers an offense when using `_8` numbered parameter 785s registers an offense when using `_6` numbered parameter 785s 785s RuboCop::Formatter::HTMLFormatter 786s outputs the cached result in HTML 787s outputs the result in HTML 787s 787s RuboCop::Cop::Style::HashExcept 787s does not register an offense when not using key block argument` 787s does not register an offense when using `Hash#except` 787s does not register an offense when not using block` 787s does not register an offense when using `select` and comparing with `lvar == :key` 787s does not register an offense when using `select` and comparing with `:key == lvar` 787s does not register an offense when using `reject` and comparing with `lvar != :key` 787s does not register an offense when using `reject` and `include?` 787s does not register an offense when using `reject` and comparing with `:key != lvar` 787s Ruby 2.7 or lower 787s does not register an offense when using `reject` and comparing with `lvar == :key` 787s does not register an offense when using `select` and comparing with `lvar != :key` 787s does not register an offense when using `select` and comparing with `:key != lvar` 787s does not register an offense when using `reject` and comparing with `:key == lvar` 787s Ruby 3.0 or higher 787s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 787s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 787s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 787s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 787s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 787s does not register an offense when comparing with hash value 787s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 787s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 788s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 788s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 788s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 788s using `exclude?` 788s does not register offenses when using `reject` and calling `!exclude?` method with symbol array 788s using `include?` 788s registers and corrects an offense when using `reject` and calling `include?` method with method call 788s registers and corrects an offense when using `reject` and calling `include?` method with variable 788s does not register an offense when using `reject` and calling `include?` method with symbol array and second block value 788s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 788s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 788s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 788s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 788s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 788s when `AllCops/ActiveSupportExtensionsEnabled: true` 788s does not register an offense when using `keep_if` and comparing with `lvar != :sym` 788s does not register an offense when using `delete_if` and comparing with `lvar == :sym` 788s registers and corrects an offense when using `reject` and comparing with `lvar == 'str'` 788s registers and corrects an offense when using `reject` and comparing with `lvar == :sym` 788s registers and corrects an offense when using `select` and comparing with `lvar != :sym` 788s does not register an offense when comparing with hash value 788s registers and corrects an offense when using `select` and comparing with `:sym != lvar` 788s registers and corrects an offense when using `reject` and comparing with `:sym == lvar` 788s does not register an offense when using `reject` and other than comparison by string and symbol using `==` 788s registers and corrects an offense when using `reject` and other than comparison by string and symbol using `eql?` 788s registers and corrects an offense when using `filter` and comparing with `lvar != :sym` 788s using `in?` 788s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic symbol array 788s registers and corrects an offense when using `reject` and calling `key.in?` method with method call 788s registers and corrects an offense when using `select` and calling `!key.in?` method with symbol array 788s registers and corrects an offense when using `reject` and calling `key.in?` method with dynamic string array 788s registers and corrects an offense when using `reject` and calling `key.in?` method with symbol array 788s registers and corrects an offense when using `filter` and calling `!key.in?` method with symbol array 788s registers and corrects an offense when using `reject` and calling `key.in?` method with variable 788s does not register an offense when using `reject` and calling `in?` method with symbol array and second block value 788s using `exclude?` 789s registers and corrects an offense when using `reject` and calling `!exclude?` method with symbol array 789s does not register an offense when using `reject` and calling `exclude?` method with symbol array and second block value 789s registers and corrects an offense when using `select` and calling `exclude?` method with symbol array 789s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic string array 789s registers and corrects an offense when using `reject` and calling `!exclude?` method with variable 789s registers and corrects an offense when using `reject` and calling `!exclude?` method with dynamic symbol array 789s registers and corrects an offense when using `filter` and calling `exclude?` method with symbol array 789s registers and corrects an offense when using `reject` and calling `!exclude?` method with method call 789s using `include?` 789s registers and corrects an offense when using `reject` and calling `include?` method with variable 789s registers and corrects an offense when using `select` and calling `!include?` method with symbol array 789s registers and corrects an offense when using `reject` and calling `include?` method with method call 789s registers and corrects an offense when using `reject` and calling `include?` method with dynamic symbol array 789s registers and corrects an offense when using `reject` and calling `include?` method with symbol array 789s registers and corrects an offense when using `filter` and calling `!include?` method with symbol array 789s registers and corrects an offense when using `reject` and calling `include?` method with dynamic string array 789s using `in?` 789s does not register offenses when using `reject` and calling `key.in?` method with symbol array 789s 789s RuboCop::Cop::Style::FetchEnvVar 789s registers an offense when using `ENV || x` that is different from `if` condition in the body 789s registers an offense when using an `ENV` at `if` condition in the body 789s registers an offense when using `ENV && x` that is different from `if` condition in the body 789s registers an offense with using an `ENV` at multiple `if` condition in the body 789s when the node is a assigned by `&&=` 789s registers an offense 789s when it is a hash key 789s registers an offense 789s when it is an array element 789s registers an offense 789s when the node is a receiver of `||=` 789s does not register an offense 789s when it is evaluated with no default values 789s registers an offense 789s when it is assigned to a variable 789s registers an offense when using single assignment 789s registers an offense when using multiple assignment 789s when it is compared `!=` with other object 789s does not register an offense 789s with negation 789s registers no offenses 789s when the node is a receiver of `&&=` 789s does not register an offense 789s when the env val is excluded from the inspection by the config 789s registers no offenses 789s when using `fetch` instead of `[]` 789s registers no offenses 789s when it is compared `==` with other object 789s does not register an offense 789s when `ENV[]` is the LHS of `||` 789s registers no offenses 789s when it receives a message with safe navigation 789s registers no offenses 789s when it is an argument of a method 789s registers an offense 789s when it receives a message 789s registers no offenses 789s when it is used in an interpolation 789s registers an offense 789s when it is a hash value 789s registers an offense 789s when it is used in a conditional expression 789s registers an offense when using an `ENV` var that is different from `if` condition in the body 789s registers no offenses with ternary operator 789s registers no offenses with `if` 789s registers an offense with using an `ENV` var as `if` condition in the body with assignment method 789s registers no offenses when using the same `ENV` var as `if` condition in the body with operator 789s registers no offenses when using the same `ENV` var as `if` condition in the body 789s registers no offenses with `unless` 789s registers no offenses when using the same `ENV` var as `if` condition in the body with predicate method 789s registers an offense with `case` 789s registers no offenses when using the same `ENV` var as `if` condition in the body with assignment method 789s registers no offenses when using the same `ENV` var as `if` condition in the body with other conditions 789s when the node is a assigned by `||=` 789s registers an offense 789s when `ENV[]` is the right end of `||` chains 789s registers an offense 789s 789s RuboCop::Cop::Style::StaticClass 789s does not register an offense when class is empty 789s does not register an offense when class has macro-like method 789s registers an offense when class has assignments along with class methods 789s registers an offense when class extends a module 789s does not register an offense when class has a parent 789s does not register an offense when class has `class << self` with macro calls 789s does not register an offense when class has instance method 789s does not register an offense for modules 789s registers an offense when class has `class << self` with class methods 789s does not register an offense when class includes/prepends a module 789s registers an offense when class has only class method 789s 789s RuboCop::Cop::Layout::EndAlignment 789s can handle ternary if 789s accepts matching puts 1; while ... end 790s registers an offense for mismatched puts 1; case a when b end and autocorrects 790s registers an offense for mismatched until test end and autocorrects 790s accepts matching puts 1; class ... end 790s accepts matching while ... end 790s accepts matching puts 1; unless ... end 790s registers an offense for mismatched while test end and autocorrects 790s registers an offense for mismatched puts 1; until test end and autocorrects 790s registers an offense for mismatched module Test end and autocorrects 790s registers an offense for mismatched puts 1; unless test end and autocorrects 790s accepts matching puts 1; until ... end 790s accepts matching class ... end 790s registers an offense for mismatched puts 1; if test end and autocorrects 790s accepts matching case ... end 790s registers an offense for mismatched puts 1; class Test end and autocorrects 790s accepts matching unless ... end 790s accepts matching puts 1; case ... end 790s registers an offense for mismatched unless test end and autocorrects 790s accepts matching puts 1; module ... end 790s registers an offense for mismatched puts 1; class Test end and autocorrects 790s registers an offense for mismatched module Test end and autocorrects 790s registers an offense for mismatched puts 1; while test end and autocorrects 790s registers an offense for mismatched if test end and autocorrects 790s accepts matching if ... end 790s accepts matching class ... end 790s accepts matching module ... end 790s accepts matching until ... end 790s accepts matching puts 1; if ... end 790s registers an offense for mismatched case a when b end and autocorrects 790s can handle modifier if 790s case as argument 790s when EnforcedStyleAlignWith is variable 790s registers an offense for mismatched test case a when b end and autocorrects 790s accepts matching test case ... end 790s when EnforcedStyleAlignWith is start_of_line 790s registers an offense for mismatched test case a when b end and autocorrects 790s accepts matching test case a when b ... end 790s when EnforcedStyleAlignWith is keyword 790s registers an offense for mismatched test case a when b end and autocorrects 790s accepts matching test case ... end 790s when EnforcedStyleAlignWith is start_of_line 790s accepts matching puts 1; until ... end 790s registers an offense for mismatched var << while test end and autocorrects 790s registers an offense for mismatched class Test end and autocorrects 790s registers an offense for mismatched unless test end and autocorrects 790s registers an offense for mismatched puts 1; while test end and autocorrects 790s registers an offense for mismatched module Test end and autocorrects 790s registers an offense for mismatched puts 1; unless test end and autocorrects 790s accepts matching var = unless ... end 790s registers an offense for mismatched var = if test end and autocorrects 790s registers an offense for mismatched var = if test end and autocorrects 790s registers an offense for mismatched puts(if test end) and autocorrects 790s registers an offense for mismatched case a when b end and autocorrects 790s registers an offense for mismatched var << case a when b end and autocorrects 790s registers an offense for mismatched puts 1; module Test end and autocorrects 790s accepts matching puts 1; while ... end 790s registers an offense for mismatched puts 1; case a when b end and autocorrects 790s registers an offense for mismatched if test end and autocorrects 790s registers an offense for mismatched while test end and autocorrects 790s registers an offense for mismatched var = unless test end and autocorrects 790s accepts matching var = if ... end 790s registers an offense for mismatched puts 1; if test end and autocorrects 790s registers an offense for mismatched var = case a when b end and autocorrects 790s accepts matching var << while ... end 790s accepts matching var = if ... end 790s registers an offense for mismatched var << if test end and autocorrects 790s accepts matching var = while ... end 790s accepts matching var = until ... end 790s registers an offense for mismatched var = while test end and autocorrects 790s registers an offense for mismatched puts 1; until test end and autocorrects 790s accepts matching puts 1; class ... end 790s registers an offense for mismatched var << unless test end and autocorrects 790s accepts matching puts 1; unless ... end 790s accepts matching puts 1; module ... end 790s registers an offense for mismatched puts 1; class Test end and autocorrects 790s registers an offense for mismatched var << until test end and autocorrects 790s registers an offense for mismatched var = until test end and autocorrects 790s registers an offense for mismatched until test end and autocorrects 790s accepts matching puts 1; case ... end 790s accepts matching puts 1; if ... end 790s accepts matching var = case ... end 790s correct + opposite 790s registers an offense and corrects 790s when EnforcedStyleAlignWith is variable 790s registers an offense for mismatched if test end and autocorrects 790s registers an offense for mismatched puts 1; class Test end and autocorrects 790s accepts matching class ... end 790s accepts matching if ... end 790s accepts matching case ... end 790s register an offense when using `-` operator method and `end` is not aligned 790s registers an offense for mismatched puts 1; unless test end and autocorrects 790s registers an offense for mismatched puts 1; until test end and autocorrects 790s accepts matching puts 1; until ... end 790s register an offense when using a conditional statement in a method argument and `end` is not aligned 790s registers an offense for mismatched while test end and autocorrects 790s registers an offense for mismatched puts 1; module Test end and autocorrects 790s registers an offense for mismatched case a when b end and autocorrects 790s registers an offense for mismatched until test end and autocorrects 790s accepts matching module ... end 790s registers an offense for mismatched puts 1; case a when b end and autocorrects 790s accepts matching puts 1; module ... end 790s registers an offense for mismatched module Test end and autocorrects 790s registers an offense for mismatched puts 1; if test end and autocorrects 790s accepts matching while ... end 791s registers an offense for mismatched class Test end and autocorrects 791s accepts matching puts 1; class ... end 791s accepts matching puts 1; if ... end 791s registers an offense for mismatched unless test end and autocorrects 791s accepts matching until ... end 791s accepts matching puts 1; while ... end 791s accepts matching puts 1; unless ... end 791s register an offense when using `+` operator method and `end` is not aligned 791s registers an offense for mismatched puts 1; while test end and autocorrects 791s accepts matching unless ... end 791s accepts matching puts 1; case ... end 791s regarding assignment 791s when EnforcedStyleAlignWith is variable 791s accepts matching var = unless ... end 791s registers an offense for mismatched var = # comment while test end and autocorrects 791s accepts matching var &&= if ... end 791s accepts matching CNST = if ... end 791s accepts matching h.k = if ... end 791s registers an offense for mismatched var = unless test end and autocorrects 791s registers an offense for mismatched h.k = if test end and autocorrects 791s accepts matching @var = if ... end 791s registers an offense for mismatched var ||= if test end and autocorrects 791s accepts matching var = if ... end 791s registers an offense for mismatched a, b = if test end and autocorrects 791s accepts matching var = case ... end 791s registers an offense for mismatched var = until test do_something end and autocorrects 791s registers an offense for mismatched @@var << if test end and autocorrects 791s accepts matching @@var = if ... end 791s accepts matching var = until ... end 791s registers an offense for mismatched $var << if test end and autocorrects 791s registers an offense for mismatched var = unless test end and autocorrects 791s accepts matching $var = if ... end 791s accepts matching var ||= if ... end 791s accepts matching var = while ... end 791s accepts matching var = until ... end 791s registers an offense for mismatched @var = if test end and autocorrects 791s accepts matching h[k] = if ... end 791s registers an offense for mismatched var = case a when b end and autocorrects 791s registers an offense for mismatched @@var = if test end and autocorrects 791s registers an offense for mismatched CNST << if test end and autocorrects 791s registers an offense for mismatched var << if test end and autocorrects 791s registers an offense for mismatched h[k] = if test end and autocorrects 791s accepts matching var += if ... end 791s registers an offense for mismatched @var << if test end and autocorrects 791s registers an offense for mismatched $var = if test end and autocorrects 791s registers an offense for mismatched CNST = if test end and autocorrects 791s registers an offense for mismatched var[x] = while test end and autocorrects 791s registers an offense for mismatched h[k] << if test end and autocorrects 791s registers an offense for mismatched var << unless test end and autocorrects 791s registers an offense for mismatched var << case a when b end and autocorrects 792s registers an offense for mismatched var = until test end.j and autocorrects 792s accepts matching var = if ... end 792s registers an offense for mismatched var += if test end and autocorrects 792s registers an offense for mismatched var = while test end and autocorrects 792s accepts matching var << if ... end 792s registers an offense for mismatched var = if test end and autocorrects 792s accepts matching var = until ... end 792s registers an offense for mismatched var << until test end and autocorrects 792s registers an offense for mismatched var &&= if test end and autocorrects 792s accepts matching a, b = if ... end 792s registers an offense for mismatched var = until test end and autocorrects 792s registers an offense for mismatched var = if test end and autocorrects 792s when EnforcedStyleAlignWith is keyword 792s accepts matching var = case ... end 792s accepts matching var = unless ... end 792s registers an offense for mismatched var = until test end and autocorrects 792s accepts matching var[0] = case ... end 792s accepts matching var = while ... end 792s registers an offense for mismatched var = if test end and autocorrects 792s accepts matching var = until ... end 792s registers an offense for mismatched var = unless test end and autocorrects 792s accepts matching var = if ... end 792s registers an offense for mismatched var << until test end and autocorrects 792s registers an offense for mismatched var = while test end and autocorrects 792s when end is preceded by something else than whitespace 792s does not register an offense 792s 792s RuboCop::Cop::Lint::DuplicateBranch 792s does not register an offense for empty `if` 792s registers an offense when `if` has multiple duplicate branches 792s registers an offense when `case` has duplicate `else` branch 792s does not register an offense for modifier `unless` 792s does not register an offense for empty `unless` 792s registers an offense when `rescue` has duplicate `else` branch 792s does not register an offense when ternary has no duplicate branches 792s registers an offense when `case` has multiple duplicate branches 792s registers an offense when `rescue` has multiple duplicate `resbody` branches 792s registers an offense when `if` has duplicate `elsif` branch 792s does not register an offense for simple `if` without other branches 792s does not register an offense for simple `unless` without other branches 792s does not register an offense when `case` has no duplicate branches 792s registers an offense when `if` has duplicate `else` branch 792s does not register an offense when `rescue` has no duplicate branches 792s registers an offense when `case` has duplicate `when` branch 793s does not register an offense for modifier `if` 793s does not register an offense when `if` has no duplicate branches 793s does not register an offense when `unless` has no duplicate branches 793s registers an offense when `unless` has duplicate `else` branch 793s registers an offense when ternary has duplicate branches 793s registers an offense when `rescue` has duplicate `resbody` branch 793s with IgnoreLiteralBranches: true 793s with `rescue` 793s behaves like literal rescue disallowed 793s when returning a variable in multiple branches 793s registers an offense 793s and IgnoreConstBranches: false 793s behaves like literal rescue disallowed 793s when returning a array of constants in multiple branches 793s registers an offense 793s behaves like literal rescue disallowed 793s when returning a hash of constants in multiple branches 793s registers an offense 793s behaves like literal rescue allowed 793s when returning a regexp with modifier in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a empty array in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a simple irange in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue disallowed 793s when returning a method call in multiple branches 793s registers an offense 793s behaves like literal rescue disallowed 793s when returning a dstr in multiple branches 793s registers an offense 793s behaves like literal rescue allowed 793s when returning a nil in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a symbol in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a array of literals in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a float in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a hash of literals in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a string in multiple branches 793s allows branches to be duplicated 793s and IgnoreConstBranches: true 793s behaves like literal rescue allowed 793s when returning a hash of constants in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a array of constants in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a regexp in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a true in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a integer in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a complex in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue allowed 793s when returning a rational in multiple branches 793s allows branches to be duplicated 793s behaves like literal rescue disallowed 793s when returning a complex erange in multiple branches 793s registers an offense 793s behaves like literal rescue allowed 793s when returning a empty hash in multiple branches 794s allows branches to be duplicated 794s behaves like literal rescue disallowed 794s when returning a dsym in multiple branches 794s registers an offense 794s behaves like literal rescue disallowed 794s when returning a complex array in multiple branches 794s registers an offense 794s behaves like literal rescue disallowed 794s when returning a xstr in multiple branches 794s registers an offense 794s behaves like literal rescue disallowed 794s when returning a complex irange in multiple branches 794s registers an offense 794s behaves like literal rescue disallowed 794s when returning a complex hash in multiple branches 794s registers an offense 794s behaves like literal rescue allowed 794s when returning a simple erange in multiple branches 794s allows branches to be duplicated 794s behaves like literal rescue disallowed 794s when returning a complex regexp in multiple branches 794s registers an offense 794s behaves like literal rescue allowed 794s when returning a false in multiple branches 794s allows branches to be duplicated 794s with `if` 794s behaves like literal if disallowed 794s when returning a complex irange in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a regexp with modifier in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a dsym in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a empty array in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a true in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a nil in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a integer in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a float in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a simple erange in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a method call in multiple branches 794s registers an offense 794s and IgnoreConstBranches: false 794s behaves like literal if disallowed 794s when returning a array of constants in multiple branches 794s registers an offense 794s behaves like literal if disallowed 794s when returning a hash of constants in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a false in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a array of literals in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a xstr in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a empty hash in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a dstr in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a hash of literals in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a complex erange in multiple branches 794s registers an offense 794s behaves like literal if disallowed 794s when returning a variable in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a simple irange in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a complex hash in multiple branches 794s registers an offense 794s behaves like literal if disallowed 794s when returning a complex regexp in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a complex in multiple branches 794s allows branches to be duplicated 794s behaves like literal if disallowed 794s when returning a complex array in multiple branches 794s registers an offense 794s behaves like literal if allowed 794s when returning a regexp in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a string in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a rational in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a symbol in multiple branches 794s allows branches to be duplicated 794s and IgnoreConstBranches: true 794s behaves like literal if allowed 794s when returning a array of constants in multiple branches 794s allows branches to be duplicated 794s behaves like literal if allowed 794s when returning a hash of constants in multiple branches 794s allows branches to be duplicated 794s with `case` 794s and IgnoreConstBranches: true 794s behaves like literal case allowed 794s when returning a hash of constants in multiple branches 794s allows branches to be duplicated 794s behaves like literal case allowed 794s when returning a array of constants in multiple branches 794s allows branches to be duplicated 794s behaves like literal case allowed 794s when returning a regexp with modifier in multiple branches 794s allows branches to be duplicated 794s behaves like literal case allowed 794s when returning a rational in multiple branches 794s allows branches to be duplicated 794s behaves like literal case disallowed 794s when returning a variable in multiple branches 794s registers an offense 794s behaves like literal case allowed 794s when returning a symbol in multiple branches 794s allows branches to be duplicated 794s behaves like literal case disallowed 794s when returning a complex erange in multiple branches 794s registers an offense 794s behaves like literal case allowed 794s when returning a true in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a empty hash in multiple branches 795s allows branches to be duplicated 795s behaves like literal case disallowed 795s when returning a dsym in multiple branches 795s registers an offense 795s behaves like literal case disallowed 795s when returning a dstr in multiple branches 795s registers an offense 795s behaves like literal case allowed 795s when returning a array of literals in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a nil in multiple branches 795s allows branches to be duplicated 795s behaves like literal case disallowed 795s when returning a complex irange in multiple branches 795s registers an offense 795s behaves like literal case allowed 795s when returning a simple erange in multiple branches 795s allows branches to be duplicated 795s behaves like literal case disallowed 795s when returning a complex regexp in multiple branches 795s registers an offense 795s and IgnoreConstBranches: false 795s behaves like literal case disallowed 795s when returning a hash of constants in multiple branches 795s registers an offense 795s behaves like literal case disallowed 795s when returning a array of constants in multiple branches 795s registers an offense 795s behaves like literal case disallowed 795s when returning a complex array in multiple branches 795s registers an offense 795s behaves like literal case allowed 795s when returning a float in multiple branches 795s allows branches to be duplicated 795s behaves like literal case disallowed 795s when returning a complex hash in multiple branches 795s registers an offense 795s behaves like literal case disallowed 795s when returning a method call in multiple branches 795s registers an offense 795s behaves like literal case allowed 795s when returning a hash of literals in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a false in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a regexp in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a string in multiple branches 795s allows branches to be duplicated 795s behaves like literal case disallowed 795s when returning a xstr in multiple branches 795s registers an offense 795s behaves like literal case allowed 795s when returning a empty array in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a integer in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 795s when returning a simple irange in multiple branches 795s allows branches to be duplicated 795s behaves like literal case allowed 796s when returning a complex in multiple branches 796s allows branches to be duplicated 796s with IgnoreConstantBranches: true 796s with `case` 796s behaves like literal case allowed 796s when returning a constant in multiple branches 796s allows branches to be duplicated 796s behaves like literal case disallowed 796s when returning a object in multiple branches 796s registers an offense 796s with `if` 796s behaves like literal if disallowed 796s when returning a object in multiple branches 796s registers an offense 796s behaves like literal if allowed 796s when returning a constant in multiple branches 796s allows branches to be duplicated 796s with `rescue` 796s behaves like literal rescue allowed 796s when returning a constant in multiple branches 796s allows branches to be duplicated 796s behaves like literal rescue disallowed 796s when returning a object in multiple branches 796s registers an offense 796s with `case-match` 796s behaves like literal case-match allowed 796s when returning a constant in multiple branches 796s allows branches to be duplicated 796s behaves like literal case-match disallowed 796s when returning a object in multiple branches 796s registers an offense 796s 796s RuboCop::Cop::Style::RedundantSelfAssignmentBranch 796s does not register an offense when using `elsif` and self-assigning the value of `then` branch 796s registers and corrects an offense when self-assigning redundant else ternary branch 796s registers and corrects an offense when self-assigning redundant if branch 796s does not register an offense when not self-assigning redundant branches 796s registers and corrects an offense when self-assigning redundant else branch 796s does not register an offense when lhs is not variable 796s does not register an offense when self-assigning redundant else ternary branch for gvar 796s does not register an offense when multi assignment 796s registers and corrects an offense when self-assigning redundant else branch and empty if branch 796s does not register an offense when using `elsif` and self-assigning the value of `else` branch 796s does not register an offense when using only if branch 796s does not register an offense when self-assigning redundant else ternary branch for ivar 796s does not register an offense when self-assigning redundant else branch and multiline else branch 796s does not register an offense when self-assigning redundant else ternary branch for cvar 796s registers and corrects an offense when self-assigning redundant if ternary branch 796s registers and corrects an offense when self-assigning redundant else branch and empty else branch 796s does not register an offense when self-assigning redundant else branch and multiline if branch 796s does not register an offense when using `elsif` and self-assigning the value of `elsif` branch 796s 796s RuboCop::Cop::Lint::UselessTimes 796s registers an offense and corrects with 1.times with method chain 796s registers an offense and corrects with negative times with block arg 796s does not register an offense for an integer > 1 796s registers an offense and corrects when there is a blank line in the method definition 796s registers an offense and corrects with 1.times with block arg 796s registers an offense and corrects when 1.times with empty block argument 796s registers an offense and corrects with 0.times 796s registers an offense and corrects with 1.times 796s registers an offense and corrects with negative times 796s registers an offense and corrects with 0.times with block arg 796s short-form method 796s does not register an offense for an integer > 1 796s registers an offense and corrects with 0.times 796s registers an offense and corrects with 1.times 797s does not adjust surrounding space 797s registers an offense and corrects with negative times 797s multiline block 797s corrects a block that changes another lvar 797s does not try to correct a block if the block arg is changed 797s correctly handles a multiline block with 1.times 797s does not try to correct a block if the block arg is changed in parallel assignment 797s within indentation 797s corrects properly when replacing 797s corrects properly when removing multiline 797s corrects properly when removing single line 797s inline `Integer#times` calls 797s does not try to correct `1.times` 797s does not try to correct `0.times` 797s 797s RuboCop::Cop::Lint::UselessMethodDefinition 797s registers an offense and corrects for method containing only `super` call 797s does not register an offense when method definition contains optional argument 797s does not register an offense for empty constructor 797s does not register an offense when `super` arguments differ from method arguments 797s does not register an offense for constructor containing additional code to `super` 797s does not register an offense when non-constructor contains only comments 797s does not register an offense for constructor with only comments 797s does not register an offense for empty class level `initialize` method 797s does not register an offense when method definition contains optional keyword argument 797s does not register an offense for method containing additional code to `super` 797s 797s RuboCop::Cop::InternalAffairs::RedundantMethodDispatchNode 797s registers an offense when using `node.send_node.method_name` 797s does not register an offense when using `send_node.method_name` 797s does not register an offense when using `node.method_name` 797s registers an offense when using `node.send_node.receiver` 797s does not register an offense when using `node.receiver` 797s does not register an offense when using `node.send_node.arguments?` 797s 797s RuboCop::Cop::Style::ObjectThen 797s EnforcedStyle: then 797s accepts yield_self without a block 797s accepts yield_self with more than 1 param 797s registers an offense for yield_self with proc param 797s Ruby 2.7 797s registers an offense for yield_self with block 797s Ruby 2.6 797s registers an offense for yield_self with block 797s Ruby 2.5 797s accepts yield_self with block 797s EnforcedStyle: yield_self 797s accepts then without a block 797s registers an offense for then with proc param 797s registers an offense for then with block 797s accepts then with more than 1 param 797s 797s RuboCop::Formatter::Colorizable 797s #red 797s invokes #colorize(string, red 797s #green 797s invokes #colorize(string, green 797s #black 797s invokes #colorize(string, black 797s #cyan 797s invokes #colorize(string, cyan 797s #blue 797s invokes #colorize(string, blue 797s #yellow 797s invokes #colorize(string, yellow 797s #colorize 797s when the global Rainbow.enabled is true 797s and output is not a tty, but --color option was provided 797s colorizes the passed string 797s and the formatter's output is a tty 797s colorizes the passed string 797s and the formatter's output is not a tty 797s does nothing 797s when the global Rainbow.enabled is false 797s and the formatter's output is a tty 797s does nothing 797s and the formatter's output is not a tty 797s does nothing 797s #magenta 797s invokes #colorize(string, magenta 797s #white 797s invokes #colorize(string, white 797s 797s RuboCop::Formatter::WorstOffendersFormatter 797s #finished 797s when there are many offenses 797s sorts by offense count first and then by cop name 797s 797s RuboCop::Cop::Style::ColonMethodDefinition 797s accepts a class method defined using . 797s using the class name 797s registers an offense for a class method defined using :: 797s using self 797s registers an offense for a class method defined using :: 797s 797s RuboCop::Cop::Style::MapToHash 797s >= Ruby 2.6 797s for `collect.to_h` with block arity 1 797s registers an offense and corrects 797s `map` and `collect.to_h` with newlines 797s registers an offense and corrects with newline removal 797s `map` without `to_h` 797s does not register an offense 797s `collect.to_h` with a block on `to_h` 797s registers an offense but does not correct 797s when chained further 797s registers an offense and corrects 797s for `collect.to_h` with block arity 2 797s registers an offense and corrects 797s `map.to_h` with a block on `to_h` 797s registers an offense but does not correct 798s when chained further 798s registers an offense and corrects 798s when the receiver is an hash 798s registers an offense and corrects 798s `collect` without `to_h` 798s does not register an offense 798s when the receiver is an hash 798s registers an offense and corrects 798s when the receiver is an array 798s registers an offense and corrects 798s for `map.to_h` with block arity 2 798s registers an offense and corrects 798s `map` and `map.to_h` with newlines 798s registers an offense and corrects with newline removal 798s for `map.to_h` with block arity 1 798s registers an offense and corrects 798s when the receiver is an array 798s registers an offense and corrects 798s 798s RuboCop::Cop::Style::OneLineConditional 798s when AlwaysCorrectToMultiline is false 798s registers and corrects an offense with multi-line construct for if-then-elsif-then-end 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 798s does not register an offense for unless/then/end 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s does not register an offense for unless/then/else/end with empty else 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s does not register an offense for if/then/end 798s registers and corrects an offense with ternary operator for unless/then/else/end 798s does not register an offense for if/then/else/end with empty else 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator for if/then/else/end when `then` without body 798s registers and corrects an offense with ternary operator for if/then/else/end 798s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `next` keyword 798s registers and corrects an offense with ternary operator and adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with ternary operator without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 798s behaves like if/then/else/end with constructs changing precedence 798s 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 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `yield a` constructs inside inner branches 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `a = b` constructs inside inner branches 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `puts 1` constructs inside inner branches 798s behaves like if/then/else/end with keyword 798s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `retry` keyword 798s behaves like if/then/else/end with keyword 798s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `break` keyword 798s behaves like if/then/else/end with constructs changing precedence 798s 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 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `not a` constructs inside inner branches 798s behaves like if/then/else/end with keyword 798s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `raise` keyword 798s behaves like if/then/else/end with keyword 798s registers and corrects an offense with ternary operator when one of the branches of if/then/else/end contains `self` keyword 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `super b` constructs inside inner branches 798s behaves like if/then/else/end with constructs changing precedence 798s 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 798s behaves like if/then/else/end with constructs changing precedence 798s registers and corrects an offense with ternary operator and adding parentheses inside for if/then/else/end with `defined? :A` constructs inside inner branches 798s when AlwaysCorrectToMultiline is true 798s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with parenthesized arguments 798s does not register an offense for if/then/end 798s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 798s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s does not register an offense for unless/then/end 799s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains method calls with unparenthesized arguments 799s registers and corrects an offense with multi-line construct for if-then-elsif-then-elsif-then-else-end 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s does not register an offense for if/then/else/end with empty else 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct for unless/then/else/end 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct for if/then/else/end 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct for if-then-elsif-then-else-end 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct for if/then/else/end when `then` without body 799s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 799s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end that contains unparenthesized operator method calls 799s does not register an offense for unless/then/else/end with empty else 799s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `next` keyword 800s registers and corrects an offense with multi-line construct without adding parentheses when if/then/else/end is preceded by an operator 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `not a` constructs inside inner branches 800s behaves like if/then/else/end with keyword 800s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `break` keyword 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `super b` constructs inside inner branches 800s behaves like if/then/else/end with constructs changing precedence 800s 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 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `puts 1` constructs inside inner branches 800s when IndentationWidth differs from default 800s registers and corrects an offense with multi-line construct for if/then/else/end 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `defined? :A` constructs inside inner branches 800s behaves like if/then/else/end with constructs changing precedence 800s 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 800s behaves like if/then/else/end with keyword 800s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `self` keyword 800s behaves like if/then/else/end with keyword 800s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `raise` keyword 800s behaves like if/then/else/end with constructs changing precedence 800s 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 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `a = b` constructs inside inner branches 800s behaves like if/then/else/end with constructs changing precedence 800s registers and corrects an offense with multi-line construct without adding parentheses for if/then/else/end with `yield a` constructs inside inner branches 800s behaves like if/then/else/end with keyword 800s registers and corrects an offense with multi-line construct when one of the branches of if/then/else/end contains `retry` keyword 800s 800s RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor 800s constructor has disjunctive assignment 800s LHS is ivar 800s registers an offense and corrects 800s constructor calls super before disjunctive assignment 800s accepts 800s constructor calls any method before disjunctive assignment 800s accepts 800s constructor calls super after assignment 800s registers an offense and corrects 800s LHS is lvar 800s accepts 800s constructor does not have disjunctive assignment 800s accepts 800s empty constructor 800s accepts 800s 800s RuboCop::Cop::Lint::NumberConversion 800s to_method in symbol form 800s registers an offense when using nested number conversion methods 800s does not register an offense when using `Integer` constructor 800s does not register an offense when using `Complex` constructor 800s registers offense and autocorrects 800s registers offense with try 800s does not register an offense when using `Float` constructor 800s registers offense with send 800s registers offense and autocorrects without parentheses 800s AllowedMethods 800s does not register an offense for an allowed method 800s registers an offense for other methods 800s registers an offense 800s when `#to_i` called on a variable on a array 800s when using `#to_r` for number literals 800s when using `#to_f` for number literals 800s when using `#to_c` for number literals 800s when using `#to_f` 800s when using `#to_c` 800s when `#to_i` called on a hash value 800s when using `#to_i` 800s when using `#to_r` 800s when `#to_i` called on a variable on a hash 800s when `#to_i` called on a variable 800s when using `#to_i` for number literals 800s AllowedPatterns 800s does not register an offense for an allowed method 800s registers an offense for other methods 800s does not register an offense 800s when using Integer() with integer 800s when using Complex() 800s when `#to_i` called without a receiver 800s when `:to_f` is one of multiple method arguments 800s when using Float() 800s IgnoredClasses 800s when using Time/DateTime with multiple method calls 800s when using DateTime 800s when using Time 800s 800s RuboCop::Cop::Metrics::CyclomaticComplexity 800s when AllowedPatterns is enabled 800s does not register an offense when defining an instance method 800s does not register an offense when using `define_method` 800s does not register an offense when defining a class method 800s when Max is 1 800s does not count blocks in general 800s registers an offense for &&= 800s counts only a single method 800s registers an offense for or 800s counts repeated &. on same untouched local variable as 1 800s accepts an empty `define_method` 800s registers an offense for an if modifier 800s registers an offense for a ternary operator 800s registers an offense for and 800s registers an offense for an elsif block 800s counts enumerating methods with blocks as +1 800s registers an offense for a `define_method` 800s registers an offense for a for block 801s registers an offense for ||= 801s accepts a method with no decision points 801s registers an offense for && 801s registers an offense for &. 801s counts enumerating methods with block-pass as +1 801s accepts an empty method 801s registers an offense for a while block 801s accepts complex code outside of methods 801s registers an offense for a case/when block 801s registers an offense for a rescue block 801s registers an offense for an unless modifier 801s registers an offense for an until block 801s registers an offense for || 801s deals with nested if blocks containing && and || 801s Ruby 2.7 801s counts enumerating methods with numblocks as +1 801s when Max is 2 801s counts stupid nested if and else blocks 801s when AllowedMethods is enabled 801s does not register an offense when defining an instance method 801s does not register an offense when defining a class method 801s does not register an offense when using `define_method` 801s 801s RuboCop::Cop::Lint::FloatOutOfRange 801s does not register an offense for tiny little itty bitty floats 801s does not register an offense for respectably sized floats 801s does not register an offense for 0.0 801s on whopping big floats which tip the scales 801s registers an offense 801s on floats so close to zero that nobody can tell the difference 801s registers an offense 801s 801s RuboCop::Cop::Style::CharacterLiteral 801s autocorrects ?' to "'" 801s accepts ? in a %w literal 801s accepts literals like ?\C-\M-d 801s registers an offense for literals like \n 801s registers an offense for character literals 801s 801s RuboCop::Cop::Style::SingleLineBlockParams 801s reports an offense if the names are partially correct 801s finds wrong argument names in calls with different syntax 801s ignores do..end blocks 801s finds incorrectly named parameters with leading underscores 801s allows calls with proper argument names 801s does not report if the right names are used but not all arguments are given 801s reports an offense if the names are in reverse order 801s ignores :reduce symbols 801s does not report when destructuring is used 801s reports an offense if the arguments names are wrong and not all arguments are given 801s does not report if no block arguments are present 801s allows an unused parameter to have a leading underscore 801s 801s RuboCop::Cop::Layout::ClassStructure 801s registers an offense and corrects when xstr heredoc constant is defined after public method 801s registers an offense and corrects when literal constant is after method definitions 801s registers an offense and corrects when dstr heredoc constant is defined after public method 801s registers an offense and corrects when there is a comment in the macro method 801s registers an offense and corrects when str heredoc constant is defined after public method 801s with attribute macros before after validations 801s is expected to eq class Person 801s include AnotherModule 801s extend SomeModule 801s 801s CustomError = Cla...rivate :other_public_method 801s 801s private 801s 801s def some_private_method 801s end 801s end 801s when the first line ends with a comment 801s reports an offense and swaps the lines 801s constant is not a literal 801s registers offense but does not autocorrect 801s initializer is private and comes after attribute macro 801s registers an offense and autocorrects 801s with protected methods declared before private 801s is expected to eq class MyClass 801s def public_method 801s end 801s 801s private 801s 801s def first_private...ar before `private_methods`. 801s end 801s 801s def second_protected_method 801s end 801s end 801s when def modifier is used 801s registers an offense and corrects public method after private method marked by its name 801s registers an offense and corrects public method without modifier declared after private method with modifier 801s registers an offense and corrects public method with modifier declared after private method with modifier 801s simple example 801s is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" 801s with a complete ordered example 802s does not create offense 802s 802s RuboCop::Cop::Layout::EmptyLinesAroundBlockBody 802s when EnforcedStyle is empty_lines for do end block 802s is not fooled by single line blocks 802s registers an offense for block body not starting or ending with a blank 802s ignores block with an empty body 802s when EnforcedStyle is no_empty_lines for do end block 802s registers an offense for block body starting with a blank 802s accepts block body starting with a line with spaces 802s registers an offense for block body ending with a blank 802s is not fooled by single line blocks 802s registers an offense for block body starting with a blank passed to a multi-line method call 802s Ruby 2.7 802s registers an offense for block body ending with a blank 802s when EnforcedStyle is no_empty_lines for { } block 802s is not fooled by single line blocks 802s registers an offense for block body starting with a blank passed to a multi-line method call 802s accepts block body starting with a line with spaces 802s registers an offense for block body starting with a blank 802s registers an offense for block body ending with a blank 802s Ruby 2.7 802s registers an offense for block body ending with a blank 802s when EnforcedStyle is empty_lines for { } block 802s registers an offense for block body not starting or ending with a blank 802s is not fooled by single line blocks 802s ignores block with an empty body 802s 802s RuboCop::Cop::Style::SafeNavigation 802s allows an object check before a blank check 802s allows chained method calls during arithmetic operations safe guarded by an object check 802s allows calls on nil 802s allows an object check before hash access 802s allows for empty if blocks with comments 802s allows an object check before a negated predicate method chain 802s allows method call that is used in a comparison safe guarded by an object check 802s does not move comments that are inside an inner block 802s allows a method call as a parameter when the parameter is safe guarded with an object check 802s allows chained method calls during assignment safe guardedby an object check 802s allows a method call safeguarded with a negative check for the object when using `if` 802s allows a method chain that is used in a comparison safe guarded by an object check 802s allows an object check before a method call that is used in a negated regex comparison 802s allows method calls that do not get called using . safe guarded by an object check 802s allows an object check before a method chain longer than 2 methods 802s allows an object check before a nil check on a long chain 802s allows a method call safeguarded when using `unless nil?` 802s allows object checks in the condition of an elsif statement and a method call on that object in the body 802s allows an object check before a method call that is used in a regex comparison 802s allows calls to methods not safeguarded by respond_to 802s allows method call that is used in a negated regex comparison safe guarded by an object check 802s allows an object check before a negated method call with a safe navigation 802s allows an object check before a method call that is used in a comparison 802s allows calls using safe navigation 802s allows an object check before a long chain with a block 802s allows an object check before a nil check on a short chain 802s allows an object check before a negated predicate 802s allows method call that is used in a regex comparison safe guarded by an object check 802s allows an object check before a method chain that is used in a comparison 802s allows an object check before a method call that is used in a spaceship comparison 802s allows an object check before a method call that is used with `empty?` 802s allows a method call safeguarded with a negative check for the object when using `unless` 802s allows method call that is used in a spaceship comparison safe guarded by an object check 802s when Ruby <= 2.2 803s does not register an offense when a method call that nil responds to safe guarded by an object check 803s behaves like all variable types 803s modifier if 803s registers an offense for a method call with a block safeguarded with a negative check for the object 803s registers an offense for a method call safeguarded with a negative nil check for the object 803s registers an offense for a method call with params and a block safeguarded with a nil check for the object 803s registers an offense for a method call with params safeguarded with a negative check for the object 803s registers an offense for a method call with a block safeguarded with a negative nil check for the object 803s registers an offense for a method call with params and a block safeguarded with a negative check for the object 803s registers an offense for a method call safeguarded with a nil check for the object 803s registers an offense for a method call with params safeguarded with a check for the object 803s registers an offense for a method call with a block safeguarded with a check for the object 803s registers an offense for a method call with params safeguarded with a nil check for the object 803s registers an offense for a method call that nil responds to safe guarded by an object check 803s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 803s registers an offense for a method call safeguarded with a check for the object 803s registers an offense for a chained method call safeguarded with an unless nil check for the object 803s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 803s registers an offense for a method call with params safeguarded with a negative nil check for the object 804s registers an offense for a chained method call safeguarded with a check for the object 804s registers an offense for a method call safeguarded with a negative check for the object 804s registers an offense for an object check followed by a method call with a comment at EOL 804s registers an offense for a method call with params and a block safeguarded with a check for the object 804s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 804s registers an offense for a chained method call safeguarded with a negative nil check for the object 804s registers an offense for a method call with a block safeguarded with a nil check for the object 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to return safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to break safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to next safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to fail safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to throw safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to raise safe guarded by an object check 804s behaves like safe guarding logical break keywords 804s allows a method call being passed to yield safe guarded by an object check 804s object check before method call 804s allows a nil object check followed by a method call with params and a block 804s allows a non object check followed by a method call 804s allows a nil object check followed by a method call 804s allows a non object check followed by a method call with params 804s allows a non object check followed by a method call with a block 804s allows a nil object check followed by a method call with a block 804s allows a non object check followed by a method call with params and a block 804s allows a nil object check followed by a method call with params 804s ConvertCodeThatCanStartToReturnNil true 804s registers an offense for a non-nil object check followed by a method call with params 804s registers an offense for a non-nil object check followed by a method call with params and a block 804s registers an offense for an object check followed by a method call with a block 804s registers an offense for a check for the object followed by a method call in the condition for an if expression 804s registers an offense for an object check followed by a method call 804s corrects an object check followed by a method call and another check 804s registers an offense for an object check followed by a method call with params and a block 804s registers an offense for a non-nil object check followed by a method call with a block 804s registers an offense for an object check followed by a method call with params 804s registers an offense for a non-nil object check followed by a method call 804s method chaining 804s registers an offense for an object check followed by chained method calls with blocks 804s with Lint/SafeNavigationChain disabled 804s allows an object check followed by chained method calls with blocks 804s allows an object check followed by chained method calls 804s MaxChainLength: 3 804s registers an offense for an object check followed by 3 chained method calls 804s allows an object check followed by 4 chained method calls 804s MaxChainLength: 1 804s registers an offense for an object check followed by 1 chained method calls 804s allows an object check followed by 2 chained method calls 804s ConvertCodeThatCanStartToReturnNil false 804s registers an offense for an object check followed by a method call with a block 804s registers an offense for an object check followed by a method call with params 804s registers an offense for an object check followed by a method call 804s allows a non-nil object check followed by a method call with params and a block 804s registers an offense for a check for the object followed by a method call in the condition for an if expression 804s registers an offense for an object check followed by a method calls that nil responds to 804s registers an offense for an object check followed by a method call with params and a block 804s allows a non-nil object check followed by a method call with a block 804s allows a non-nil object check followed by a method call with params 804s allows a non-nil object check followed by a method call 804s method chaining 804s corrects an object check followed by a chained method call with a symbol proc 804s corrects an object check followed by a chained method call with params 804s corrects an object check followed by a chained method call 804s corrects an object check followed by a chained method call with a block 804s if expression 804s registers an offense for a single method call with params inside of an unless nil check for the object 804s registers an offense for a single method call with a block inside of an unless negative check for the object 804s does not lose comments within if expression 804s registers an offense for a single method call with params and a block inside of a check for the object 804s registers an offense for a single method call with params inside of a check for the object 805s registers an offense for a single method call with a block inside of a check for the object 805s registers an offense for a single method call inside of a check for the object 805s allows a single method call inside of a check for the object with an else 805s registers an offense for a single method call with params and a block inside of a non-nil check for the object 805s registers an offense for a single method call inside of an unless negative check for the object 805s registers an offense for a single method call inside of an unless nil check for the object 805s registers an offense for a single method call with a block inside of a non-nil check for the object 805s registers an offense for a single method call with a block inside of an unless nil check for the object 805s only moves comments that fall within the expression 805s registers an offense for a single method call with params inside of a non-nil check for the object 805s registers an offense for a single method call inside of a non-nil check for the object 805s registers an offense for a single method call with params inside of an unless negative check for the object 805s registers an offense for a single method call with params and a block inside of an unless nil check for the object 805s registers an offense for a single method call with params and a block inside of an unless negative check for the object 805s ternary expression 805s allows ternary expression 805s behaves like all variable types 805s if expression 805s only moves comments that fall within the expression 805s registers an offense for a single method call inside of a non-nil check for the object 805s does not lose comments within if expression 805s registers an offense for a single method call with params and a block inside of an unless negative check for the object 805s registers an offense for a single method call with a block inside of an unless nil check for the object 805s registers an offense for a single method call with params inside of an unless negative check for the object 805s registers an offense for a single method call with a block inside of an unless negative check for the object 805s registers an offense for a single method call with params inside of a non-nil check for the object 805s allows a single method call inside of a check for the object with an else 805s registers an offense for a single method call with params and a block inside of a non-nil check for the object 805s registers an offense for a single method call inside of an unless nil check for the object 805s registers an offense for a single method call inside of a check for the object 805s registers an offense for a single method call with params and a block inside of a check for the object 805s registers an offense for a single method call with params and a block inside of an unless nil check for the object 805s registers an offense for a single method call inside of an unless negative check for the object 805s registers an offense for a single method call with params inside of an unless nil check for the object 805s registers an offense for a single method call with a block inside of a check for the object 805s registers an offense for a single method call with a block inside of a non-nil check for the object 805s registers an offense for a single method call with params inside of a check for the object 805s ternary expression 805s allows ternary expression 805s object check before method call 805s allows a non object check followed by a method call 805s allows a nil object check followed by a method call 805s allows a nil object check followed by a method call with params and a block 805s allows a non object check followed by a method call with a block 805s allows a non object check followed by a method call with params 805s allows a non object check followed by a method call with params and a block 805s allows a nil object check followed by a method call with params 805s allows a nil object check followed by a method call with a block 805s ConvertCodeThatCanStartToReturnNil true 805s corrects an object check followed by a method call and another check 805s registers an offense for a non-nil object check followed by a method call with a block 805s registers an offense for an object check followed by a method call with params 805s registers an offense for a non-nil object check followed by a method call with params 805s registers an offense for a non-nil object check followed by a method call with params and a block 805s registers an offense for a non-nil object check followed by a method call 805s registers an offense for an object check followed by a method call 805s registers an offense for an object check followed by a method call with params and a block 805s registers an offense for an object check followed by a method call with a block 805s registers an offense for a check for the object followed by a method call in the condition for an if expression 805s method chaining 805s registers an offense for an object check followed by chained method calls with blocks 805s MaxChainLength: 1 806s registers an offense for an object check followed by 1 chained method calls 806s allows an object check followed by 2 chained method calls 806s with Lint/SafeNavigationChain disabled 806s allows an object check followed by chained method calls with blocks 806s allows an object check followed by chained method calls 806s MaxChainLength: 3 806s registers an offense for an object check followed by 3 chained method calls 806s allows an object check followed by 4 chained method calls 806s ConvertCodeThatCanStartToReturnNil false 806s registers an offense for a check for the object followed by a method call in the condition for an if expression 806s registers an offense for an object check followed by a method call with params and a block 806s registers an offense for an object check followed by a method call with params 806s registers an offense for an object check followed by a method calls that nil responds to 806s registers an offense for an object check followed by a method call with a block 806s allows a non-nil object check followed by a method call with params and a block 806s registers an offense for an object check followed by a method call 806s allows a non-nil object check followed by a method call with a block 806s allows a non-nil object check followed by a method call with params 806s allows a non-nil object check followed by a method call 806s method chaining 806s corrects an object check followed by a chained method call 806s corrects an object check followed by a chained method call with params 806s corrects an object check followed by a chained method call with a block 806s corrects an object check followed by a chained method call with a symbol proc 806s modifier if 806s registers an offense for a method call safeguarded with a negative nil check for the object 806s registers an offense for a method call with a block safeguarded with a negative check for the object 806s registers an offense for a method call with a block safeguarded with a nil check for the object 806s registers an offense for a method call with params safeguarded with a nil check for the object 806s registers an offense for a chained method call safeguarded with a negative nil check for the object 806s registers an offense for a method call safeguarded with a negative check for the object 806s registers an offense for an object check followed by a method call with a comment at EOL 806s registers an offense for a method call with a block safeguarded with a check for the object 806s registers an offense for a method call with params and a block safeguarded with a check for the object 807s registers an offense for a method call with params and a block safeguarded with a nil check for the object 807s registers an offense for a method call with params safeguarded with a check for the object 807s registers an offense for a chained method call safeguarded with an unless nil check for the object 807s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 807s registers an offense for a method call with params safeguarded with a negative check for the object 807s registers an offense for a method call with params and a block safeguarded with a negative check for the object 807s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 807s registers an offense for a method call that nil responds to safe guarded by an object check 807s registers an offense for a method call safeguarded with a nil check for the object 807s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 807s registers an offense for a method call with a block safeguarded with a negative nil check for the object 807s registers an offense for a chained method call safeguarded with a check for the object 807s registers an offense for a method call safeguarded with a check for the object 807s registers an offense for a method call with params safeguarded with a negative nil check for the object 807s behaves like safe guarding logical break keywords 807s allows a method call being passed to raise safe guarded by an object check 807s behaves like safe guarding logical break keywords 807s allows a method call being passed to fail safe guarded by an object check 807s behaves like safe guarding logical break keywords 807s allows a method call being passed to return safe guarded by an object check 807s behaves like safe guarding logical break keywords 807s allows a method call being passed to next safe guarded by an object check 807s behaves like safe guarding logical break keywords 808s allows a method call being passed to yield safe guarded by an object check 808s behaves like safe guarding logical break keywords 808s allows a method call being passed to break safe guarded by an object check 808s behaves like safe guarding logical break keywords 808s allows a method call being passed to throw safe guarded by an object check 808s behaves like all variable types 808s object check before method call 808s allows a non object check followed by a method call with params 808s allows a nil object check followed by a method call with params and a block 808s allows a non object check followed by a method call with params and a block 808s allows a nil object check followed by a method call with a block 808s allows a nil object check followed by a method call 809s allows a non object check followed by a method call 809s allows a nil object check followed by a method call with params 809s allows a non object check followed by a method call with a block 809s ConvertCodeThatCanStartToReturnNil false 809s allows a non-nil object check followed by a method call 809s allows a non-nil object check followed by a method call with params and a block 809s registers an offense for a check for the object followed by a method call in the condition for an if expression 809s registers an offense for an object check followed by a method call with params and a block 809s registers an offense for an object check followed by a method call with a block 809s registers an offense for an object check followed by a method call 809s registers an offense for an object check followed by a method call with params 809s registers an offense for an object check followed by a method calls that nil responds to 809s allows a non-nil object check followed by a method call with a block 809s allows a non-nil object check followed by a method call with params 809s method chaining 809s corrects an object check followed by a chained method call 809s corrects an object check followed by a chained method call with params 809s corrects an object check followed by a chained method call with a block 809s corrects an object check followed by a chained method call with a symbol proc 809s ConvertCodeThatCanStartToReturnNil true 809s registers an offense for a non-nil object check followed by a method call with params 809s registers an offense for a non-nil object check followed by a method call with a block 809s corrects an object check followed by a method call and another check 809s registers an offense for an object check followed by a method call with params 809s registers an offense for an object check followed by a method call with a block 809s registers an offense for a non-nil object check followed by a method call with params and a block 809s registers an offense for an object check followed by a method call with params and a block 809s registers an offense for a check for the object followed by a method call in the condition for an if expression 809s registers an offense for an object check followed by a method call 809s registers an offense for a non-nil object check followed by a method call 809s method chaining 809s registers an offense for an object check followed by chained method calls with blocks 809s MaxChainLength: 3 809s allows an object check followed by 4 chained method calls 809s registers an offense for an object check followed by 3 chained method calls 809s MaxChainLength: 1 809s registers an offense for an object check followed by 1 chained method calls 809s allows an object check followed by 2 chained method calls 809s with Lint/SafeNavigationChain disabled 809s allows an object check followed by chained method calls 809s allows an object check followed by chained method calls with blocks 809s if expression 809s registers an offense for a single method call inside of an unless negative check for the object 809s registers an offense for a single method call with params and a block inside of a non-nil check for the object 809s allows a single method call inside of a check for the object with an else 809s registers an offense for a single method call with a block inside of a check for the object 809s registers an offense for a single method call with params inside of a non-nil check for the object 809s registers an offense for a single method call with params and a block inside of an unless negative check for the object 809s registers an offense for a single method call with params and a block inside of a check for the object 809s registers an offense for a single method call with params and a block inside of an unless nil check for the object 809s registers an offense for a single method call with a block inside of an unless negative check for the object 809s registers an offense for a single method call inside of an unless nil check for the object 809s registers an offense for a single method call with params inside of a check for the object 809s registers an offense for a single method call with a block inside of a non-nil check for the object 809s registers an offense for a single method call with params inside of an unless nil check for the object 809s only moves comments that fall within the expression 809s registers an offense for a single method call with params inside of an unless negative check for the object 809s registers an offense for a single method call inside of a check for the object 809s does not lose comments within if expression 809s registers an offense for a single method call inside of a non-nil check for the object 809s registers an offense for a single method call with a block inside of an unless nil check for the object 809s ternary expression 809s allows ternary expression 809s modifier if 809s registers an offense for a method call with a block safeguarded with a check for the object 809s registers an offense for a method call with params safeguarded with a negative check for the object 809s registers an offense for a method call safeguarded with a negative nil check for the object 809s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 809s registers an offense for a method call with params and a block safeguarded with a check for the object 809s registers an offense for a method call with a block safeguarded with a nil check for the object 809s registers an offense for a method call with params safeguarded with a check for the object 809s registers an offense for a method call safeguarded with a check for the object 809s registers an offense for a method call with params and a block safeguarded with a negative check for the object 809s registers an offense for a method call with params safeguarded with a nil check for the object 809s registers an offense for a chained method call safeguarded with a negative nil check for the object 809s registers an offense for a method call that nil responds to safe guarded by an object check 809s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 809s registers an offense for a method call with a block safeguarded with a negative nil check for the object 809s registers an offense for a chained method call safeguarded with a check for the object 809s registers an offense for a method call safeguarded with a negative check for the object 809s registers an offense for an object check followed by a method call with a comment at EOL 809s registers an offense for a method call safeguarded with a nil check for the object 809s registers an offense for a method call with a block safeguarded with a negative check for the object 809s registers an offense for a chained method call safeguarded with an unless nil check for the object 809s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 809s registers an offense for a method call with params and a block safeguarded with a nil check for the object 809s registers an offense for a method call with params safeguarded with a negative nil check for the object 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to next safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to fail safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to raise safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to yield safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to break safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to throw safe guarded by an object check 809s behaves like safe guarding logical break keywords 809s allows a method call being passed to return safe guarded by an object check 809s behaves like all variable types 810s modifier if 810s registers an offense for a method call safeguarded with a negative check for the object 810s registers an offense for a method call with params and a block safeguarded with a negative check for the object 810s registers an offense for a method call with a block safeguarded with a negative check for the object 810s registers an offense for a method call with params safeguarded with a negative check for the object 810s registers an offense for a chained method call safeguarded with an unless nil check for the object 810s registers an offense for a chained method call safeguarded with a check for the object 810s registers an offense for a method call with a block safeguarded with a negative nil check for the object 810s registers an offense for an object check followed by a method call with a comment at EOL 810s registers an offense for a method call with a block safeguarded with a nil check for the object 810s registers an offense for a method call safeguarded with a nil check for the object 810s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 810s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 810s registers an offense for a chained method call safeguarded with a negative nil check for the object 810s registers an offense for a method call with params safeguarded with a negative nil check for the object 810s registers an offense for a method call safeguarded with a check for the object 810s registers an offense for a method call with params safeguarded with a check for the object 810s registers an offense for a method call that nil responds to safe guarded by an object check 810s registers an offense for a method call with params and a block safeguarded with a nil check for the object 810s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 810s registers an offense for a method call with a block safeguarded with a check for the object 810s registers an offense for a method call with params and a block safeguarded with a check for the object 810s registers an offense for a method call with params safeguarded with a nil check for the object 810s registers an offense for a method call safeguarded with a negative nil check for the object 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to raise safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to fail safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to return safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to yield safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to next safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to break safe guarded by an object check 810s behaves like safe guarding logical break keywords 810s allows a method call being passed to throw safe guarded by an object check 810s object check before method call 810s allows a nil object check followed by a method call with params and a block 810s allows a non object check followed by a method call with a block 810s allows a nil object check followed by a method call 810s allows a non object check followed by a method call 810s allows a nil object check followed by a method call with a block 810s allows a non object check followed by a method call with params 810s allows a nil object check followed by a method call with params 810s allows a non object check followed by a method call with params and a block 810s ConvertCodeThatCanStartToReturnNil true 810s registers an offense for a check for the object followed by a method call in the condition for an if expression 810s registers an offense for a non-nil object check followed by a method call with params and a block 811s registers an offense for a non-nil object check followed by a method call 811s registers an offense for a non-nil object check followed by a method call with a block 811s registers an offense for an object check followed by a method call with params and a block 811s registers an offense for an object check followed by a method call with a block 811s registers an offense for an object check followed by a method call 811s corrects an object check followed by a method call and another check 811s registers an offense for a non-nil object check followed by a method call with params 811s registers an offense for an object check followed by a method call with params 811s method chaining 811s registers an offense for an object check followed by chained method calls with blocks 811s MaxChainLength: 1 811s allows an object check followed by 2 chained method calls 811s registers an offense for an object check followed by 1 chained method calls 811s with Lint/SafeNavigationChain disabled 811s allows an object check followed by chained method calls 811s allows an object check followed by chained method calls with blocks 811s MaxChainLength: 3 811s registers an offense for an object check followed by 3 chained method calls 811s allows an object check followed by 4 chained method calls 811s ConvertCodeThatCanStartToReturnNil false 811s allows a non-nil object check followed by a method call 811s registers an offense for a check for the object followed by a method call in the condition for an if expression 811s registers an offense for an object check followed by a method call with a block 811s allows a non-nil object check followed by a method call with params 811s allows a non-nil object check followed by a method call with a block 811s allows a non-nil object check followed by a method call with params and a block 811s registers an offense for an object check followed by a method calls that nil responds to 811s registers an offense for an object check followed by a method call 811s registers an offense for an object check followed by a method call with params 811s registers an offense for an object check followed by a method call with params and a block 811s method chaining 811s corrects an object check followed by a chained method call with a block 811s corrects an object check followed by a chained method call 811s corrects an object check followed by a chained method call with params 811s corrects an object check followed by a chained method call with a symbol proc 811s if expression 811s registers an offense for a single method call with params and a block inside of a check for the object 811s registers an offense for a single method call with a block inside of a non-nil check for the object 811s registers an offense for a single method call with params and a block inside of an unless nil check for the object 811s registers an offense for a single method call with params inside of a non-nil check for the object 811s registers an offense for a single method call with a block inside of an unless negative check for the object 811s only moves comments that fall within the expression 811s registers an offense for a single method call with params and a block inside of an unless negative check for the object 811s registers an offense for a single method call inside of an unless negative check for the object 811s registers an offense for a single method call with a block inside of an unless nil check for the object 811s registers an offense for a single method call inside of an unless nil check for the object 811s registers an offense for a single method call with a block inside of a check for the object 811s allows a single method call inside of a check for the object with an else 811s registers an offense for a single method call with params inside of a check for the object 811s registers an offense for a single method call with params inside of an unless negative check for the object 811s registers an offense for a single method call inside of a non-nil check for the object 811s registers an offense for a single method call with params inside of an unless nil check for the object 811s registers an offense for a single method call with params and a block inside of a non-nil check for the object 812s registers an offense for a single method call inside of a check for the object 812s does not lose comments within if expression 812s ternary expression 812s allows ternary expression 812s behaves like all variable types 812s if expression 812s does not lose comments within if expression 812s registers an offense for a single method call with a block inside of an unless nil check for the object 812s registers an offense for a single method call with params inside of a non-nil check for the object 812s registers an offense for a single method call with params and a block inside of an unless nil check for the object 812s registers an offense for a single method call inside of a check for the object 812s registers an offense for a single method call with params inside of a check for the object 812s registers an offense for a single method call with params inside of an unless negative check for the object 812s registers an offense for a single method call with params inside of an unless nil check for the object 812s registers an offense for a single method call inside of an unless negative check for the object 812s registers an offense for a single method call with a block inside of a check for the object 812s registers an offense for a single method call with params and a block inside of a check for the object 812s only moves comments that fall within the expression 812s registers an offense for a single method call with params and a block inside of a non-nil check for the object 812s registers an offense for a single method call with params and a block inside of an unless negative check for the object 812s allows a single method call inside of a check for the object with an else 812s registers an offense for a single method call with a block inside of an unless negative check for the object 812s registers an offense for a single method call inside of a non-nil check for the object 812s registers an offense for a single method call with a block inside of a non-nil check for the object 812s registers an offense for a single method call inside of an unless nil check for the object 812s ternary expression 812s allows ternary expression 812s object check before method call 812s allows a non object check followed by a method call with a block 812s allows a non object check followed by a method call with params 812s allows a nil object check followed by a method call 812s allows a nil object check followed by a method call with a block 812s allows a nil object check followed by a method call with params and a block 812s allows a non object check followed by a method call with params and a block 812s allows a non object check followed by a method call 812s allows a nil object check followed by a method call with params 812s ConvertCodeThatCanStartToReturnNil true 812s registers an offense for an object check followed by a method call with params and a block 812s registers an offense for an object check followed by a method call with params 812s corrects an object check followed by a method call and another check 812s registers an offense for an object check followed by a method call with a block 812s registers an offense for an object check followed by a method call 812s registers an offense for a non-nil object check followed by a method call 812s registers an offense for a non-nil object check followed by a method call with a block 812s registers an offense for a check for the object followed by a method call in the condition for an if expression 812s registers an offense for a non-nil object check followed by a method call with params 812s registers an offense for a non-nil object check followed by a method call with params and a block 812s method chaining 812s registers an offense for an object check followed by chained method calls with blocks 812s MaxChainLength: 3 812s registers an offense for an object check followed by 3 chained method calls 812s allows an object check followed by 4 chained method calls 812s with Lint/SafeNavigationChain disabled 812s allows an object check followed by chained method calls 812s allows an object check followed by chained method calls with blocks 812s MaxChainLength: 1 812s allows an object check followed by 2 chained method calls 812s registers an offense for an object check followed by 1 chained method calls 812s ConvertCodeThatCanStartToReturnNil false 812s registers an offense for an object check followed by a method call with params 812s allows a non-nil object check followed by a method call with params 812s registers an offense for an object check followed by a method calls that nil responds to 812s allows a non-nil object check followed by a method call 812s allows a non-nil object check followed by a method call with params and a block 812s registers an offense for an object check followed by a method call with a block 812s allows a non-nil object check followed by a method call with a block 812s registers an offense for an object check followed by a method call with params and a block 812s registers an offense for an object check followed by a method call 812s registers an offense for a check for the object followed by a method call in the condition for an if expression 812s method chaining 812s corrects an object check followed by a chained method call with a symbol proc 812s corrects an object check followed by a chained method call 812s corrects an object check followed by a chained method call with a block 812s corrects an object check followed by a chained method call with params 812s modifier if 812s registers an offense for a method call with a block safeguarded with a negative nil check for the object 812s registers an offense for a method call with params and a block safeguarded with a nil check for the object 812s registers an offense for a method call with params and a block safeguarded with a negative check for the object 812s registers an offense for a method call that nil responds to safe guarded by an object check 813s registers an offense for an object check followed by a method call with a comment at EOL 813s registers an offense for a chained method call safeguarded with a check for the object 813s registers an offense for a chained method call safeguarded with a negative nil check for the object 813s registers an offense for a chained method call safeguarded with an unless nil check for the object 813s registers an offense for a method call with params safeguarded with a nil check for the object 813s registers an offense for a method call with params safeguarded with a negative check for the object 813s registers an offense for a method call with a block safeguarded with a negative check for the object 813s registers an offense for a method call safeguarded with a nil check for the object 813s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 813s registers an offense for a method call with params safeguarded with a check for the object 813s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 813s registers an offense for a method call safeguarded with a check for the object 813s registers an offense for a method call safeguarded with a negative check for the object 813s registers an offense for a method call with params safeguarded with a negative nil check for the object 813s registers an offense for a method call with params and a block safeguarded with a check for the object 813s registers an offense for a method call safeguarded with a negative nil check for the object 813s registers an offense for a method call with a block safeguarded with a nil check for the object 813s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 813s registers an offense for a method call with a block safeguarded with a check for the object 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to raise safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to return safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to break safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to throw safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to fail safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to next safe guarded by an object check 813s behaves like safe guarding logical break keywords 813s allows a method call being passed to yield safe guarded by an object check 813s behaves like all variable types 813s object check before method call 813s allows a nil object check followed by a method call with a block 814s allows a non object check followed by a method call with a block 814s allows a non object check followed by a method call with params 814s allows a nil object check followed by a method call with params 814s allows a nil object check followed by a method call with params and a block 814s allows a non object check followed by a method call with params and a block 814s allows a non object check followed by a method call 814s allows a nil object check followed by a method call 814s ConvertCodeThatCanStartToReturnNil true 814s registers an offense for a non-nil object check followed by a method call 814s registers an offense for an object check followed by a method call 814s corrects an object check followed by a method call and another check 814s registers an offense for a non-nil object check followed by a method call with a block 814s registers an offense for a non-nil object check followed by a method call with params and a block 814s registers an offense for an object check followed by a method call with params and a block 814s registers an offense for an object check followed by a method call with a block 814s registers an offense for an object check followed by a method call with params 814s registers an offense for a non-nil object check followed by a method call with params 814s registers an offense for a check for the object followed by a method call in the condition for an if expression 814s method chaining 814s registers an offense for an object check followed by chained method calls with blocks 814s with Lint/SafeNavigationChain disabled 814s allows an object check followed by chained method calls 814s allows an object check followed by chained method calls with blocks 814s MaxChainLength: 3 814s allows an object check followed by 4 chained method calls 814s registers an offense for an object check followed by 3 chained method calls 814s MaxChainLength: 1 814s registers an offense for an object check followed by 1 chained method calls 814s allows an object check followed by 2 chained method calls 814s ConvertCodeThatCanStartToReturnNil false 814s allows a non-nil object check followed by a method call 814s registers an offense for an object check followed by a method call with params and a block 814s allows a non-nil object check followed by a method call with params and a block 814s registers an offense for an object check followed by a method call 814s registers an offense for a check for the object followed by a method call in the condition for an if expression 814s allows a non-nil object check followed by a method call with params 814s registers an offense for an object check followed by a method call with a block 814s registers an offense for an object check followed by a method calls that nil responds to 814s allows a non-nil object check followed by a method call with a block 814s registers an offense for an object check followed by a method call with params 814s method chaining 814s corrects an object check followed by a chained method call 814s corrects an object check followed by a chained method call with params 814s corrects an object check followed by a chained method call with a symbol proc 814s corrects an object check followed by a chained method call with a block 814s modifier if 815s registers an offense for a method call with params safeguarded with a negative nil check for the object 815s registers an offense for a method call with params and a block safeguarded with a negative check for the object 815s registers an offense for a chained method call safeguarded with an unless nil check for the object 815s registers an offense for a method call with a block safeguarded with a negative nil check for the object 815s registers an offense for a method call safeguarded with a nil check for the object 815s registers an offense when safe guard check and safe navigation method call are connected with `&&` condition 815s registers an offense for a method call with params safeguarded with a nil check for the object 815s registers an offense for a method call with a block safeguarded with a negative check for the object 815s registers an offense for a method call with params safeguarded with a negative check for the object 815s registers an offense for a method call safeguarded with a check for the object 815s registers an offense for a method call with a block safeguarded with a check for the object 815s registers an offense for a method call safeguarded with a negative nil check for the object 815s registers an offense for a method call with params and a block safeguarded with a negative nil check for the object 815s registers an offense for a method call on an accessor safeguarded by a check for the accessed variable 815s registers an offense for a chained method call safeguarded with a check for the object 815s registers an offense for a method call that nil responds to safe guarded by an object check 815s registers an offense for a chained method call safeguarded with a negative nil check for the object 815s registers an offense for a method call safeguarded with a negative check for the object 815s registers an offense for a method call with params and a block safeguarded with a check for the object 815s registers an offense for a method call with params safeguarded with a check for the object 815s registers an offense for a method call with a block safeguarded with a nil check for the object 815s registers an offense for a method call with params and a block safeguarded with a nil check for the object 815s registers an offense for an object check followed by a method call with a comment at EOL 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to raise safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to break safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to return safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to fail safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to throw safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to yield safe guarded by an object check 815s behaves like safe guarding logical break keywords 815s allows a method call being passed to next safe guarded by an object check 815s if expression 815s only moves comments that fall within the expression 816s registers an offense for a single method call with params inside of an unless nil check for the object 816s does not lose comments within if expression 816s registers an offense for a single method call with a block inside of a check for the object 816s registers an offense for a single method call with a block inside of an unless negative check for the object 816s registers an offense for a single method call with params inside of an unless negative check for the object 816s registers an offense for a single method call inside of a check for the object 816s registers an offense for a single method call with params inside of a check for the object 816s registers an offense for a single method call with params and a block inside of a non-nil check for the object 816s registers an offense for a single method call inside of an unless nil check for the object 816s registers an offense for a single method call with params inside of a non-nil check for the object 816s registers an offense for a single method call inside of a non-nil check for the object 816s allows a single method call inside of a check for the object with an else 816s registers an offense for a single method call inside of an unless negative check for the object 816s registers an offense for a single method call with a block inside of an unless nil check for the object 816s registers an offense for a single method call with params and a block inside of a check for the object 816s registers an offense for a single method call with params and a block inside of an unless nil check for the object 816s registers an offense for a single method call with params and a block inside of an unless negative check for the object 816s registers an offense for a single method call with a block inside of a non-nil check for the object 816s ternary expression 816s allows ternary expression 816s respond_to? 816s allows method calls safeguarded by a respond_to check on adifferent variable and method 816s allows enumerable accessor method calls safeguarded by a respond_to check 816s allows method calls safeguarded by a respond_to check 816s allows method calls safeguarded by a respond_to check to a different method 816s allows method calls safeguarded by a respond_to check on adifferent variable but the same method 816s 816s RuboCop::Cop::Lint::RedundantWithIndex 816s registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` 816s registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` 816s registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` 816s accepts an index is used as a block argument 816s registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` 816s Ruby 2.7 816s registers an offense for `ary.each_with_index { _1 }` and corrects to `ary.each` 816s registers an offense when using `ary.each.with_index { _1 }` and corrects to `ary.each` 816s accepts an index is used as a numblock argument 816s 816s RuboCop::Cop::Style::TrailingBodyOnMethodDefinition 816s does not register offense with trailing body on method end 816s removes semicolon from method definition but not body when autocorrecting 816s autocorrects body with method definition with args not in parens 816s autocorrects with comment after body 816s registers an offense when body trails after method definition 816s accepts a method with multiple lines of body 816s registers when body starts on def line & continues one more line 816s accepts a method with one line of body 816s registers when body starts on def line & continues many more lines 816s Ruby 3.0 or higher 816s does not register offense when endless method definition body is after newline in opening parenthesis 816s when method is not on first line of processed_source 816s autocorrects offense 816s 816s RuboCop::Cop::Style::HashConversion 816s reports different offense for Hash[(a || b)] 816s reports different offense for Hash[(a && b)] 816s reports different offense for multi-argument Hash[] 816s registers and corrects an offense when using `zip` with argument in `Hash[]` 816s reports different offense for empty Hash[] 816s reports different offense for hash argument Hash[] 816s wraps complex statements in parens if needed 817s does not try to correct multi-argument Hash with odd number of arguments 817s registers and corrects an offense when using argumentless `zip` with parentheses in `Hash[]` 817s reports different offense for Hash[a && b] 817s reports different offense for hash argument Hash[] as a method argument without parentheses 817s registers and corrects an offense when using multi-argument `Hash[]` as a method argument 817s registers and corrects an offense when using argumentless `zip` without parentheses in `Hash[]` 817s reports different offense for hash argument Hash[] as a method argument with parentheses 817s reports an offense for single-argument Hash[] 817s reports different offense for Hash[a || b] 817s AllowSplatArgument: false 817s reports uncorrectable offense for unpacked array 817s AllowSplatArgument: true 817s does not register an offense for unpacked array 817s 817s RuboCop::Cop::Style::Dir 817s when using `#dirname` and `#realpath` 817s registers an offense with ::File 817s registers an offense 817s when using `#expand_path` and `#dirname` 817s registers an offense 817s registers an offense with ::File 817s 817s RuboCop::Cop::Layout::SpaceBeforeComma 817s handles more than one space before a comma 817s registers an offense and corrects block argument with space before comma 817s registers an offense and corrects method call arg with space before comma 817s registers an offense and corrects array index with space before comma 817s does not register an offense for no spaces before comma 817s heredocs 817s registers an offense and corrects 817s 817s RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault 817s when EnforcedStyle is no_space 817s registers an offense and corrects default value assignment with space 817s accepts default value assignment without space 817s registers an offense and corrects assignment of empty string with space 817s registers an offense and corrects assignment of empty list with space 817s when EnforcedStyle is space 817s registers an offense and corrects default value assignment without space 817s accepts default value assignment with spaces and unary + operator 817s registers an offense and corrects missing space for arguments with unary operators 817s accepts default value assignment with space 817s registers an offense and corrects assignment of empty list without space 817s registers an offense and corrects assigning empty string without space 817s registers an offense and corrects default value assignment where first is partially right without space 817s 817s RuboCop::Cop::Lint::UnifiedInteger 817s target ruby version >= 2.4 817s when Bignum 817s with MyNamespace 818s does not register an offense 818s when explicitly specified as toplevel constant 818s registers an offense 818s without any decorations 818s registers an offense 818s when Integer 818s without any decorations 818s does not register an offense 818s with MyNamespace 818s does not register an offense 818s when explicitly specified as toplevel constant 818s does not register an offense 818s target ruby version < 2.4 818s when Bignum 818s with MyNamespace 818s does not register an offense 818s when explicitly specified as toplevel constant 818s registers an offense 818s without any decorations 818s registers an offense and autocorrects 818s target ruby version >= 2.4 818s when Fixnum 818s with MyNamespace 818s does not register an offense 818s when explicitly specified as toplevel constant 818s registers an offense 818s without any decorations 818s registers an offense 818s target ruby version < 2.4 818s when Fixnum 818s without any decorations 818s registers an offense and autocorrects 818s when explicitly specified as toplevel constant 818s registers an offense 818s with MyNamespace 818s does not register an offense 818s 818s RuboCop::Cop::Lint::FloatComparison 818s registers an offense when comparing with float 818s does not register an offense when comparing with float method that can return numeric and returns integer 818s registers an offense when comparing with float returning method 818s registers an offense when comparing with method on float receiver 818s registers an offense when comparing with arightmetic operator on floats 818s registers an offense when comparing with float method that can return numeric and returns float 818s does not register an offense when comparing with float using epsilon 818s 818s RuboCop::Cop::Style::InlineComment 818s does not register an offense for a standalone comment 818s does not register an offense for special rubocop inline comments 818s registers an offense for a trailing inline comment 818s 818s RuboCop::Cop::Lint::UnreachableLoop 818s does not register an offense when branch includes continue statement preceding break statement 818s does not register an offense when using `return do_something(value) || next` in a loop 818s registers an offense when using `return do_something(value) || break` in a loop 818s does not register an offense when using `return do_something(value) || redo` in a loop 818s handles inner loops 818s without preceding continue statements 819s registers an offense when using `if-else` with all break branches 819s registers an offense when using `break` 819s does not register an offense when using `if` without `else` 819s does not register an offense when using `case` without `else` 819s does not register an offense when using `if-elsif-else` and not all branches are breaking 819s registers an offense when using `case-when-else` with all break branches 819s does not register an offense when using `case-when-else` and not all branches are breaking 819s Ruby 2.7 819s registers an offense when using `return do_something(value) || break` in a loop 819s with preceding continue statements 819s does not register an offense when using `case-when-else` with all break branches 819s does not register an offense when using `break` 819s does not register an offense when using `if-else` with all break branches 819s with an enumerator method 819s not chained 819s registers an offense 819s in the middle of a method chain 819s does not register an offense 819s as the last item in a method chain 819s registers an offense 819s with AllowedPatterns 819s with a non ignored method call 819s registers an offense 819s Ruby 2.7 819s registers an offense 819s with a ignored method call 819s does not register an offense 819s 819s RuboCop::Cop::Layout::LineContinuationLeadingSpace 819s EnforcedStyle: leading 819s registers offense in the right location when 1st line is not the string 819s registers offenses when 1st and 2nd line has trailing spaces 819s marks the correct range when string is a block method argument 819s marks the correct range when string is a positional method argument 819s registers an offense when 1st line has multiple trailing spaces 819s registers an offense when 1st line has one trailing space 819s puts the offense message in correct position also on indented line 819s interpolated strings 819s registers offenses when 1st line has leading spaces and 1st line is interpolated 819s registers no offense for correctly formatted multiline interpolation 819s registers an offense for incorrectly formatted multiline interpolated string 819s registers no offense for correctly formatted multiline interpolated string 819s registers no offense on doubly interpolated string alone 819s registers no offense on interpolated string alone 819s registers offenses when 1st line has trailing spaces and 2nd line is interpolated 819s EnforcedStyle: trailing 819s marks the correct range when string is a positional method argument 819s registers an offense when 2nd line has multiple leading spaces 819s registers offenses when 2nd and 3rd line has leading spaces 819s registers offense in the right location when 1st line is not the string 820s registers an offense when 2nd line has one leading space 820s marks the correct range when string is a block method argument 820s puts the offense message in correct position also on indented line 820s interpolated strings 820s registers no offense for correctly formatted multiline interpolated string 820s registers no offense on interpolated string alone 820s registers no offense on doubly interpolated string alone 820s registers no offense for correctly formatted multiline interpolation 820s registers offenses when 2nd line has leading spaces and 2nd line is interpolated 820s registers offenses when 2nd line has leading spaces and 1st line is interpolated 820s registers an offense for incorrectly formatted multiline interpolated string 820s 820s RuboCop::Cop::Style::Lambda 820s when using safe navigation operator 820s does not break 820s with enforced `literal` style 820s with a single line lambda method call 820s without arguments 820s registers an offense 820s with arguments 820s registers an offense 820s with a multiline lambda method call 820s without arguments 820s registers an offense 820s with arguments 820s registers an offense 820s with enforced `lambda` style 820s with a single line lambda literal 820s without argument parens and spaces 820s registers an offense 820s with arguments 820s registers an offense 820s without arguments 820s registers an offense 820s with a multiline lambda literal 820s without arguments 820s registers an offense 820s with arguments 820s registers an offense 820s with default `line_count_dependent` style 820s with a multiline lambda literal as an argument 820s registers an offense 820s with a single line lambda literal 820s does not register an offense 820s unusual lack of spacing 820s without any spacing 820s registers an offense 820s with a multiline lambda literal 820s without parentheses 820s registers an offense 820s with empty arguments 820s registers an offense 820s with no arguments and bad spacing 820s registers an offense 820s with no arguments and no spacing 820s registers an offense 820s with no parentheses and many args 820s registers an offense 820s with no parentheses and bad spacing 820s registers an offense 820s without spacing after arguments 820s registers an offense 820s without spacing before arguments 820s registers an offense 820s with a multiline lambda literal 820s with arguments 820s registers an offense 820s without arguments 820s registers an offense 820s with a multiline lambda method call 820s does not register an offense 820s >= Ruby 2.7 820s when using numbered parameter 820s with a single line lambda literal 820s does not register an offense 820s with a single line lambda method call 820s registers an offense 820s with a multiline lambda method call 820s does not register an offense 820s with a multiline braces lambda literal as a keyword argument 820s registers an offense 820s with a single line lambda method call 820s without arguments 820s registers an offense 820s with arguments 820s registers an offense 820s with a multiline do-end lambda literal as a keyword argument 820s registers an offense 820s with a multiline do-end lambda as a parenthesized kwarg 820s registers an offense 820s when calling a lambda method without a block 820s does not register an offense 820s 820s RuboCop::Cop::Lint::MissingCopEnableDirective 820s when the maximum range size is finite 820s does not register an offense when the disable cop is re-enabled within the limit 820s registers an offense when a department is disabled for too many lines 820s registers an offense when a department is disabled and never re-enabled 820s registers an offense when a cop is disabled and never re-enabled 820s does not register an offense when the disable department is re-enabled within the limit 820s registers an offense when a cop is disabled for too many lines 820s when the maximum range size is infinite 820s registers an offense when a department is disabled and never re-enabled 820s does not register an offense when the disable department is re-enabled 820s does not register an offense when the disable cop is re-enabled 820s registers an offense when a cop is disabled and never re-enabled 820s when the cop is disabled in the config 820s reports no offense when re-disabling it until EOF 820s 820s RuboCop::Cop::Lint::UnreachableCode 820s accepts `return` is in `if` branch only 820s accepts `throw` is in `else` branch only 820s registers an offense for `exit` in all `case` branches 820s registers an offense for `next` in all `if` branches 820s registers an offense for `abort` in all `if` and `elsif` branches 820s registers an offense for `next` in all `case` branches 820s registers an offense for `exit` in all `if` and `elsif` branches 820s registers an offense for `fail` in all `if` branches with other expressions 820s accepts `fail` is in `else` branch only 820s registers an offense for `raise` in all `if` and `elsif` branches 820s registers an offense for `next` in `begin` 820s registers an offense for `break` in `begin` 820s accepts `break` is not in `elsif` branch 820s accepts `redo` is in `if`, and without `else` 820s accepts `exit!` is in `if` branch only 820s accepts `fail` is not in `elsif` branch 820s accepts `fail` is in `if`, and without `else` 820s accepts `retry` is in all `if` branches 820s accepts `abort` as the final expression 820s registers an offense for `exit` in all `if` branches 820s registers an offense for `throw` in `begin` 821s accepts `next` as the final expression 821s registers an offense for `break` before other statements 821s registers an offense for `raise` in all `if` branches with other expressions 821s registers an offense for `break` in all `if` and `elsif` branches 821s accepts `exit` is in `else` branch only 821s accepts `fail` is in all `if` branches 821s accepts code with conditional `abort` 821s registers an offense for `throw` in all `if` branches 821s accepts `break` is in `if` branch only 821s accepts code with conditional `raise` 821s accepts `redo` is not in `elsif` branch 821s accepts `abort` is in `if`, and without `else` 821s accepts code with conditional `exit!` 821s accepts `redo` is in all `if` branches 821s registers an offense for `return` in all `if` branches with other expressions 821s accepts `raise` is in `else` branch only 821s accepts `redo` is in `case` branch without else 821s accepts `return` is in all `if` branches 821s registers an offense for `exit!` in all `if` branches 821s accepts `raise` as the final expression 821s accepts `fail` is in `case` branch without else 821s accepts `exit` is in `case` branch without else 821s registers an offense for `redo` in all `case` branches 821s accepts `next` is in `if` branch only 821s registers an offense for `fail` in all `if` branches 821s registers an offense for `exit!` before other statements 821s accepts `return` is in `case` branch without else 821s registers an offense for `abort` in all `case` branches 821s registers an offense for `raise` in all `case` branches 821s accepts `next` is in `case` branch without else 821s accepts `abort` is not in `elsif` branch 821s registers an offense for `redo` before other statements 821s accepts `next` is in `if`, and without `else` 821s registers an offense for `break` in all `if` branches with other expressions 821s accepts `exit!` as the final expression 821s accepts `retry` is in `else` branch only 821s accepts `break` is in all `if` branches 821s accepts `next` is in `else` branch only 821s accepts `abort` is in `case` branch without else 821s accepts `retry` is not in `elsif` branch 821s registers an offense for `abort` in all `if` branches 821s accepts `raise` is not in `elsif` branch 821s accepts `throw` is in `case` branch without else 821s registers an offense for `retry` before other statements 821s accepts `throw` is not in `elsif` branch 821s accepts `abort` is in all `if` branches 821s accepts `redo` is in `else` branch only 821s registers an offense for `exit!` in `begin` 821s accepts `redo` as the final expression 821s registers an offense for `abort` in all `if` branches with other expressions 821s accepts `retry` is in `if` branch only 821s accepts `throw` is in `if` branch only 821s registers an offense for `throw` in all `case` branches 822s accepts `break` is in `if`, and without `else` 822s accepts `return` as the final expression 822s registers an offense for `throw` before other statements 822s registers an offense for `throw` in all `if` and `elsif` branches 822s registers an offense for `next` before other statements 822s accepts `throw` is in all `if` branches 822s registers an offense for `return` in all `case` branches 822s registers an offense for `exit` in all `if` branches with other expressions 822s accepts `break` as the final expression 822s accepts code with conditional `exit` 822s accepts `retry` is in `case` branch without else 822s accepts code with conditional `return` 822s accepts `abort` is in `else` branch only 822s accepts code with conditional `retry` 822s registers an offense for `retry` in all `if` and `elsif` branches 822s accepts `retry` is in `if`, and without `else` 822s accepts `exit` is in `if`, and without `else` 822s accepts `throw` is in `if`, and without `else` 822s accepts `exit!` is in all `if` branches 822s registers an offense for `return` in all `if` branches 822s accepts `next` is in all `if` branches 822s accepts `next` is not in `elsif` branch 822s registers an offense for `exit` in `begin` 822s accepts `exit!` is in `case` branch without else 822s accepts `return` is in `if`, and without `else` 822s accepts `return` is not in `elsif` branch 822s accepts code with conditional `break` 822s accepts `raise` is in all `if` branches 822s accepts `abort` is in `if` branch only 822s accepts `exit` is in `if` branch only 822s registers an offense for `exit!` in all `case` branches 822s registers an offense for `abort` in `begin` 822s registers an offense for `exit!` in all `if` and `elsif` branches 822s registers an offense for `retry` in `begin` 822s registers an offense for `throw` in all `if` branches with other expressions 822s accepts `throw` as the final expression 822s accepts code with conditional `next` 822s registers an offense for `raise` before other statements 822s registers an offense for `break` in all `if` branches 822s registers an offense for `retry` in all `if` branches 822s accepts code with conditional `redo` 823s registers an offense for `break` in all `case` branches 823s registers an offense for `next` in all `if` branches with other expressions 823s accepts `return` is in `else` branch only 823s registers an offense for `fail` in all `if` and `elsif` branches 823s registers an offense for `retry` in all `case` branches 823s accepts `redo` is in `if` branch only 823s accepts `exit!` is in `if`, and without `else` 823s registers an offense for `raise` in all `if` branches 823s registers an offense for `redo` in all `if` branches 823s registers an offense for `abort` before other statements 823s registers an offense for `fail` in all `case` branches 823s registers an offense for `return` in `begin` 823s accepts `raise` is in `case` branch without else 823s accepts `exit` is in all `if` branches 823s accepts `fail` is in `if` branch only 823s accepts `exit` is not in `elsif` branch 823s registers an offense for `redo` in all `if` and `elsif` branches 823s accepts `exit!` is not in `elsif` branch 823s registers an offense for `retry` in all `if` branches with other expressions 823s registers an offense for `next` in all `if` and `elsif` branches 823s registers an offense for `redo` in all `if` branches with other expressions 823s registers an offense for `redo` in `begin` 823s registers an offense for `return` in all `if` and `elsif` branches 823s registers an offense for `fail` before other statements 823s accepts code with conditional `throw` 823s accepts `fail` as the final expression 823s registers an offense for `fail` in `begin` 823s accepts `exit` as the final expression 823s registers an offense for `return` before other statements 823s accepts `break` is in `case` branch without else 823s accepts `raise` is in `if`, and without `else` 823s accepts `exit!` is in `else` branch only 823s registers an offense for `exit` before other statements 823s accepts `retry` as the final expression 823s registers an offense for `exit!` in all `if` branches with other expressions 823s accepts code with conditional `fail` 823s registers an offense for `raise` in `begin` 823s accepts `break` is in `else` branch only 823s accepts `raise` is in `if` branch only 823s 823s RuboCop::Cop::InternalAffairs::CreateEmptyFile 823s registers an offense when using `create_file(path, '') 823s registers an offense when using `create_file(path, "") 823s does not register an offense when using `create_file(path)` 823s does not register an offense when using `receiver.create_file(path, '')` 823s does not register an offense when using `create_file(path, ['foo', 'bar'])` 823s does not register an offense when using `create_file(path, 'hello')` 823s 823s RuboCop::Cop::VariableForce::Scope 823s .new 823s when begin node is passed 823s accepts that as top level scope 823s when lvasgn node is passed 823s accepts that as top level scope 823s #name 823s when the scope is singleton method definition 823s returns the method name 823s when the scope is instance method definition 823s returns the method name 823s #include? 823s with child node the scope does not include 823s is expected to equal false 823s with child node the scope includes 823s is expected to equal true 823s with descendant node the scope does not include 823s is expected to equal false 823s with node of the scope itself 823s is expected to equal false 823s with ancestor node the scope does not include 823s is expected to equal false 823s #body_node 823s when the scope is block 823s returns the body node 823s when the scope is class 823s returns the body node 823s when the scope is instance method 823s returns the body node 823s when the scope is top level 823s returns the body node 823s when the scope is singleton method 823s returns the body node 823s when the scope is singleton class 823s returns the body node 823s when the scope is module 823s returns the body node 823s #each_node 823s outer scope boundary handling 823s when the scope is block 823s yields the argument and the body nodes 823s when the scope is top level 823s yields the body nodes 823s when the scope is instance method 823s yields the argument and the body nodes 823s when the scope is singleton method 823s yields the argument and the body nodes 823s when the scope is class 823s yields the body nodes 823s when the scope is singleton class 823s yields the body nodes 823s when the scope is module 823s yields the body nodes 823s inner scope boundary handling 823s when there's a singleton method definition 823s yields only the defs node and the method host node 823s when there's a method invocation with block 823s yields only the block node and the child send node 823s 823s RuboCop::Cop::Lint::RedundantStringCoercion 823s accepts #to_s with arguments in an interpolation 823s registers an offense and corrects `to_s` in an interpolation with several expressions 823s registers an offense and corrects `to_s` in interpolation 823s accepts interpolation without #to_s 823s registers an offense and corrects an implicit receiver 823s does not explode on empty interpolation 823s 823s RuboCop::Cop::Naming::FileName 823s when CheckDefinitionPathHierarchy is false 823s on a file with a non-matching struct 823s registers an offense 823s with a matching module containing a non-matching struct 823s does not register an offense 823s with a non-matching module containing a matching class 823s does not register an offense 823s on a file with a non-matching class 823s registers an offense 823s in a non-matching directory, but with a matching class 823s does not register an offense 823s on a file with a matching struct 823s does not register an offense 823s on a file with a matching class 823s does not register an offense 823s with a matching module containing a non-matching class 823s does not register an offense 823s with a non-matching module containing a matching struct 823s does not register an offense 823s on an empty file 823s registers an offense 823s when the file is specified in AllCops/Include 823s with a non-snake_case file name 823s does not register an offense 823s with snake_case file names with multiple extensions 823s does not register an offense 823s with camelCase file names ending in .rb 823s registers an offense 823s when Regex is set 823s with a matching name 823s does not register an offense 823s with a non-matching name 823s registers an offense 823s with camelCase file names without file extension 823s registers an offense 823s with non-snake-case file names with a shebang 823s does not register an offense 823s when IgnoreExecutableScripts is disabled 823s registers an offense 823s with non-ascii characters in filename 823s does not register an offense 823s with snake_case names which use + 823s does not register an offense 823s with snake_case file names ending in .rb 823s does not register an offense 823s with dotfiles 823s does not register an offense 823s with snake_case names which use ? and ! 823s does not register an offense 823s with include acronym name 823s does not register an offense 823s with snake_case file names with non-rb extension 824s does not register an offense 824s with acronym class name 824s does not register an offense 824s with acronym namespace 824s does not register an offense 824s when ExpectMatchingDefinition is true 824s on an empty file 824s registers an offense 824s on a file which defines multiple classes 824s in a directory elsewhere which only matches the module name 824s does not register an offense 824s in a directory elsewhere which does not match the module name 824s registers an offense 824s in a non-matching directory under lib 824s registers an offense 824s in a matching directory under test 824s does not register an offense 824s in a non-matching directory under spec 824s registers an offense 824s in a directory with multiple instances of test 824s does not register an offense 824s in a directory with multiple instances of src 824s does not register an offense 824s in a non-matching directory under test 824s registers an offense 824s in a non-matching directory under src 824s registers an offense 824s in a matching directory under spec 824s does not register an offense 824s in a matching directory under src 824s does not register an offense 824s in a matching directory under lib 824s does not register an offense 824s in a directory with multiple instances of spec 824s does not register an offense 824s in a directory with multiple instances of lib 824s does not register an offense 824s on a file which uses Name::Spaced::Module syntax 824s in a non-matching directory under src 824s registers an offense 824s in a matching directory under lib 824s does not register an offense 824s in a matching directory under src 824s does not register an offense 824s in a directory with multiple instances of src 824s does not register an offense 824s in a matching directory under test 824s does not register an offense 824s in a non-matching directory under lib 824s registers an offense 824s in a non-matching directory under test 824s registers an offense 824s in a directory with multiple instances of spec 824s does not register an offense 824s in a directory with multiple instances of test 824s does not register an offense 824s in a matching directory under spec 824s does not register an offense 824s in a non-matching directory under spec 824s registers an offense 824s in a directory with multiple instances of lib 824s does not register an offense 824s in a directory elsewhere which only matches the module name 824s does not register an offense 824s in a directory elsewhere which does not match the module name 824s registers an offense 824s on an empty file with a space in its filename 824s registers an offense 824s on a file which defines no class or module at all 824s under some other random directory 824s registers an offense 824s under test 824s registers an offense 824s under src 824s registers an offense 824s under lib 824s registers an offense 824s under spec 824s registers an offense 824s under lib when not added to root 824s registers an offense 824s on a file which defines a Struct with a block 824s in a matching directory under test 824s does not register an offense 824s in a directory elsewhere which does not match the module name 824s registers an offense 824s in a non-matching directory under test 824s registers an offense 824s in a matching directory under spec 824s does not register an offense 824s in a directory with multiple instances of src 824s does not register an offense 824s in a non-matching directory under src 824s registers an offense 824s in a directory with multiple instances of test 824s does not register an offense 824s in a directory with multiple instances of spec 824s does not register an offense 824s in a directory with multiple instances of lib 824s does not register an offense 824s in a non-matching directory under spec 824s registers an offense 824s in a matching directory under src 824s does not register an offense 824s in a matching directory under lib 825s does not register an offense 825s in a directory elsewhere which only matches the module name 825s does not register an offense 825s in a non-matching directory under lib 825s registers an offense 825s on a file which defines a nested module 825s in a directory with multiple instances of spec 825s does not register an offense 825s in a matching directory under spec 825s does not register an offense 825s in a matching directory under test 825s does not register an offense 825s in a directory elsewhere which does not match the module name 825s registers an offense 825s in a directory with multiple instances of lib 825s does not register an offense 825s in a non-matching directory under spec 825s registers an offense 825s in a directory elsewhere which only matches the module name 825s does not register an offense 825s in a directory with multiple instances of test 825s does not register an offense 825s in a matching directory under src 825s does not register an offense 825s in a non-matching directory under test 825s registers an offense 825s in a directory with multiple instances of src 825s does not register an offense 825s in a non-matching directory under lib 825s registers an offense 825s in a matching directory under lib 825s does not register an offense 825s in a non-matching directory under src 825s registers an offense 825s on a file which defines a Struct without a block 825s in a non-matching directory under src 825s registers an offense 825s in a non-matching directory under lib 825s registers an offense 825s in a matching directory under src 825s does not register an offense 825s in a directory with multiple instances of src 825s does not register an offense 825s in a directory elsewhere which only matches the module name 825s does not register an offense 825s in a non-matching directory under test 825s registers an offense 825s in a non-matching directory under spec 825s registers an offense 825s in a matching directory under test 825s does not register an offense 825s in a directory with multiple instances of test 825s does not register an offense 825s in a directory with multiple instances of spec 825s does not register an offense 825s in a matching directory under spec 825s does not register an offense 825s in a directory elsewhere which does not match the module name 825s registers an offense 825s in a matching directory under lib 825s does not register an offense 825s in a directory with multiple instances of lib 825s does not register an offense 825s on a file which defines a nested class 825s in a non-matching directory under src 825s registers an offense 825s in a directory elsewhere which does not match the module name 825s registers an offense 825s in a directory with multiple instances of spec 825s does not register an offense 825s in a non-matching directory under spec 825s registers an offense 825s in a directory elsewhere which only matches the module name 825s does not register an offense 825s in a matching directory under spec 825s does not register an offense 825s in a directory with multiple instances of src 825s does not register an offense 825s in a matching directory under test 825s does not register an offense 825s in a matching directory under lib 825s does not register an offense 825s in a non-matching directory under lib 825s registers an offense 825s in a directory with multiple instances of test 825s does not register an offense 825s in a non-matching directory under test 825s registers an offense 825s in a matching directory under src 825s does not register an offense 825s in a directory with multiple instances of lib 825s does not register an offense 825s with snake_case file names without file extension 825s does not register an offense 825s 825s RuboCop::Cop::Style::MultilineTernaryOperator 825s registers an offense and corrects when condition is multiline and using assignment method 826s register an offense and corrects when returning a multiline ternary operator expression with `return` 826s registers an offense and corrects when condition is multiline 826s registers an offense and corrects when the false branch is on a separate line 826s register an offense and corrects when returning a multiline ternary operator expression with `next` 826s register an offense and corrects when returning a multiline ternary operator expression with `break` 826s register an offense and corrects when returning a multiline ternary operator expression with method call 826s registers offense and corrects when the if branch and the else branch are on a separate line from the condition 826s accepts a single line ternary operator expression 826s registers an offense and corrects when everything is on a separate line 826s registers an offense and corrects when the false branch is on a separate line and assigning a return value 826s registers an offense and corrects when condition is multiline and using hash key assignment 826s 826s RuboCop::Cop::InternalAffairs::RedundantDescribedClassAsSubject 826s registers an offense when using `subject(:cop)` and `:config` is not specified in `describe` 826s does not register an offense when using `subject(:cop)` with multiple arguments to `described_class.new` 826s registers an offense when using `subject(:cop)` with no argument `described_class.new` and `:config` is specified 826s registers an offense when using `subject(:cop)` and `:config` is already specified in `describe` 826s 826s RuboCop::Cop::Style::WhileUntilDo 826s accepts do in single-line while 826s registers an offense for do in multiline until 826s accepts do in single-line until 826s accepts multi-line while without do 826s registers an offense for do in multiline while 826s accepts multi-line until without do 826s 826s RuboCop::Cop::Lint::EmptyConditionalBody 826s does not register an offense for missing `unless` body with a comment 826s does not register an offense for missing `elsif` body with a comment 826s registers an offense for missing `unless` body 826s registers an offense for missing `if` body 826s registers an offense for missing `unless` and `else` body 826s registers an offense for missing second `elsif` body without an inline comment 826s registers an offense for missing `if` and `elsif` body 826s registers an offense for missing `if` and `else` body 826s does not register an offense for missing `if` body with a comment 826s registers an offense for missing `if` body with `else` 826s registers an offense for missing `if` body with `elsif` 826s registers an offense for missing `elsif` body 826s does not register an offense for missing `elsif` body with an inline comment 826s registers an offense for missing `if` and `else` body with some indentation 826s registers an offense for missing `if` body with present `else` body 826s registers an offense for missing all branches of `if` and `elsif` body 826s registers an offense for missing `elsif` body that is not the one with a comment 826s autocorrects properly when the if is assigned to a variable 826s registers an offense for missing `unless` body with `else` 826s registers an offense for missing all branches of `if` and multiple `elsif` body 826s when AllowComments is false 826s registers an offense for missing `elsif` body with a comment 826s registers an offense for missing `if` body with a comment 826s registers an offense for missing `unless` body with a comment 826s 826s RuboCop::Cop::Lint::ShadowedArgument 826s block argument shadowing 826s when a block local variable is assigned but no argument is shadowed 827s accepts 827s when a single argument is shadowed 827s registers an offense 827s and shadowed within a conditional 827s registers an offense without specifying where the reassignment took place 827s and the conditional occurs after the reassignment 827s registers an offense 827s and the conditional is nested within a conditional 827s registers an offense without specifying where the reassignment took place 827s and the argument was used before shadowing 827s accepts 827s and was used before shadowing 827s accepts 827s and the argument was not shadowed outside the conditional 827s accepts 827s and the conditional is nested within a lambda 827s registers an offense without specifying where the reassignment took place 827s and the argument was used before shadowing 827s accepts 827s when zsuper is used 827s accepts 827s and shadowed within a block 827s registers an offense without specifying where the reassignment took place 827s and the argument was not shadowed outside the block 827s accepts 827s and the block is nested within a conditional 827s registers an offense without specifying where the reassignment took place 827s and the argument was used before shadowing 827s accepts 827s and was used before shadowing 827s accepts 827s and the block occurs after the reassignment 827s registers an offense 827s and the block is nested within a block 827s registers an offense without specifying where the reassignment took place 827s and the argument was used before shadowing 827s accepts 827s when binding is used 827s registers an offense 828s when IgnoreImplicitReferences config option is set to true 828s accepts 828s and the argument is not used 828s accepts 828s when multiple arguments are shadowed 828s and one of them shadowed within a lambda while another is shadowed outside 828s registers an offense 828s method argument shadowing 828s when a single argument is shadowed 828s registers an offense 828s and shadowed within a conditional 828s registers an offense without specifying where the reassignment took place 828s and the conditional is nested within a lambda 828s registers an offense without specifying where the reassignment took place 828s and the argument was used before shadowing 828s accepts 828s and the conditional occurs after the reassignment 828s registers an offense 828s and was used before shadowing 828s accepts 828s and the conditional is nested within a conditional 828s registers an offense without specifying where the reassignment took place 828s and the argument was used before shadowing 828s accepts 828s and the argument was not shadowed outside the conditional 828s accepts 828s and shadowed within a block 828s registers an offense without specifying where the reassignment took place 828s and the block is nested within a block 828s registers an offense without specifying where the reassignment took place 828s and the argument was used before shadowing 828s accepts 828s and the block occurs after the reassignment 828s registers an offense 828s and was used before shadowing 828s accepts 828s and the block is nested within a conditional 828s registers an offense without specifying where the reassignment took place 828s and the argument was used before shadowing 828s accepts 828s and the argument was not shadowed outside the block 828s accepts 828s when binding is used 828s registers an offense 828s when IgnoreImplicitReferences config option is set to true 828s accepts 828s when zsuper is used 828s registers an offense 828s when argument was shadowed by zsuper 828s registers an offense 828s when IgnoreImplicitReferences config option is set to true 828s accepts 828s when argument was shadowed by zsuper 828s does not register an offense 828s when a splat argument is shadowed 828s registers an offense 828s when argument was used in shorthand assignment 828s does not register an offense 828s and the argument is not used 828s accepts 828s when reassigning to splat variable 828s does not register an offense 828s when multiple arguments are shadowed 828s and one of them shadowed within a lambda while another is shadowed outside 828s registers an offense 828s 828s RuboCop::CLI --disable-uncorrectable 828s --disable-uncorrectable 830s does not disable anything for cops that support autocorrect 830s if one one-line disable statement fits 831s adds it when the cop supports autocorrect but does not correct the offense 832s adds it 832s and there are two offenses of the same kind on one line 833s adds a single one-line disable statement 833s but there are more offenses on the line and they don't all fit 835s adds both one-line and before-and-after disable statements 835s if a one-line disable statement doesn't fit 836s adds before-and-after disable statement 836s and the offense is inside a heredoc 837s adds before-and-after disable statement around the heredoc 837s when exist offense for Layout/SpaceInsideArrayLiteralBrackets 837s when `EnforcedStyle: no_space` 838s does not disable anything for cops that support autocorrect 838s when `EnforcedStyle: space` 839s does not disable anything for cops that support autocorrect 839s 839s RuboCop::Cop::Lint::RedundantWithObject 839s registers an offense and corrects when using ary.each_with_object([]) do-end block 839s an object is used as a block argument 839s registers an offense and corrects when using ary.each_with_object do-end block without parentheses 839s registers an offense and corrects when using `ary.each_with_object { |v| v }` 839s registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` 839s Ruby 2.7 839s registers an offense and corrects when using `ary.each_with_object { _1 }` 839s registers an offense and corrects when using `ary.each.with_object([]) { _1 }` 839s when missing argument to `each_with_object` 839s does not register an offense when block has 2 arguments 839s does not register an offense when block has 1 argument 839s 839s RuboCop::Cop::Layout::SpaceInsideStringInterpolation 839s when EnforcedStyle is no_space 839s accepts empty interpolation 840s does not touch spaces inside the interpolated expression 840s for well-formatted string interpolations 840s accepts excess literal spacing 840s for ill-formatted string interpolations 840s finds interpolations in string-like contexts 840s registers offenses and autocorrects 840s for "space" style formatted string interpolations 840s registers offenses and autocorrects 840s when interpolation starts or ends with a line break 840s does not register an offense 840s ignores comments and whitespace when looking for line breaks 840s when EnforcedStyle is space 840s accepts empty interpolation 840s for "no_space" style formatted string interpolations 840s registers offenses and autocorrects 840s for well-formatted string interpolations 840s does not register an offense for excess literal spacing 840s for ill-formatted string interpolations 840s registers offenses and autocorrects 840s 840s RuboCop::Cop::Layout::ParameterAlignment 840s aligned with first parameter 840s accepts parameter lists on a single line 840s registers an offense and corrects parameters with single indent 840s accepts a method definition without parameters 840s registers an offense and corrects alignment in simple case 840s doesn't get confused by splat 840s accepts the first parameter being on a new row 840s accepts proper indentation 840s registers an offense and corrects parameters with double indent 840s defining self.method 840s accepts proper indentation 840s registers an offense and corrects parameters with single indent 840s aligned with fixed indentation 840s registers an offense and corrects parameters aligned to first param 840s accepts a method definition without parameters 840s accepts proper indentation 840s registers an offense and corrects parameters with double indent 840s accepts parameter lists on a single line 840s doesn't get confused by splat 840s accepts the first parameter being on a new row 840s defining self.method 840s registers an offense and corrects parameters aligned to first param 840s accepts proper indentation 840s 840s RuboCop::Cop::Naming::HeredocDelimiterCase 840s when enforced style is uppercase 840s with an interpolated heredoc 840s registers an offense with a camel case delimiter 840s registers an offense and corrects with a lowercase delimiter 840s does not register an offense with an uppercase delimiter 840s with a non-interpolated heredoc 840s when using non-word delimiters 840s does not register an offense 840s when using double quoted delimiters 840s registers an offense and corrects with a lowercase delimiter 841s does not register an offense with an uppercase delimiter 841s registers an offense and corrects with a camel case delimiter 841s when using back tick delimiters 841s registers an offense and corrects with a camel case delimiter 841s does not register an offense with an uppercase delimiter 841s registers an offense and corrects with a lowercase delimiter 841s when using single quoted delimiters 841s registers an offense and corrects with a lowercase delimiter 841s registers an offense and corrects with a camel case delimiter 841s does not register an offense with an uppercase delimiter 841s with a squiggly heredoc 841s registers an offense and corrects with a lowercase delimiter 841s registers an offense and corrects with a camel case delimiter 841s does not register an offense with an uppercase delimiter 841s when enforced style is lowercase 841s with an interpolated heredoc 841s registers an offense and corrects with an uppercase delimiter 841s does not register an offense with a lowercase delimiter 841s registers an offense and corrects with a camel case delimiter 841s with a non-interpolated heredoc 841s registers an offense and corrects with a camel case delimiter 841s registers an offense and corrects with an uppercase delimiter 841s does not register an offense with a lowercase delimiter 841s with a squiggly heredoc 841s does not register an offense with a lowercase delimiter 841s registers an offense and corrects with an uppercase delimiter 841s registers an offense and corrects with a camel case delimiter 841s 841s RuboCop::Cop::Style::OptionalArguments 841s allows methods without arguments 841s registers an offense when an optional argument is followed by a required argument 841s allows methods with only required arguments 841s allows methods with only optional arguments 841s allows methods with only one optional argument 841s registers an offense for each optional argument when multiple optional arguments are followed by a required argument 841s allows methods with only one required argument 841s allows methods with multiple optional arguments at the end 841s named params 841s required params 841s allows optional arguments before required named arguments 841s allows optional arguments to come before a mix of required and optional named argument 841s registers an offense for optional arguments that come before required arguments where there are name arguments 841s with default values 841s allows optional arguments before an optional named argument 841s 841s RuboCop::Cop::Style::MethodCallWithArgsParentheses 841s when EnforcedStyle is omit_parentheses 841s register an offense in multi-line inheritance 841s register an offense for hashes in keyword values 841s accepts parens in super without args 841s accepts parens in operator method calls 841s accepts parens in super calls with braced blocks 841s accepts parens in args with ternary conditions 841s accepts parens in yield argument method calls 841s accepts parens in calls with hash as arg 841s accepts parens in default argument value calls 841s accepts parens in default keyword argument value calls 841s accepts parens in super method calls as arguments 841s accepts parens in calls with args with logical operators 841s register an offense for parens in do-end blocks 841s accepts no parens in method call with args 841s register an offense for camel-case methods with arguments 841s accepts parens in splat calls 841s accepts parens in method args 841s register an offense for parens in the last chain 841s accepts no parens in method call without args 841s register an offense in assignments 841s accepts special lambda call syntax 841s accepts parens in chained method calls 841s accepts parens in ternary condition calls 841s accepts parens in block passing calls 841s autocorrects multi-line calls with trailing whitespace 841s accepts parens in single-line inheritance 841s accepts parens in args splat 842s accepts parens in chaining with safe operators 842s accepts parens in chaining with operators 842s accepts parens in assignment in conditions 842s accepts parens in slash regexp literal as argument 842s accepts parens in nested method args 842s accepts parens in range literals 842s accepts parens in blocks with braces 842s accepts parens in camel case method without args 842s register an offense for parens in string interpolation 842s register an offense for %r regex literal as arguments 842s register an offense in complex conditionals 842s autocorrects complex multi-line calls 842s accepts parens in literals with unary operators as first argument 842s accepts parens in implicit #to_proc 842s accepts parens in calls with logical operators 842s autocorrects single-line calls 842s register an offense for multi-line method calls 842s register an offense for parens in method call without args 842s register an offense for yield call with parens 842s register an offense for superclass call with parens 842s accepts parens in argument calls with braced blocks 842s behaves like endless methods 842s endless methods 842s without arguments 842s does not register an offense when there are no parens 842s does not register an offense for `defs` when there are arguments 842s registers an offense when there are parens 842s does not register an offense when there are arguments 842s registers an offense for `defs` when there are parens 842s with arguments 842s requires method calls to have parens 842s allowing parens in multi-line calls 842s accepts parens for multi-line calls 842s forwarded arguments in 2.7 842s accepts parens for forwarded arguments 842s allowing parenthesis in chaining 842s register offense for single-line chaining without previous parens 842s accepts parens in the last call if any previous calls with parentheses 842s register offense for multi-line chaining without previous parens 842s accepts no parens in the last call if previous calls with parens 842s forwarded arguments in 3.0 842s accepts parens for forwarded arguments 842s numbered parameters in 2.7 842s accepts parens for braced numeric block calls 842s allowing parens in camel-case methods 843s accepts parens for camel-case method names 843s hash value omission in 3.1 843s registers and corrects an offense when explicit hash value with parentheses and using modifier form 843s registers an offense when last argument is a hash value omission 843s registers an offense when with parentheses call expr follows 843s does not register an offense when without parentheses call expr follows 843s does not register an offense when hash value omission with parentheses and using modifier form 843s registers an offense using assignment with parentheses call expr follows 843s when inspecting macro methods with IncludedMacros 843s behaves like endless methods 843s endless methods 843s with arguments 843s requires method calls to have parens 843s without arguments 843s does not register an offense for `defs` when there are arguments 843s does not register an offense when there are no parens 843s does not register an offense when there are arguments 843s does not register an offense for `defs` when there are parens 843s does not register an offense when there are parens 843s in a module body 843s finds offense 843s in a class body 843s finds offense 843s for a macro not on the included list 843s allows 843s for a macro in both IncludedMacros and AllowedMethods 843s allows 843s when EnforcedStyle is require_parentheses (default) 843s autocorrects fully parenthesized args by removing space 843s autocorrects calls where the argument node is a constant 843s accepts no parens for operators 843s autocorrects calls where the argument node is a number 843s accepts parens in method call with args 843s autocorrects call with multiple args by adding braces 843s accepts no parens in method call without args 843s autocorrects parenthesized args for local methods by removing space 843s accepts no parens for setter methods 843s register an offense for non-receiver method call without parens 843s autocorrects calls where multiple args are method calls 843s register an offense for superclass call without parens 843s register an offense for method call without parens 843s register an offense for yield without parens 843s accepts parens in method call with do-end blocks 843s register no offense for superclass call with parens 843s autocorrects calls where arg is method call 843s accepts no parens for unary operators 843s register no offense for yield without args 843s register no offense for superclass call without args 843s register an offense for methods starting with capital without parens 843s autocorrects partially parenthesized args by adding needed braces 843s autocorrects calls with multiple args by adding needed braces 843s when inspecting macro methods 843s in a module body 843s does not register an offense 843s in a class body 843s does not register an offense 843s with AllowedMethods 843s allow method listed in AllowedMethods 843s when using safe navigation operator 843s register an offense for method call without parens 843s AllowedPatterns 843s ignored methods listed in AllowedPatterns 843s behaves like endless methods 843s endless methods 843s with arguments 843s requires method calls to have parens 843s without arguments 843s does not register an offense when there are parens 843s does not register an offense for `defs` when there are arguments 843s does not register an offense when there are no parens 843s does not register an offense when there are arguments 843s does not register an offense for `defs` when there are parens 843s allowing parens in string interpolation 844s accepts parens for camel-case method names 844s 844s RuboCop::Cop::Style::UnlessLogicalOperators 844s EnforcedStyle is `forbid_mixed_logical_operators` 844s does not register an offense when using only `or`s 844s does not register an offense when using only `||`s 844s does not register an offense when using if 844s registers an offense when using `||` and `and` 844s registers an offense when using `||` and `or` 844s does not register an offense when using only `&&`s 844s registers an offense when using `&&` and `or` 844s registers an offense when using parentheses 844s does not register an offense when not used in unless 844s does not register an offense when using `||` operator and invoked method name includes "or" in the conditional branch 844s does not register an offense when using only `and`s 844s does not register an offense when not using logical operator 844s registers an offense when using `&&` and `and` 844s does not register an offense when using `&&` operator and invoked method name includes "and" in the conditional branch 844s registers an offense when using `&&` and `||` 844s EnforcedStyle is `forbid_logical_operators` 844s registers an offense when using only `||` 844s registers an offense when using only `and` 844s registers an offense when using only `&&` 844s does not register an offense when using if 844s registers an offense when using `&&` followed by || 844s registers an offense when using only `or` 844s does not register an offense when not used in unless 844s does not register an offense when not using logical operator 844s 844s RuboCop::Cop::Style::SwapValues 844s handles comments when correcting 844s does not register an offense when idiomatically swapping variables 844s does not register an offense when assigning receiver object at `def` 844s does not register an offense when almost swapping variables 844s behaves like verbosely swapping 844s registers an offense and corrects when verbosely swapping mixed variables 844s behaves like verbosely swapping 844s registers an offense and corrects when verbosely swapping local variables 844s behaves like verbosely swapping 845s registers an offense and corrects when verbosely swapping constant variables 845s behaves like verbosely swapping 845s registers an offense and corrects when verbosely swapping constant with namespaces variables 845s behaves like verbosely swapping 845s registers an offense and corrects when verbosely swapping global variables 845s behaves like verbosely swapping 845s registers an offense and corrects when verbosely swapping instance variables 845s behaves like verbosely swapping 845s registers an offense and corrects when verbosely swapping class variables 845s 845s RuboCop::Cop::Lint::NoReturnInBeginEndBlocks 845s rejects a return statement inside a block when using /= 845s accepts a block with no return when using += 845s rejects a return statement inside a block when using ||= 845s accepts a block with no return when using *= 845s rejects a return statement inside a block when using += 845s accepts a block with no return when using ||= 845s rejects a return statement inside a block when using -= 845s accepts a block with no return when using = 845s rejects a return statement inside a block when using **= 845s accepts a block with no return when using -= 845s rejects a return statement inside a block when using = 845s accepts a block with no return when using **= 845s rejects a return statement inside a block when using *= 845s accepts a block with no return when using /= 845s 845s RuboCop::Cop::Style::SlicingWithRange 845s >= Ruby 2.7 845s reports no offense for startless 845s <= Ruby 2.5 845s reports no offense for array slicing with -1 845s >= Ruby 2.6 845s reports no offense for other methods 845s reports no offense for excluding end 845s reports an offense for slicing to ..-1 845s reports no offense for array with range inside 845s reports an offense for slicing from expression to ..-1 845s 845s RuboCop::Cop::Lint::RedundantRequireStatement 845s registers an offense when using requiring `enumerator` with modifier form 845s registers an offense when using requiring `enumerator` 845s registers an offense when using requiring `enumerator` in condition 845s target ruby version <= 2.1 845s does not register an offense when using requiring `rational`, `complex` 845s target ruby version >= 2.7 845s registers an offense when using requiring `ruby2_keywords` or already redundant features 845s target ruby version >= 3.1 845s registers an offense and corrects when using requiring `fiber` or already redundant features 845s target ruby version >= 3.2 845s registers an offense and corrects when using requiring `set` 845s target ruby version <= 2.6 845s does not register an offense when using requiring `ruby2_keywords` 845s target ruby version >= 2.5 845s register an offense and corrects when using requiring `pp` or already redundant features 845s target ruby version <= 2.4 845s does not register an offense when using requiring `pp` 845s target ruby version >= 2.1 845s register an offense and corrects when using requiring `thread` or already redundant features 845s target ruby version >= 2.2 845s registers an offense when using requiring `rational`, `complex` 845s target ruby version <= 2.0 846s does not register an offense when using requiring `thread` 846s target ruby version < 3.1 846s does not register an offense and corrects when using requiring `fiber` 846s 846s RuboCop::Cop::Lint::RedundantSplatExpansion 846s accepts expanding a variable as a method parameter 846s allows assigning to a splat 846s allows expanding a method call on an array literal 846s allows assigning a variable to a splat expansion of a variable 846s allows assigning to a splat variable 846s allows splat expansion inside of an array 846s allows assigning to an expanded range 846s allows expansions of an array that is assigned to a variable in rescue 846s registers an offense and corrects an array literal being expanded in a rescue 846s allows an array using a constructor 846s expanding an array literal in a when condition 846s allows an array that is assigned to a variable 846s registers an offense and corrects an array using %w 846s allows an array using a constructor 846s registers an offense and corrects an array using %W 846s registers an offense and corrects %I to a list of symbols 846s registers an offense and corrects an array using [] 846s registers an offense and corrects %i to a list of symbols 846s behaves like splat expansion 846s method parameters 846s registers an offense and converts to an array 846s behaves like splat literal assignment 846s registers an offense and converts to an array 846s behaves like array splat expansion 846s behaves like splat literal assignment 846s registers an offense and removes the splat from array 846s method parameters 846s registers an offense and converts to a list of arguments 846s behaves like splat expansion 846s behaves like splat literal assignment 846s registers an offense and converts to an array 846s method parameters 847s registers an offense and converts to an array 847s expanding Array.new call on array literal 847s when the array literal contains more than one element 847s accepts 847s when the array literal contains exactly one element 847s registers an offense and corrects 847s with ::Array.new 847s when the array literal contains exactly one element 847s registers an offense and corrects 847s splat expansion inside of an array 847s registers an offense and corrects expansion of %W to a list of words 847s registers an offense and corrects the expansion of an array literalinside of an array literal 847s registers an offense and corrects expansion of %w to a list of words 847s behaves like splat expansion 847s method parameters 847s registers an offense and converts to an array 847s behaves like splat literal assignment 847s registers an offense and converts to an array 847s assignment to splat expansion 847s registers and corrects an array using top-level const 847s registers an offense and corrects an array using a constructor 847s expanding Array.new call on method argument 847s registers an offense and corrects 847s when `AllowPercentLiteralArrayArgument: true` 847s does not register an offense when using percent symbol literal array 847s does not register an offense when using percent string literal array 847s behaves like splat expansion 847s method parameters 847s registers an offense and converts to an array 847s behaves like splat literal assignment 847s registers an offense and converts to an array 847s arrays being expanded with %i variants using splat expansion 847s splat expansion inside of an array 847s registers an offense and changes %I to a list of symbols 847s registers an offense and corrects %i to a list of symbols 847s when `AllowPercentLiteralArrayArgument: false` 847s registers an offense when using percent literal array 847s registers an offense when using percent symbol literal array 847s behaves like array splat expansion 847s behaves like splat literal assignment 847s registers an offense and removes the splat from array 847s method parameters 847s registers an offense and converts to a list of arguments 847s behaves like array splat expansion 847s method parameters 847s registers an offense and converts to a list of arguments 847s behaves like splat literal assignment 847s registers an offense and removes the splat from array 847s splat expansion of method parameters 847s registers an offense and corrects an array literal %i 847s registers an offense and corrects an array literal %I 847s behaves like array splat expansion 847s behaves like splat literal assignment 847s registers an offense and removes the splat from array 847s method parameters 847s registers an offense and converts to a list of arguments 847s behaves like array splat expansion 847s method parameters 847s registers an offense and converts to a list of arguments 847s behaves like splat literal assignment 847s registers an offense and removes the splat from array 847s 847s RuboCop::Cop::Style::ArrayCoercion 847s does not register an offense when converting variable into other named array variable with check 847s does not register an offense when splat is not in array 847s registers an offense and corrects when splatting variable into array 847s registers an offense and corrects when converting variable into array with check 847s does not register an offense when splatting multiple variables into array 847s 847s RuboCop::Cop::Lint::DuplicateMethods 847s registers an offense for duplicate alias_method in class 847s registers an offense for duplicate protected methods in class_eval block 847s registers an offense for duplicate class methods in class_eval block 847s does not register for the same method in different scopes within `class << self` 847s registers an offense for duplicate nested method in class_eval block 847s accepts for non-duplicate alias_method in dynamic module 847s registers an offense for duplicate methods at top level 847s registers 2 offenses for pair of duplicate methods in module 847s doesn't register an offense for non-duplicate method in class 847s registers an offense for duplicate alias in module 847s accepts for non-duplicate alias_method in module 847s doesn't register an offense for non-duplicate alias in class_eval block 847s registers an offense for duplicate private methods in class 847s registers offenses for duplicate attr_accessor in dynamic module 847s registers offenses for duplicate assignable attr in class 847s doesn't register an offense for alias for gvar in module 847s doesn't register an offense for non-duplicate method in module 848s recognizes difference between instance and class methods in dynamic module 848s does not register an offense for same method name defined in different self methods 848s does not register an offense for same method name defined in different methods 848s recognizes difference between instance and class methods in dynamic class 848s registers an offense for duplicate attr_writer in dynamic module 848s doesn't register offense for non-duplicate class methods in dynamic module 848s only registers an offense for the second instance of a duplicate instance method in separate files 848s does not register an offense for same method name defined in different self methods 848s registers an offense for duplicate class methods with `self` and named receiver in class 848s registers an offense for a duplicate instance method in separate class blocks 848s registers an offense for duplicate private methods in dynamic module 848s registers an offense for a duplicate class method in separate class blocks 848s doesn't register an offense for different private methods in class_eval block 848s accepts for attr_reader and setter in dynamic class 848s registers an offense for duplicate attr_writer in dynamic class 848s accepts for attr_reader and setter in class 848s doesn't register an offense for different private methods in module 848s registers an offense for duplicate class methods with named receiver in class 848s registers an offense for duplicate alias in dynamic module 848s registers an offense for duplicate method in module 848s registers an offense for duplicate nested method in module 848s understands class << A 848s doesn't register an offense for non-duplicate method in dynamic module 848s properly registers and offense when deeply nested 848s registers an offense for duplicate protected methods in class 848s registers an offense for duplicate method in class_eval block 848s registers an offense for duplicate method in class 848s does not register an offense for same method name defined in different self methods 848s recognizes difference between instance and class methods in class_eval block 848s accepts for non-duplicate alias_method in class_eval block 848s registers an offense for a duplicate instance method in separate dynamic class blocks 848s registers an offense for a duplicate class method in separate dynamic module blocks 848s doesn't register offense for non-duplicate class methods in dynamic class 848s registers an offense for duplicate private self methods in class 848s registers an offense for duplicate private methods in class_eval block 848s registers an offense for duplicate private self methods in dynamic class 848s registers an offense for duplicate class methods in module 848s registers an offense for duplicate nested method in dynamic module 848s registers an offense for duplicate protected methods in module 848s registers an offense for duplicate attr_writer in class_eval block 848s understands class << self 848s doesn't register an offense for alias for gvar in dynamic class 848s registers an offense for duplicate protected methods in dynamic class 848s registers an offense for a duplicate instance method in separate module blocks 848s registers an offense for duplicate class methods with `<<` and named receiver in module 848s only registers an offense for the second instance of a duplicate instance method in separate files 848s doesn't register offense for non-duplicate class methods in module 848s only registers an offense for the second instance of a duplicate instance method in separate files 848s registers an offense for duplicate private self methods in class_eval block 848s only registers an offense for the second instance of a duplicate instance method in separate files 848s registers an offense for a duplicate class method in separate class_eval block blocks 848s registers offenses for duplicate attr_accessor in class 848s recognizes difference between instance and class methods in module 848s registers an offense when class << exp is used 848s accepts for attr_reader and setter in module 848s registers an offense for duplicate class methods with named receiver in module 848s registers an offense for duplicate attr in dynamic class 848s registers an offense for duplicate attr_reader in dynamic class 849s registers an offense for duplicate nested method in self method of dynamic module 849s registers offenses for duplicate assignable attr in dynamic module 849s registers an offense when class << exp is used 849s registers an offense when class << exp is used 849s registers 2 offenses for pair of duplicate methods in class_eval block 849s registers an offense for duplicate attr_reader in module 849s registers offenses for duplicate attr_accessor in module 849s understands nested modules 849s doesn't register an offense for non-duplicate alias in dynamic module 849s registers an offense for duplicate attr in dynamic module 849s registers offenses for duplicate assignable attr in module 849s registers an offense for duplicate private self methods in module 849s accepts for attr_writer and getter in dynamic module 849s registers an offense for duplicate private methods in dynamic class 849s registers an offense for duplicate nested method in self method of class_eval block 849s does not register an offense for same method name defined in different methods 849s understands class << self 849s ignores Class.new blocks which are assigned to local variables 849s registers an offense for duplicate protected methods in dynamic module 849s understands nested modules 849s registers an offense for duplicate attr_reader in class 849s handles class_eval with implicit receiver 849s registers 2 offenses for pair of duplicate methods in dynamic module 849s accepts for attr_writer and getter in class 849s registers offenses for duplicate assignable attr in dynamic class 849s accepts for attr_writer and getter in module 849s doesn't register an offense for alias for gvar in class 849s does not register an offense for same method name defined in different methods 849s does not register an offense for same method name defined in different self methods 849s recognizes difference between instance and class methods in class 849s accepts for attr_reader and setter in dynamic module 849s registers an offense for duplicate nested method in self method of dynamic class 849s ignores method definitions in RSpec `describe` blocks 849s registers 2 offenses for pair of duplicate methods in class 849s understands nested modules 849s doesn't register offense for non-duplicate class methods in class_eval block 849s registers an offense for duplicate class methods with `self` and named receiver in module 849s registers an offense for duplicate attr in class_eval block 849s doesn't register an offense for different private methods in dynamic module 849s registers an offense for duplicate attr_reader in class_eval block 849s registers an offense for duplicate attr_writer in class 849s registers an offense for duplicate alias_method in dynamic module 849s registers an offense for a duplicate instance method in separate class_eval block blocks 849s registers an offense for duplicate private self methods in dynamic module 849s understands nested modules 849s does not register an offense for same method name defined in different self methods 849s registers an offense for duplicate attr in class 849s doesn't register an offense for different private methods in class 849s registers offenses for duplicate assignable attr in class_eval block 849s registers an offense for duplicate alias_method in module 849s registers an offense for duplicate alias in dynamic class 849s registers an offense for duplicate class methods with `<<` and named receiver in class 849s registers an offense when class << exp is used 849s registers an offense for duplicate class methods in class 849s registers an offense for duplicate private methods in module 849s registers an offense for duplicate nested method in class 849s registers an offense for duplicate nested method in self method of class 849s accepts for attr_reader and setter in class_eval block 849s accepts for attr_writer and getter in class_eval block 849s does not register an offense for same method name defined in different methods 849s registers an offense for duplicate attr_reader in dynamic module 849s registers an offense for duplicate attr in module 850s registers an offense for duplicate class methods in dynamic module 850s doesn't register an offense for non-duplicate method in class_eval block 850s registers an offense for duplicate alias in class 850s accepts for attr_writer and getter in dynamic class 850s doesn't register an offense for alias for gvar in dynamic module 850s doesn't register an offense for non-duplicate alias in dynamic class 850s understands class << self 850s registers an offense for duplicate nested method in self method of module 850s accepts for non-duplicate alias_method in class 850s doesn't register an offense for different private methods in dynamic class 850s doesn't register offense for non-duplicate class methods in class 850s understands class << self 850s accepts for non-duplicate alias_method in dynamic class 850s registers an offense for duplicate alias in class_eval block 850s doesn't register an offense for non-duplicate alias in class 850s registers an offense for duplicate alias_method in dynamic class 850s doesn't register an offense for non-duplicate alias in module 850s only registers an offense for the second instance of a duplicate instance method in separate files 850s registers offenses for duplicate attr_accessor in class_eval block 850s registers an offense for duplicate method in dynamic class 850s registers an offense for duplicate attr_writer in module 850s does not register an offense for same method name defined in different methods 850s understands nested modules 850s registers an offense for duplicate nested method in dynamic class 850s registers an offense when class << exp is used 850s registers an offense for duplicate class methods in dynamic class 850s registers an offense for a duplicate class method in separate dynamic class blocks 850s understands class << self 850s registers an offense for duplicate method in dynamic module 850s doesn't register an offense for non-duplicate method in dynamic class 850s registers an offense for duplicate alias_method in class_eval block 850s registers offenses for duplicate attr_accessor in dynamic class 850s doesn't register an offense for alias for gvar in class_eval block 850s registers an offense for a duplicate instance method in separate dynamic module blocks 850s registers 2 offenses for pair of duplicate methods in dynamic class 850s registers an offense for a duplicate class method in separate module blocks 850s when path is in the project root 850s adds a message with relative path 850s when path is not in the project root 850s adds a message with absolute path 850s 850s RuboCop::Cop::Lint::Debugger 850s does not register an offense for a save_and_open_page in comments 850s does not register an offense for a irb method 850s does not register an offense for a remote_byebug in comments 850s does not register an offense for a remote_pry method 850s does not register an offense for a pry method 850s does not register an offense for a pry_remote method 850s does not register an offense for a save_and_open_page method 850s does not register an offense for a save_and_open_screenshot method 850s does not register an offense for a binding method that is not disallowed 850s does not register an offense for a byebug method 850s does not register an offense for a pry in comments 850s does not register an offense for a debugger method 850s does not register an offense for a remote_pry in comments 850s does not register an offense for a byebug in comments 850s does not register an offense for a console in comments 850s does not register an offense for a irb in comments 851s does not register an offense for a remote_byebug method 851s does not register an offense for a console method 851s does not register an offense for a debugger in comments 851s does not register an offense for a pry_remote in comments 851s does not register an offense for a save_and_open_screenshot in comments 851s capybara 851s registers an offense for save_and_open_screenshot 851s registers an offense for save_and_open_page 851s with an argument 851s registers an offense for save_and_open_page 851s registers an offense for save_and_open_screenshot 851s when a method group is disabled with false 851s does not register an offense for a Pry debugger call 851s does register an offense for another group 851s debug.rb 851s registers an offense for a `break` binding call 851s registers an offense for a `binding.break` with `Kernel` call 851s registers an offense for a `b` binding call 851s registers an offense for a `binding.b` with `Kernel` call 851s web console 851s does not register an offense for `console` without a receiver 851s registers an offense for a `binding.console` call 851s with the DebuggerMethods configuration 851s registers an offense for a `custom_debugger` call 851s does not register an offense for a byebug call 851s with a method chain 851s registers an offense for a `debugger.foo.bar` call 851s with a const chain 851s registers an offense for a `Foo::Bar::Baz.debug` call 851s nested custom configurations 851s registers an offense for a `custom_debugger call 851s with a const chain and a method chain 851s registers an offense for a `Foo::Bar::Baz.debug.this.code` call 851s rails 851s registers an offense for a debugger with Kernel call 851s registers an offense for a debugger call 851s registers an offense for a debugger with an argument call 851s registers an offense for a debugger with ::Kernel call 851s when a method group is disabled with nil 851s does not register an offense for a Pry debugger call 851s does register an offense for another group 851s pry 851s does not register an offense for a `rescue` call without Pry 851s registers an offense for a remote_pry binding with an argument call 851s registers an offense for a remote_pry binding call 851s registers an offense for a pry binding call 851s does not register an offense for a `pry` call without binding 851s registers an offense for a binding.pry with Kernel call 851s registers an offense for a Pry.rescue call 851s registers an offense for a pry_remote binding with an argument call 851s registers an offense for a pry binding with an argument call 851s registers an offense for a pry_remote binding call 851s byebug 851s registers an offense for a Kernel.remote_byebug call 851s registers an offense for a Kernel.byebug call 851s registers an offense for a remote_byebug call 851s registers an offense for a byebug call 851s registers an offense for a byebug with an argument call 851s built-in methods 851s registers an offense for a binding.irb with Kernel call 851s registers an offense for a irb binding call 851s RubyJard 851s registers an offense for a jard call 851s 851s RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective 852s registers an offense for disabled cop within source code 852s registers an offense for disabling all cops 852s registers an offense for enabled cop within source code 852s with AllowedCops 852s when using leading source comment 852s does not register an offense 852s when an mix of cops are disabled 852s registers an offense and corrects 852s when an non-allowed cop is disabled 852s registers an offense and corrects 852s when an allowed cop is disabled 852s does not register an offense 852s 852s RuboCop::Cop::VariableForce::VariableTable 852s #pop_scope 852s returns popped scope object 852s #find_variable with an empty scope stack 852s returns nil 852s #declare_variable 852s returns the added variable 852s adds variable to current scope with its name as key 852s #push_scope 852s returns pushed scope object 852s #accessible_variables 852s when the direct outer scope has some variables 852s and the current scope is not block 852s returns only the current scope variables 852s and the current scope is block 852s returns the current and direct outer scope variables 852s when there are no variables 852s returns empty array 852s when the current scope has some variables 852s returns all the variables 852s #current_scope_level 852s decreases by popping scope 852s increases by pushing scope 852s #find_variable 852s when current scope is not block 852s when a variable with the target name exists in current scope 852s and does not exist in outer scope 852s returns the current scope variable 852s and also exists in outer scope 852s returns the current scope variable 852s when a variable with the target name does not exist in current scope 852s and does not exist in all outer scopes 852s returns nil 852s but exists in the direct outer scope 852s returns nil 852s when current scope is block 852s when a variable with the target name exists in current scope 852s and does not exist in outer scope 852s returns the current scope variable 852s and also exists in outer scope 852s returns the current scope variable 852s when a variable with the target name does not exist in current scope 852s and does not exist in all outer scopes 852s returns nil 852s but exists in a indirect outer scope 852s when the direct outer scope is block 852s returns the indirect outer scope variable 852s when the direct outer scope is not block 852s returns nil 852s but exists in the direct outer scope 852s returns the direct outer scope variable 852s 852s RuboCop::Cop::Style::NestedParenthesizedCalls 852s on a call with no arguments, nested in a parenthesized one 852s doesn't register an offense 852s on a deeply nested argument 852s doesn't register an offense 852s on an aref, nested in a parenthesized method call 852s doesn't register an offense 852s on a non-parenthesized method call 852s doesn't register an offense 852s on a permitted method 852s doesn't register an offense 852s on a call to a setter method 852s doesn't register an offense 852s on a nested, parenthesized method call 852s doesn't register an offense 852s on a non-parenthesized call nested in a parenthesized one 852s with a single argument to the nested call 852s registers an offense 852s when using safe navigation operator 852s registers an offense 852s with multiple arguments to the nested call 852s registers an offense 852s on a method call with no arguments 852s doesn't register an offense 852s backslash newline in method call 852s registers an offense 852s 852s RuboCop::Cop::Layout::SingleLineBlockChain 852s does not register an offense for method call chained without a dot 852s registers an offense for no selector method call chained on the same line as a block 852s does not register an offense for method call chained on a new line after a single line block with trailing dot 852s registers an offense for method call chained on the same line as a block 852s does not register an offense for method call chained on a new line after a single line block 852s does not register an offense for method call chained on the same line as a multiline block 852s 852s RuboCop::Cop::Style::ParallelAssignment 852s registers an offense with attributes when assignments must be reordered to preserve meaning 852s corrects when assignments must be reordered to avoid changing meaning 852s corrects when the right variable is a symbol array 852s corrects when the expression uses a modifier if statement inside a method 852s registers an offense when right hand side has namespaced constants 852s registers an offense with indices and attributes when assignments must be reordered to preserve meaning 852s registers an offense when the right side has mixed expressions 852s corrects parallel assignment in if statements 852s corrects parallel assignment in unless statements 852s corrects when the expression uses a modifier unless statement 852s corrects when the expression uses a modifier rescue statement as the only thing inside of a method 852s registers an offense when the right side has mulitiple arrays 852s corrects when the right variable is a word array 852s registers an offense when the right side has constants 852s corrects when assigning from multiple methods with blocks 852s corrects parallel assignment in while statements 852s corrects when the expression uses a modifier rescue statement inside of a method 852s registers an offense when left hand side ends with an implicit variable 852s corrects when assigning to method returns 852s corrects when using parallel assignment in singleton method 852s registers an offense when right hand side has maps with blocks 852s corrects when using single indentation 852s registers an offense with indices of different variables 852s registers an offense when the right side has multiple hashes 852s corrects when the expression uses a modifier if statement 852s registers an offense when assigning to same variables in same order 852s corrects when using constants 852s corrects when the number of left hand variables matches the number of right hand variables 852s corrects when the expression is missing spaces 852s registers an offense when assignments must be reordered to preserve meaning 852s allows expanding an assigned var 852s allows more right variables than left variables 852s registers an offense with indices 853s corrects when the expression uses a modifier while statement 853s corrects when the expression uses a modifier rescue statement 853s corrects parallel assignment inside rescue statements within method definitions 853s corrects when using nested indentation 853s registers an offense when assigning to namespaced constants 853s corrects when the right variable is an array 853s corrects parallel assignment in rescue statements within begin ... rescue 853s corrects when the expression uses a modifier until statement 853s corrects parallel assignment in until statements 853s registers an offense when the right side has methods with/without blocks 853s allows more left variables than right variables 853s behaves like allowed 853s allows assignment of: a = a 853s behaves like allowed 853s allows assignment of: a, b = *foo 853s behaves like allowed 853s allows assignment of: *a, b = [1, 2, 3] 853s behaves like allowed 853s allows assignment of: a, = a 853s behaves like allowed 853s allows assignment of: a = *'foo' 853s behaves like allowed 853s allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] 853s behaves like allowed 853s allows assignment of: a = 1; b = 2; 853s behaves like allowed 853s allows assignment of: begin_token, end_token = CONSTANT 853s behaves like allowed 853s allows assignment of: a, b = foo() 853s behaves like allowed 853s allows assignment of: a, b, c = b, c, a 853s behaves like allowed 853s allows assignment of: a, b = (a + b), (a - b) 853s behaves like allowed 853s allows assignment of: foo = [1, 2, 3]; a, b, c = foo; 853s behaves like allowed 853s allows assignment of: a = 1 853s behaves like allowed 853s allows assignment of: a, = 1, 2, 3 853s behaves like allowed 853s allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 853s behaves like allowed 853s allows assignment of: a, = *'foo' 853s behaves like allowed 853s allows assignment of: a[0], a[1] = a[1], a[0] 853s behaves like allowed 853s allows assignment of: self.a, self.b = b, a 853s behaves like allowed 853s allows assignment of: self.a, self.b = self.b, self.a 853s behaves like allowed 853s allows assignment of: CONSTANT, = 1, 2 853s behaves like allowed 853s allows assignment of: array = [1, 2, 3]; a, = array; 853s behaves like allowed 853s allows assignment of: a, *b = [1, 2, 3] 853s behaves like allowed 853s allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 853s behaves like allowed 853s allows assignment of: a, b, c = 1, 2, *node 853s behaves like allowed 853s allows assignment of: a, b = b, a 853s behaves like allowed 853s allows assignment of: a, b, c = *node, 1, 2 853s behaves like allowed 853s allows assignment of: a, b = Float::INFINITY 853s using custom indentation width 853s works with nesting 853s works with rescue 853s works with guard clauses 853s works with standard correction 853s behaves like allowed 853s allows assignment of: a, b = foo.map { |e| e.id } 853s behaves like allowed 853s allows assignment of: a, = *foo 853s behaves like allowed 853s allows assignment of: a, = 1 853s 853s RuboCop::Cop::Style::WhenThen 853s registers an offense for when b, c; 853s accepts ; separating statements in the body of when 853s registers an offense for when b; 853s when inspecting a case statement with an empty branch 853s does not register an offense 853s 853s RuboCop::Cop::Lint::MultipleComparison 853s registers an offense for x < y < z 853s accepts to use one compare operator 853s registers an offense for x <= y <= z 853s accepts to use `^` operator 853s registers an offense for x >= y > z 853s accepts to use `|` operator 853s registers an offense for x > y >= z 853s accepts to use `&` operator 853s registers an offense for x <= y < z 853s registers an offense for x > y < z 853s registers an offense for x >= y < z 853s registers an offense for x > y <= z 853s registers an offense for x > y > z 853s registers an offense for x < y >= z 853s registers an offense for x <= y >= z 853s registers an offense for x <= y > z 853s registers an offense for x < y > z 853s registers an offense for x >= y <= z 853s registers an offense for x < y <= z 853s registers an offense for x >= y >= z 853s 853s RuboCop::Cop::Lint::BooleanSymbol 853s registers an offense when using `:true` 853s registers an offense when using `:false` 853s does not register an offense when using regular symbol 853s does not register an offense when using `true` 853s does not register an offense when using `false` 853s does not register an offense when used inside percent-literal symbol array 853s when using the new hash syntax 854s registers an offense when using `true:` 854s registers an offense when using `false:` 854s registers an offense when using `key: :false` 854s 854s RuboCop::Cop::Style::ClassAndModuleChildren 854s compact style 854s accepts compact style for classes/modules 854s registers an offense for modules with partially nested children 854s registers an offense for classes with partially nested children 854s correctly indents heavily nested children 854s preserves comments between classes 854s accepts nesting for classes/modules with more than one child 854s registers a offense for classes with nested one-liner children 854s registers a offense for classes with nested children 854s accepts nesting for classes with an explicit superclass 854s registers a offense for modules with nested children 854s accepts class/module with single method 854s registers and offense for deeply nested children 854s nested style 854s accepts :: in parent class on inheritance 854s registers an offense for not nested classes with explicit superclass 854s accepts nested children 854s registers an offense for not nested classes when namespace is defined as a class 854s registers an offense for partially nested classes 854s accepts cbase class name 854s registers an offense for partially nested modules 854s accepts cbase module name 854s registers an offense for not nested modules 854s registers an offense for not nested classes when namespace is defined as a module 854s preserves comments 854s registers an offense for not nested classes 854s 854s RuboCop::Cop::Layout::MultilineMethodCallIndentation 854s when EnforcedStyle is indented 854s accepts indentation of assignment to obj.a[:key] with newline after = 854s accepts even indentation of consecutive lines in typical RSpec code 854s accepts alignment inside a grouped expression 854s accepts any indentation of parameters to #[] 854s registers an offense for a 2 space indentation of while condition 854s accepts double indentation of until condition 854s accepts indented methods in if body 854s registers an offense and corrects correct + unrecognized style 854s registers an offense for a 2 space indentation of if condition 854s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 854s doesn't fail on unary operators 854s accepts indented methods in unless body 854s accepts special indentation of for expression 854s registers an offense and corrects aligned operators in assignment 854s accepts normal indentation of method parameters 854s accepts double indentation of unless condition 854s accepts indented methods in for body 854s accepts indented methods in while body 854s accepts indented methods in LHS of []= assignment 854s accepts correctly indented methods in operation 854s registers an offense for a 2 space indentation of unless condition 854s registers an offense and corrects one space indentation of 2nd line 854s accepts indented methods in if condition 854s registers an offense and corrects aligned methods in if condition 854s accepts indentation of assignment to a[:key] with rhs on same line 854s registers an offense and corrects no indentation of second line 855s accepts indentation of assignment to a with rhs on same line 855s accepts indented methods in ordinary statement 855s accepts indentation of assignment to a[:key] with newline after = 855s accepts normal indentation inside grouped expression 855s registers an offense for a 2 space indentation of until condition 855s accepts an expression where the first method spans multiple lines 855s accepts double indentation of if condition 855s accepts indentation of assignment to a with newline after = 855s accepts special indentation of return unless condition 855s accepts alignment of method with assignment and operator-like method 855s registers an offense and corrects wrong indentation of for expression 855s accepts double indentation of while condition 855s accepts indentation relative to first receiver 855s registers an offense and corrects 3 spaces indentation of 2nd line 855s registers an offense and corrects extra indentation of third line 855s accepts indented methods inside and outside a block 855s accepts indentation of assignment to obj.a with newline after = 855s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 855s accepts any indentation of method parameters 855s registers an offense and corrects 1 space indentation of 3rd line 855s accepts indented methods in until body 855s registers an offense and corrects proc call without a selector 855s accepts special indentation of return if condition 855s registers an offense and corrects 0 space indentation inside square brackets 855s accepts no extra indentation of third line 855s doesn't crash on unaligned multiline lambdas 855s for possible semantic alignment 855s accepts indented methods 855s when indentation width is overridden for this cop 855s accepts indented methods in until body 855s accepts indentation of while condition which is offset by a single normal indentation step 855s registers an offense for a 4 space indentation of if condition 855s accepts indented methods in unless body 855s accepts indentation of assignment 855s accepts correctly indented methods in operation 855s registers an offense for a 4 space indentation of until condition 855s accepts indentation of if condition which is offset by a single normal indentation step 855s accepts indented methods in if condition 855s accepts indented methods 855s registers an offense for a 4 space indentation of unless condition 855s accepts indentation of until condition which is offset by a single normal indentation step 855s accepts indentation of unless condition which is offset by a single normal indentation step 855s registers an offense for a 4 space indentation of while condition 855s accepts indented methods in if body 855s accepts indented methods in while body 855s when EnforcedStyle is aligned 855s accepts even indentation of consecutive lines in typical RSpec code 855s registers an offense and corrects misaligned methods in local variable assignment 855s accepts aligned methods in if + assignment 855s registers an offense and corrects misaligned methods in if condition 855s registers an offense and corrects one space indentation of 3rd line 855s registers an offense and corrects misaligned methods in unless condition 856s accepts indented method when there is nothing to align with 856s accepts aligned method in assignment + block + assignment 856s accepts indented and aligned methods in binary operation 856s accepts aligned methods in if condition 856s does not check binary operations when string wrapped with backslash 856s accepts indented methods in LHS of []= assignment 856s accepts alignment of method with assignment and operator-like method 856s accepts no extra indentation of third line 856s registers an offense and corrects misaligned methods in until condition 856s registers an offense and corrects 3 spaces indentation of 2nd line 856s accepts aligned methods in a begin..end block 856s registers an offense and corrects no indentation of second line 856s registers an offense and corrects one space indentation of 2nd line 856s accepts any indentation of parameters to #[] 856s accepts correctly aligned methods in assignment 856s accepts indented methods in for body 856s accepts aligned methods in constant assignment 856s registers an offense and corrects misaligned methods in while condition 856s accepts aligned methods in operator assignment 856s accepts aligned methods in assignment 856s accepts indented methods inside and outside a block 856s accepts indented methods in ordinary statement 856s accepts indentation relative to first receiver 856s does not check binary operations when string wrapped with + 856s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 856s registers an offense and corrects proc call without a selector 856s registers an offense and corrects unaligned methods in assignment 856s registers an offense and corrects misaligned method in []= call 856s accepts aligned method in return 856s accepts correctly aligned methods in operands 856s accepts an expression where the first method spans multiple lines 856s registers an offense and corrects extra indentation of third line 856s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 856s accepts alignment inside a grouped expression 856s doesn't fail on unary operators 856s doesn't crash on unaligned multiline lambdas 856s for semantic alignment 856s accepts methods being aligned with method that is an argument 856s accepts 3 aligned methods 856s registers an offense and corrects unaligned methods 857s accepts methods being aligned with method that is an argument in assignment 857s accepts method being aligned with method in assignment 857s accepts aligned method with blocks in operation assignment 857s accepts aligned method even when an aref is in the chain 857s doesn't fail on a chain of aref calls 857s registers an offense and corrects unaligned method in block body 857s accepts nested method calls 857s accepts aligned method even when an aref is first in the chain 857s accepts key access to hash 857s accepts method being aligned with method 857s >= Ruby 2.7 857s accepts methods being aligned with method that is an argumentwhen using numbered parameter 857s when EnforcedStyle is indented_relative_to_receiver 857s registers an offense and corrects 3 spaces indentation of second line 857s accepts indented methods in LHS of []= assignment 857s accepts indentation of consecutive lines in typical RSpec code 857s accepts an expression where the first method spans multiple lines 857s does not register an offense when multiline method chain has expected indent width and the method is preceded by double splat 857s registers an offense and corrects one space indentation of 2nd line 857s accepts alignment of method with assignment and operator-like method 857s registers an offense and corrects extra indentation of 3rd line in typical RSpec code 857s accepts indented methods inside and outside a block 857s doesn't crash on unaligned multiline lambdas 857s doesn't fail on unary operators 857s registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array 857s does not register an offense when multiline method chain has expected indent width and the method is preceded by splat 857s registers an offense and corrects extra indentation of 3rd line 857s accepts indented methods in ordinary statement 857s registers an offense and corrects proc call without a selector 857s accepts no extra indentation of third line 857s accepts any indentation of parameters to #[] 857s accepts alignment inside a grouped expression 857s accepts indented methods in for body 857s accepts indentation relative to first receiver 857s accepts correctly indented methods in operation 857s registers an offense and corrects no indentation of second line 857s for possible semantic alignment 857s accepts indented methods 857s 857s RuboCop::Cop::Lint::RescueException 857s does not register an offense for rescue with other class 857s registers an offense for rescue from Exception 857s does not register an offense for rescue with a module prefix 857s registers an offense for rescue with ::Exception 857s does not crash when the splat operator is used in a rescue 857s registers an offense for rescue with StandardError, Exception 858s does not register an offense for rescue with no class and => e 858s does not register an offense for rescue with other classes 858s does not register an offense for rescue with no class 858s does not crash when the namespace of a rescued class is in a local variable 858s registers an offense for rescue with Exception => e 858s 858s RuboCop::Cop::Style::UnlessElse 858s unless with nested if-else 858s registers an offense 858s unless without else 858s does not register an offense 858s unless with else 858s registers an offense 858s and nested unless with else 858s registers offenses for both but corrects only the outer unless/else 858s 858s RuboCop::Cop::Lint::ShadowingOuterLocalVariable 858s when a block local variable has same name as an outer scope variablewith same branches of same `unless` condition node 858s registers an offense 858s when a block argument has a same name starts with "_" as an outer scope variable 858s does not register an offense 858s 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 858s registers an offense 858s when a block argument has same name "_" as outer scope variable "_" 858s does not register an offense 858s when a block local variable has same name as an outer scope variablewith same branches of same `if` condition node 858s registers an offense 858s when a block local variable has same name as an outer scope variablewith different branches of same `unless` condition node 858s does not register an offense 858s when multiple block arguments have same name "_" 858s does not register an offense 858s when a block local variable has same name as an outer scope variablewith same branches of same nested `if` condition node 858s registers an offense 858s when an outer scope variable is referenced in a block 858s does not register an offense 858s when the same variable name as a block variable is used in return value assignment of `if` 858s does not register an offense 858s when a block local variable has same name as an outer scope variablewith different branches of same `if` condition node 858s does not register an offense 858s when an outer scope variable is reassigned in a block 858s does not register an offense 858s when a block local variable has same name as an outer scope variable 858s registers an offense 858s when a block argument has same name as an outer scope variable 858s registers an offense 858s when a splat block argument has same name as an outer scope variable 858s registers an offense 858s when a block local variable has same name as an outer scope variablewith different branches of same `case` condition node 858s does not register an offense 858s when a block local variable has same name as an outer scope variablewith same branches of same `case` condition node 858s registers an offense 858s when a block block argument has same name as an outer scope variable 858s registers an offense 858s when multiple block arguments have a same name starts with "_" 858s does not register an offense 858s when a method argument has same name as an outer scope variable 858s does not register an offense 858s with Ractor.new 858s does not register an offense 858s when a block argument has different name with outer scope variables 858s does not register an offense 858s 858s RuboCop::Cop::Style::CaseLikeIf 858s registers an offense and corrects when using `include?` with range 859s registers an offense and corrects when using `match?` with regexp 859s does not register an offense when using `match?` with non regexp 859s does not register an offense when an object overrides `equal?` with no arity 859s does not register an offense when using `unless` 859s does not register an offense when not all conditions contain target 859s registers an offense and corrects when using `match?` with non regexp in other branches except first 859s does not register an offense when using modifier `if` 859s does not register an offense when using `=~` in first branch with non regexp 859s does not register an offense when using `match?` in first branch with non regexp 859s does not register an offense when using `include?` without a receiver 859s registers an offense and corrects when using `is_a?` 859s does not register an offense when using ternary operator 859s registers an offense and corrects when using `==` with constant 859s does not register an offense when using `match?` without a receiver 859s does not register an offense when one of the branches contains `==` with class reference 859s does not register an offense when one of `||` subconditions is not convertible 859s registers an offense and corrects when using `||` within conditions 859s registers an offense and corrects when using nested conditions with `||` 859s does not register an offense when using `cover?` without a receiver 859s registers an offense and corrects when using `===` 859s does not register an offense when using `==` with method call with arguments 859s does not register an offense when using `==` with constant containing 1 letter in name 859s registers an offense and corrects when using `=~` 859s does not register an offense when only `if-else` 859s does not register an offense when only single `if` 859s registers an offense and corrects when target is a method call 859s registers an offense and corrects when using `==` with literal 859s does not register an offense when using `equal?` without a receiver 859s does not register an offense when using `==` with class reference 859s when using regexp with named captures 859s registers and corrects an offense with =~ and regexp on rhs 859s registers and corrects an offense with match? and regexp on lhs 859s does not register an offense with match and regexp on rhs 859s registers and corrects an offense with match? and regexp on rhs 859s does not register an offense with =~ and regexp on lhs 859s does not register an offense with match and regexp on lhs 859s 859s RuboCop::Cop::Style::RedundantStringEscape 859s does not register an offense for a regexp literal 859s does not register an offense for a x-str literal 859s does not register an offense for a __dir__ literal 859s does not register an offense for a __FILE__ literal 859s with a %Q(...) literal 859s behaves like a literal with interpolation 859s does not register an offense for a @-escaped ivar interpolation 859s registers an offense and corrects an escaped # without following { 859s does not register an offense for a bracket-escaped interpolation 859s does not register a bracket-escaped lvar interpolation 859s does not register an offense for a technically-unnecessary escape 859s registers an offense and corrects an escaped single quote 859s does not register an offense for an escaped delimiter before interpolation 859s does not register an offense for an escaped backslash 859s does not register an offense for multiple unicode escapes 859s does not register an offense for an escaped cvar interpolation 859s does not register an offense for an escaped # followed { 859s does not register an offense for a unicode escape 859s does not register an offense for an escaped gvar interpolation 859s registers an offense and corrects a escaped nested delimiter in a double quoted string 859s registers an offense and corrects an escaped double quote 859s registers an offense and corrects an escaped # before interpolation 859s does not register an offense for meta control characters 859s does not register an offense for an escaped interpolation 860s does not register an offense for control characters 860s does not register an offense for a @-escaped cvar interpolation 860s does not register an offense for a newline 860s does not register an offense for an escaped newline 860s does not register an offense for an escaped delimiter 860s does not register an offense for a $-escaped gvar interpolation 860s does not register an offense for an escaped ivar interpolation 860s registers an offense and corrects an escaped # at end-of-string 860s does not register an offense for a meta character 860s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 860s does not register an offense without escapes 860s does not register an offense for a hex escape 860s does not register an offense for an ascii DEL 860s does not register an offense for an octal escape 860s with a double quoted string 860s registers an offense and corrects an unnecessary escape in multi-line broken string 860s does not register an offense with escaped double quote 860s does not register an offense when escaping a quote in multi-line broken string 860s does not register an offense with multiple escaped backslashes 860s behaves like a literal with interpolation 860s does not register an offense for an escaped interpolation 860s does not register an offense for a @-escaped cvar interpolation 860s registers an offense and corrects an escaped # without following { 860s does not register an offense for an ascii DEL 860s does not register an offense for a hex escape 860s registers an offense and corrects an escaped # at end-of-string 860s registers an offense and corrects an escaped single quote 860s does not register a bracket-escaped lvar interpolation 860s does not register an offense for a bracket-escaped interpolation 860s does not register an offense for an escaped # followed { 860s does not register an offense without escapes 860s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 860s does not register an offense for an escaped backslash 860s does not register an offense for an escaped delimiter 860s does not register an offense for an escaped newline 860s does not register an offense for a unicode escape 860s does not register an offense for multiple unicode escapes 860s does not register an offense for meta control characters 860s does not register an offense for a $-escaped gvar interpolation 860s does not register an offense for a meta character 860s does not register an offense for an escaped delimiter before interpolation 860s does not register an offense for a newline 860s does not register an offense for a @-escaped ivar interpolation 860s does not register an offense for a technically-unnecessary escape 860s registers an offense and corrects an escaped # before interpolation 860s does not register an offense for control characters 860s does not register an offense for an octal escape 860s does not register an offense for an escaped cvar interpolation 860s does not register an offense for an escaped ivar interpolation 860s does not register an offense for an escaped gvar interpolation 860s with a %w(...) literal 860s does not register an offense for escaped spaces 860s behaves like a literal without interpolation 860s does not register an offense with escaped # without following { 860s does not register an offense with escaped double quote 860s does not register an offense for an escaped newline 860s does not register a bracket-escaped lvar interpolation 860s does not register an offense with escaped # at end-of-string 860s does not register an offense for a @-escaped cvar interpolation 860s does not register an offense for a bracket-escaped interpolation 860s does not register an offense for multiple unicode escapes 860s does not register an offense for an allowed escape inside multi-line literal 860s does not register an offense for an escaped # with following { 860s does not register an offense for an escaped gvar interpolation 860s does not register an offense for an escaped delimiter 860s does not register an offense for a newline 860s does not register an offense for meta control characters 860s does not register an offense for an escaped # followed { 860s does not register an offense for a technically-unnecessary escape 860s does not register an offense for a hex escape 860s does not register an offense for an ascii DEL 860s does not register an offense for an escaped interpolation 860s does not register an offense for an escaped ivar interpolation 860s does not register an offense with escaped single quote 860s does not register an offense for a $-escaped gvar interpolation 860s does not register an offense for a unicode escape 860s does not register an offense for an escaped cvar interpolation 860s does not register an offense for a meta character 860s does not register an offense for an escaped delimiter before interpolation 860s does not register an offense for control characters 860s does not register an offense without escapes 860s does not register an offense for a @-escaped ivar interpolation 860s does not register an offense for an octal escape 860s does not register an offense for an escaped backslash 860s with a %(...) literal 860s behaves like a literal with interpolation 860s does not register an offense for control characters 860s does not register an offense for a bracket-escaped interpolation 860s registers an offense and corrects an escaped # at end-of-string 861s registers an offense and corrects an escaped # without following { 861s registers an offense and corrects an escaped single quote 861s does not register an offense for a @-escaped ivar interpolation 861s does not register an offense for an escaped ivar interpolation 861s does not register an offense for an escaped gvar interpolation 861s registers an offense and corrects a escaped nested delimiter in a double quoted string 861s does not register an offense for a $-escaped gvar interpolation 861s does not register an offense for a technically-unnecessary escape 861s does not register an offense for a meta character 861s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 861s does not register an offense for an octal escape 861s does not register an offense for an escaped backslash 861s does not register a bracket-escaped lvar interpolation 861s does not register an offense for multiple unicode escapes 861s does not register an offense for an escaped delimiter 861s registers an offense and corrects an escaped double quote 861s does not register an offense for a @-escaped cvar interpolation 861s does not register an offense for an escaped # followed { 861s does not register an offense without escapes 861s does not register an offense for a unicode escape 861s does not register an offense for an escaped cvar interpolation 861s registers an offense and corrects an escaped # before interpolation 861s does not register an offense for meta control characters 861s does not register an offense for a newline 861s does not register an offense for an escaped delimiter before interpolation 861s does not register an offense for an escaped interpolation 861s does not register an offense for an ascii DEL 861s does not register an offense for an escaped newline 861s does not register an offense for a hex escape 861s with a %W(...) literal 861s does not register an offense for escaped spaces 861s behaves like a literal with interpolation 861s does not register an offense for a meta character 861s does not register an offense for meta control characters 861s does not register an offense for a @-escaped ivar interpolation 861s does not register an offense for an octal escape 861s registers an offense and corrects an escaped single quote 861s does not register an offense for an escaped backslash 861s does not register an offense for an escaped gvar interpolation 861s registers an offense and corrects an escaped # before interpolation 861s does not register an offense for an ascii DEL 861s does not register a bracket-escaped lvar interpolation 861s registers an offense and corrects an escaped double quote 861s does not register an offense for an escaped interpolation 861s registers an offense and corrects a escaped nested delimiter in a double quoted string 861s does not register an offense for multiple unicode escapes 861s does not register an offense for a unicode escape 861s does not register an offense for an escaped delimiter before interpolation 861s does not register an offense for control characters 861s registers an offense and corrects an escaped # without following { 861s does not register an offense for a @-escaped cvar interpolation 861s does not register an offense for an escaped newline 862s does not register an offense for an escaped # followed { 862s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 862s does not register an offense for a hex escape 862s does not register an offense for an escaped ivar interpolation 862s does not register an offense for an escaped delimiter 862s does not register an offense for an escaped cvar interpolation 862s does not register an offense for a bracket-escaped interpolation 862s does not register an offense for a newline 862s does not register an offense without escapes 862s does not register an offense for a $-escaped gvar interpolation 862s registers an offense and corrects an escaped # at end-of-string 862s does not register an offense for a technically-unnecessary escape 862s with an interpolation-enabled HEREDOC 862s does not register an offense for a newline 862s does not register an offense for multiple unicode escapes 862s does not register an offense for a nested heredoc without interpolation 862s does not register an offense for a heredoc interpolating a string with an allowed escape 862s does not register an offense for an escaped ivar interpolation 862s does not register an offense for a @-escaped ivar interpolation 862s registers an offense and corrects an escaped single quote 862s does not register an offense for a bracket-escaped interpolation 862s does not register an offense for an escaped interpolation 862s does not register an offense for a $-escaped gvar interpolation 862s does not register an offense without escapes 862s does not register an offense for an octal escape 862s does not register an offense for meta control characters 862s does not register an offense for a unicode escape 862s does not register an offense for an escaped newline 862s does not register an offense for an escaped gvar interpolation 862s does not register an offense for a technically-unnecessary escape 862s does not register an offense for a hex escape 862s registers an offense and corrects an escaped # without following { 862s registers an offense and corrects an escaped # at end-of-string 862s does not register an offense for a @-escaped cvar interpolation 862s does not register an offense for an escaped backslash 862s does not register a bracket-escaped lvar interpolation 862s does not register an offense for a meta character 862s does not register an offense for control characters 862s does not register an offense for an ascii DEL 862s does not register an offense for an escaped # followed { 862s registers an offense and corrects an escaped # before interpolation 862s does not register an offense for an escaped cvar interpolation 862s with a %q(...) literal 862s behaves like a literal without interpolation 862s does not register an offense for a newline 862s does not register an offense for an escaped gvar interpolation 862s does not register an offense for a bracket-escaped interpolation 862s does not register an offense for an escaped delimiter 862s does not register an offense for an octal escape 862s does not register an offense with escaped # without following { 862s does not register an offense for an escaped # with following { 862s does not register an offense with escaped double quote 862s does not register an offense for an escaped cvar interpolation 862s does not register an offense for multiple unicode escapes 862s does not register an offense for a @-escaped cvar interpolation 862s does not register an offense for a unicode escape 862s does not register an offense for an escaped backslash 862s does not register an offense for an escaped interpolation 862s does not register an offense for meta control characters 862s does not register an offense for control characters 862s does not register an offense for an escaped delimiter before interpolation 862s does not register a bracket-escaped lvar interpolation 862s does not register an offense for a $-escaped gvar interpolation 862s does not register an offense for a hex escape 862s does not register an offense with escaped # at end-of-string 862s does not register an offense for a @-escaped ivar interpolation 862s does not register an offense for a technically-unnecessary escape 862s does not register an offense for a meta character 862s does not register an offense for an allowed escape inside multi-line literal 862s does not register an offense for an escaped # followed { 862s does not register an offense with escaped single quote 862s does not register an offense without escapes 862s does not register an offense for an escaped ivar interpolation 862s does not register an offense for an escaped newline 862s does not register an offense for an ascii DEL 862s with a single quoted string 862s behaves like a literal without interpolation 862s does not register an offense for an escaped # with following { 862s does not register an offense for an escaped ivar interpolation 862s does not register an offense with escaped double quote 862s does not register an offense for a $-escaped gvar interpolation 862s does not register an offense for an escaped delimiter 862s does not register an offense for an escaped interpolation 862s does not register an offense for a newline 862s does not register an offense for an escaped delimiter before interpolation 862s does not register an offense for an escaped # followed { 862s does not register an offense for a @-escaped ivar interpolation 862s does not register an offense without escapes 862s does not register an offense with escaped # at end-of-string 862s does not register an offense for an octal escape 862s does not register an offense for a hex escape 863s does not register an offense for a unicode escape 863s does not register an offense for an escaped gvar interpolation 863s does not register an offense for a bracket-escaped interpolation 863s does not register an offense for a technically-unnecessary escape 863s does not register an offense for an escaped newline 863s does not register an offense with escaped # without following { 863s does not register an offense for an escaped cvar interpolation 863s does not register an offense for a @-escaped cvar interpolation 863s does not register an offense for an escaped backslash 863s does not register an offense with escaped single quote 863s does not register a bracket-escaped lvar interpolation 863s does not register an offense for multiple unicode escapes 863s does not register an offense for a meta character 863s does not register an offense for control characters 863s does not register an offense for an ascii DEL 863s does not register an offense for an allowed escape inside multi-line literal 863s does not register an offense for meta control characters 863s with an interpolation-disabled HEREDOC 863s behaves like a literal without interpolation 863s does not register an offense for an allowed escape inside multi-line literal 863s does not register an offense for a $-escaped gvar interpolation 863s does not register an offense for an escaped backslash 863s does not register an offense for a meta character 863s does not register a bracket-escaped lvar interpolation 863s does not register an offense without escapes 863s does not register an offense for an escaped # with following { 863s does not register an offense for an escaped gvar interpolation 863s does not register an offense for multiple unicode escapes 863s does not register an offense with escaped # without following { 863s does not register an offense for control characters 864s does not register an offense for meta control characters 864s does not register an offense for an escaped cvar interpolation 864s does not register an offense for a bracket-escaped interpolation 864s does not register an offense for a @-escaped ivar interpolation 864s does not register an offense for a technically-unnecessary escape 864s does not register an offense with escaped single quote 864s does not register an offense for an escaped newline 864s does not register an offense for an ascii DEL 864s does not register an offense for an escaped ivar interpolation 864s does not register an offense for a hex escape 864s does not register an offense for a unicode escape 864s does not register an offense for an escaped interpolation 864s does not register an offense with escaped double quote 864s does not register an offense for a newline 864s does not register an offense for a @-escaped cvar interpolation 864s does not register an offense for an escaped # followed { 864s does not register an offense for an octal escape 864s does not register an offense with escaped # at end-of-string 864s when using character literals 864s does not register an offense for `?\n` 864s does not register an offense for `?a` 864s with a %Q!...! literal 864s behaves like a literal with interpolation 864s does not register a bracket-escaped lvar interpolation 864s does not register an offense for an escaped ivar interpolation 864s registers an offense and corrects an escaped } when escaping both brackets to avoid interpolation 864s does not register an offense for an escaped delimiter before interpolation 864s does not register an offense for a newline 864s does not register an offense for a $-escaped gvar interpolation 864s does not register an offense for an escaped delimiter 864s registers an offense and corrects a escaped nested delimiter in a double quoted string 864s does not register an offense for an escaped cvar interpolation 864s registers an offense and corrects an escaped # without following { 865s does not register an offense for a technically-unnecessary escape 865s does not register an offense for an escaped gvar interpolation 865s does not register an offense for a @-escaped cvar interpolation 865s does not register an offense for a meta character 865s registers an offense and corrects an escaped # before interpolation 865s does not register an offense for a unicode escape 865s registers an offense and corrects an escaped single quote 865s does not register an offense for an escaped # followed { 865s does not register an offense for an escaped backslash 865s registers an offense and corrects an escaped # at end-of-string 865s does not register an offense for a bracket-escaped interpolation 865s does not register an offense for multiple unicode escapes 865s does not register an offense without escapes 865s does not register an offense for a hex escape 865s registers an offense and corrects an escaped double quote 865s does not register an offense for meta control characters 865s does not register an offense for an escaped newline 865s does not register an offense for an ascii DEL 865s does not register an offense for control characters 865s does not register an offense for an escaped interpolation 865s does not register an offense for an octal escape 865s does not register an offense for a @-escaped ivar interpolation 865s 865s RuboCop::Cop::InternalAffairs::UndefinedConfig 865s works with deeper nested cop names 865s ignores `cop_config` in non-cop classes 865s ignores `cop_config` in non-cop subclasses 865s does not register an offense if using `cop_config` outside of a cop class 865s works when the base class is `Cop` instead of `Base` 865s registers an offense when the cop inherits `::RuboCop::Cop::Base` 865s registers an offense when the cop is not within the `RuboCop::Cop` namespace 865s does not register an offense for implicit configuration keys 865s can handle an empty file 865s registers an offense when the cop inherits `RuboCop::Cop::Base` 865s registers an offense when the cop has no configuration at all 865s registers an offense when the cop inherits `Cop::Base` 865s element lookup 865s registers an offense for missing configuration keys 865s does not register an offense for defined configuration keys 865s fetch 865s does not register an offense for defined configuration keys 865s registers an offense for missing configuration keys 865s with a default value 866s does not register an offense for defined configuration keys 866s registers an offense for missing configuration keys 866s 866s RuboCop::Cop::Lint::DeprecatedOpenSSLConstant 866s registers an offense with AES + blocksize constant and mode argument and corrects 866s does not register an offense when building digest using an algorithm string 866s registers an offense with cipher constant and two arguments and corrects 866s registers an offense with AES + blocksize constant and corrects 866s does not register an offense with cipher constant and argument is a variable 866s registers an offense with cipher constant and double quoted string argument and corrects 866s registers an offense when building an instance using an digest constant and corrects 866s does not register an offense with cipher constant and send argument is a method 866s registers an offense with cipher constant and no arguments and corrects 866s does not register an offense when building digest using an algorithm string and nested digest constants 866s registers an offense with cipher constant and no arguments and corrects 866s registers an offense when using ::Digest class methods on an algorithm constant and corrects 866s does not register an offense when using ::Digest class methods with an algorithm string and value 866s does not register an offense with cipher constant and argument is a constant 866s registers an offense with cipher constant and no arguments and corrects 866s registers an offense with cipher constant and one argument and corrects 866s does not register an offense when using cipher with a string 866s registers an offense with cipher constant and `cbc` argument and corrects 866s registers an offense when using an digest constant with chained methods and corrects 866s registers an offense with cipher constant and no arguments and corrects 866s when used in a block 866s registers an offense when using ::Digest class methods on an algorithm constant and corrects 866s 866s RuboCop::Cop::Style::OpenStructUse 866s when using custom namespaced OpenStruct 866s when inheriting from it 866s is expected to eq "class A < SomeNamespace::OpenStruct; end" 866s when used in assignments 866s registers no offense 866s when defined in custom namespace 866s when class 866s is expected to eq "module SomeNamespace\n class OpenStruct\n end\nend\n" 866s when module 866s is expected to eq "module SomeNamespace\n module OpenStruct\n end\nend\n" 866s when using OpenStruct 866s for OpenStruct 866s when used in assignments 866s registers an offense 866s when inheriting from it via Class.new 866s registers an offense 866s when inheriting from it via < 866s registers an offense 866s for ::OpenStruct 866s when used in assignments 866s registers an offense 866s when inheriting from it via < 866s registers an offense 866s when inheriting from it via Class.new 866s registers an offense 866s when not using OpenStruct 866s registers no offense 866s 866s RuboCop::Cop::Style::NilComparison 866s configured with comparison preferred 866s registers and corrects an offense for `!x.nil?` 866s registers an offense for nil? 866s configured with predicate preferred 866s registers an offense for == nil 866s registers and corrects an offense when using `x == nil` as a guard condition 867s registers an offense for === nil 867s 867s RuboCop::Cop::Style::FrozenStringLiteralComment 867s always_true 867s registers an offense for a disabled frozen string literal above an empty line 867s registers an offense for a disabled frozen string literal comment under shebang with no other code 867s accepts a frozen string literal comment after other comments 867s accepts a frozen string literal comment below shebang and encoding comments 867s registers an offense for having a frozen string literal comment under ruby code 867s registers an offense for arbitrary tokens 867s registers an offense for an extra first empty line 867s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 867s accepts a frozen string literal comment below shebang, an encoding comment, and extra space 867s registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space 867s accepts a frozen string literal below a shebang comment 867s registers an offense for a disabled frozen string literal on the top line 867s registers an offense for a disabled frozen string literal comment below an encoding comment and extra space 867s accepts a source with no tokens 867s registers an offense for not having a frozen string literal comment on the top line 867s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 867s accepts a frozen string literal below an encoding comment 867s registers an offense for arbitrary tokens below shebang and encoding comments 867s registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space 867s accepts a frozen string literal on the top line 867s registers an offense for not having a frozen string literal comment under shebang with no other code 867s accepts an empty source 867s accepts a frozen string literal comment under shebang with no other code 867s registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space 867s registers an offense for a disabled frozen string literal 867s registers an offense for arbitrary tokens below a shebang comment 867s registers an offense for a disabled frozen string literal comment after other comments 867s registers an offense for a disabled frozen string literal below an encoding comment 867s registers an offense for arbitrary tokens under shebang with no other code 867s accepts a frozen string literal comment below shebang above an encoding comments 867s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 867s accepts an emacs style combined magic comment 867s registers an offense for arbitrary tokens below an encoding comment and extra space 867s accepts a frozen string literal comment below an encoding comment and extra space 868s registers an offense for arbitrary tokens above an empty line 868s registers an offense for arbitrary tokens below shebang above an encoding comments 868s registers an offense for not having a frozen string literal comment under an encoding comment 868s registers an offense for arbitrary tokens below an encoding comment 868s registers an offense for a disabled frozen string literal below a shebang comment 868s registers an offense for not having a frozen string literal comment under an encoding comment and extra space 868s never 868s registers an offense for a disabled frozen string literal comment on the top line 868s accepts an empty source 868s registers an offense for a frozen string literal comment below shebang and encoding comments 868s registers an offense for a frozen string literal comment below a shebang comment 868s allows not having a frozen string literal comment under an encoding comment 868s registers an offense for a frozen string literal comment below shebang above an encoding comments 868s registers an offense for having a frozen string literal comment after other comments 868s accepts not having a frozen string literal comment on the top line 868s registers an offense for a disabled frozen string literal comment below shebang above an encoding comments 868s allows not having a frozen string literal comment under a shebang and an encoding comment 868s registers an offense for a disabled frozen string literal below an encoding comment 868s registers an offense for a disabled frozen string literal below a shebang comment 868s registers an offense for a frozen string literal comment below an encoding comment 868s registers an offense for a frozen string literal comment on the top line 868s registers an offense for a disabled frozen string literal comment below shebang and encoding comments 868s accepts a frozen string literal comment under ruby code 868s accepts a source with no tokens 868s accepts not having not having a frozen string literal comment under a shebang 868s always 868s accepts an empty source 868s registers an offense for not having a frozen string literal comment on the top line 868s accepts a source with no tokens 868s accepts an emacs style combined magic comment 868s accepts a frozen string literal below an encoding comment 868s registers an offense for not having a frozen string literal comment under a shebang and an encoding comment 868s accepts a frozen string literal comment after other comments 868s accepts a disabled frozen string literal comment below shebang above an encoding comments 868s registers an offense for arbitrary tokens 868s accepts a frozen string literal comment below shebang above an encoding comments 868s registers an offense for an extra first empty line 868s registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline 868s accepts a disabled frozen string literal comment below shebang and encoding comments 868s registers an offense for not having a frozen string literal comment under an encoding comment 868s accepts a disabled frozen string literal on the top line 868s accepts a disabled frozen string literal below a shebang comment 868s accepts a frozen string literal on the top line 868s registers an offense for not having a frozen string literal comment under a shebang 868s accepts a frozen string literal comment below shebang and encoding comments 868s registers an offense for not having a frozen string literal comment when there is only a shebang 868s accepts a disabled frozen string literal below an encoding comment 868s accepts a frozen string literal below a shebang comment 868s registers an offense with an empty line between magic comments and the code 868s accepts a frozen string literal comment below newline-separated magic comments 868s registers an offense for having a frozen string literal comment under ruby code 868s target_ruby_version < 2.3 868s accepts calling << on a string with interpolation 868s accepts calling << on a string 868s accepts freezing a string with interpolation 868s accepts freezing a string 868s 868s RuboCop::Cop::Style::MethodCalledOnDoEndBlock 868s with a multi-line do..end block 868s accepts it if there is no chained call 868s accepts a chained block 868s registers an offense for a chained call 868s when using safe navigation operator 869s registers an offense for a chained call 869s with a {} block 869s accepts a multi-line block with a chained call 869s accepts a single-line block with a chained call 869s Ruby 2.7 869s registers an offense for a chained call 869s with a single-line do..end block 869s accepts a single-line do..end block with a chained block 869s registers an offense for a chained call 869s 869s RuboCop::Cop::Lint::RedundantDirGlobSort 869s does not register an offense when not using `sort` for `Dir` 869s does not register an offense when using `sort` without a receiver 869s when Ruby 2.7 or lower 869s does not register an offense and correction when using `Dir.glob.sort` 869s does not register an offense and correction when using `::Dir.glob.sort` 869s does not register an offense and correction when using `Dir[].sort.each(&do_something)` 869s does not register an offense and correction when using `Dir[].sort.each do` 869s when Ruby 3.0 or higher 869s registers an offense and correction when using `Dir[].sort.each do` 869s registers an offense and correction when using `Dir.glob.sort` 869s does not register an offense when using `Dir.glob('./b/*.txt', './a/*.txt').sort` 869s registers an offense and correction when using `Dir[].sort.each(&do_something)` 869s does not register an offense when using `Dir[*path].sort` 869s does not register an offense when using `Dir.glob(*path).sort` 869s registers an offense and correction when using `::Dir.glob.sort` 869s does not register an offense when using `Dir['./b/*.txt', './a/*.txt'].sort` 869s does not register an offense when using `collection.sort` 869s does not register an offense when not using `sort` with `sort: false` option for `Dir` 869s 869s RuboCop::Cop::Style::MultipleComparison 869s registers an offense and corrects when `a` is compared three times 869s does not register an offense for comparing multiple literal strings 869s does not register an offense for comparing an lvar 869s registers an offense and corrects when `a` is compared three times, once on the righthand side 869s does not register an offense for Array#include? 869s does not register an offense for comparing lvars 870s registers an offense and corrects when `a` is compared twice in `if` and `elsif` conditions 870s does not register an offense for comparing lvars when a string is on the lefthand side 870s registers an offense and corrects when `a` is compared three times on the right hand side 870s does not register an offense for comparing multiple int literals 870s registers an offense and corrects when multiple comparison is not part of a conditional 870s does not register an offense for a == b || b == a 870s registers an offense and corrects when `a` is compared twice 870s does not register an offense for a duplicated condition 870s does not register an offense when comparing two sides of the disjunction is unrelated 870s when `AllowMethodComparison: true` 870s does not register an offense when using multiple method calls 870s when `AllowMethodComparison: false` 870s registers an offense and corrects when using multiple method calls 870s 870s RuboCop::Cop::Style::FileRead 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+') 870s registers an offense for and corrects the `File.open` with inline read block (mode 'r+t') 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rt') 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'r') 870s registers an offense for and corrects the `File.open` with inline read block (mode 'rt') 870s registers an offense for and corrects the `File.open` with multiline read block (implicit text mode) 870s registers an offense for and corrects `File.open(filename, 'r').read` 870s registers an offense for and corrects the `File.open` with inline read block (mode 'r+') 870s registers an offense for and corrects the `File.open` with inline read block (mode 'r') 870s registers an offense for and corrects the `File.open` with symbolic read proc (implicit text mode) 870s registers an offense for and corrects `File.open(filename, 'r+t').read` 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'rt') 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+') 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+t') 870s registers an offense for and corrects `File.open(filename, 'rt').read` 870s registers an offense for and corrects `::File.open(filename).read` 870s does not register an offense when not reading from the block variable 870s registers an offense for and corrects `File.open(filename, 'rb').read` 870s registers an offense for and corrects the `File.open` with inline read block (implicit text mode) 870s registers an offense for and corrects `File.open(filename, 'r+').read` 870s registers an offense for and corrects `File.open(filename, 'r+b').read` 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r') 870s registers an offense for and corrects `File.open(filename).read` 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'r+b') 870s registers an offense for and corrects the `File.open` with symbolic read proc (mode 'rb') 870s registers an offense for and corrects the `File.open` with inline read block (mode 'rb') 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+t') 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'rb') 870s registers an offense for and corrects the `File.open` with multiline read block (mode 'r+b') 871s registers an offense for and corrects the `File.open` with inline read block (mode 'r+b') 871s 871s RuboCop::Cop::Style::IfWithSemicolon 871s registers an offense and corrects for one line if/;/end 871s accepts without `else` branch 871s can handle modifier conditionals 871s when elsif is present 871s accepts with `else` branch 871s accepts second elsif block 871s accepts without `else` branch 871s 871s RuboCop::Cop::Style::NumericPredicate 871s when configured to enforce numeric comparison methods 871s allows checking if a number is not zero 871s registers an offense for checking if a number is negative 871s registers an offense for checking if a number is zero 871s registers an offense for checking if a number is positive 871s when configured to enforce numeric predicate methods 871s when checking if a number is negative 871s when target ruby version is 2.3 or higher 871s registers an offense in yoda condition 871s registers an offense 871s with a complex expression 871s registers an offense 871s registers an offense in yoda condition 871s when target ruby version is 2.2 or lower 871s does not register an offense 871s when checking if a number is positive 871s when target ruby version is 2.2 or lower 871s does not register an offense 871s when target ruby version is 2.3 or higher 871s registers an offense in yoda condition 871s registers an offense 871s with a complex expression 871s registers an offense in yoda condition 871s registers an offense 871s with checking if a number is not zero 871s allows comparing against a global variable 871s allows comparing against a variable 871s allows comparing against a complex expression 871s when checking if a number is zero 871s registers an offense 871s allows comparing against a global variable 871s registers an offense with a complex expression 871s when comparing against a method argument variable 871s registers an offense 871s registers an offense with complex expression 871s when there are allowed methods 871s simple method call 871s `EnforcedStyle` is `comparison` 871s allows checking if a number is zero 871s `EnforcedStyle` is `predicate` 871s allows checking if a number is zero 871s in block 871s ignored method 871s with a string 871s allows checking if a number is positive 871s allows checking if a number is negative 871s with a regex 871s allows checking if a number is positive 871s allows checking if a number is negative 871s not ignored method 871s registers an offense for checking if a number is positive 871s registers an offense for checking if a number is negative 871s in argument 871s ignored method 871s with a string 871s allows checking if a number is negative 872s allows checking if a number is positive 872s with a regex 872s allows checking if a number is negative 872s allows checking if a number is positive 872s not ignored method 872s when checking if a number is positive 872s when target ruby version is 2.2 or lower 872s does not register an offense 872s when target ruby version is 2.3 or higher 872s registers an offense 872s when checking if a number is negative 872s when target ruby version is 2.3 or higher 872s registers an offense 872s when target ruby version is 2.2 or lower 872s does not register an offense 872s 872s RuboCop::Cop::Layout::EmptyLinesAroundArguments 872s when extra lines 872s registers and autocorrects offense for empty line between args 872s registers and autocorrects offense for empty line after arg 872s registers and autocorrects offenses when multiple empty lines are detected 872s registers and autocorrects offense for empty line before arg 872s registers and autocorrects offense when args start on definition line 872s registers autocorrects empty line whetn args start on definition line 872s registers and autocorrects offense on correct lines for multi-offense example 872s registers and autocorrects offense when empty line between normal arg & block arg 872s registers and autocorrects offense on correct line for single offense example 872s when using safe navigation operator 872s registers and autocorrects offense for empty line before arg 872s when no extra lines 872s accepts multiline style argument for method call without selector 872s accepts multiple listed mixed args 872s accepts method with argument that trails off block 872s accepts listed args starting on definition line 872s accepts block argument with empty line 872s accepts method with no arguments that trails off block 872s accepts when blank line is inserted between method with arguments and receiver 872s accepts one line methods 872s accepts method with argument that trails off heredoc 872s with one argument 872s ignores empty lines inside of method arguments 872s with multiple arguments 872s ignores empty lines inside of method arguments 872s 872s RuboCop::Cop::Layout::ArgumentAlignment 872s aligned with fixed indentation 872s registers an offense and corrects when missed indentation kwargs 872s autocorrects by indenting when not indented 872s autocorrects by outdenting when indented too far 872s corrects indentation for kwargs starting on same line as other args 872s autocorrects when first line is indented 872s does not register an offense when using aligned braced hash as a argument 872s assigned methods 872s with ArgumentAlignment:IndentationWidth set to 4 872s accepts the first parameter being on a new row 872s accepts the first parameter being on method row 872s with IndentationWidth:Width set to 4 872s accepts the first parameter being on a new row 872s accepts the first parameter being on method row 872s autocorrects even when first argument is in wrong position 872s multi-line method calls 872s registers offenses and corrects double indentation from relevant method 872s does not err on method call without a method name 872s can handle existing indentation from multi-line method calls 872s autocorrects relative to position of relevant method call 872s aligned with first argument 872s accepts correctly aligned arguments 872s registers an offense and corrects splat operator 872s registers an offense and corrects multiline missed indentation 872s doesn't get confused by regexen with embedded expressions 872s can handle a ternary condition with a block reference 872s can handle a method call within a method call 872s can handle other method calls without parentheses 872s can handle a call embedded in a string 873s accepts correctly aligned arguments with fullwidth characters 873s doesn't crash and burn when there are nested issues 873s can handle a string literal as other argument 873s can handle do-end 873s can handle heredoc strings 873s doesn't get confused by a symbol argument 873s can handle a correctly aligned string literal as first argument 873s registers an offense and correct multi-line parametersindented too far 873s can handle method calls without parentheses 873s registers an offense and corrects arguments with single indent 873s accepts calls that only span one line 873s can handle parentheses used with no arguments 873s does not crash in autocorrect on dynamic string in parameter value 873s doesn't get confused by symbols with embedded expressions 873s doesn't get confused by a line break inside a parameter 873s registers an offense and corrects multi-line outdented parameters 873s can handle a multiline hash as second parameter 873s can handle a call with a block inside another call 873s accepts multiline []= method call 873s registers an offense and corrects when missed indentation kwargs 873s accepts braceless hashes 873s accepts the first parameter being on a new row 873s doesn't get confused by extra comma at the end 874s registers an offense and corrects arguments with double indent 874s assigned methods 874s accepts the first parameter being on method row 874s accepts the first parameter being on a new row 874s when using safe navigation operator 874s registers an offense and corrects arguments with single indent 874s 874s RuboCop::Cop::Style::IfInsideElse 874s ignores unless inside else 874s ignores if inside unless 874s ignores ternary inside if..else 874s handles a nested `if...then...elsif...end` 874s handles a nested `if...then...else...end` 874s catches a modifier if nested inside an else after elsif 874s ignores nested ternary expressions 874s catches an if..else nested inside an else 874s handles a nested multiline `if...then...elsif...else...end` 874s handles a nested `if...then...elsif...else...end` 874s isn't offended if there is a statement following the if node 874s catches an `if..else` nested inside an `else` and nested inside `if` branch code is empty 874s catches an if node nested inside an else 874s catches an if..elsif..else nested inside an else 874s isn't offended if there is a statement preceding the if node 874s isn't offended by if..elsif..else 874s handles a nested `if...then...end` 874s when AllowIfModifier is false 874s catches a modifier if nested inside an else 874s when AllowIfModifier is true 874s accepts a modifier if nested inside an else 874s 874s RuboCop::Cop::Util 874s #line_range 874s returns line range of the expression 874s #to_supported_styles 874s when EnforcedStyleInsidePipes 874s is expected to eq "SupportedStylesInsidePipes" 874s when EnforcedStyle 874s is expected to eq "SupportedStyles" 874s #same_line? 874s returns false when two nodes are not on the same line 874s returns true when two nodes are on the same line 874s returns false if an argument is not a node or range 874s can use ranges 874s 874s RuboCop::Cop::Style::MultilineIfModifier 874s if guard clause 874s registers an offense when indented 874s registers an offense 874s allows a multiline condition 874s allows a one liner 874s unless guard clause 874s registers an offense when indented 874s registers an offense 874s allows a multiline condition 874s allows a one liner 874s 874s RuboCop::Cop::Style::OptionalBooleanParameter 874s registers an offense when defining class method with optional boolean arg 874s registers an offense when defining method with optional boolean arg 874s registers an offense when defining method with optional boolean arg that has no space 874s registers an offense when defining method with multiple optional boolean args 874s does not register an offense when defining method with optional non-boolean arg 874s does not register an offense when defining method with keyword boolean arg 874s does not register an offense when defining method without args 874s when AllowedMethods is not empty 875s does not register an offense 875s 875s RuboCop::Cop::Style::PerlBackrefs 875s autocorrects $& to Regexp.last_match(0) 875s autocorrects "#$1" to "#{Regexp.last_match(1)}" 875s autocorrects $+ to Regexp.last_match(-1) 875s autocorrects $` to Regexp.last_match.pre_match 875s autocorrects $PREMATCH to Regexp.last_match.pre_match 875s autocorrects $9 to Regexp.last_match(9) 875s autocorrects `#$1` to `#{Regexp.last_match(1)}` 875s autocorrects $LAST_PAREN_MATCH to Regexp.last_match(-1) 875s autocorrects puts $1 to puts Regexp.last_match(1) 875s autocorrects $POSTMATCH to Regexp.last_match.post_match 875s autocorrects $MATCH to Regexp.last_match(0) 875s autocorrects $1 to ::Regexp.last_match(1) in namespace 875s autocorrects /#$1/ to /#{Regexp.last_match(1)}/ 875s autocorrects $' to Regexp.last_match.post_match 875s 875s RuboCop::Cop::Style::NegatedIfElseCondition 875s does not register an offense when both branches are empty 875s works with comments and multiple statements 875s does not register an offense when `if` with `!!` condition 875s does not register an offense when only part of the condition is negated 875s registers an offense and corrects nested `if-else` with negated condition 875s does not register an offense when the `else` branch is empty 875s works with comments when one branch is a begin and the other is not 875s does not register an offense when `if` with negated condition has no `else` branch 875s registers an offense and corrects a multiline ternary 875s moves comments to correct branches during autocorrect 875s registers an offense when using negated condition and `if` branch body is empty 875s works with comments when neither branch is a begin node 875s correctly moves comments at the end of branches 875s does not register an offense when negating condition for `if-elsif` 875s registers an offense and corrects when negating condition with `not` for ternary 875s registers an offense and corrects when negating condition with `not` for `if-else` 875s works with duplicate nodes 875s registers an offense and corrects when negating condition with `!` for `if-else` 875s behaves like negation method 875s registers an offense and corrects when negating condition with `!~` in begin-end for ternary 875s registers an offense and corrects when negating condition with `!~` in parentheses for ternary 875s registers an offense and corrects when negating condition with `!~` for `if-else` 875s registers an offense and corrects when negating condition with `!~` in parentheses for `if-else` 875s registers an offense and corrects when negating condition with `!~` for ternary 875s registers an offense and corrects when negating condition with `!~` in begin-end for `if-else` 875s behaves like negation method 875s registers an offense and corrects when negating condition with `!=` in parentheses for ternary 875s registers an offense and corrects when negating condition with `!=` for ternary 875s registers an offense and corrects when negating condition with `!=` for `if-else` 875s registers an offense and corrects when negating condition with `!=` in begin-end for `if-else` 875s registers an offense and corrects when negating condition with `!=` in begin-end for ternary 875s registers an offense and corrects when negating condition with `!=` in parentheses for `if-else` 875s 875s RuboCop::Runner 875s #run when interrupted 875s with SIGINT 876s returns false 876s #run 876s if -s/--stdin is used with an offense 877s sends the offense to a formatter 877s returns false 877s if a cop crashes 878s does not call ResultCache#save 878s if there are no offenses in inspected files 878s returns true 878s if there is an offense in an inspected file 878s sends the offense to a formatter 878s returns false 878s #run with cops autocorrecting each-other 878s with two conflicting cops 878s if there are multiple offenses in an inspected file 879s aborts because of an infinite loop 879s if there is an offense in an inspected file 879s aborts because of an infinite loop 879s with two pairs of conflicting cops 879s with display options 879s --display-only-safe-correctable 879s ommits unsafe correctable `Style/FrozenStringLiteral` 879s returns false 879s --display-only-correctable 879s returns false 879s ommits uncorrectable `Layout/LineLength` 879s with three cop cycle 879s if there is an offense in an inspected file 880s aborts because of an infinite loop 880s if there is an offense in an inspected file 880s aborts because of an infinite loop 880s 880s RuboCop::Cop::Utils::FormatString 880s finds the correct number of fields 880s #valid? 880s returns true when there are only numbered formats 880s returns true when there are only unnumbered formats 880s returns false when there are unnumbered and numbered formats 880s returns true when there are only named formats 880s returns false when there are unnumbered and named formats 880s returns true when there are only named with escaped `%` formats 880s returns false when there are numbered and named formats 880s #named_interpolation? 880s behaves like named format sequence 880s detects named format sequence 880s does not detect escaped named format sequence 880s behaves like named format sequence 880s does not detect escaped named format sequence 880s detects named format sequence 880s behaves like named format sequence 880s detects named format sequence 880s does not detect escaped named format sequence 880s behaves like named format sequence 880s detects named format sequence 880s does not detect escaped named format sequence 880s 880s RuboCop::Cop::Style::AccessorGrouping 880s when EnforcedStyle is separated 880s registers an offense and corrects when using grouped accessors within eigenclass 880s does not register an offense for grouped accessors with comments 880s does not register an offense when using separated accessors 880s registers an offense and corrects when the same accessor is given more than once in the same statement 880s registers an offense and corrects when using grouped accessors 880s registers an offense and corrects when using grouped accessors with different access modifiers 880s does not register an offense if the same accessor is listed twice 880s when there are comments for attributes 880s registers and corrects an offense 880s when EnforcedStyle is grouped 881s registers an offense and corrects when using separated accessors within eigenclass 881s registers an offense and corrects when using separated accessors with different access modifiers 881s does not register an offense when using grouped accessors 881s does not register offense for accessors with comments 881s registers an offense and corrects when using separated accessors 881s registers offense and corrects if at least two separate accessors without comments 881s does not register an offense when the same accessor is given more than once in the same statement 881s registers an offense and correct if the same accessor is listed twice 881s 881s RuboCop::Cop::Style::EvenOdd 881s converts (x(y) % 2) != 1 to #even? 881s converts (x % 2) == 1 to #odd? 881s converts 1 % 2 != 1 to even? 881s converts (x % 2) == 0 to #even? 881s converts (y % 2) != 1 to #even? 881s converts x % 2 != 0 to #odd? 881s accepts x % 2 == 2 881s converts (x.y % 2) != 1 to #even? 881s converts x % 2 == 0 to #even? 881s accepts x % 3 != 0 881s converts (x % 2) != 0 to #odd? 881s converts x._(y) % 2 != 1 to even? 881s converts complex examples 881s converts (x._(y) % 2) != 1 to even? 881s converts (x._(y)) % 2 != 1 to even? 881s accepts x % 3 == 0 881s converts x % 2 == 1 to #odd? 881s converts x % 2 != 1 to #even? 881s 881s RuboCop::Formatter::AutoGenConfigFormatter 881s #finished 881s calls #report_summary 881s when no offenses are detected 881s does not report offenses 881s when any offenses are detected 881s outputs report summary 881s does not report offenses 881s #report_file_as_mark 881s when different severity offenses are detected 881s prints highest level mark 881s when a refactor severity offense is detected 881s prints "R" 881s when no offenses are detected 881s prints "." 881s when a refactor convention offense is detected 881s prints "C" 881s 881s RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor 881s accepts code that where the attr_accessor is the last line 881s registers an offense and corrects for an attribute accessor and comment line 881s accepts code when attribute method is method chained 881s accepts code when used in class definition 881s accepts code that separates attribute accessors from the code and comment line with a newline 881s registers an offense and corrects for an attribute accessor and some comment line 881s registers an offense and corrects for code that immediately follows accessor with comment 881s registers an offense and corrects for an attribute accessor and `rubocop:disable` comment line 881s registers an offense and corrects for some attribute accessors and comment line 882s accepts code that separates an attribute accessor from the code with a newline 882s does not register an offense and corrects when using `if` ... `else` branches 882s registers an offense and corrects for code that immediately follows accessor 882s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line and other comment 882s registers an offense and corrects for an attribute accessor and `rubocop:enable` comment line 882s accepts code that separates attribute accessors from the code with a newline 882s accepts code that separates an attribute accessor from the code and `rubocop:enable` comment line with a newline 882s when `AllowedMethods: private` 882s does not register an offense for code that immediately ignored methods after accessor 882s when `AllowedMethods: []` 882s registers an offense for code that immediately ignored methods after accessor 882s when `AllowAliasSyntax: false` 882s registers an offense for code that immediately `alias` syntax after accessor 882s when `AllowAliasSyntax: true` 882s does not register an offense for code that immediately `alias` syntax after accessor 882s 882s RuboCop::Cop::Style::ClassMethodsDefinitions 882s when EnforcedStyle is self_class 882s does not register an offense when defining class methods with `class << self` 882s registers an offense when defining class methods with `def self.method` 882s does not register an offense when defining singleton methods not on self 882s when EnforcedStyle is def_self 882s registers an offense and corrects when defining class methods with `class << self` and there is no blank line between method definition and attribute accessor 882s correctly handles methods with annotation comments 882s does not register an offense when class << self contains only class methods 882s does not register an offense when `class << self` contains non public methods 882s registers and corrects an offense when defining class methods with `class << self` with inline comment 882s correctly handles class << self containing multiple methods 882s does not register an offense when defining singleton methods using `self << object` 882s correctly handles def self.x within class << self 882s registers an offense and corrects when defining class methods with `class << self` 882s does not register an offense when class << self does not contain methods 882s does not register an offense when defining class methods with `def self.method` 882s registers and corrects an offense when defining class methods with `class << self` with comment only body 882s removes empty class << self when correcting 882s 882s RuboCop::Cop::Lint::OutOfRangeRegexpRef 882s does not register offense to a regexp with valid references for numbered captures 883s registers an offense when the regexp is matched with `match` 883s does not register offense to a regexp with encoding option and valid references for numbered captures 883s ignores calls to `match?` 883s registers an offense when the regexp appears on the right hand side of `=~` 883s registers an offense when the regexp is matched with `===` 883s ignores `match` with no arguments 883s uses the maximum number of captures for when clauses with multiple conditions 883s does not register an offense when in range references are used inside a when clause 883s does not register an offense regexp containing non literal 883s registers an offense when out of range references are used for non captures 883s registers an offense when out of range references are used for mix of numbered and named captures 883s registers an offense when out of range references are used inside a when clause 883s does not register offense to a regexp with valid references for named captures 883s registers an offense when out of range references are used for numbered captures 883s only registers an offense for when clauses when the regexp is matched as a literal 883s does not register offense to a regexp with valid references for a mix named and numbered captures 883s registers an offense when out of range references are used for named captures 883s ignores regexp when clause conditions that contain interpolations 883s ignores `match` with no receiver 883s registers an offense when references are used before any regexp 883s only registers an offense when the regexp is matched as a literal 883s matching with rindex 883s only registers an offense when the regexp is matched as a literal 883s registers an offense when out of range references are used 883s does not register an offense when in range references are used 883s matching with sub! 883s only registers an offense when the regexp is matched as a literal 883s registers an offense when out of range references are used 883s does not register an offense when in range references are used 883s when calling a regexp method on a nth-ref node 883s registers an offense when calling gsub on an invalid nth-ref 883s does not register an offense when calling gsub on a valid nth-ref 883s registers an offense if the capturing groups have changed 883s matching with scan 883s does not register an offense when in range references are used 883s registers an offense when out of range references are used 883s only registers an offense when the regexp is matched as a literal 883s matching with `[]` 883s registers an offense when out of range references are used 883s does not register an offense when in range references are used 883s only registers an offense when the regexp is matched as a literal 883s when both the LHS and RHS use regexp 883s only considers the RHS regexp 883s matching with end_with? 883s registers an offense when out of range references are used 883s does not register an offense when in range references are used 883s only registers an offense when the regexp is matched as a literal 883s matching with match 883s registers an offense when out of range references are used 883s does not register an offense when in range references are used 883s only registers an offense when the regexp is matched as a literal 883s matching with `grep` 883s only registers an offense when the regexp is matched as a literal 883s does not register an offense when in range references are used 883s registers an offense when out of range references are used 883s matching with slice! 883s only registers an offense when the regexp is matched as a literal 883s does not register an offense when in range references are used 884s registers an offense when out of range references are used 884s matching with gsub! 884s does not register an offense when in range references are used 884s only registers an offense when the regexp is matched as a literal 884s registers an offense when out of range references are used 884s matching with partition 884s registers an offense when out of range references are used 884s only registers an offense when the regexp is matched as a literal 884s does not register an offense when in range references are used 884s matching with slice 884s registers an offense when out of range references are used 884s does not register an offense when in range references are used 884s only registers an offense when the regexp is matched as a literal 884s matching with rpartition 884s only registers an offense when the regexp is matched as a literal 884s registers an offense when out of range references are used 884s does not register an offense when in range references are used 884s matching with index 884s registers an offense when out of range references are used 884s does not register an offense when in range references are used 884s only registers an offense when the regexp is matched as a literal 884s matching with sub 884s registers an offense when out of range references are used 884s does not register an offense when in range references are used 884s only registers an offense when the regexp is matched as a literal 884s matching with gsub 884s only registers an offense when the regexp is matched as a literal 884s does not register an offense when in range references are used 884s registers an offense when out of range references are used 884s matching with start_with? 884s registers an offense when out of range references are used 884s only registers an offense when the regexp is matched as a literal 884s does not register an offense when in range references are used 884s 884s RuboCop::Cop::InternalAffairs::OffenseLocationKeyword 884s does not register an offense when the `loc` is on a child node 884s does not register an offense when the `loc` is on a different node 884s when `node.loc.selector` is passed 884s registers an offense if message argument is passed 884s registers an offense 884s 884s RuboCop::Cop::Style::SoleNestedConditional 884s does not register an offense when no nested conditionals 884s registers an offense and corrects when using nested `unless` modifier multiple conditional 884s registers an offense and corrects when using nested `unless` modifier conditional 884s registers an offense and corrects when `if` foo do_something end `unless` bar 884s registers an offense and corrects for multiple nested conditionals with using method call outer condition by omitting parentheses 884s registers an offense and corrects when using `unless` and `||` without parens in the outer condition and nested modifier condition 884s registers an offense and corrects when using nested conditional and branch contains a comment 885s registers an offense and corrects when using `unless` and `||` and parens in the outer condition and nested modifier condition 885s registers an offense and corrects when using nested `if` modifier conditional 885s registers an offense and corrects when using `unless` and method arguments without parentheses in the outer condition and nested modifier condition 885s registers an offense and corrects when nested `||` operator condition 885s registers an offense and corrects when `unless` foo do_something end `if` bar 885s registers an offense and corrects when using `unless` and `&&` without parens in the outer condition and nested modifier condition 885s registers an offense and corrects when using `unless` and method arguments with parentheses in the outer condition and nested modifier condition 885s does not register an offense when using nested modifier on value assigned in single condition 885s registers an offense and corrects when using guard conditional with outer comment 885s registers an offense and corrects when using nested `if` within `unless foo == bar` 885s registers an offense and corrects when using nested `if` within `if foo = bar` 885s does not register an offense when using nested ternary within conditional 885s registers an offense and corrects for multiple nested conditionals 885s registers an offense and corrects when using nested `unless` within `if` 885s registers an offense and corrects when `unless` foo && bar do_something end `if` baz 885s does not register an offense when using nested modifier on value assigned in multiple conditions 885s registers an offense and corrects when using `||` in the outer condition and nested modifier condition 885s registers an offense and corrects when using nested `if` within `unless` 885s does not register an offense for nested conditionals when outer conditional has an `else` branch 885s registers an offense and corrects when `if` foo do_something end `if` bar 885s registers an offense and corrects when `if` foo do_something end `unless` bar && baz 885s registers an offense and corrects when there are outer and inline comments 885s registers an offense and corrects when using nested `if` within `if` 885s does not register an offense when using nested conditional is not the whole body 885s registers an offense and corrects when `if` foo && bar do_something end `if` baz 885s registers an offense and corrects when using `unless` and multiple method arguments with parenthesesin the outer condition and nested modifier condition 886s does not register an offense when using nested conditional within `elsif` 886s registers an offense and corrects when using nested `unless` modifier with a single expression condition 886s registers an offense and corrects when `if` foo do_something end `if` bar && baz 886s registers an offense and corrects when `if` foo && bar do_something end `unless` baz 886s does not register an offense when nested conditional has an `else` branch 886s registers an offense and corrects when using `||` in the outer condition 886s registers an offense and corrects when using nested `unless` within `unless` 886s registers an offense and corrects when nested `||` operator modifier condition 886s when disabling `Style/IfUnlessModifier` 886s registers an offense and corrects when using nested conditional and branch contains a comment 886s registers an offense and corrects when there are outer and inline comments 886s when the inner condition has a send node without parens 886s in modifier style 886s registers an offense and corrects 886s with a `csend` node 886s registers an offense and corrects 886s with a block 886s registers an offense and corrects 886s in guard style 886s registers an offense and corrects 886s when AllowModifier is true 886s does not register an offense when using nested modifier conditional 886s when the inner condition has a send node with parens 886s in guard style 886s registers an offense and corrects 886s in modifier style 886s registers an offense and corrects 886s 886s RuboCop::Cop::Lint::SuppressedException 886s with AllowComments set to false 886s does not register an offense for rescue with body 886s registers an offense for empty rescue block 886s Ruby 2.5 or higher 886s when empty rescue for `do` block 886s registers an offense for empty rescue without comment 886s registers an offense for empty rescue with comment 886s when empty rescue for `def` 886s registers an offense for empty rescue without comment 886s registers an offense for empty rescue with comment 886s with AllowNil set to true 886s does not register an offense for rescue block with nil 886s does not register an offense for inline nil rescue 886s with AllowNil set to false 886s registers an offense for inline nil rescue 886s registers an offense for rescue block with nil 886s when empty rescue for defs 886s registers an offense for empty rescue with comment 886s registers an offense for empty rescue without comment 886s with AllowComments set to true 887s does not register an offense for empty rescue with comment 887s registers an offense for empty rescue on single line with a comment after it 887s Ruby 2.7 or higher 887s when empty rescue for `do` block with a numbered parameter 887s registers an offense for empty rescue without comment 887s does not register an offense for empty rescue with comment 887s when empty rescue for `defs` 887s registers an offense for empty rescue without comment 887s does not register an offense for empty rescue with comment 887s Ruby 2.5 or higher 887s when empty rescue for `do` block 887s does not register an offense for empty rescue with comment 887s registers an offense for empty rescue without comment 887s when empty rescue for `def` 887s does not register an offense for empty rescue with comment 887s registers an offense for empty rescue without comment 887s 887s RuboCop::Cop::Layout::RescueEnsureAlignment 887s accepts rescue and ensure on the same line 887s accepts aligned rescue in do-end block with `.()` call 887s accepts aligned rescue in do-end block 887s accepts aligned rescue in do-end block on multi-assignment 887s accepts the modifier form 887s accepts aligned rescue in do-end block in a method 887s accepts aligned rescue in do-end block assigned to instance variable 887s accepts aligned rescue in do-end block on and-assignment 887s accepts correctly aligned rescue/ensure with def 887s accepts aligned rescue with do-end block that line break with leading dot for method calls 887s accepts correctly aligned rescue in assigned begin-end block 887s accepts correctly aligned rescue 887s accepts aligned rescue do-end block assigned to local variable 887s accepts aligned rescue in assigned do-end block starting on newline 887s accepts aligned rescue in do-end block on operation assignment 887s accepts correctly aligned ensure 888s accepts correctly aligned rescue/ensure with def with no body 888s accepts aligned rescue in do-end block on or-assignment 888s accepts aligned rescue with do-end block that line break with trailing dot for method calls 888s accepts aligned rescue in do-end block assigned to global variable 888s accepts end being misaligned 888s accepts aligned rescue in do-end block assigned to class 888s accepts aligned rescue in do-end block assigned to class variable 888s rescue in do-end block assigned to local variable 888s registers an offense 888s rescue with def 888s registers an offense 888s excluded file 888s processes excluded files with issue 888s rescue in do-end block assigned to instance variable 888s registers an offense 888s rescue in do-end block assigned to global variable 888s registers an offense 888s rescue with begin 888s registers an offense 888s as RHS of assignment 888s `Layout/BeginEndAlignment` cop is not enabled 888s accepts multi-line, indented 888s accepts multi-line, aligned 888s registers an offense and corrects for incorrect alignment 888s when `EnforcedStyleAlignWith: start_of_line` of `Layout/BeginEndAlignment` cop 888s registers an offense and corrects for incorrect alignment 888s accepts multi-line, indented 888s accepts multi-line, aligned 888s when `EnforcedStyleAlignWith: begin` of `Layout/BeginEndAlignment` cop 888s accepts multi-line, indented 888s accepts multi-line, aligned 888s registers an offense and corrects for incorrect alignment 888s rescue with defs 888s registers an offense 888s rescue in do-end block on multi-assignment 888s registers an offense 888s rescue in assigned do-end block starting on newline 888s registers an offense 888s rescue in do-end block assigned to class 888s registers an offense 888s ensure with defs 888s registers an offense 888s rescue in do-end block on or-assignment 888s registers an offense 888s allows inline expression before 888s rescue 888s registers an offense 888s ensure 888s registers an offense 888s rescue with module 888s registers an offense when rescue used with module 888s rescue with do-end block 888s registers an offense 888s rescue in do-end block on and-assignment 888s registers an offense 888s ensure with def 888s registers an offense 888s ensure with module 888s registers an offense when ensure used with module 888s ensure with class 888s registers an offense 888s rescue in do-end block assigned to class variable 888s registers an offense 888s rescue in do-end block on operation assignment 888s registers an offense 888s rescue with class 888s registers an offense when rescue used with class 888s allows inline access modifier 888s with public_class_method modifier 888s rescue with def 889s correct alignment 889s registers an offense 889s rescue with defs 889s correct alignment 889s registers an offense 889s ensure with defs 889s correct alignment 889s registers an offense 889s ensure with def 889s registers an offense 889s correct alignment 889s with private modifier 889s rescue with defs 889s registers an offense 889s correct alignment 889s ensure with defs 889s correct alignment 889s registers an offense 889s rescue with def 889s correct alignment 889s registers an offense 889s ensure with def 889s correct alignment 889s registers an offense 889s with private_class_method modifier 889s ensure with def 889s correct alignment 889s registers an offense 889s rescue with defs 889s correct alignment 890s registers an offense 890s rescue with def 890s registers an offense 890s correct alignment 890s ensure with defs 890s registers an offense 890s correct alignment 890s when using zsuper with block 890s does not register an offense when correct alignment 890s registers and corrects an offense and corrects when incorrect alignment 890s ensure with begin 890s registers an offense when ensure used with begin 890s 890s RuboCop::Cop::Style::ModuleFunction 890s when enforced style is `module_function` 890s registers an offense for `extend self` in a module 890s accepts for `extend self` in a module with declarative private 890s accepts for `extend self` in a module with private methods 890s accepts `extend self` in a class 890s when enforced style is `forbidden` 890s registers an offense for `module_function` without an argument 890s accepts `extend self` in a class 890s registers an offense for `extend self` 890s in a module 890s in a module with declarative private 890s in a module with private methods 890s when enforced style is `extend_self` 890s registers an offense for `module_function` without an argument 890s accepts module_function with an argument 890s 890s RuboCop::Cop::Style::MethodDefParentheses 890s require_no_parentheses 890s behaves like no parentheses 890s reports an offense for def with parameters with parens 890s reports an offense for def with no args and parens 890s accepts a def with parameters but no parens 890s accepts a class def with parameters with parens 890s auto-removes the parens for defs 890s requires parens for forwarding 890s reports an offense for class def with parameters with parens 890s accepts def with no args and no parens 890s reports an offense for opposite + correct 890s requires parens for anonymous block forwarding 890s behaves like endless methods 890s endless methods 890s accepts parens with args 890s accepts parens for method calls inside an endless method 890s accepts parens without args 890s accepts parens with `forward-arg` 890s require_no_parentheses_except_multiline 890s when args span multiple lines 890s reports an offense for correct + opposite 890s auto-adds required parens to argument lists on multiple lines 890s when args are all on a single line 890s behaves like no parentheses 891s accepts a def with parameters but no parens 891s reports an offense for opposite + correct 891s accepts a class def with parameters with parens 891s reports an offense for class def with parameters with parens 891s requires parens for forwarding 891s reports an offense for def with parameters with parens 891s requires parens for anonymous block forwarding 891s reports an offense for def with no args and parens 891s auto-removes the parens for defs 891s accepts def with no args and no parens 891s behaves like endless methods 891s endless methods 891s accepts parens for method calls inside an endless method 891s accepts parens without args 891s accepts parens with `forward-arg` 891s accepts parens with args 891s require_parentheses 891s reports an offense for def with parameters but no parens 891s reports an offense for correct + opposite 891s accepts def with no args and no parens 891s auto-adds required parens for a defs after a passing method 891s auto-adds required parens to argument lists on multiple lines 891s auto-adds required parens for a defs 891s reports an offense for class def with parameters but no parens 891s behaves like endless methods 891s endless methods 891s accepts parens with args 891s accepts parens with `forward-arg` 891s accepts parens without args 891s accepts parens for method calls inside an endless method 891s 891s RuboCop::Cop::Lint::RaiseException 891s registers an offense and corrects for `raise` with `Exception` 891s registers an offense and corrects for `fail` with `Exception` 891s does not register an offense when raising Exception with explicit namespace 891s does not register an offense for `fail` without arguments 891s does not register an offense for `raise` without arguments 891s registers an offense and corrects for `raise` with `::Exception.new` 891s registers an offense and corrects for `fail` with `Exception` and message 891s registers an offense and corrects for `fail` with `Exception.new` and message 891s registers an offense and corrects for `raise` with `Exception.new(args*)` 891s registers an offense and corrects for `raise` with `Exception.new` and message 891s registers an offense and corrects for `raise` with `::Exception` 891s registers an offense and corrects for `raise` with `::Exception` and message 891s registers an offense and corrects for `raise` with `Exception` and message 891s when under namespace 891s registers an offense and corrects when Exception with cbase specified 891s does not register an offense when Exception without cbase specified 891s 891s RuboCop::Cop::Metrics::ModuleLength 891s accepts a module with less than 5 lines 891s does not count blank lines 891s accepts a module with 5 lines 891s rejects a module with more than 5 lines 891s accepts empty modules 891s reports the correct beginning and end lines 891s when inspecting a class defined with ::Module.new 891s registers an offense 891s when inspecting a class defined with Module.new 891s registers an offense 891s when `CountAsOne` is not empty 891s folds array into one line 891s when using numbered parameter 891s when inspecting a class defined with Module.new 891s registers an offense 891s when inspecting a class defined with ::Module.new 891s registers an offense 891s when a module has inner classes 891s rejects a module with 6 lines that belong to the module directly 891s does not count lines of inner classes 891s when a module has inner modules 891s does not count lines of inner modules 891s rejects a module with 6 lines that belong to the module directly 891s when CountComments is enabled 891s also counts commented lines 891s 891s RuboCop::Cop::Lint::UnusedMethodArgument 891s when IgnoreEmptyMethods config parameter is set 891s accepts an empty method with multiple unused parameters 891s registers an offense for a non-empty method with a single unused parameter 891s accepts an empty singleton method with a single unused parameter 891s accepts an empty method with a single unused parameter 891s registers an offense for a non-empty method with multiple unused parameters 891s inspection 891s when an argument with a default value is unused 891s registers an offense and preserves the default value 891s when a block argument is unused 891s does not care 891s when a method argument is used 891s accepts 891s when a trailing block argument is unused 891s registers an offense and removes the unused block arg 891s in a method calling `super` with arguments 891s when a method argument is unused 892s registers an offense 892s when a singleton method argument is unused 892s registers an offense 892s in a method calling `binding` without arguments 892s accepts all arguments 892s inside another method definition 892s registers offenses 892s when a required keyword argument is unused 892s when a required keyword argument is unused 892s registers an offense but does not suggest underscore-prefix 892s in a method calling `super` without arguments 892s when a method argument is not used explicitly 892s accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them 892s when a splat argument is unused 892s registers an offense and preserves the splat 892s when a variable is unused 892s does not care 892s when a method takes multiple arguments 892s and all the arguments are unused 892s registers offenses and suggests the use of `*` and autocorrects to add underscore-prefix to all arguments 892s and an argument is unused 892s registers an offense and adds underscore-prefix 892s and one argument is assigned to another, whilst other's value is not used 892s registers an offense 892s and arguments are swap-assigned 892s accepts 892s and there is some whitespace around the unused argument 892s registers an offense and preserves whitespace 892s when an underscore-prefixed method argument is unused 892s accepts 892s when an optional keyword argument is unused 892s registers an offense but does not suggest underscore-prefix 892s and AllowUnusedKeywordArguments set 892s does not care 892s in a method calling `binding` with arguments 892s when a method argument is unused 892s registers an offense 892s when IgnoreNotImplementedMethods config parameter is set 892s accepts a method with a single unused parameter & raises ::NotImplementedError 892s accepts a method with a single unused parameter & fails with message 892s accepts a method with a single unused parameter & fails without message 892s accepts an empty method with multiple unused parameters 892s registers an offense for a non-empty method with multiple unused parameters 892s registers an offense for a non-empty method with a single unused parameter 892s accepts a method with a single unused parameter & raises NotImplementedError 892s accepts an empty singleton method with a single unused parameter &raise NotImplementedError 892s accepts a method with a single unused parameter & raises NotImplementedError, message 892s 892s RuboCop::Cop::Lint::UnexpectedBlockArity 892s registers multiple offenses 892s with a numblock 892s when given no parameters 892s registers an offense 892s with no receiver 892s does not register an offense 892s when given two parameters 892s does not register an offense 892s when using enough parameters, but not all explicitly 892s does not register an offense 892s when given three parameters 892s does not register an offense 892s when given one parameter 893s registers an offense 893s with a block 893s with keyword args 893s registers an offense 893s with a keyword splat 893s registers an offense 893s when given a splat parameter 893s does not register an offense 893s when given three parameters 893s does not register an offense 893s with shadow args 893s registers an offense 893s when given no parameters 893s registers an offense 893s with optargs 893s with arity 1 893s registers an offense 893s with arity 2 893s does not register an offense 893s with no receiver 893s does not register an offense 893s when destructuring 893s with arity 1 893s registers an offense 893s with arity 2 893s does not register an offense 893s when given one parameter 893s registers an offense 893s when given two parameters 893s does not register an offense 893s 893s RuboCop::Cop::Layout::ElseAlignment 893s accepts a ternary if 893s with case 893s accepts case without else 893s accepts correctly aligned case/when/else 893s registers an offense for misaligned else 893s accepts else aligned with when but not with case 893s >= Ruby 2.7 893s with case match 893s accepts correctly aligned case/when/else 893s registers an offense for misaligned else 893s accepts case match without else 893s accepts correctly aligned empty else 893s with def/defs 893s accepts an empty defs body 893s accepts an empty def body 893s when modifier and def are on the same line 893s registers an offense for else not aligned with private 893s accepts a correctly aligned body 893s with if statement 893s accepts an if/else branches with rescue clauses 893s accepts indentation after else when if is on new line after assignment 893s accepts a one line if statement 893s accepts a correctly aligned if/elsif/else/end 893s registers an offense for misaligned elsif 893s registers an offense for misaligned else 893s with assignment 893s when alignment style is keyword by choice 893s and end is aligned with keyword 893s accepts an if/else in assignment 893s accepts an until in assignment 893s accepts a while in assignment 893s accepts an if in assignment 893s accepts an if/else in assignment on next line 893s and end is aligned with variable 893s registers an offense for an if 893s when alignment style is variable 893s and end is aligned with keyword 893s registers an offense for an if 893s registers an offense for an if with element assignment 893s registers offenses for an if with setter 893s and end is aligned with variable 893s accepts an if-elsif-else with end aligned with setter 893s accepts an if-else with end aligned with setter 893s accepts an if with end aligned with element assignment 893s accepts an if/else 893s accepts an if/else with chaining after the end 894s accepts an if/else with chaining with a block after the end 894s for a file with byte order mark 894s accepts a correctly aligned if/elsif/else/end 894s ensure/rescue/else in Block Argument 894s accepts a correctly aligned else with assignment 894s accepts a correctly aligned else 894s registers an offense for misaligned else 894s with unless 894s registers an offense for misaligned else 894s accepts an empty unless 894s accepts a correctly aligned else in an otherwise empty unless 894s with def/rescue/else/end 894s accepts a correctly aligned else 894s registers an offense for misaligned else 894s with begin/rescue/else/ensure/end 894s registers an offense for misaligned else 894s accepts a correctly aligned else 894s with def/rescue/else/ensure/end 894s registers an offense for misaligned else 894s accepts a correctly aligned else 894s 894s RuboCop::Options 894s options precedence 894s RUBOCOP_OPTS environment variable 894s has higher precedence then options from .rubocop file 894s has lower precedence then command line options 894s .rubocop directory 894s is ignored and command line options are used 894s .rubocop file 894s has lower precedence then command line options 894s has lower precedence then options from RUBOCOP_OPTS env variable 894s option 894s --cache-root 894s fails if also `--cache false` is given 894s accepts a path as argument 894s fails if no argument is given 894s --parallel 894s combined with two incompatible arguments 894s ignores --parallel and lists both incompatible arguments 894s combined with an autocorrect argument 894s combined with --fix-layout 894s allows --parallel 894s combined with --autocorrect 894s allows --parallel 894s combined with --autocorrect-all 894s allows --parallel 894s combined with --cache false 894s ignores --parallel 894s combined with --fail-fast 894s ignores --parallel 894s combined with --auto-gen-config 894s ignores --parallel 894s --cache 894s accepts false as argument 895s fails if no argument is given 895s fails if unrecognized argument is given 895s accepts true as argument 895s deprecated options 895s --auto-correct 895s emits a warning and sets the correct options instead 895s --safe-auto-correct 895s emits a warning and sets the correct options instead 895s --auto-correct-all 895s emits a warning and sets the correct options instead 895s incompatible cli options 895s rejects using -v with -V 895s mentions all incompatible options when more than two are used 895s rejects using -v with --show-cops 895s rejects using -V with --show-cops 895s --disable-uncorrectable 895s fails if given without an autocorrect argument 895s accepts together with a safe autocorrect argument 895s accepts together with an unsafe autocorrect argument 895s --fail-level 895s accepts full severity names 896s accepts the "fake" severities A/autocorrect 896s accepts severity initial letters 896s --require 896s requires the passed path 896s --auto-gen-only-exclude 896s fails if given without --auto-gen-config 896s --display-only-correctable 897s fails if given with an autocorrect argument 897s fails if given with --display-only-failed 897s --exclude-limit 897s fails if given last without argument 897s fails if given first without argument 897s fails if given alone without argument 897s fails if given without --auto-gen-config 897s --display-only-fail-level-offenses 897s fails if given with an autocorrect argument 897s --raise-cop-error 897s raises cop errors 897s -h/--help 897s lists all builtin formatters 898s exits cleanly 898s shows help text 898s --autocorrect 898s Specify only --autocorrect 898s sets some autocorrect options 898s Specify --autocorrect and --autocorrect-all 898s emits a warning and sets some autocorrect options 898s --regenerate-todo 898s when todo options are overridden before --regenerate-todo 898s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 898s when todo options are overridden after --regenerate-todo 898s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"50", :offense_counts=>false, :regenerate_todo=>true} 898s when disabled options are overridden to be enabled 898s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>true, :regenerate_todo=>true} 898s when no other options are given 898s is expected to eq {:auto_gen_config=>true, :exclude_limit=>"100", :offense_counts=>false, :regenerate_todo=>true} 898s --fix-layout 898s sets some autocorrect options 898s --autocorrect-all 898s sets some autocorrect options 898s --auto-gen-config 898s accepts other options 898s -s/--stdin 898s fails if no paths are given 898s fails if more than one path is given 898s succeeds with exactly one path 898s --no-parallel 898s disables parallel from file 898s --display-only-failed 898s fails if given without --format junit 898s works if given with --format junit 898s 898s RuboCop::Cop::InternalAffairs::StyleDetectedApiUse 898s registers an offense when opposite_style_detected is used in a conditional expression 898s registers an offense when opposite_style_detected is used without a correct_style_detected follow up 898s does not register an offense when correct_style_detected and a ambiguous_style_detected are both used 898s registers an offense when unexpected_style_detected is used without a correct_style_detected follow up 898s does not register an offense when correct_style_detected and a unrecognized_style_detected are both used 898s registers an offense when correct_style_detected is used in a conditional expression 898s registers an offense when ambiguous_style_detected is used in a conditional expression 898s registers an offense when unrecognized_style_detected is used without a correct_style_detected follow up 898s registers an offense when correct_style_detected is used without a negative *_style_detected follow up 898s registers an offense when no_acceptable_style! is used in a conditional expression 898s does not register an offense when correct_style_detected and a unexpected_style_detected are both used 898s registers an offense when unrecognized_style_detected is used in a conditional expression 898s registers an offense when conflicting_styles_detected is used without a correct_style_detected follow up 898s registers an offense when no_acceptable_style! is used without a correct_style_detected follow up 899s does not register an offense when correct_style_detected and a no_acceptable_style! are both used 899s registers an offense when ambiguous_style_detected is used without a correct_style_detected follow up 899s registers an offense when unexpected_style_detected is used in a conditional expression 899s does not register an offense when correct_style_detected and a conflicting_styles_detected are both used 899s does not register an offense when correct_style_detected and a opposite_style_detected are both used 899s registers an offense when conflicting_styles_detected is used in a conditional expression 899s 899s RuboCop::Cop::Style::EmptyCaseCondition 899s given a case statement with an empty case 899s when using `when ... then` in `case` in a method call 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s with a single when branch and no else 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s with multiple when branches and an else 899s behaves like detect/correct empty case, accept non-empty case 899s registers an offense and autocorrects 899s accepts the source with case 899s when using `return` in `else` clause and assigning the return value of `case` 899s does not register an offense 899s with a single when branch and an else 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s with first when branch including comma-delimited alternatives 899s behaves like detect/correct empty case, accept non-empty case 899s registers an offense and autocorrects 899s accepts the source with case 899s when used as an argument of a method with comment 899s behaves like detect/correct empty case, accept non-empty case 899s registers an offense and autocorrects 899s accepts the source with case 899s when using `return ... if` in `when` clause and assigning the return value of `case` 899s does not register an offense 899s when using `return ... if` in `else` clause and assigning the return value of `case` 899s does not register an offense 899s with multiple when branches and an `else` with code comments 899s behaves like detect/correct empty case, accept non-empty case 899s registers an offense and autocorrects 899s accepts the source with case 899s with multiple when branches and no else 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s when using `return` in `when` clause and assigning the return value of `case` 899s does not register an offense 899s when used as an argument of a method without comment 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s with when branches using then 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s when using `when ... then` in `case` in `return` 899s behaves like detect/correct empty case, accept non-empty case 899s registers an offense and autocorrects 899s accepts the source with case 899s with a when branch including comma-delimited alternatives 899s behaves like detect/correct empty case, accept non-empty case 899s accepts the source with case 899s registers an offense and autocorrects 899s 899s RuboCop::Cop::Style::RescueStandardError 899s implicit 899s accepts rescue modifier 899s when rescuing in a method definition 899s accepts rescuing a single error other than StandardError 899s accepts rescuing a single error other than StandardError, assigned to a variable 899s accepts rescuing no error class 899s accepts rescuing StandardError with other errors 899s accepts rescuing StandardError with other errors, assigned to a variable 899s accepts rescuing no error class, assigned to a variable 899s when rescuing StandardError by itself 899s registers an offense 899s when the error is assigned to a variable 899s registers an offense 900s when rescuing in a begin block 900s accepts rescuing StandardError with other errors, assigned to a variable 900s accepts rescuing a single error class other than StandardError 900s accepts rescuing no error class, assigned to a variable 900s accepts rescuing a single error class other than StandardError, assigned to a variable 900s accepts rescuing no error class 900s accepts rescuing StandardError with other errors 900s accepts rescuing ::StandardError with other errors 900s when rescuing StandardError by itself 900s registers an offense 900s when the error is assigned to a variable 900s registers an offense 900s with ::StandardError 900s registers an offense 900s with ::StandardError 900s registers an offense 900s explicit 900s accepts rescue modifier 900s when rescuing in a method definition 900s accepts rescuing a single error other than StandardError 900s accepts rescuing StandardError with other errors 900s accepts rescuing StandardError by itself 900s accepts rescuing StandardError by itself, assigned to a variable 900s accepts rescuing a single error other than StandardError, assigned to a variable 900s accepts rescuing StandardError with other errors, assigned to a variable 900s when the error is assigned to a variable 900s registers an offense 900s when rescue is called without an error class 900s registers an offense 900s when rescuing in a begin block 900s accepts rescuing StandardError by itself 900s accepts rescuing a single error other than StandardErrorassigned to a variable 900s accepts rescuing StandardError with other errors, assigned to a variable 900s accepts rescuing a single error other than StandardError 900s accepts rescuing StandardError with other errors 900s accepts rescuing StandardError by itself, assigned to a variable 900s when calling rescue without an error class 900s registers an offense 900s when the error is assigned to a variable 900s registers an offense 900s 900s RuboCop::Cop::Lint::ScriptPermission 900s with file permission 0644 900s registers an offense for script permission 900s if autocorrection is off 900s leaves the file intact 900s with stdin 900s skips investigation 900s with file permission 0755 900s accepts with blank 900s accepts without shebang line 901s accepts with shebang line 901s 901s RuboCop::Cop::Layout::FirstMethodParameterLineBreak 901s accepts methods without params 901s registers an offense and corrects params listed on the first line 901s registers an offense and corrects params with default values 901s accepts params without parens 901s registers an offense and corrects params on first line of singleton method 901s accepts params listed on a single line 901s accepts single-line methods 901s 901s RuboCop::Cop::Naming::HeredocDelimiterNaming 901s with a non-interpolated heredoc 901s when using single quoted delimiters 901s does not register an offense with a meaningful delimiter 901s registers an offense with a non-meaningful delimiter 901s when using back tick delimiters 901s registers an offense with a non-meaningful delimiter 901s does not register an offense with a meaningful delimiter 901s when using double quoted delimiters 901s does not register an offense with a meaningful delimiter 901s registers an offense with a non-meaningful delimiter 901s when using non-word delimiters 901s registers an offense 901s with a squiggly heredoc 901s does not register an offense with a meaningful delimiter 901s registers an offense with a non-meaningful delimiter 901s with multiple heredocs starting on the same line 901s registers an offense with a leading non-meaningful delimiter 901s registers an offense with a trailing non-meaningful delimiter 901s does not register an offense with meaningful delimiters 901s with a naked heredoc 901s registers an offense with a non-meaningful delimiter 901s does not register an offense with a meaningful delimiter 901s with an interpolated heredoc 901s does not register an offense with a meaningful delimiter 901s registers an offense with a non-meaningful delimiter 901s when the delimiter contains non-letter characters 901s does not register an offense when delimiter contains a number 901s does not register an offense when delimiter contains an underscore 901s 901s RuboCop::Cop::Layout::SpaceInsideReferenceBrackets 901s with space inside empty brackets not allowed 901s registers an offense and corrects empty brackets with multiple spaces inside 901s accepts empty brackets with no space inside 901s registers an offense and corrects empty brackets with 1 space inside 901s registers an offense and corrects empty brackets with newline inside 901s when EnforcedStyle is space 901s registers an offense and correct third ref brackets with no trailing whitespace 901s does not register offense for ref bcts with spaces that assign 901s registers an offense and corrects ref brackets with no trailing whitespace 901s registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket 902s registers an offense and corrects ref brackets with no leading whitespace 902s accepts an array as a reference object 902s registers an offense and corrects second ref brackets with no trailing whitespace 902s registers an offense and corrects second ref brackets with no leading whitespace 902s accepts spaces in array brackets 902s does not register offense for reference brackets with spaces 902s accepts square brackets called with method call syntax 902s does not register offense for array literals 902s registers and corrects multiple offenses in one set of ref brackets 902s accepts square brackets as method name 902s registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace 902s registers an offense and corrects third ref brackets with no leading whitespace 902s registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket 902s registers and corrects multiple offenses for multiple sets of ref brackets 902s when EnforcedStyle is no_space 902s accepts square brackets as method name 902s accepts an array as a reference object 902s registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace 902s accepts extra spacing in array brackets 902s registers an offense and corrects second ref brackets with trailing whitespace 902s registers an offense and corrects outer ref brackets 902s registers an offense and corrects third ref brackets with leading whitespace 902s accepts square brackets called with method call syntax 902s registers an offense and corrects third ref brackets with trailing whitespace 902s registers multiple offenses and corrects one set of ref brackets 902s does not register offense for ref bcts with no spaces that assign 902s registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket 902s register and correct multiple offenses for multiple sets of ref brackets 902s does not register offense for array literals 902s registers an offense and corrects ref brackets with trailing whitespace 902s registers an offense and corrects second ref brackets with leading whitespace 902s registers an offense and corrects when a reference bracket with a trailing whitespace is assigned by another reference bracket 902s registers multiple offenses and corrects multiple sets of ref brackets 902s does not register offense for non-empty brackets with newline inside 902s registers an offense and corrects ref brackets with leading whitespace 902s does not register offense for reference brackets with no spaces 902s with space inside empty braces allowed 902s registers offense and corrects empty brackets with no space inside 902s registers offense and corrects empty brackets with more than one space inside 902s registers offense and corrects empty brackets with newline inside 902s accepts empty brackets with space inside 902s 902s RuboCop::Cop::Bundler::DuplicatedGem 902s when investigating Gemfiles 903s does not register an offense when gem is duplicated within `if-else` statement 903s does not register an offense when gem is duplicated within `case` statement 903s registers an offense when gem from default group is conditionally duplicated 903s does not register an offense when gem is duplicated within `if-elsif` statement 903s and a gem is duplicated in default group 903s registers an offense 903s and no duplicate gems are present 903s does not register any offenses 903s and the file is empty 903s does not register any offenses 903s and a duplicated gem is in a git/path/group/platforms block 903s registers an offense 903s when investigating Ruby files 903s does not register any offenses 903s 903s RuboCop::Cop::Style::NumericLiteralPrefix 903s decimal literals 903s registers an offense for prefixes 903s does not register offense for no prefix 903s binary literals 903s registers an offense for uppercase prefix 903s does not register offense for lowercase prefix 903s octal literals 903s when config is zero_with_o 903s registers an offense for prefixes `0` and `0O` 903s does not register offense for lowercase prefix 903s when config is zero_only 903s registers an offense for prefix `0O` and `0o` 903s does not register offense for prefix `0` 903s hex literals 903s does not register offense for lowercase prefix 903s registers an offense for uppercase prefix 903s 903s RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis 903s incorrect cases 903s simple incorrect case comma with spaces and comma in heredoc 903s detects 903s incorrect case nested method call with comma 903s detects 903s incorrect case with other param before constructor and raise call 903s detects 903s nested incorrect case 903s detects 904s simple incorrect case 904s detects 904s incorrect case with other param before constructor 904s detects 904s simple incorrect case squiggles 904s detects 904s simple incorrect case hash 904s detects 904s double case new line 904s detects and fixes 904s double incorrect case new line chained calls 904s detects 904s simple incorrect case comma 904s detects 904s complex chained incorrect case with multiple calls 904s detects and fixes the first 904s incorrect case with other param before 904s detects 904s incorrect case with other param after 904s detects 904s incorrect case in array with spaced out comma 904s detects 904s simple incorrect case with call after 904s detects 904s simple incorrect case comma with spaces 904s detects 904s complex incorrect case with multiple calls 904s detects and fixes the first 904s detects and fixes the second 904s double incorrect case 904s detects 904s simple incorrect case with call after trailing comma 904s detects 904s incorrect case in array with nested calls and double heredoc and spaced out comma 904s detects 904s incorrect case in array with double heredoc and spaced out comma 904s detects 904s correct cases 904s accepts double correct case new line 904s accepts when there is an argument between a heredoc argument and the closing paretheses 904s accepts correct case with other param before 904s accepts correct case with other param after 904s accepts method chain with heredoc argument correct case 904s accepts double correct case nested 904s accepts simple correct case 904s accepts method with heredoc argument of proc correct case 904s accepts double correct case 904s accepts hash correct case 904s invocation after the HEREDOC 904s ignores random call 904s ignores random call after 904s ignores tr 904s 904s RuboCop::Cop::EnforceSuperclass 904s registers an offense for top-level constant ::Class.new definition 904s registers an offense for model defined using top-level 905s registers an offense for models that subclass ::ActiveRecord::Base 905s registers an offense for Class.new definition 905s registers an offense for models that subclass ActiveRecord::Base 905s registers an offense for single-line definitions 905s when MyModel subclasses ApplicationRecord 905s behaves like no offense 905s registers no offenses for `class MyModel < ::ApplicationRecord; end` 905s behaves like no offense 905s registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do 905s end 905s MyModel = ::Class.new(::ApplicationRecord) 905s ` 905s behaves like no offense 905s registers no offenses for `MyModel = Class.new(ApplicationRecord) do 905s end 905s MyModel = Class.new(ApplicationRecord) 905s ` 905s behaves like no offense 905s registers no offenses for `class MyModel < ApplicationRecord; end` 905s when ApplicationRecord subclasses ActiveRecord::Base 905s behaves like no offense 905s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end 905s ` 905s behaves like no offense 905s registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` 905s behaves like no offense 905s registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end 905s ` 905s behaves like no offense 905s registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) 905s ` 905s behaves like no offense 905s registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end 905s ` 905s behaves like no offense 905s registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` 905s behaves like no offense 905s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) 905s ` 905s behaves like no offense 905s registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end 905s ` 905s 905s RuboCop::Cop::Lint::Void 905s accepts void op <= if on last line 905s accepts void op == if on last line 905s accepts percent-x commands 905s accepts void op * if on last line 905s accepts void op >= if on last line 905s accepts void op - if on last line 905s registers an offense for void sign op + if not on last line 906s accepts void op != by itself without a begin block 906s accepts void unary op + by itself without a begin block 906s registers an offense for void unary op ! if not on last line 906s accepts void op <= by itself without a begin block 906s registers an offense for void op % if not on last line 906s registers an offense for void var @var if not on last line 906s accepts void op === by itself without a begin block 906s accepts void op % by itself without a begin block 906s accepts void op > by itself without a begin block 906s registers two offenses for void literals in a `for` 906s accepts void op === if on last line 906s registers two offenses for void literals in an initialize method 906s accepts void op / by itself without a begin block 906s registers an offense for void var VAR if not on last line 906s accepts void op <=> if on last line 906s registers two offenses for void literals in a setter method 906s registers two offenses for void literals in `#tap` method 906s registers an offense for void op / if not on last line 906s handles `#each` block with single expression 906s registers an offense for void op - if not on last line 906s accepts method with erange block 906s accepts void op % if on last line 906s accepts void unary op ~ if on last line 906s accepts void unary op ! if on last line 906s accepts empty block 906s accepts void op + by itself without a begin block 906s accepts void unary op + if on last line 906s accepts void op >= by itself without a begin block 906s registers an offense for void unary op ~ if not on last line 906s registers an offense for void op >= if not on last line 906s registers an offense for void op == if not on last line 906s registers an offense for void var @@var if not on last line 906s accepts void op > if on last line 906s registers an offense for void op + if not on last line 906s registers an offense for void lit {} if not on last line 906s registers an offense for void op <=> if not on last line 906s accepts backtick commands 906s registers an offense for void op != if not on last line 906s registers an offense for void lit /test/ if not on last line 906s accepts void op / if on last line 906s registers two offenses for void literals in a `#each` method 906s registers an offense for void lit 2.0 if not on last line 906s accepts short call syntax 907s accepts void op <=> by itself without a begin block 907s registers an offense for void lit :test if not on last line 907s accepts void op == by itself without a begin block 907s registers an offense for void lit [1] if not on last line 907s accepts void op * by itself without a begin block 907s registers an offense for void op > if not on last line 907s accepts void unary op ! by itself without a begin block 907s registers an offense for void sign op - if not on last line 907s registers an offense for void var var if not on last line 907s handles explicit begin blocks 907s registers an offense for void literal in a method definition 907s registers an offense for void op * if not on last line 907s registers an offense for void lit 1 if not on last line 907s registers an offense for void `defined?` if not on last line 907s accepts void unary op ~ by itself without a begin block 907s accepts void unary op - by itself without a begin block 907s registers an offense for void op < if not on last line 907s registers an offense for void `self` if not on last line 907s accepts void op - by itself without a begin block 907s accepts void op < by itself without a begin block 907s registers an offense for void var $var if not on last line 907s registers an offense for void op === if not on last line 907s accepts void op < if on last line 907s accepts method with irange block 907s accepts void op != if on last line 907s accepts void op + if on last line 907s registers an offense for void op <= if not on last line 907s accepts void unary op - if on last line 907s when checking for methods with no side effects 907s registers an offense for chained methods 907s registers an offense if not on last line 907s Ruby 2.7 907s registers two offenses for void literals in `#tap` method 907s when not checking for methods with no side effects 907s does not register an offense for void nonmutating methods 907s 907s RuboCop::Cop::Style::RedundantAssignment 907s reports an offense for def ending with assignment and returning 907s does not register an offense when ensure block present 907s accepts empty method body 907s accepts empty if body 907s accepts empty when nodes 907s when inside begin-end body 907s registers an offense and autocorrects 907s when rescue blocks present 907s registers an offense and autocorrects when inside function or rescue block 907s when inside a when-branch 907s registers an offense and autocorrects 907s when inside an if-branch 907s registers an offense and autocorrects 907s 907s RuboCop::Cop::Lint::ParenthesesAsGroupedExpression 907s does not register an offense for a call with multiple arguments 907s does not register an offense for math expression 907s accepts a method call without arguments 907s does not register an offense for expression followed by chained expression with safe navigation operator 907s registers an offense and corrects for predicate method call with space before the parenthesis 907s does not register an offense for ternary operator 907s does not register an offense for expression followed by chained expression 907s accepts a space inside opening paren followed by left paren 907s does not register an offesne when heredoc has a space between the same string as the method name and `(` 907s does not register an offense when method argument parentheses are omitted and hash argument key is enclosed in parentheses 907s accepts method with parens as arg to method without 907s does not register an offense for expression followed by an operator 907s accepts an operator call with argument in parentheses 907s accepts a chain of method calls 907s accepts a method call with arguments but no parentheses 907s does not register an offense for math expression with `to_i` 907s registers an offense and corrects for method call with space before the parenthesis 907s when using safe navigation operator 907s registers an offense and corrects for method call with space before the parenthesis 907s 907s RuboCop::Cop::Style::NilLambda 907s stabby lambda 907s registers an offense when returning nil implicitly 907s registers an offense when returning nil with `next` 907s registers an offense when returning nil with `return` 908s properly corrects multiline 908s does not register an offense when doing more than returning nil 908s registers an offense when returning nil with `break` 908s does not register an offense when not returning nil 908s block lambda 908s does not register an offense when doing more than returning nil 908s registers an offense when returning nil with `return` 908s properly corrects single line 908s registers an offense when returning nil with `break` 908s registers an offense when returning nil implicitly 908s does not register an offense when not returning nil 908s does not remove block params or change spacing 908s registers an offense when returning nil with `next` 908s Proc.new 908s does not remove block params or change spacing 908s registers an offense when returning nil implicitly 908s does not register an offense when not returning nil 908s registers an offense when returning nil with `break` 908s properly corrects single line 908s does not register an offense when doing more than returning nil 908s registers an offense when returning nil with `next` 908s registers an offense when returning nil with `return` 908s proc 908s properly corrects single line 908s does not register an offense when not returning nil 908s registers an offense when returning nil with `next` 908s does not register an offense when doing more than returning nil 908s registers an offense when returning nil with `break` 908s does not remove block params or change spacing 908s registers an offense when returning nil implicitly 908s registers an offense when returning nil with `return` 908s 908s RuboCop::Cop::Style::ClassMethods 908s does not register an offense outside class/module bodies 908s does not register an offense for methods using self 909s registers an offense for methods using a module name 909s does not register an offense for other top-level singleton methods 909s registers an offense for methods using a class name 909s 909s RuboCop::FeatureLoader 909s .load 909s with dot-prefixed loadable feature 909s loads it as relative path 909s with dot-prefixed namespaced feature 909s loads it as namespaced feature 909s with unloadable namespaced feature 909s raises LoadError with preferred message 909s with namespaced feature 909s loads it as namespaced feature 909s with unexpected LoadError from require 909s raises LoadError 909s with normally loadable feature 909s loads it normally 909s 909s RuboCop::Cop::Layout::SpaceBeforeBrackets 909s does not register an offense when assigning an array 909s does not register an offense when using array literal argument without parentheses 909s does not register an offense when using percent array literal argument without parentheses 909s when assigning 909s does not register an offense when not using space between receiver and left brackets 909s does not register an offense when space is used in left bracket 909s does not register an offense when multiple spaces are inserted inside the left bracket 909s registers an offense and corrects when using space between receiver and left brackets 909s when referencing 909s does not register an offense when using space between method call and left brackets 909s does not register an offense when without receiver 909s registers an offense and corrects when using space between ivar receiver and left brackets 909s registers an offense and corrects when using space between lvar receiver and left brackets 909s does not register an offense when not using space between method call and left brackets 909s does not register an offense when it is used as a method argument 909s registers an offense and corrects when using space between gvar receiver and left brackets 909s registers an offense and corrects when using space between cvar receiver and left brackets 909s does not register an offense when not using space between variable receiver and left brackets 909s does not register an offense when call desugared `Hash#[]` to cvar receiver 909s does not register an offense when array literal argument is enclosed in parentheses 909s does not register an offense when using multiple arguments 909s does not register an offense when call desugared `Hash#[]` to ivar receiver 909s does not register an offense when call desugared `Hash#[]` to lvar receiver 909s 909s RuboCop::CLI 910s does not register any offenses for an empty file 912s registers an offense for a syntax error 913s checks a given file with faults and returns 1 914s finds a file with no .rb extension but has a shebang line 915s can process a file with an invalid UTF-8 byte sequence 917s registers an offense for Parser warnings 917s configuration of target Ruby versions 917s when configured with an unknown version 918s fails with an error message 918s when configured with an unsupported ruby 919s fails with an error message 919s when checking a correct file 920s returns 0 920s when super is used with a block 922s still returns 0 922s for a disabled cop 923s reports no offense when enabled on part of a file 923s style guide only usage 923s via the cli option 923s --only-guide-cops 924s overrides configuration of AllCops/StyleGuideCopsOnly 925s runs cops for rules that link to a style guide 926s skips cops that have no link to a style guide 927s via the config 927s AllCops/StyleGuideCopsOnly 927s when it is false 927s runs cops for rules regardless of any link to the style guide 927s when it is true 928s skips cops that have no link to a style guide 928s AllCops/DisabledByDefault 928s when it is true 929s runs only the cop configured in .rubocop.yml 929s when it is false 931s runs all cops that are enabled in default configuration 931s configuration from file 932s prints an error message for an unrecognized EnforcedStyle 934s finds included files 936s can be configured with project config to disable a certain error 937s can exclude directories relative to .rubocop.yml 938s can be configured to merge a parameter that is a hash 940s only reads configuration in explicitly included hidden directories 942s can use an alternative max line length from a config file 942s cannot disable Syntax offenses 945s displays style guide URLs if DisplayStyleGuide is true 946s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout 946s can be configured to override a parameter that is a hash in a special case 947s ignores excluded files 948s can have different config files in different directories 949s excludes the vendor directory by default 950s fails when a configuration file has invalid YAML syntax 952s prints a warning for an unrecognized configuration parameter 953s can be configured with option to disable a certain error 955s works when a cop that others depend on is disabled 956s can disable parser-derived offenses with warning severity 958s displays cop names if DisplayCopNames is false 959s prints an error for an unrecognized cop name in .rubocop.yml 965s fails when a configuration file specifies an invalid Severity 966s does not read files in excluded list 968s uses the DefaultFormatter if another formatter is not specified 969s can exclude a typical vendor directory 970s can exclude a vendor directory with an erroneous config file 971s matches included/excluded files correctly when . argument is given 972s works when a configuration file passed by -c specifies Exclude with strings 974s runs without errors for an unrecognized cop name in .rubocop.yml and `--ignore-unrecognized-cops` option is given 975s works when a configuration file passed by -c specifies Exclude with regexp 976s allows the default configuration file as the -c argument 978s prefers a config file in ancestor directory to another in home 979s shows an error if the input file cannot be found 980s does not consider Include parameters in subdirectories 980s works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength 982s can exclude a vendor directory indirectly 982s when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter 982s fails with an error message 983s without using namespace 983s can be configured with option to disable a certain error 983s when obsolete MultiSpaceAllowedForOperators param is used 984s displays a warning 984s when a file inherits from a higher level 985s inherits relative excludes correctly 985s when --force-default-config option is specified 985s when config file specified with -c 987s ignores config file 987s when no config file specified 988s ignores config file 988s when configured for indented_internal_methods style indentation 990s registers offense for normal indentation in module 992s registers offense for normal indentation in class 993s accepts indented_internal_methods style indentation 993s when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter 995s fails with an error message 995s when a value in a hash is overridden with nil 997s acts as if the key/value pair was removed 997s when configuration is taken from $HOME/.rubocop.yml 997s handles relative excludes correctly when run from project root 997s obsolete cops 997s when configuration for TrailingComma is given 1000s fails with an error message 1000s rubocop:disable comment 1001s can disable selected cops in a code section 1003s can disable all cops on a single line 1004s can disable selected cops on a single line 1005s can disable all cops in a code section 1005s when not necessary 1006s causes an offense to be reported 1006s and RedundantCopDisableDirective is individually disabled 1008s does not report RedundantCopDisableDirective offenses 1008s when using `rubocop:disable` line comment for `Lint/EmptyBlock` 1010s does not register an offense for `Lint/RedundantCopDisableDirective` 1010s when using `rubocop:disable` line comment for `Style/RedundantInitialize` 1012s does not register an offense for `Lint/RedundantCopDisableDirective` 1012s and RedundantCopDisableDirective is individually excluded 1014s does not report RedundantCopDisableDirective offenses 1014s and RedundantCopDisableDirective is disabled through department 1015s does not report RedundantCopDisableDirective offenses 1015s and there are no other offenses 1016s exits with error code 1016s without using namespace 1018s can disable selected cops on a single line but prints a warning 1018s Specify `--init` option to `rubocop` command 1018s when .rubocop.yml does not exist 1018s generate a .rubocop.yml file 1018s when .rubocop.yml already exists 1018s fails with an error message 1018s when --autocorrect-all is given 1020s does not trigger RedundantCopDisableDirective due to lines moving around 1020s when interrupted 1021s returns 130 1021s when given a file/directory that is not under the current dir 1021s and the Rakefile path is relative 1022s checks a Rakefile but Style/FileName does not report 1022s and the directory is relative 1024s checks a Rakefile but Style/FileName does not report 1024s and the directory is absolute 1025s checks a Rakefile but Style/FileName does not report 1025s and the Rakefile path is absolute 1027s checks a Rakefile but Style/FileName does not report 1027s when lines end with CR+LF 1028s reports an offense 1028s configuration of `AutoCorrect` 1028s when setting `AutoCorrect: false` for `Style/StringLiterals` 1029s does not suggest `1 offense autocorrectable` for `Style/StringLiterals` 1029s when parallel static by default 1029s when setting `UseCache: false` 1030s fails with an error message 1030s when specifying `--debug` option only` 1031s fails with an error message 1031s when setting `UseCache: true` 1033s fails with an error message 1033s when specifying `--debug` and `-a` options` 1034s uses parallel inspection when correcting the file 1034s info severity 1034s when there are only info offenses 1036s returns a 0 code 1036s when given `--fail-level info` 1037s returns a 1 code 1037s when given `--display-only-fail-level-offenses` 1038s returns a 0 code but does not list offenses 1038s when `Lint/Syntax` is given `Severity: info` 1040s is an invalid configuration 1040s when there are not only info offenses 1042s returns a 1 code 1042s unknown cop 1042s in configuration file is given 1043s prints the error and exists with code 2 1043s when a directory is named `*` 1043s does not crash 1043s when errors are raised while processing files due to bugs 1045s displays an error message to stderr 1045s cops can exclude files based on config 1046s ignores excluded files 1046s configuration of `require` 1046s unknown library is specified 1046s exits with 2 1046s 1046s RuboCop::Cop::Style::NonNilCheck 1046s when `EnforcedStyle: comparison` of `Style/NilComparison` cop 1046s `IncludeSemanticChanges: true` 1048s registers an offense for `foo != nil` 1048s `IncludeSemanticChanges: false` 1048s does not register an offense for `foo != nil` 1048s when not allowing semantic changes 1048s registers an offense for != nil 1048s registers an offense but does not correct when the code was not modified 1048s does not register an offense for !x.nil? 1048s does not register an offense if last expression in predicate 1048s does not register an offense with implicit receiver 1048s does not register an offense if last expression in class predicate 1048s does not register an offense if only expression in class predicate 1048s does not register an offense if only expression in predicate 1048s does not register an offense for != 0 1048s does not register an offense for not x.nil? 1048s when allowing semantic changes 1048s does not register an offense for `!x` 1048s registers an offense for `not x.nil?` 1048s autocorrects by changing `x != nil` to `x` 1048s does not blow up when autocorrecting implicit receiver 1048s does not register an offense for `x.nil?` 1048s corrects code that would not be modified if IncludeSemanticChanges were false 1048s registers an offense for unless x.nil? 1048s registers an offense for `!x.nil?` 1048s does not blow up with ternary operators 1048s 1048s RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage 1048s does not register an offense when no `RUBY_VERSION` 1048s registers an offense when using `RUBY_VERSION` 1048s registers an offense when using `::RUBY_VERSION` 1048s 1048s RuboCop::Cop::VariableForce::Assignment 1048s #name 1048s returns the variable name 1048s .new 1048s when an assignment node is passed 1048s does not raise error 1048s when an argument declaration node is passed 1048s raises error 1048s when any other type node is passed 1048s raises error 1048s #meta_assignment_node 1048s when it is &&= operator assignment 1048s returns and_asgn node 1048s when it is ||= operator assignment 1048s returns or_asgn node 1048s when it is += operator assignment 1048s returns op_asgn node 1048s when it is multiple assignment 1048s returns masgn node 1048s #operator 1048s when it is ||= operator assignment 1048s returns ||= 1048s when it is += operator assignment 1048s returns += 1048s when it is multiple assignment 1048s returns = 1048s when it is normal assignment 1048s returns = 1048s when it is &&= operator assignment 1048s returns &&= 1048s 1048s RuboCop::Cop::Metrics::MethodLength 1048s does not count blank lines 1048s is not fooled by one-liner methods, syntax #2 1048s properly counts lines when method ends with block 1048s accepts a method with multiline arguments and less than 5 lines of body 1048s accepts a method with less than 5 lines 1048s does not count commented lines by default 1048s is not fooled by one-liner methods, syntax #1 1048s accepts empty methods 1048s when method is an instance method 1048s registers an offense 1048s when methods to allow are defined 1048s AllowedPatterns is enabled 1048s raises offense for firstname 1048s accepts the user_name method 1049s AllowedMethods is enabled 1049s still rejects other methods with more than 5 lines 1049s accepts the foo method with more than 5 lines 1049s when `CountAsOne` is not empty 1049s folds array into one line 1049s when CountComments is enabled 1049s also counts commented lines 1049s when method is defined on a singleton class 1049s registers an offense 1049s when method is defined with `define_method` 1049s registers an offense 1049s when using numbered parameter 1049s when method is defined with `define_method` 1049s registers an offense 1049s when method is a class method 1049s registers an offense 1049s 1049s RuboCop::Cop::InternalAffairs::RedundantLocationArgument 1049s when location argument is passed 1049s when location argument is :expression 1049s registers an offense 1049s removes default `location` surrounded by other keywords 1049s removes default `location` when preceded by another keyword 1049s when there is a message argument 1049s registers an offense 1049s when location argument does not equal to :expression 1049s does not register an offense 1049s when location argument is not passed 1049s does not register an offense 1049s 1049s RuboCop::Cop::Force 1049s .force_name 1049s returns the class name without namespace 1049s #run_hook 1049s invokes a hook in all cops 1049s 1049s RuboCop::Cop::Style::RedundantEach 1049s does not register an offense when using `each_with_index` 1050s does not register an offense when any method is used between methods with `each` in the method name 1050s does not register an offense when using `each.with_index` 1050s does not register an offense when using `each {}.each_with_object([]) {}` 1050s does not register an offense when using `reverse_each(&:foo).each {...}` 1050s registers an offense when using a method starting with `each_` with `each_with_object` 1050s does not register an offense when using `each` as enumerator 1050s registers an offense when using a method starting with `each_` with `each_with_index` 1050s registers an offense when using `reverse_each.each` 1050s does not register an offense when using `each {}.reverse_each {}` 1050s does not register an offense when using `each_ancestor.each` 1050s registers an offense when using `each.reverse_each` 1050s does not register an offense when using `each_with_object` 1050s registers an offense when using `each.each_with_index` 1050s registers an offense when using `each.each(&:foo)` 1050s does not register an offense when using `each {}.each_with_index {}` 1050s does not register an offense when using `each_foo {}.each_with_object([]) {}` 1050s does not register an offense when using `each.with_object` 1050s registers an offense when using `reverse_each.each_with_object` 1050s does not register an offense when using `reverse_each {}.each {}` 1050s registers an offense when using `each.each` 1050s registers an offense when using `reverse_each.each_with_index` 1050s does not register an offense when using `each` with a symbol proc for last argument 1050s does not register an offense when using `each_with_index.reverse_each` 1050s registers an offense when using `each.each_with_object` 1050s does not register an offense when using only single `each` 1050s does not register an offense when using `each` with a symbol proc argument 1050s does not register an offense when not chaining `each_` calls 1050s 1050s RuboCop::Cop::Style::DoubleCopDisableDirective 1050s registers an offense for duplicate disable directives 1050s does not register an offense for cops with single cop directive 1051s registers an offense for duplicate todo directives 1051s 1051s RuboCop::Cop::Registry 1051s exposes a mapping of cop names to cop classes 1051s exposes the number of stored cops 1051s can filter down to one type 1051s can be cloned 1051s can filter down to all but one type 1051s exposes cop departments 1051s exposes a list of cop names 1051s names_for_department 1051s returns array of cops for specified department 1051s #contains_cop_matching? 1051s can find cops matching a given name 1051s returns false for cops not included in the store 1051s when dismissing a cop class 1051s allows it if done rapidly 1051s allows re-listing 1051s disallows it if done too late 1051s #cops 1051s exposes a list of cops 1051s with cops having the same inner-most module 1051s exposes both cops 1051s #enabled 1051s selects only safe cops if :safe passed 1051s selects cops which are enabled in the config 1051s overrides config if :only includes the cop 1051s when new cops are introduced 1051s overrides config if :only includes the cop 1051s does not include them 1051s when specifying `NewCops: enable` option in .rubocop.yml 1051s includes them 1051s when specifying `NewCops: disable` option in .rubocop.yml 1051s does not include them 1051s when specifying `NewCops: pending` option in .rubocop.yml 1051s does not include them 1051s when specifying `--enable-pending-cops` command-line option 1051s includes them 1051s when specifying `NewCops: disable` option in .rubocop.yml 1051s includes them because command-line option takes precedence over .rubocop.yml 1051s when specifying `--disable-pending-cops` command-line option 1051s does not include them 1051s when specifying `NewCops: enable` option in .rubocop.yml 1051s does not include them because command-line option takes precedence over .rubocop.yml 1051s #qualified_cop_name 1051s returns the provided name if no namespace is found 1051s emits a warning when namespace is incorrect 1051s raises an error when a cop name is ambiguous 1051s gives back already properly qualified names 1051s qualifies names without a namespace 1051s qualifies names with the correct namespace 1051s #department? 1051s returns false for other names 1051s returns true for department name 1051s 1051s RuboCop::Cop::Layout::AssignmentIndentation 1051s allows a properly indented rhs with fullwidth characters 1051s ignores comparison operators 1051s allows a properly indented rhs 1051s registers an offense for multi-lhs 1051s registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line 1051s registers an offense for incorrectly indented rhs 1051s registers an offense for incorrectly indented rhs when multiple assignment 1051s allows assignments that do not start on a newline 1051s when indentation width is overridden for this cop only 1051s allows a properly indented rhs 1051s autocorrects indentation 1051s 1051s RuboCop::Cop::Lint::UnusedBlockArgument 1051s when IgnoreEmptyBlocks config parameter is set 1051s registers an offense for a non-empty block with multiple unused args 1051s registers an offense for a non-empty block with an unused parameter 1051s accepts an empty block with multiple unused parameters 1051s accepts an empty block with a single unused parameter 1051s inspection 1051s when a variable is not used 1051s does not care 1051s in a method calling `binding` without arguments 1051s accepts all arguments 1051s inside a method definition 1051s registers offenses 1051s when a lambda block takes arguments 1051s and all the arguments are unused 1051s registers offenses and suggests using a proc 1051s and an argument is unused 1051s registers an offense 1051s when a block takes multiple arguments 1051s and a splat argument is unused 1051s registers an offense and preserves splat 1051s and arguments are swap-assigned 1051s accepts 1051s and all the arguments are unused 1051s registers offenses and suggests omitting them 1051s and unused arguments span multiple lines 1051s registers offenses and suggests omitting them 1051s and an argument is unused 1051s registers an offense 1051s and all arguments are used 1051s accepts 1051s and an argument with default value is unused 1051s registers an offense and preserves default value 1051s and one argument is assigned to another, whilst other's value is not used 1051s registers an offense 1051s when an optional keyword argument is unused 1051s when the method call is `define_method` 1051s registers an offense 1051s when AllowUnusedKeywordArguments set 1051s does not care 1051s when the method call is not `define_method` 1051s registers an offense 1051s when AllowUnusedKeywordArguments set 1051s does not care 1051s when a method argument is not used 1052s does not care 1052s with an empty block 1052s when not configured to ignore empty blocks 1052s registers an offense 1052s when configured to ignore empty blocks 1052s does not register an offense 1052s when a block takes single argument 1052s and the method call is `define_method` 1052s registers an offense 1052s and the argument is unused 1052s registers an offense and suggests omitting that 1052s when a block have a block local variable 1052s and the variable is unused 1052s registers an offense 1052s and the variable is used 1052s does not register offense 1052s in a method calling `binding` with arguments 1052s when a method argument is unused 1052s registers an offense 1052s when an underscore-prefixed block argument is not used 1052s accepts 1052s 1052s RuboCop::Formatter::PacmanFormatter 1052s #next_step 1052s when no offenses are detected 1052s calls the step function with a dot 1052s when a offense is detected in a file 1052s calls the step function with a dot 1052s #update_progress_line 1052s when total_files less than columns in the terminal 1052s updates the progress_line properly 1052s when total_files is greater than columns in the terminal 1052s updates the progress_line properly 1052s when need to change the line 1052s updates the progress_line properly 1052s #step 1052s character is a Pacdot 1052s leaves the progress_line as it is 1052s character is ghost 1052s removes the first • and puts a ghosts 1052s character is normal dot 1052s removes the first • and puts a . 1052s character is Pacman 1052s removes the first • and puts a ᗧ 1052s 1052s RuboCop::Cop::Style::ColonMethodCall 1052s does not register an offense for nested class 1052s does not register an offense for op methods 1052s does not register an offense for constant access 1052s registers an offense for class method call 1052s registers an offense for instance method call 1052s does not register an offense for Java package namespaces 1052s registers an offense for class method call with arg 1052s does not register an offense when for constructor methods 1052s does not register an offense for Java static types 1052s registers an offense for instance method call with arg 1052s 1052s RuboCop::Cop::Style::SingleLineMethods 1052s autocorrects def with semicolon before end 1052s autocorrects defs with parentheses after method name 1052s autocorrects def with argument in parentheses 1052s autocorrects def with semicolon after method name 1052s registers an offense for a single-line method 1052s accepts a multi-line method 1052s autocorrects def with argument and no parentheses 1052s registers an offense for a single-line method and method body is enclosed in parentheses 1052s does not crash on an method with a capitalized name 1052s endless methods 1052s does not register an offense 1052s when `Style/EndlessMethod` is disabled 1053s corrects to an normal method 1053s when `Style/EndlessMethod` is enabled 1053s with `allow_always` style 1053s behaves like convert to endless method 1053s corrects to an endless class method definition when using > 1053s does not to an endless class method definition when using `return` 1053s corrects to an endless method definition when single line method call with parentheses 1053s corrects to an endless class method definition when using >= 1053s corrects to an endless method definition when method body is a literal 1053s does not add parens if they are already present 1053s corrects to a normal method if the method body contains multiple statements 1053s corrects to an endless method definition 1053s retains comments 1053s corrects to an endless class method definition when using != 1053s corrects to an endless class method definition 1053s corrects to multiline method definition when defining setter method 1053s handles arguments properly 1053s does not to an endless class method definition when using `break` 1053s corrects to an endless class method definition when using < 1053s corrects to an endless class method definition when using == 1053s does not to an endless class method definition when using `next` 1053s corrects to an endless class method definition when using === 1053s corrects to an endless class method definition when using <= 1053s corrects to an endless method definition when single line method call without parentheses 1053s with AllowIfMethodIsEmpty: false 1053s does not turn a method with no body into an endless method 1053s with AllowIfMethodIsEmpty: true 1053s does not correct 1053s prior to ruby 3.0 1053s corrects to a multiline method 1053s with `allow_single_line` style 1053s behaves like convert to endless method 1053s corrects to an endless method definition 1053s corrects to an endless class method definition when using < 1053s corrects to a normal method if the method body contains multiple statements 1053s corrects to an endless class method definition when using == 1053s corrects to an endless method definition when single line method call without parentheses 1053s retains comments 1053s does not to an endless class method definition when using `next` 1053s corrects to an endless class method definition 1053s does not add parens if they are already present 1054s corrects to an endless class method definition when using === 1054s corrects to an endless class method definition when using != 1054s does not to an endless class method definition when using `break` 1054s corrects to an endless method definition when single line method call with parentheses 1054s corrects to an endless method definition when method body is a literal 1054s corrects to multiline method definition when defining setter method 1054s corrects to an endless class method definition when using > 1054s handles arguments properly 1054s corrects to an endless class method definition when using <= 1054s does not to an endless class method definition when using `return` 1054s corrects to an endless class method definition when using >= 1054s with AllowIfMethodIsEmpty: true 1054s does not correct 1054s with AllowIfMethodIsEmpty: false 1054s does not turn a method with no body into an endless method 1054s with `disallow` style 1054s corrects to an normal method 1054s when AllowIfMethodIsEmpty is disabled 1054s registers an offense for an empty method 1054s when AllowIfMethodIsEmpty is enabled 1054s accepts a single-line empty method 1054s 1054s RuboCop::Cop::Layout::LineLength 1054s highlights excessive characters 1054s registers an offense for a line that's 81 characters wide 1054s accepts a line that's 80 characters wide 1054s registers an offense for long line before __END__ but not after 1054s accepts the first line if it is a shebang line 1054s when AllowURI option is enabled 1054s and an error other than URI::InvalidURIError is raised while validating a URI-ish string 1054s does not crash 1054s and the URL does not have a http(s) scheme 1054s rejects the line 1054s and the scheme has been configured 1054s does not register an offense 1054s and all the excessive characters are part of a URL 1054s accepts the line 1054s and the URL is wrapped in braces with title 1054s accepts the line 1054s and the URL is wrapped in braces 1054s accepts the line 1054s and the URL is wrapped in single quotes 1054s accepts the line 1054s and the URL is wrapped in double quotes 1054s accepts the line 1054s and the excessive characters include part of a URL in braces and another word 1054s registers an offense for the line 1054s and the excessive characters include part of a URL in double quotes 1054s does not include the quote as part of the offense 1054s and the excessive characters include part of a URL and another word 1054s registers an offense for the line 1054s and the excessive characters include part of a URL and trailing whitespace 1054s registers an offense for the line 1054s and the excessive characters include a complete URL 1054s registers an offense for the line 1054s and the URI is an argument 1054s does not register an offense 1054s and the URL fits within the max allowed characters 1054s registers an offense for the line 1054s and the URI is assigned 1054s does not register an offense 1054s when IgnoreCopDirectives is enabled 1054s and the source is too long 1054s highlights only the non-directive part 1054s and the source contains non-directive #s as non-comment 1054s registers an offense for the line 1054s and the source contains non-directive # as comment 1054s highlights only the non-directive part 1054s and the Rubocop directive causes an excessive line length 1054s accepts the line 1054s and has explanatory text 1054s does not register an offense 1054s and the Rubocop directive is excessively long 1054s accepts the line 1054s when AllowURI option is disabled 1054s and all the excessive characters are part of a URL 1054s registers an offense for the line 1054s autocorrection 1054s no breakable collections 1054s adds an offense and does not autocorrect it 1054s method call 1054s when under limit 1054s does not add any offenses 1054s when two method calls 1054s adds an offense only to outer and autocorrects it 1054s with a heredoc argument 1054s does not break up the line when parentheses are omitted 1054s does not break up the line when a heredoc is used as the first element of an array 1054s does not break up the line 1054s and other arguments before the heredoc 1054s can break up the line before the heredoc argument 1054s and the heredoc is after the line should split 1054s can break up the line before the heredoc argument 1054s when over limit 1054s adds an offense and autocorrects it 1054s with long argument list 1054s registers an offense and autocorrects it 1054s when call with hash on same line 1054s adds an offense only to outer and autocorrects it 1054s when two together 1054s does not add any offenses 1054s with a hash with a too long first item 1054s when not parenthesized 1054s when there is only one element 1054s does not autocorrect 1054s when there are multiple elements 1054s moves the 2nd element to a new line 1054s when on multiple lines 1054s does not correct 1054s when the hash is parenthesized 1054s corrects 1054s when parenthesized 1054s corrects 1054s when unparenthesized 1054s when there is one argument 1054s does not autocorrect 1054s when there are multiple arguments 1054s splits the line after the first element 1054s when nested method calls allows outer to get broken up first 1054s adds offense and does not autocorrect 1054s long blocks 1054s no spaces 1054s adds an offense and does correct it 1054s Ruby 2.7 1054s adds an offense for do-end block and does correct it 1054s adds an offense for {} block does correct it 1054s braces 1054s adds an offense and does correct it 1054s do/end 1054s adds an offense for block with arguments and does correct it 1054s adds an offense for block without arguments and does correct it 1054s let block 1054s adds an offense and does correct it 1054s lambda syntax 1054s when argument is not enclosed in parentheses 1054s registers an offense and corrects 1054s when argument is enclosed in parentheses 1054s registers an offense and corrects 1054s semicolon 1054s when over limit and many spaces around semicolon 1054s adds offense and autocorrects it by breaking the semicolonbefore the hash 1054s semicolon inside string literal 1055s adds offense and autocorrects elsewhere 1055s when over limit and many semicolons at the end 1055s adds offense and does not autocorrectbefore the hash 1055s when over limit and semicolon at end of line 1055s adds offense and autocorrects it by breaking the first semicolonbefore the hash 1055s when under limit 1055s does not add any offenses 1055s semicolons inside string literal 1055s adds offense and autocorrects elsewhere 1055s when over limit and many semicolons 1055s adds offense and autocorrects it by breaking the semicolonbefore the hash 1055s when over limit and one semicolon at the end 1055s adds offense and does not autocorrectbefore the hash 1055s when over limit 1055s adds offense and autocorrects it by breaking the semicolonbefore the hash 1055s HEREDOC 1055s when over limit with semicolon 1055s adds offense and does not autocorrect 1055s multiple assignment 1055s when over limit at right hand side 1055s registers and corrects an offense 1055s array 1055s when over limit 1055s adds an offense and autocorrects it 1055s when two arrays on two lines allows outer to get broken first 1055s adds an offense only to inner and does not autocorrect it 1055s when already on two lines 1055s does not add any offenses 1055s when has inside array 1055s adds an offense only to outer and autocorrects it 1055s when under limit 1055s does not add any offenses 1055s method definition 1055s when over limit 1055s adds an offense and autocorrects it 1055s when under limit 1055s does not add any offenses 1055s hash 1055s when over limit and keys already on multiple lines 1055s adds an offense and does not autocorrect 1055s when nested hashes on same line 1055s adds an offense only to outer and autocorrects it 1055s when hash in method call 1055s adds an offense only to outer and autocorrects it 1055s when under limit 1055s does not add any offenses 1055s when over limit because of a comment 1055s adds an offense and does not autocorrect 1055s when over limit rocket symbol 1055s adds an offense and autocorrects it 1055s when over limit and already on multiple lines long key 1055s adds an offense and does not autocorrect 1055s when over limit rocket 1055s adds an offense and autocorrects it 1055s when over limit 1055s adds an offense and autocorrects it 1055s comments 1055s when over limit with semicolon 1056s adds offense and does not autocorrect 1056s when AllowedPatterns option is set 1056s only registers an offense for lines not matching the pattern 1056s when AllowHeredoc option is enabled 1056s accepts long lines in heredocs 1056s and only certain heredoc delimiters are permitted 1056s rejects long lines in heredocs with not permitted delimiters 1056s when the source has no AST 1056s does not crash 1056s when line is indented with tabs 1056s registers an offense for a long line 1056s accepts a short line 1056s affecting by IndentationWidth from Layout\Tab 1056s without AllowURI option 1056s behaves like with tabs indentation 1056s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 1056s accepts a line that's including 1 tab with size 2 and 28 other characters 1056s with AllowURI option 1056s accepts a line that's including URI 1056s accepts a line that's including URI with text 1056s accepts a line that's including URI and exceeds by 1 char 1056s accepts a line that's including URI in quotes with text 1056s behaves like with tabs indentation 1056s registers an offense for a line that's including 2 tab with size 2 and 28 other characters 1056s accepts a line that's including 1 tab with size 2 and 28 other characters 1056s when IgnoreCopDirectives is disabled 1056s and the source is too long and has a trailing cop directive 1056s highlights the excess source and cop directive 1056s and the source is acceptable length 1056s with a trailing RuboCop directive 1056s registers an offense for the line 1056s with an inline comment 1056s highlights the excess comment 1056s 1056s RuboCop::Cop::Lint::AmbiguousOperatorPrecedence 1056s does not register an offense when boolean expressions are wrapped in parens 1056s does not register an offense when there is only one operator in the expression 1056s does not register an offense when expressions are wrapped in parentheses by precedence 1056s allows an operator with `or` 1056s registers an offense when an expression with mixed precedence has no parens 1056s does not register an offense when all operators in the expression have the same precedence 1056s corrects a super long expression in precedence order 1056s corrects a super long expression in reverse precedence order 1056s does not register an offense when expressions are wrapped in parentheses by reverse precedence 1056s registers an offense for expressions containing booleans and operators 1056s registers an offense when an expression with mixed boolean operators has no parens 1056s allows an operator with `and` 1056s registers an offense when the entire expression is wrapped in parentheses 1056s 1056s RuboCop::Cop::Lint::EmptyInPattern 1056s when `AllowComments: false` 1056s registers an offense for empty `in` body with a comment 1056s when a `in` body is missing 1056s registers an offense for a missing `in` body 1056s registers an offense for missing `in` body with a comment 1056s registers an offense for missing `in` ... `then` body 1056s registers an offense for missing `in` body followed by `else` 1056s registers an offense for missing `in` ... then `body` followed by `else` 1056s registers an offense for missing `in` body with a comment followed by `else` 1056s when `AllowComments: true` 1056s accepts an empty `in` body with a comment 1056s registers an offense for empty `in` when comment is in another branch 1056s when a `in` body is present 1056s accepts `case` with `in` bodies 1056s accepts `case` with `in` bodies and `else` clause 1056s accepts `case` with `in` ... `then` statements 1056s accepts `case` with `in` ... `then` statements and else clause 1056s 1056s RuboCop::Cop::Lint::ElseLayout 1056s accepts proper else 1056s does not register an offense for an elsif with no body 1056s registers an offense and corrects for the entire else body being on the same line 1056s registers an offense and corrects for elsifs 1056s registers and corrects an offense when using multiple `elsif`s 1057s accepts modifier forms 1057s registers an offense and corrects for expr on same line as else 1057s accepts ternary ops 1057s accepts empty braces 1057s does not register an offense if the entire if is on a single line 1057s 1057s RuboCop::Cop::Style::ArrayJoin 1057s autocorrects '*' to 'join' when there are no spaces 1057s registers an offense for an array followed by string 1057s does not register an offense for numbers 1057s autocorrects '*' to 'join' when setting to a variable 1057s does not register an offense for ambiguous cases 1057s 1057s RuboCop::Cop::Metrics::Utils::CodeLengthCalculator 1057s #calculate 1057s raises when unknown foldable type is passed 1057s when method 1057s counts single line correctly if asked folding 1057s does not count blank lines 1057s folds multiline hashes without braces as method args if asked 1057s folds hashes without braces as the one of method args if asked 1057s folds hashes with comment if asked 1057s folds hashes as method args if asked 1057s counts single line hash as the one of method args if asked folding 1057s counts single line hash as the one of method args with safe navigation operator if asked folding 1057s counts single line without parentheses correctly if asked folding 1057s calculates method length 1057s folds hashes as method kwargs if asked 1057s folds multiline hashes with line break after it as method args if asked 1057s counts single line hash with other args correctly if asked folding 1057s folds arrays if asked 1057s counts single line hash with line breaks correctly if asked folding 1058s counts comments if asked 1058s folds multiline hashes with line break before it as method args if asked 1058s folds heredocs if asked 1058s folds hashes if asked 1058s when class 1058s folds heredocs if asked 1058s counts comments if asked 1058s does not count lines of inner classes 1058s calculates class length 1058s folds hashes if asked 1058s folds arrays if asked 1058s does not count blank lines 1058s 1058s RuboCop::Cop::Lint::InheritException 1058s when class inherits from `Exception` 1058s with enforced style set to `runtime_error` 1058s registers an offense and corrects 1058s when inheriting a standard lib exception class that is not a subclass of `StandardError` 1058s does not register an offense 1058s when creating a subclass using Class.new 1058s registers an offense and corrects 1058s with enforced style set to `standard_error` 1058s registers an offense and corrects 1058s when inheriting a standard lib exception class that is not a subclass of `StandardError` 1058s does not register an offense 1058s when creating a subclass using Class.new 1058s registers an offense and corrects 1058s 1058s RuboCop::Cop::Style::IfUnlessModifierOfIfUnless 1058s provides a good error message 1058s conditional with modifier 1058s registers an offense and corrects 1058s `unless` / `else` with modifier 1058s registers an offense and corrects 1058s ternary with modifier 1058s registers an offense and corrects 1058s nested conditionals 1058s accepts 1058s conditional with modifier in body 1058s accepts 1058s 1058s RuboCop::Cop::Style::WordArray 1058s with a treacherous WordRegex configuration 1058s doesn't break when words contain whitespace 1058s doesn't break when words contain delimiters 1058s when PreferredDelimiters is specified 1058s autocorrects an array with delimiters 1058s when EnforcedStyle is array 1058s autocorrects a %w() array which uses single quotes 1058s registers an offense for an empty %w() array 1058s does not register an offense for arrays of strings with hyphens 1058s registers an offense for a %w() array 1058s autocorrects multiline %w() array 1058s autocorrects a %W() array which uses string with hyphen 1058s does not register an offense for arrays of single quoted strings 1058s does not register an offense for arrays of strings with spaces 1058s does not register an offense for arrays of double quoted strings 1058s doesn't fail on strings which are not valid UTF-8 1058s autocorrects a %W() array which uses string interpolation 1058s doesn't fail with `encoding: binary 1058s autocorrects a %w() array which uses string with hyphen 1058s autocorrects a %W() array which uses escapes 1058s with a custom WordRegex configuration 1058s registers an offense for arrays of email addresses 1058s when the WordRegex configuration is not a Regexp 1058s still parses the code without raising an error 1058s with a WordRegex configuration which accepts almost anything 1058s uses %w for strings which only appear to have an escape 1058s uses %W when autocorrecting strings with non-printable chars 1058s when EnforcedStyle is percent 1058s autocorrects an array of words in multiple lines 1058s registers an offense for strings with newline and tab escapes 1058s registers an offense for arrays with character constants 1058s doesn't fail in wacky ways when multiple cop instances are used 1058s does not register an offense for array containing non-string 1058s does not register offense for array with allowed number of strings 1058s detects when the cop must be disabled to avoid offenses 1058s autocorrects an array of words 1058s does not register an offense on non-word strings 1059s registers an offense in a non-ambiguous block context 1059s registers an offense for an array with comments outside of it 1059s keeps the line breaks in place after autocorrect 1059s detects right value of MinSize to use for --auto-gen-config 1059s registers an offense for arrays of strings containing hyphens 1059s does not register an offense for a %w() array containing non word characters 1059s corrects properly when there is an extra trailing comma 1059s does not register an offense for array starting with %w 1059s autocorrects an array of words and character constants 1059s autocorrects an array of words using partial newlines 1059s uses %W when autocorrecting strings with embedded newlines and tabs 1059s registers an offense for arrays of double quoted strings 1059s registers an offense for a %w() array containing spaces 1059s does not register an offense for array of non-words 1059s autocorrects an array with one element 1059s registers an offense for arrays of single quoted strings 1059s does not register an offense for array with empty strings 1059s does not register an offense for an array with comments in it 1059s when the default external encoding is US-ASCII 1059s registers an offense for arrays of unicode word characters 1059s when the default external encoding is UTF-8 1059s registers an offense for arrays of unicode word characters 1059s with non-default MinSize 1059s does not autocorrect arrays of one symbol if MinSize > 1 1059s 1059s RuboCop::Cop::Layout::EndOfLine 1059s when EnforcedStyle is lf 1059s registers an offense for CR+LF 1059s does not register offenses after __END__ 1059s accepts an empty file 1059s registers an offense for CR at end of file 1059s and the default external encoding is US_ASCII 1059s can inspect non-UTF-8 encoded source with proper encoding comment 1059s does not crash on UTF-8 encoded non-ascii characters 1059s and there are many lines ending with CR+LF 1059s can inspect non-UTF-8 encoded source with proper encoding comment 1059s registers only one offense 1059s when EnforcedStyle is native 1059s registers an offense for an incorrect EOL 1059s when EnforcedStyle is crlf 1059s does not register offense for no CR at end of file 1059s does not register offenses after __END__ 1059s accepts an empty file 1059s registers an offense for CR+LF 1059s and the default external encoding is US_ASCII 1059s can inspect non-UTF-8 encoded source with proper encoding comment 1059s does not crash on UTF-8 encoded non-ascii characters 1059s and there are many lines ending with LF 1059s registers only one offense 1059s can inspect non-UTF-8 encoded source with proper encoding comment 1059s 1059s RuboCop::Cop::Style::ConditionalAssignment 1060s allows assignment in multiple branches when it is wrapped in a modifier 1060s allows modifier if 1060s allows if else without variable assignment 1060s registers an offense for assignment in unless else 1060s allows modifier if inside of if else 1060s doesn't crash with empty braces 1060s allows assignment of different variables in if else 1060s allows aref assignment with different indices in if..else 1060s allows if elsif else with the same assignment only in elsif else 1060s allows assignment to the result of a ternary operation 1060s allows different assignment types in case with when else 1060s allows method calls in conditionals 1060s registers an offense for assignment in ternary operation using strings 1060s allows assignment using different (method) operators in if..else 1060s registers an offense for assignment in if elsif elsif else 1060s registers an offense for assignment in case when then else 1060s registers an offense for assignment in if then elsif then else 1060s allows assignment of different variables in case when else 1060s autocorrects assignment in if else when the assignment spans multiple lines 1060s counts array assignment when determining multiple assignment 1060s registers an offense for assignment in if elsif else 1060s allows method calls in if else 1060s allows assignment using different operators in if elsif else 1060s registers an offense for assignment in case with when else 1060s allows if elsif else with the same assignment only in if else 1060s allows if elsif else with the same assignment only in if elsif 1060s registers an offense in an if else if the assignment is already at the line length limit 1060s allows assignment using different operators in if else 1060s doesn't crash when assignment statement uses chars which have special meaning in a regex 1060s behaves like all assignment types 1060s for a constant lval 1060s registers an offense for assignment using >>= in ternary 1060s with end alignment to start_of_line 1060s for a instance variable lval 1060s registers an offense for assignment using >>= in case when 1060s registers an offense for assignment using >>= in if else 1060s for a class variable lval 1060s registers an offense for assignment using >>= in if else 1060s registers an offense for assignment using >>= in case when 1060s for a global variable lval 1061s registers an offense for assignment using >>= in case when 1061s registers an offense for assignment using >>= in if else 1061s for a local variable lval 1061s registers an offense for assignment using >>= in case when 1061s registers an offense for assignment using >>= in if else 1061s for a constant lval 1061s registers an offense for assignment using >>= in case when 1061s registers an offense for assignment using >>= in if else 1061s for a global variable lval 1061s registers an offense for assignment using >>= in ternary 1061s for a class variable lval 1061s registers an offense for assignment using >>= in ternary 1061s for a local variable lval 1061s registers an offense for assignment using >>= in ternary 1061s with end alignment to keyword 1061s for a constant lval 1061s registers an offense for assignment using >>= in if else 1061s registers an offense for assignment using >>= in case when 1061s for a instance variable lval 1061s registers an offense for assignment using >>= in if else 1061s registers an offense for assignment using >>= in case when 1061s for a local variable lval 1061s registers an offense for assignment using >>= in if else 1061s registers an offense for assignment using >>= in case when 1061s for a class variable lval 1061s registers an offense for assignment using >>= in if else 1061s registers an offense for assignment using >>= in case when 1061s for a global variable lval 1061s registers an offense for assignment using >>= in if else 1061s registers an offense for assignment using >>= in case when 1061s for a instance variable lval 1061s registers an offense for assignment using >>= in ternary 1061s behaves like comparison methods 1061s registers an offense for comparison methods in ternary operations 1061s with end alignment to keyword 1061s corrects comparison methods in unless else 1061s corrects comparison methods in case when 1061s corrects comparison methods in if elsif else 1061s >= Ruby 2.7 1061s corrects comparison methods in case in 1061s with end alignment to start_of_line 1061s corrects comparison methods in if elsif else 1062s corrects comparison methods in unless else 1062s corrects comparison methods in case when 1062s >= Ruby 2.7 1062s corrects comparison methods in case in 1062s behaves like comparison methods 1062s registers an offense for comparison methods in ternary operations 1062s with end alignment to keyword 1062s corrects comparison methods in case when 1062s corrects comparison methods in unless else 1062s corrects comparison methods in if elsif else 1062s >= Ruby 2.7 1062s corrects comparison methods in case in 1062s with end alignment to start_of_line 1062s corrects comparison methods in case when 1062s corrects comparison methods in unless else 1062s corrects comparison methods in if elsif else 1062s >= Ruby 2.7 1062s corrects comparison methods in case in 1062s behaves like all assignment types 1062s with end alignment to keyword 1062s for a constant lval 1062s registers an offense for assignment using -= in if else 1062s registers an offense for assignment using -= in case when 1062s for a local variable lval 1062s registers an offense for assignment using -= in if else 1062s registers an offense for assignment using -= in case when 1062s for a global variable lval 1062s registers an offense for assignment using -= in if else 1062s registers an offense for assignment using -= in case when 1062s for a instance variable lval 1062s registers an offense for assignment using -= in case when 1062s registers an offense for assignment using -= in if else 1062s for a class variable lval 1062s registers an offense for assignment using -= in case when 1062s registers an offense for assignment using -= in if else 1062s for a constant lval 1062s registers an offense for assignment using -= in ternary 1062s for a class variable lval 1062s registers an offense for assignment using -= in ternary 1062s with end alignment to start_of_line 1062s for a local variable lval 1062s registers an offense for assignment using -= in if else 1062s registers an offense for assignment using -= in case when 1062s for a instance variable lval 1062s registers an offense for assignment using -= in case when 1062s registers an offense for assignment using -= in if else 1062s for a global variable lval 1062s registers an offense for assignment using -= in case when 1063s registers an offense for assignment using -= in if else 1063s for a constant lval 1063s registers an offense for assignment using -= in case when 1063s registers an offense for assignment using -= in if else 1063s for a class variable lval 1063s registers an offense for assignment using -= in case when 1063s registers an offense for assignment using -= in if else 1063s for a instance variable lval 1063s registers an offense for assignment using -= in ternary 1063s for a global variable lval 1063s registers an offense for assignment using -= in ternary 1063s for a local variable lval 1063s registers an offense for assignment using -= in ternary 1063s behaves like all variable types 1063s registers an offense assigning any variable type in if else 1063s allows assignment to the return of case when 1063s allows assignment to the return of if else 1063s registers an offense assigning any variable type in case when 1063s registers an offense assigning any variable type in ternary 1063s allows assignment to the return of a ternary 1063s behaves like comparison methods 1063s registers an offense for comparison methods in ternary operations 1063s with end alignment to start_of_line 1064s corrects comparison methods in unless else 1064s corrects comparison methods in if elsif else 1064s corrects comparison methods in case when 1064s >= Ruby 2.7 1064s corrects comparison methods in case in 1064s with end alignment to keyword 1064s corrects comparison methods in unless else 1064s corrects comparison methods in case when 1064s corrects comparison methods in if elsif else 1064s >= Ruby 2.7 1064s corrects comparison methods in case in 1064s behaves like all assignment types 1064s with end alignment to start_of_line 1064s for a constant lval 1064s registers an offense for assignment using += in case when 1064s registers an offense for assignment using += in if else 1064s for a local variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a instance variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a global variable lval 1064s registers an offense for assignment using += in case when 1064s registers an offense for assignment using += in if else 1064s for a class variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a global variable lval 1064s registers an offense for assignment using += in ternary 1064s for a instance variable lval 1064s registers an offense for assignment using += in ternary 1064s for a class variable lval 1064s registers an offense for assignment using += in ternary 1064s for a constant lval 1064s registers an offense for assignment using += in ternary 1064s with end alignment to keyword 1064s for a class variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a constant lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a instance variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a global variable lval 1064s registers an offense for assignment using += in if else 1064s registers an offense for assignment using += in case when 1064s for a local variable lval 1065s registers an offense for assignment using += in case when 1065s registers an offense for assignment using += in if else 1065s for a local variable lval 1065s registers an offense for assignment using += in ternary 1065s behaves like all variable types 1065s allows assignment to the return of a ternary 1065s registers an offense assigning any variable type in ternary 1065s allows assignment to the return of if else 1065s registers an offense assigning any variable type in case when 1065s allows assignment to the return of case when 1065s registers an offense assigning any variable type in if else 1065s behaves like comparison methods 1065s registers an offense for comparison methods in ternary operations 1065s with end alignment to start_of_line 1065s corrects comparison methods in unless else 1065s corrects comparison methods in if elsif else 1065s corrects comparison methods in case when 1065s >= Ruby 2.7 1065s corrects comparison methods in case in 1065s with end alignment to keyword 1065s corrects comparison methods in if elsif else 1065s corrects comparison methods in case when 1065s corrects comparison methods in unless else 1065s >= Ruby 2.7 1065s corrects comparison methods in case in 1065s behaves like all assignment types 1065s with end alignment to start_of_line 1065s for a local variable lval 1065s registers an offense for assignment using <<= in if else 1065s registers an offense for assignment using <<= in case when 1065s for a class variable lval 1065s registers an offense for assignment using <<= in case when 1065s registers an offense for assignment using <<= in if else 1065s for a instance variable lval 1065s registers an offense for assignment using <<= in if else 1065s registers an offense for assignment using <<= in case when 1065s for a global variable lval 1065s registers an offense for assignment using <<= in if else 1065s registers an offense for assignment using <<= in case when 1065s for a constant lval 1065s registers an offense for assignment using <<= in if else 1065s registers an offense for assignment using <<= in case when 1065s for a constant lval 1065s registers an offense for assignment using <<= in ternary 1065s for a class variable lval 1065s registers an offense for assignment using <<= in ternary 1065s for a local variable lval 1065s registers an offense for assignment using <<= in ternary 1065s for a global variable lval 1065s registers an offense for assignment using <<= in ternary 1065s with end alignment to keyword 1065s for a constant lval 1066s registers an offense for assignment using <<= in if else 1066s registers an offense for assignment using <<= in case when 1066s for a class variable lval 1066s registers an offense for assignment using <<= in case when 1066s registers an offense for assignment using <<= in if else 1066s for a global variable lval 1066s registers an offense for assignment using <<= in case when 1066s registers an offense for assignment using <<= in if else 1066s for a instance variable lval 1066s registers an offense for assignment using <<= in case when 1066s registers an offense for assignment using <<= in if else 1066s for a local variable lval 1066s registers an offense for assignment using <<= in case when 1066s registers an offense for assignment using <<= in if else 1066s for a instance variable lval 1066s registers an offense for assignment using <<= in ternary 1066s behaves like all assignment types 1066s for a class variable lval 1066s registers an offense for assignment using = in ternary 1066s for a local variable lval 1066s registers an offense for assignment using = in ternary 1066s with end alignment to keyword 1066s for a global variable lval 1066s registers an offense for assignment using = in if else 1066s registers an offense for assignment using = in case when 1066s for a constant lval 1066s registers an offense for assignment using = in if else 1066s registers an offense for assignment using = in case when 1066s for a local variable lval 1066s registers an offense for assignment using = in if else 1066s registers an offense for assignment using = in case when 1066s for a instance variable lval 1066s registers an offense for assignment using = in case when 1066s registers an offense for assignment using = in if else 1066s for a class variable lval 1066s registers an offense for assignment using = in if else 1066s registers an offense for assignment using = in case when 1066s for a instance variable lval 1066s registers an offense for assignment using = in ternary 1066s with end alignment to start_of_line 1066s for a global variable lval 1066s registers an offense for assignment using = in case when 1066s registers an offense for assignment using = in if else 1066s for a instance variable lval 1066s registers an offense for assignment using = in case when 1066s registers an offense for assignment using = in if else 1066s for a local variable lval 1066s registers an offense for assignment using = in if else 1066s registers an offense for assignment using = in case when 1066s for a constant lval 1066s registers an offense for assignment using = in case when 1066s registers an offense for assignment using = in if else 1066s for a class variable lval 1066s registers an offense for assignment using = in case when 1066s registers an offense for assignment using = in if else 1066s for a global variable lval 1066s registers an offense for assignment using = in ternary 1066s for a constant lval 1066s registers an offense for assignment using = in ternary 1066s for if elsif else if else 1066s autocorrects the outer offense later 1066s autocorrects the inner offense first 1066s behaves like else followed by new conditional without else 1066s allows if elsif else if 1066s behaves like all variable types 1067s registers an offense assigning any variable type in ternary 1067s allows assignment to the return of case when 1067s registers an offense assigning any variable type in case when 1067s allows assignment to the return of if else 1067s allows assignment to the return of a ternary 1067s registers an offense assigning any variable type in if else 1067s behaves like all variable types 1067s registers an offense assigning any variable type in case when 1067s allows assignment to the return of if else 1067s allows assignment to the return of case when 1067s allows assignment to the return of a ternary 1067s registers an offense assigning any variable type in if else 1067s registers an offense assigning any variable type in ternary 1067s behaves like all assignment types 1067s with end alignment to keyword 1067s for a constant lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a class variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a instance variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a global variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a local variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a local variable lval 1067s registers an offense for assignment using **= in ternary 1067s for a constant lval 1067s registers an offense for assignment using **= in ternary 1067s for a instance variable lval 1067s registers an offense for assignment using **= in ternary 1067s for a class variable lval 1067s registers an offense for assignment using **= in ternary 1067s for a global variable lval 1067s registers an offense for assignment using **= in ternary 1067s with end alignment to start_of_line 1067s for a local variable lval 1067s registers an offense for assignment using **= in if else 1067s registers an offense for assignment using **= in case when 1067s for a global variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a constant lval 1067s registers an offense for assignment using **= in if else 1067s registers an offense for assignment using **= in case when 1067s for a class variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s for a instance variable lval 1067s registers an offense for assignment using **= in case when 1067s registers an offense for assignment using **= in if else 1067s behaves like all assignment types 1067s for a class variable lval 1067s registers an offense for assignment using |= in ternary 1067s for a local variable lval 1067s registers an offense for assignment using |= in ternary 1067s for a global variable lval 1067s registers an offense for assignment using |= in ternary 1067s for a instance variable lval 1067s registers an offense for assignment using |= in ternary 1067s for a constant lval 1067s registers an offense for assignment using |= in ternary 1067s with end alignment to keyword 1067s for a constant lval 1067s registers an offense for assignment using |= in if else 1067s registers an offense for assignment using |= in case when 1067s for a class variable lval 1067s registers an offense for assignment using |= in case when 1067s registers an offense for assignment using |= in if else 1067s for a instance variable lval 1068s registers an offense for assignment using |= in if else 1068s registers an offense for assignment using |= in case when 1068s for a global variable lval 1068s registers an offense for assignment using |= in case when 1068s registers an offense for assignment using |= in if else 1068s for a local variable lval 1068s registers an offense for assignment using |= in if else 1068s registers an offense for assignment using |= in case when 1068s with end alignment to start_of_line 1068s for a constant lval 1068s registers an offense for assignment using |= in if else 1068s registers an offense for assignment using |= in case when 1068s for a class variable lval 1068s registers an offense for assignment using |= in if else 1068s registers an offense for assignment using |= in case when 1068s for a local variable lval 1068s registers an offense for assignment using |= in case when 1068s registers an offense for assignment using |= in if else 1068s for a instance variable lval 1068s registers an offense for assignment using |= in if else 1068s registers an offense for assignment using |= in case when 1068s for a global variable lval 1068s registers an offense for assignment using |= in case when 1068s registers an offense for assignment using |= in if else 1068s behaves like comparison methods 1068s registers an offense for comparison methods in ternary operations 1068s with end alignment to start_of_line 1068s corrects comparison methods in unless else 1068s corrects comparison methods in if elsif else 1068s corrects comparison methods in case when 1068s >= Ruby 2.7 1068s corrects comparison methods in case in 1068s with end alignment to keyword 1068s corrects comparison methods in case when 1069s corrects comparison methods in unless else 1069s corrects comparison methods in if elsif else 1069s >= Ruby 2.7 1069s corrects comparison methods in case in 1069s behaves like all assignment types 1069s for a constant lval 1069s registers an offense for assignment using *= in ternary 1069s with end alignment to start_of_line 1069s for a instance variable lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s for a class variable lval 1069s registers an offense for assignment using *= in if else 1069s registers an offense for assignment using *= in case when 1069s for a global variable lval 1069s registers an offense for assignment using *= in if else 1069s registers an offense for assignment using *= in case when 1069s for a constant lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s for a local variable lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s with end alignment to keyword 1069s for a class variable lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s for a instance variable lval 1069s registers an offense for assignment using *= in if else 1069s registers an offense for assignment using *= in case when 1069s for a global variable lval 1069s registers an offense for assignment using *= in if else 1069s registers an offense for assignment using *= in case when 1069s for a constant lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s for a local variable lval 1069s registers an offense for assignment using *= in case when 1069s registers an offense for assignment using *= in if else 1069s for a class variable lval 1069s registers an offense for assignment using *= in ternary 1069s for a instance variable lval 1069s registers an offense for assignment using *= in ternary 1069s for a local variable lval 1070s registers an offense for assignment using *= in ternary 1070s for a global variable lval 1070s registers an offense for assignment using *= in ternary 1070s assignment as the last statement 1070s allows more than variable assignment in if else 1070s allows multiple assignment in unless else 1070s allows variable assignment in unless else with more than variable assignment 1070s allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches 1070s allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches 1070s allows multiple assignments in case when if there are uniq variables in the when branches 1070s allows multiple assignment in if elsif elsif else 1070s allows multiple assignments in case when with multiple whens 1070s allows more than variable assignment in if elsif else 1070s allows multiple assignment in if else 1070s allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 1070s allows multiple assignments in case when with only one when 1070s allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches 1070s allows multiple assignment in if elsif else 1070s allows variable assignment in case when else with more than variable assignment 1070s behaves like allows out of order multiple assignment in if elsif else 1070s allows out of order multiple assignment in if elsif else 1070s multiple assignment in only one branch 1070s does not register an offense when multiple assignment is in else 1070s allows multiple assignment is in if 1070s allows multiple assignment is in elsif 1070s behaves like all assignment types 1070s for a local variable lval 1070s registers an offense for assignment using ||= in ternary 1070s for a constant lval 1070s registers an offense for assignment using ||= in ternary 1070s with end alignment to start_of_line 1070s for a class variable lval 1070s registers an offense for assignment using ||= in if else 1070s registers an offense for assignment using ||= in case when 1070s for a global variable lval 1070s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s for a local variable lval 1071s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s for a constant lval 1071s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s for a instance variable lval 1071s registers an offense for assignment using ||= in if else 1071s registers an offense for assignment using ||= in case when 1071s for a class variable lval 1071s registers an offense for assignment using ||= in ternary 1071s for a global variable lval 1071s registers an offense for assignment using ||= in ternary 1071s for a instance variable lval 1071s registers an offense for assignment using ||= in ternary 1071s with end alignment to keyword 1071s for a local variable lval 1071s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s for a constant lval 1071s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s for a instance variable lval 1071s registers an offense for assignment using ||= in if else 1071s registers an offense for assignment using ||= in case when 1071s for a class variable lval 1071s registers an offense for assignment using ||= in if else 1071s registers an offense for assignment using ||= in case when 1071s for a global variable lval 1071s registers an offense for assignment using ||= in case when 1071s registers an offense for assignment using ||= in if else 1071s behaves like all assignment types 1071s for a local variable lval 1071s registers an offense for assignment using << in ternary 1071s for a global variable lval 1072s registers an offense for assignment using << in ternary 1072s with end alignment to keyword 1072s for a global variable lval 1072s registers an offense for assignment using << in if else 1072s registers an offense for assignment using << in case when 1072s for a constant lval 1072s registers an offense for assignment using << in if else 1072s registers an offense for assignment using << in case when 1072s for a local variable lval 1072s registers an offense for assignment using << in case when 1072s registers an offense for assignment using << in if else 1072s for a class variable lval 1072s registers an offense for assignment using << in case when 1072s registers an offense for assignment using << in if else 1072s for a instance variable lval 1072s registers an offense for assignment using << in case when 1072s registers an offense for assignment using << in if else 1072s for a class variable lval 1072s registers an offense for assignment using << in ternary 1072s for a instance variable lval 1072s registers an offense for assignment using << in ternary 1072s with end alignment to start_of_line 1072s for a constant lval 1072s registers an offense for assignment using << in case when 1072s registers an offense for assignment using << in if else 1072s for a class variable lval 1073s registers an offense for assignment using << in if else 1073s registers an offense for assignment using << in case when 1073s for a local variable lval 1073s registers an offense for assignment using << in if else 1073s registers an offense for assignment using << in case when 1073s for a global variable lval 1073s registers an offense for assignment using << in if else 1073s registers an offense for assignment using << in case when 1073s for a instance variable lval 1073s registers an offense for assignment using << in case when 1073s registers an offense for assignment using << in if else 1073s for a constant lval 1073s registers an offense for assignment using << in ternary 1073s empty branch 1073s allows assignment in if without an else 1073s allows assignment in case when without an else 1073s allows an empty if statement 1073s allows case with an empty else 1073s allows an empty elsif statement 1073s allows if elsif without else 1073s allows assignment in unless without an else 1073s allows an empty when branch with an else 1073s behaves like all assignment types 1073s for a global variable lval 1073s registers an offense for assignment using ^= in ternary 1073s for a instance variable lval 1073s registers an offense for assignment using ^= in ternary 1073s for a class variable lval 1073s registers an offense for assignment using ^= in ternary 1073s with end alignment to keyword 1073s for a global variable lval 1073s registers an offense for assignment using ^= in if else 1073s registers an offense for assignment using ^= in case when 1073s for a local variable lval 1073s registers an offense for assignment using ^= in case when 1073s registers an offense for assignment using ^= in if else 1073s for a constant lval 1073s registers an offense for assignment using ^= in case when 1073s registers an offense for assignment using ^= in if else 1073s for a instance variable lval 1074s registers an offense for assignment using ^= in if else 1074s registers an offense for assignment using ^= in case when 1074s for a class variable lval 1074s registers an offense for assignment using ^= in if else 1074s registers an offense for assignment using ^= in case when 1074s for a constant lval 1074s registers an offense for assignment using ^= in ternary 1074s for a local variable lval 1074s registers an offense for assignment using ^= in ternary 1074s with end alignment to start_of_line 1074s for a class variable lval 1074s registers an offense for assignment using ^= in case when 1074s registers an offense for assignment using ^= in if else 1074s for a global variable lval 1074s registers an offense for assignment using ^= in case when 1074s registers an offense for assignment using ^= in if else 1074s for a instance variable lval 1074s registers an offense for assignment using ^= in if else 1074s registers an offense for assignment using ^= in case when 1074s for a constant lval 1074s registers an offense for assignment using ^= in case when 1074s registers an offense for assignment using ^= in if else 1074s for a local variable lval 1074s registers an offense for assignment using ^= in if else 1074s registers an offense for assignment using ^= in case when 1074s behaves like comparison methods 1074s registers an offense for comparison methods in ternary operations 1074s with end alignment to keyword 1074s corrects comparison methods in if elsif else 1074s corrects comparison methods in case when 1074s corrects comparison methods in unless else 1074s >= Ruby 2.7 1074s corrects comparison methods in case in 1074s with end alignment to start_of_line 1074s corrects comparison methods in unless else 1074s corrects comparison methods in if elsif else 1074s corrects comparison methods in case when 1074s >= Ruby 2.7 1074s corrects comparison methods in case in 1074s autocorrect 1074s corrects =~ in ternary operations 1075s corrects assignment to unbracketed array in if else 1075s preserves comments during correction in case when else 1075s preserves comments during correction in if else 1075s constant assignment 1075s corrects if..else with namespaced constant 1075s corrects if..else with top-level constant 1075s self.attribute= assignment 1075s corrects if..else 1075s with different receivers 1075s doesn't register an offense 1075s aref assignment 1075s corrects if..else 1075s with different indices 1075s doesn't register an offense 1075s multiple assignment 1075s does not register an offense in if else 1075s does not register an offense in case when 1075s assignment from a method 1075s corrects if else 1075s corrects case when 1075s corrects unless else 1075s IncludeTernaryExpressions false 1075s allows assignment in ternary operation 1075s behaves like comparison methods 1075s registers an offense for comparison methods in ternary operations 1075s with end alignment to start_of_line 1075s corrects comparison methods in case when 1075s corrects comparison methods in if elsif else 1075s corrects comparison methods in unless else 1075s >= Ruby 2.7 1075s corrects comparison methods in case in 1075s with end alignment to keyword 1076s corrects comparison methods in case when 1076s corrects comparison methods in unless else 1076s corrects comparison methods in if elsif else 1076s >= Ruby 2.7 1076s corrects comparison methods in case in 1076s behaves like comparison methods 1076s registers an offense for comparison methods in ternary operations 1076s with end alignment to keyword 1076s corrects comparison methods in case when 1076s corrects comparison methods in unless else 1076s corrects comparison methods in if elsif else 1076s >= Ruby 2.7 1076s corrects comparison methods in case in 1076s with end alignment to start_of_line 1076s corrects comparison methods in if elsif else 1076s corrects comparison methods in case when 1076s corrects comparison methods in unless else 1076s >= Ruby 2.7 1076s corrects comparison methods in case in 1076s behaves like all variable types 1076s registers an offense assigning any variable type in case when 1076s registers an offense assigning any variable type in ternary 1076s allows assignment to the return of case when 1076s registers an offense assigning any variable type in if else 1076s allows assignment to the return of if else 1076s allows assignment to the return of a ternary 1076s EndAlignment configured to start_of_line 1076s autocorrect 1076s uses proper end alignment in case 1076s uses proper end alignment in if 1077s uses proper end alignment in unless 1077s behaves like all assignment types 1077s for a global variable lval 1077s registers an offense for assignment using &&= in ternary 1077s for a local variable lval 1077s registers an offense for assignment using &&= in ternary 1077s for a class variable lval 1077s registers an offense for assignment using &&= in ternary 1077s with end alignment to keyword 1077s for a global variable lval 1077s registers an offense for assignment using &&= in case when 1077s registers an offense for assignment using &&= in if else 1077s for a constant lval 1077s registers an offense for assignment using &&= in case when 1077s registers an offense for assignment using &&= in if else 1077s for a class variable lval 1077s registers an offense for assignment using &&= in if else 1077s registers an offense for assignment using &&= in case when 1077s for a local variable lval 1077s registers an offense for assignment using &&= in if else 1077s registers an offense for assignment using &&= in case when 1077s for a instance variable lval 1077s registers an offense for assignment using &&= in if else 1078s registers an offense for assignment using &&= in case when 1078s for a constant lval 1078s registers an offense for assignment using &&= in ternary 1078s with end alignment to start_of_line 1078s for a local variable lval 1078s registers an offense for assignment using &&= in if else 1078s registers an offense for assignment using &&= in case when 1078s for a global variable lval 1078s registers an offense for assignment using &&= in case when 1078s registers an offense for assignment using &&= in if else 1078s for a class variable lval 1078s registers an offense for assignment using &&= in case when 1078s registers an offense for assignment using &&= in if else 1078s for a instance variable lval 1078s registers an offense for assignment using &&= in case when 1078s registers an offense for assignment using &&= in if else 1078s for a constant lval 1078s registers an offense for assignment using &&= in if else 1078s registers an offense for assignment using &&= in case when 1078s for a instance variable lval 1078s registers an offense for assignment using &&= in ternary 1078s with nested conditionals 1078s eventually autocorrects all branches 1078s does not consider branches of nested ifs 1078s configured to check conditions with multiple statements 1078s registers an offense for multiple assignment when an earlier assignment is is protected by a modifier 1078s allows assignment in multiple branches when it is wrapped in a modifier 1078s autocorrect 1078s corrects multiple assignment in if else 1078s corrects multiple assignment in unless else 1078s corrects multiple assignment in case when 1078s corrects multiple assignment in if elsif else 1078s corrects multiple assignment in if elsif else with multiple elsifs 1078s corrects assignment in an if statement that is nested in unless else 1078s corrects multiple assignment in case when with multiple whens 1078s assignment as the last statement 1078s registers an offense in case when else with more than variable assignment 1078s registers offense for multiple assignment in if elsif elsif else 1078s registers an offense in if elsif else with more than variable assignment 1078s registers an offense in unless else with more than variable assignment 1078s registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment 1079s registers offense for multiple assignments in case when with multiple whens 1079s registers an offense for multiple assignment in if elsif else 1079s register an offense for multiple assignment in if else 1079s registers offense for multiple assignment in unless else 1079s registers an offense in if else with more than variable assignment 1079s registers offense for multiple assignments in case when with only one when 1079s behaves like allows out of order multiple assignment in if elsif else 1079s allows out of order multiple assignment in if elsif else 1079s multiple assignment in only one branch 1079s registers an offense when multiple assignment is in if 1079s registers an offense when multiple assignment is in else 1079s registers an offense when multiple assignment is in elsif 1079s correction would exceed max line length 1079s allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength 1079s allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength 1079s allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength 1079s behaves like comparison methods 1079s registers an offense for comparison methods in ternary operations 1079s with end alignment to start_of_line 1079s corrects comparison methods in if elsif else 1080s corrects comparison methods in case when 1080s corrects comparison methods in unless else 1080s >= Ruby 2.7 1080s corrects comparison methods in case in 1080s with end alignment to keyword 1080s corrects comparison methods in case when 1080s corrects comparison methods in unless else 1080s corrects comparison methods in if elsif else 1080s >= Ruby 2.7 1080s corrects comparison methods in case in 1080s behaves like all variable types 1080s allows assignment to the return of a ternary 1080s registers an offense assigning any variable type in case when 1080s registers an offense assigning any variable type in ternary 1080s allows assignment to the return of case when 1080s allows assignment to the return of if else 1080s registers an offense assigning any variable type in if else 1080s behaves like all assignment types 1080s for a global variable lval 1080s registers an offense for assignment using /= in ternary 1080s for a local variable lval 1080s registers an offense for assignment using /= in ternary 1080s for a instance variable lval 1080s registers an offense for assignment using /= in ternary 1080s with end alignment to keyword 1080s for a local variable lval 1080s registers an offense for assignment using /= in case when 1080s registers an offense for assignment using /= in if else 1080s for a instance variable lval 1080s registers an offense for assignment using /= in if else 1080s registers an offense for assignment using /= in case when 1080s for a class variable lval 1080s registers an offense for assignment using /= in case when 1081s registers an offense for assignment using /= in if else 1081s for a constant lval 1081s registers an offense for assignment using /= in case when 1081s registers an offense for assignment using /= in if else 1081s for a global variable lval 1081s registers an offense for assignment using /= in if else 1081s registers an offense for assignment using /= in case when 1081s for a constant lval 1081s registers an offense for assignment using /= in ternary 1081s for a class variable lval 1081s registers an offense for assignment using /= in ternary 1081s with end alignment to start_of_line 1081s for a local variable lval 1081s registers an offense for assignment using /= in case when 1081s registers an offense for assignment using /= in if else 1081s for a global variable lval 1082s registers an offense for assignment using /= in case when 1082s registers an offense for assignment using /= in if else 1082s for a class variable lval 1082s registers an offense for assignment using /= in case when 1082s registers an offense for assignment using /= in if else 1082s for a instance variable lval 1082s registers an offense for assignment using /= in if else 1082s registers an offense for assignment using /= in case when 1082s for a constant lval 1082s registers an offense for assignment using /= in case when 1082s registers an offense for assignment using /= in if else 1082s behaves like comparison methods 1083s registers an offense for comparison methods in ternary operations 1083s with end alignment to keyword 1083s corrects comparison methods in if elsif else 1083s corrects comparison methods in case when 1083s corrects comparison methods in unless else 1083s >= Ruby 2.7 1083s corrects comparison methods in case in 1083s with end alignment to start_of_line 1083s corrects comparison methods in unless else 1084s corrects comparison methods in if elsif else 1084s corrects comparison methods in case when 1084s >= Ruby 2.7 1084s corrects comparison methods in case in 1084s behaves like all assignment types 1084s with end alignment to keyword 1084s for a constant lval 1085s registers an offense for assignment using %= in if else 1085s registers an offense for assignment using %= in case when 1085s for a instance variable lval 1085s registers an offense for assignment using %= in if else 1085s registers an offense for assignment using %= in case when 1085s for a class variable lval 1085s registers an offense for assignment using %= in if else 1086s registers an offense for assignment using %= in case when 1086s for a global variable lval 1086s registers an offense for assignment using %= in if else 1086s registers an offense for assignment using %= in case when 1086s for a local variable lval 1086s registers an offense for assignment using %= in if else 1086s registers an offense for assignment using %= in case when 1086s with end alignment to start_of_line 1086s for a class variable lval 1086s registers an offense for assignment using %= in if else 1086s registers an offense for assignment using %= in case when 1086s for a instance variable lval 1086s registers an offense for assignment using %= in case when 1086s registers an offense for assignment using %= in if else 1086s for a constant lval 1086s registers an offense for assignment using %= in if else 1086s registers an offense for assignment using %= in case when 1086s for a local variable lval 1087s registers an offense for assignment using %= in if else 1087s registers an offense for assignment using %= in case when 1087s for a global variable lval 1087s registers an offense for assignment using %= in if else 1087s registers an offense for assignment using %= in case when 1087s for a instance variable lval 1087s registers an offense for assignment using %= in ternary 1087s for a class variable lval 1087s registers an offense for assignment using %= in ternary 1087s for a global variable lval 1087s registers an offense for assignment using %= in ternary 1087s for a local variable lval 1088s registers an offense for assignment using %= in ternary 1088s for a constant lval 1088s registers an offense for assignment using %= in ternary 1088s behaves like all variable types 1088s allows assignment to the return of a ternary 1088s allows assignment to the return of if else 1088s registers an offense assigning any variable type in if else 1088s allows assignment to the return of case when 1088s registers an offense assigning any variable type in case when 1088s registers an offense assigning any variable type in ternary 1088s behaves like else followed by new conditional without else 1088s allows if elsif else unless 1088s behaves like all assignment types 1088s for a instance variable lval 1088s registers an offense for assignment using &= in ternary 1088s for a local variable lval 1088s registers an offense for assignment using &= in ternary 1088s for a class variable lval 1088s registers an offense for assignment using &= in ternary 1088s with end alignment to start_of_line 1088s for a local variable lval 1088s registers an offense for assignment using &= in if else 1088s registers an offense for assignment using &= in case when 1088s for a class variable lval 1088s registers an offense for assignment using &= in case when 1088s registers an offense for assignment using &= in if else 1088s for a instance variable lval 1088s registers an offense for assignment using &= in case when 1089s registers an offense for assignment using &= in if else 1089s for a constant lval 1089s registers an offense for assignment using &= in case when 1089s registers an offense for assignment using &= in if else 1089s for a global variable lval 1089s registers an offense for assignment using &= in if else 1089s registers an offense for assignment using &= in case when 1089s for a constant lval 1089s registers an offense for assignment using &= in ternary 1089s for a global variable lval 1089s registers an offense for assignment using &= in ternary 1089s with end alignment to keyword 1089s for a class variable lval 1089s registers an offense for assignment using &= in case when 1089s registers an offense for assignment using &= in if else 1089s for a constant lval 1089s registers an offense for assignment using &= in case when 1089s registers an offense for assignment using &= in if else 1089s for a global variable lval 1089s registers an offense for assignment using &= in if else 1089s registers an offense for assignment using &= in case when 1089s for a instance variable lval 1089s registers an offense for assignment using &= in if else 1089s registers an offense for assignment using &= in case when 1089s for a local variable lval 1089s registers an offense for assignment using &= in if else 1089s registers an offense for assignment using &= in case when 1089s 1089s RuboCop::Cop::Style::ParenthesesAroundCondition 1090s is not confused by leading parentheses in subexpression 1090s does not blow up for empty unless condition 1090s accepts parentheses around condition in a ternary 1090s does not blow up for empty if condition 1090s registers an offense for parentheses around condition 1090s is not confused by parentheses in subexpression 1090s does not register an offense when parentheses in multiple expressions separated by semicolon 1090s does not blow up when the condition is a ternary op 1090s allows parens if the condition node is a modifier unless op 1090s allows parens if the condition node is a modifier if op 1090s allows parens if the condition node is a modifier rescue op 1090s allows parens if the condition node is a modifier until op 1090s allows parens if the condition node is a modifier while op 1090s accepts parentheses if there is no space between the keyword and (. 1090s safe assignment is not allowed 1090s does not accept element assignment in condition surrounded with parentheses 1090s does not accept variable assignment in condition surrounded with parentheses 1090s parentheses in multiline conditions are allowed 1090s registers an offense for parentheses in single line condition 1090s accepts parentheses around multiline condition 1090s parentheses in multiline conditions are not allowed 1090s registers an offense for parentheses around multiline condition 1090s safe assignment is allowed 1090s accepts setter in condition surrounded with parentheses 1090s accepts element assignment in condition surrounded with parentheses 1090s accepts variable assignment in condition surrounded with parentheses 1090s 1090s RuboCop::Cop::Layout::SpaceAroundOperators 1090s accepts some operators that are exceptions & don't need spaces 1090s accepts an operator at the beginning of a line 1090s accepts an assignment with a blank line 1091s accepts operator surrounded by tabs 1091s accepts [] without space 1091s accepts exponent operator without spaces 1091s accepts operator symbols 1091s accepts an assignment with the same alignment margins 1091s registers an offense and corrects singleton class operator` 1091s accepts []= without space 1091s accepts unary operators without space 1091s accepts ::Kernel::raise 1091s accepts [arg] without space 1091s accepts scope operator 1091s accepts exclamation point definition 1091s accepts an assignment followed by newline 1091s registers an offenses for exponent operator with spaces 1091s accepts splat operator 1091s accepts an assignment by `for` statement 1091s accepts rational 1091s accepts def of operator 1091s registers an offense and corrects exclamation point negation 1091s accepts argument default values without space 1091s accepts an operator called with method syntax 1091s accepts ranges 1091s accepts an operator at the end of a line 1091s accepts the result of the ExtraSpacing Cop 1091s accepts an assignment with spaces 1091s accepts operators with spaces 1091s accepts a unary 1091s extra space around operators 1092s registers an offense and corrects a hash rocket with too many spaces 1092s registers an offense and corrects hash rocket with too many spaces at rescue 1092s registers an offense and corrects arguments to a method 1092s registers an offense and corrects ternary operator with too many spaces 1092s accepts for a hash rocket with an extra space for alignment on multiple line 1092s registers an offense and corrects operators with too many spaces 1092s registers an offense and corrects a setter call with too many spaces 1092s registers an offense and corrects inheritance < with too many spaces 1092s registers an offense and corrects equality operators with too many spaces 1093s registers an offense and corrects assignment with too many spaces on either side 1093s registers an offense and corrects match operators with too many spaces 1093s registers an offense and corrects a hash rocket with an extra spaceon multiple line 1093s registers an offense and corrects operators with too many spaces on the same line 1093s registers an offense and corrects various assignments with too many spaces 1093s does not register an offenses match operators between `+=` and `<<` 1093s registers an offense and corrects binary operators that could be unary 1093s does not register an offenses match operators between `<<` and `+=` 1093s registers an offense and corrects `-` with too many spaces with negative lhs operand 1093s behaves like modifier with extra space 1093s registers an offense in presence of modifier unless statement 1093s behaves like modifier with extra space 1093s registers an offense in presence of modifier if statement 1093s behaves like modifier with extra space 1093s registers an offense in presence of modifier until statement 1093s behaves like modifier with extra space 1093s registers an offense in presence of modifier while statement 1093s when does not allowed for alignment 1093s registers an offense and corrects an extra space 1093s when EnforcedStyleForExponentOperator is space 1093s registers an offenses for exponent operator without spaces 1093s >= Ruby 3.0 1093s registers an offenses for one-line pattern matching syntax (`=>`) 1093s missing space around operators 1093s registers an offense and corrects various assignments without space 1093s doesn't register an offense for operators with newline on right 1093s registers an offense for binary operators that could be unary 1093s registers an offense and corrects inheritance < without space 1093s registers an offense and corrects arguments to a method 1094s registers an offense and corrects string concatenation without messing up new lines 1094s registers an offense and corrects equality operators without space 1094s registers an offense and corrects hash rocket without space at rescue 1094s registers an offense and corrects a setter call without spaces 1094s registers an offense for operators without spaces 1094s registers an offense and corrects `-` without space with a negative lhs operand 1094s registers an offense for assignment without space on both sides 1094s registers an offense and corrects match operators without space 1094s behaves like modifier with missing space 1094s registers an offense in presence of modifier while statement 1094s behaves like modifier with missing space 1094s registers an offense in presence of modifier until statement 1094s behaves like modifier with missing space 1094s registers an offense in presence of modifier if statement 1094s when a hash literal is on multiple lines 1094s and Layout/HashAlignment:EnforcedHashRocketStyle is key 1094s registers an offense and corrects a hash rocket without spaces 1094s and Layout/HashAlignment:EnforcedHashRocketStyle is table 1094s doesn't register an offense for a hash rocket without spaces 1094s ternary operators 1094s registers an offense and corrects operators with no spaces 1094s registers an offense and corrects operators with just a leading space 1094s registers an offense and corrects operators with just a trailing space 1094s when a hash literal is on a single line 1094s and Layout/HashAlignment:EnforcedHashRocketStyle is key 1094s registers an offense and corrects a hash rocket without spaces 1094s and Layout/HashAlignment:EnforcedHashRocketStyle is table 1094s registers an offense and corrects a hash rocket without spaces 1094s behaves like modifier with missing space 1094s registers an offense in presence of modifier unless statement 1094s when Layout/ExtraSpacing has `ForceEqualSignAlignment` configured to true 1094s allows constants to be aligned 1094s allows variables to be aligned 1094s >= Ruby 2.7 1094s does not register an offenses for one-line pattern matching syntax (`in`) 1094s 1094s RuboCop::Cop::Style::SelectByRegexp 1094s with find_all 1094s registers an offense and corrects for `lvar =~ blockvar` 1094s does not register an offense when there is no block 1094s does not register an offense when the receiver is `Hash[]` 1094s does not register an offense when the receiver is `to_hash` 1094s registers an offense if `to_h` is in the receiver chain but not the actual receiver 1094s does not register an offense when given a proc 1094s does not register an offense when the receiver is `Hash.new` 1094s registers an offense and corrects when the receiver is an array 1094s does not register an offense when the receiver is `ENV` 1095s does not register an offense when the receiver is `to_h` 1095s does not register an offense when the block param is a method argument 1095s does not register an offense when the block has multiple expressions 1095s does not register an offense when the block uses an external variable in a regexp match 1095s does not register an offense when the receiver is a hash literal 1095s registers an offense and corrects for `Regexp#match?` 1095s registers an offense and corrects for `regexp =~ blockvar` 1095s registers an offense and corrects for `blockvar =~ lvar` 1095s registers an offense and corrects when the receiver is a range 1095s does not register an offense when the block arity is not 1 1095s registers an offense and corrects when the receiver is a set 1095s registers an offense and corrects when there is no explicit regexp 1095s registers an offense and corrects with a multiline block 1095s registers an offense and corrects without a receiver 1095s does not register an offense when the block does not match a regexp 1095s registers an offense and corrects for `blockvar =~ regexp` 1095s registers an offense and corrects for `match?` 1095s with `numblock`s 1095s registers an offense and corrects for `Regexp#match?` 1095s registers an offense and corrects for `blockvar =~ regexp` 1095s does not register an offense when using `match?` without a receiver 1095s does not register an offense if there is more than one numbered param 1095s does not register an offense when the param is a method argument 1095s registers an offense and corrects for `regexp =~ blockvar` 1095s registers an offense and corrects for `match?` 1095s with select 1095s does not register an offense when there is no block 1095s does not register an offense when the receiver is `Hash.new` 1095s registers an offense and corrects for `regexp =~ blockvar` 1095s registers an offense and corrects for `blockvar =~ lvar` 1095s does not register an offense when the receiver is `ENV` 1095s does not register an offense when the receiver is a hash literal 1095s registers an offense and corrects with a multiline block 1095s registers an offense and corrects when the receiver is a set 1095s does not register an offense when the receiver is `to_hash` 1095s does not register an offense when the receiver is `to_h` 1096s does not register an offense when the block does not match a regexp 1096s registers an offense and corrects when there is no explicit regexp 1096s does not register an offense when the block uses an external variable in a regexp match 1096s registers an offense and corrects for `match?` 1096s registers an offense if `to_h` is in the receiver chain but not the actual receiver 1096s registers an offense and corrects when the receiver is a range 1097s registers an offense and corrects for `Regexp#match?` 1097s registers an offense and corrects for `lvar =~ blockvar` 1097s does not register an offense when the block param is a method argument 1097s does not register an offense when given a proc 1097s registers an offense and corrects for `blockvar =~ regexp` 1097s registers an offense and corrects when the receiver is an array 1097s does not register an offense when the block arity is not 1 1097s registers an offense and corrects without a receiver 1097s does not register an offense when the block has multiple expressions 1097s does not register an offense when the receiver is `Hash[]` 1097s with `numblock`s 1097s registers an offense and corrects for `blockvar =~ regexp` 1097s registers an offense and corrects for `match?` 1097s registers an offense and corrects for `Regexp#match?` 1097s does not register an offense when the param is a method argument 1097s does not register an offense when using `match?` without a receiver 1097s registers an offense and corrects for `regexp =~ blockvar` 1097s does not register an offense if there is more than one numbered param 1097s with reject 1097s registers an offense and corrects when there is no explicit regexp 1097s does not register an offense when there is no block 1097s does not register an offense when the block does not match a regexp 1097s does not register an offense when the receiver is `Hash[]` 1097s does not register an offense when given a proc 1097s registers an offense and corrects when the receiver is a range 1098s registers an offense and corrects for `lvar =~ blockvar` 1098s does not register an offense when the receiver is `Hash.new` 1098s does not register an offense when the block has multiple expressions 1098s registers an offense and corrects for `match?` 1098s does not register an offense when the receiver is `to_hash` 1098s does not register an offense when the receiver is a hash literal 1098s registers an offense if `to_h` is in the receiver chain but not the actual receiver 1098s does not register an offense when the block param is a method argument 1098s registers an offense and corrects without a receiver 1098s does not register an offense when the receiver is `ENV` 1098s registers an offense and corrects when the receiver is a set 1098s registers an offense and corrects with a multiline block 1098s registers an offense and corrects for `blockvar =~ regexp` 1098s registers an offense and corrects for `Regexp#match?` 1098s registers an offense and corrects when the receiver is an array 1098s does not register an offense when the block uses an external variable in a regexp match 1098s does not register an offense when the block arity is not 1 1098s registers an offense and corrects for `blockvar =~ lvar` 1098s does not register an offense when the receiver is `to_h` 1098s registers an offense and corrects for `regexp =~ blockvar` 1098s with `numblock`s 1098s does not register an offense when using `match?` without a receiver 1098s does not register an offense when the param is a method argument 1098s registers an offense and corrects for `blockvar =~ regexp` 1098s registers an offense and corrects for `match?` 1098s does not register an offense if there is more than one numbered param 1099s registers an offense and corrects for `Regexp#match?` 1099s registers an offense and corrects for `regexp =~ blockvar` 1099s 1099s RuboCop::Cop::Style::LambdaCall 1099s when style is set to braces 1099s registers an offense for opposite + correct 1099s registers an offense for correct + multiple opposite styles 1099s accepts a call without receiver 1099s registers an offense for x.call() 1099s autocorrects x.call to x.() 1099s autocorrects x.call asdf, x123 to x.(asdf, x123) 1099s when style is set to call 1099s registers an offense for x.() 1099s registers an offense for correct + opposite 1099s registers an offense for correct + multiple opposite styles 1099s 1099s RuboCop::Cop::Bundler::GemVersion 1099s when EnforcedStyle is set to forbidden 1099s flags gems that specify a gem version 1099s does not flag gems included in AllowedGems metadata 1099s does not flag gems without a specified version 1099s when EnforcedStyle is set to required (default) 1099s does not flag gems with a specified version 1099s flags gems that do not specify a version 1099s does not flag gems included in AllowedGems metadata 1099s 1099s RuboCop::Cop::Style::Attr 1099s registers offense for attr within module_eval 1099s accepts attr when it does not take arguments 1099s does not register offense for custom `attr` method 1099s accepts attr when it has a receiver 1099s registers an offense attr 1099s registers offense for attr within class_eval 1099s autocorrects 1099s attr :name, true to attr_accessor :name 1099s attr with multiple names to attr_reader 1099s attr, false to attr_reader 1099s attr to attr_reader 1099s 1099s RuboCop::Cop::Style::ClassCheck 1099s when enforced style is is_a? 1099s registers an offense for kind_of? and corrects to is_a? 1099s when enforced style is kind_of? 1099s registers an offense for is_a? and corrects to kind_of? 1099s 1099s RuboCop::Cop::Layout::SpaceAroundKeyword 1099s &. 1099s behaves like accept after 1099s accepts `&.` after keyword in `super&.foo` 1099s behaves like accept after 1099s accepts `&.` after keyword in `yield&.foo` 1099s behaves like missing before 1100s registers an offense for missing space before keyword in `for x in []do end` 1100s behaves like accept after 1100s accepts `(` after keyword in `return(1)` 1100s behaves like accept after 1100s accepts `(` after keyword in `break(1)` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `begin rescue; else"" end` and autocorrects 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `1 and(2)` and autocorrects 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `a "b"do end` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `begin ensure"" end` and autocorrects 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `until 1 do"x" end` and autocorrects 1100s behaves like accept around 1100s accepts `{}` around keyword in `"#{begin end}"` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `return""` and autocorrects 1100s behaves like accept before 1100s accepts `+` before keyword in `a+begin end` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `super""` and autocorrects 1100s behaves like accept after 1100s accepts `.` after keyword in `begin end.inspect` 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `case ""when a; end` 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `if a; ""elsif b; end` 1100s behaves like accept around 1100s accepts `{}` around keyword in `{a: begin end}` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `break""` and autocorrects 1100s behaves like accept around 1100s accepts `()` around keyword in `(next)` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `case"" when 1; end` and autocorrects 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `a do|x| end` and autocorrects 1100s >= Ruby 2.7 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `""in a` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `case a; in""; end` and autocorrects 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `a in""` and autocorrects 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `1 or(2)` and autocorrects 1100s behaves like accept around 1100s accepts `[]` around keyword in `a[begin end]` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `if a; else"" end` and autocorrects 1100s behaves like accept after 1100s accepts `#` after keyword in `next#comment` 1100s behaves like accept before 1100s accepts `+` before keyword in `a+begin; end.method` 1100s behaves like accept around 1100s accepts `[]` around keyword in `[begin end]` 1100s behaves like accept after 1100s accepts `(` after keyword in `super(1)` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `1 until""` and autocorrects 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `if a; ""else end` 1100s behaves like missing after 1100s registers an offense for missing space after keyword in `BEGIN{}` and autocorrects 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `while 1do end` 1100s behaves like accept after 1100s accepts `(` after keyword in `yield(1)` 1100s behaves like accept before 1100s accepts `&&` before keyword in `a&&begin end` 1100s behaves like accept after 1100s accepts `(` after keyword in `defined?(1)` 1100s behaves like accept before 1100s accepts `!` before keyword in `!yield.method` 1100s behaves like missing before 1100s registers an offense for missing space before keyword in `1until ""` 1100s behaves like missing after 1101s registers an offense for missing space after keyword in `case a; when b; else"" end` and autocorrects 1101s behaves like accept before 1101s accepts `*` before keyword in `a*begin end` 1101s behaves like accept after 1101s accepts `[` after keyword in `yield[1]` 1101s behaves like accept around 1101s accepts `,` around keyword in `a 1,next,1` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `a do "a"end` 1101s behaves like accept before 1101s accepts `==` before keyword in `a==begin end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `1and 2` 1101s behaves like accept after 1101s accepts `(` after keyword in `not(1)` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `1while ""` 1101s >= Ruby 2.7 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `case""; in 1; end` and autocorrects 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `next""` and autocorrects 1101s behaves like accept before 1101s accepts `|` before keyword in `loop { |x|break }` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `yield""` and autocorrects 1101s >= Ruby 2.7 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `case a; in b; ""else end` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `case a; in b; else"" end` and autocorrects 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `case a; in "pattern"if "condition"; else "" end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `case a; in "pattern"unless "condition"; else "" end` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `case a; in "pattern" unless"condition"; else "" end` and autocorrects 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `case a; in "pattern" if"condition"; else "" end` and autocorrects 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `begin rescue; ""else end` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `unless""; end` and autocorrects 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `begin "a"end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `if ""then a end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `1or 2` 1101s behaves like accept before 1101s accepts `**` before keyword in `a**begin end` 1101s behaves like accept before 1101s accepts `=*` before keyword in `a=*begin end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `case a; when b; ""else end` 1101s behaves like accept before 1101s accepts `<` before keyword in `a` before keyword in `a>begin end` 1101s behaves like accept after 1101s accepts `{` after keyword in `loop{}` 1101s behaves like accept before 1101s accepts `!` before keyword in `!yield` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `case a when""; end` and autocorrects 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `begin"" end` and autocorrects 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `defined?1` and autocorrects 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `1 while""` and autocorrects 1101s behaves like accept after 1101s accepts `(` after keyword in `next(1)` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `until 1 do "x"end` 1101s behaves like accept before 1101s accepts `-` before keyword in `a-begin end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `for x in [] do "x"end` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `a rescue""` and autocorrects 1101s >= Ruby 3.0 1101s behaves like accept before 1101s accepts `=>` before keyword in `""=> a` 1101s behaves like accept after 1101s accepts `=>` after keyword in `a =>""` 1101s behaves like accept after 1101s accepts `.` after keyword in `yield.method` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `for x in [] do"x" end` and autocorrects 1101s behaves like accept after 1101s accepts `\n` after keyword in `test do 1101s end` 1101s behaves like accept before 1101s accepts `/` before keyword in `a/begin end` 1101s behaves like accept after 1101s accepts `\` after keyword in `test do\ 1101s end` 1101s behaves like accept after 1101s accepts `+` after keyword in `+begin end` 1101s behaves like missing after 1101s registers an offense for missing space after keyword in `super{}` and autocorrects 1101s behaves like accept after 1101s accepts `rescue` after keyword in `begin; rescue(Error); end` 1101s behaves like missing before 1101s registers an offense for missing space before keyword in `begin ""ensure end` 1101s behaves like accept around 1102s accepts `{}` around keyword in `loop {next}` 1102s behaves like missing after 1102s registers an offense for missing space after keyword in `if""; end` and autocorrects 1102s behaves like accept around 1102s accepts `;` around keyword in `test do;end` 1102s behaves like missing after 1102s registers an offense for missing space after keyword in `begin+1 end` and autocorrects 1102s behaves like accept before 1102s accepts `!` before keyword in `!super.method` 1102s behaves like missing after 1102s registers an offense for missing space after keyword in `if a then"" end` and autocorrects 1102s behaves like accept after 1102s accepts `[` after keyword in `super[1]` 1102s behaves like accept before 1102s accepts `||` before keyword in `a||begin end` 1102s behaves like missing after 1102s registers an offense for missing space after keyword in `while 1 do"x" end` and autocorrects 1102s behaves like missing after 1102s registers an offense for missing space after keyword in `not""` and autocorrects 1102s 1102s RuboCop::Cop::InternalAffairs::ExampleDescription 1102s with `expect_offense` 1102s does not register an offense when given a proper description 1102s registers an offense when given an improper description 1102s does not register an offense when given an unexpected description 1102s when not making an expectation on offenses 1102s does not register an offense 1102s with `expect_no_corrections` 1102s registers an offense when given an improper description 1102s in conjunction with expect_offense 1102s registers an offense when given an improper description 1102s with `expect_no_offenses` 1102s does not register an offense when given a proper description 1102s does not crash when given a proper description that is split with + 1102s registers an offense when given an improper description 1102s does not register an offense when given an unexpected description 1102s with `expect_correction` 1102s registers an offense when given an improper description 1102s in conjunction with expect_offense 1102s registers an offense when given an improper description 1102s when the description is invalid for both methods 1102s registers an offense for the first method encountered 1102s 1102s RuboCop::Cop::Style::For 1102s when each is the enforced style 1102s registers an offense for for 1102s registers multiple offenses 1102s accepts def for 1102s registers an offense for opposite + correct style 1103s accepts :for 1103s accepts multiline each 1103s autocorrect 1103s corrects an array with `&&` operator 1103s corrects an array with `|` operator 1103s changes for that does not have do or semicolon to each 1103s corrects an array with `*` operator 1103s corrects an array with `||` operator 1103s corrects an array with `&` operator 1103s corrects an array with `-` operator 1103s corrects an array with `+` operator 1103s corrects a tuple of items 1103s corrects to `each` without parenthesize collection if non-operator method called 1103s with range 1103s changes for that does not have do or semicolon to each 1103s changes for to each 1103s without parentheses 1103s changes for that does not have do or semicolon to each 1103s changes for to each 1103s when for is the enforced style 1103s registers an offense for each without an item and uses _ as the item 1103s registers an offense for multiline each 1103s registers an offense for correct + opposite style 1103s accepts for 1103s accepts single line each 1103s registers an offense for a tuple of items 1103s registers multiple offenses 1103s Ruby 2.7 1103s registers an offense for each without an item and uses _ as the item 1103s when using safe navigation operator 1103s does not break 1103s 1103s RuboCop::Cop::Style::ConstantVisibility 1103s does not register an offense when passing a string to the visibility declaration 1103s does not register an offense in the top level scope 1103s registers an offense for module definitions 1103s IgnoreModules 1103s registers an offense for constants 1104s does not register an offense for class definitions 1104s when defining a constant in a class 1104s with a single-statement body 1104s registers an offense when not using a visibility declaration 1104s with a multi-statement body 1104s registers an offense when there is no matching visibility declaration 1104s registers an offense when not using a visibility declaration 1104s does not register an offense when using a visibility declaration 1104s when defining a constant in a module 1104s does not register an offense when using a visibility declaration 1104s registers an offense when not using a visibility declaration 1104s 1104s RuboCop::Cop::AnnotationComment 1104s #correct? 1104s when there is duplication in the keywords 1104s when the shorter keyword is given first 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s when the longer keyword is given first 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s when no colon is required 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s when a colon is required 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like correct 1104s is expected to be truthy 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s behaves like incorrect 1104s is expected to be falsey 1104s #annotation? 1104s when given as the first word of a sentence 1104s is expected to be falsey 1104s when given a keyword followed by a space 1104s is expected to equal true 1104s when given a keyword followed by a colon 1104s is expected to equal true 1104s when the keyword is not capitalized properly 1104s is expected to equal true 1104s when it includes a keyword 1104s is expected to be falsey 1104s when the keyword is multiple words 1104s is expected to equal true 1104s when annotated with a non keyword 1104s is expected to be falsey 1104s 1104s RuboCop::Cop::Lint::ErbNewArguments 1104s >= Ruby 2.6 1104s does not register an offense when using `ERB.new` with keyword arguments 1104s registers an offense when using `ERB.new` with non-keyword 2nd argument 1104s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument 1104s registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments 1104s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments 1104s registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument 1104s registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments 1104s does not register an offense when using `ERB.new` without optional arguments 1104s when using `ActionView::Template::Handlers::ERB.new` 1104s does not register an offense when using `ERB.new` without arguments 1104s <= Ruby 2.5 1104s does not register an offense when using `ERB.new` with non-keyword arguments 1104s 1104s RuboCop::Cop::Layout::MultilineMethodCallBraceLayout 1104s ignores calls with a multiline empty brace 1104s ignores calls with an empty brace 1104s ignores implicit calls 1104s ignores calls without arguments 1104s ignores single-line calls 1104s behaves like multiline literal brace layout trailing comma 1104s symmetrical style 1104s opening brace on same line as first element 1104s last element has a trailing comma 1104s autocorrects closing brace on different line from last element 1104s same_line style 1104s opening brace on same line as first element 1104s last element has a trailing comma 1104s autocorrects closing brace on different line as last element 1104s behaves like multiline literal brace layout 1104s heredoc 1104s detects heredoc structures that are safe to add to 1104s ignores heredocs that could share a last line 1104s same_line style 1104s opening brace on same line as first element 1104s allows closing brace on same line as multi-line element 1104s autocorrects closing brace on different line as last element 1104s allows closing brace on same line from last element 1104s detects closing brace on different line from multiline element 1104s with a chained call on the closing brace 1104s and a comment after the last element 1104s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1104s but no comment after the last element 1104s autocorrects the closing brace 1104s opening brace on separate line from first element 1104s detects closing brace on different line from last element 1104s allows closing brace on same line as last element 1104s allows closing brace on same line as last multiline element 1104s symmetrical style 1104s opening brace on same line as first element 1104s autocorrects closing brace on different line from last element 1104s allows closing brace on same line as last element 1104s allows closing brace on same line as last multiline element 1104s detects closing brace on different line from last element 1104s with a chained call on the closing brace 1104s but no comment after the last element 1104s autocorrects the closing brace 1104s and a comment after the last element 1104s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1104s opening brace on separate line from first element 1104s detects closing brace on same line as last element 1104s allows closing brace on separate line from last element 1105s allows closing brace on separate line from last multiline element 1105s new_line style 1105s opening brace on same line as first element 1105s detects closing brace on same line as last multiline element 1105s allows closing brace on different line from last element 1105s allows closing brace on different line from multi-line element 1105s autocorrects closing brace on same line as last element 1105s opening brace on separate line from first element 1105s allows closing brace on separate line from last multiline element 1105s detects closing brace on same line as last element 1105s allows closing brace on separate line from last element 1105s when comment present before closing brace 1105s corrects closing brace without crashing 1105s when EnforcedStyle is new_line 1105s ignores single-line calls with multi-line receiver 1105s still ignores single-line calls 1105s ignores single-line calls with multi-line receiver with leading dot 1105s 1105s RuboCop::Cop::Gemspec::RequireMFA 1105s with rubygems_mfa_required: false by key access 1105s registers an offense and corrects 1105s when there are other metadata keys 1105s and `rubygems_mfa_required` is included 1105s does not register an offense 1105s and `rubygems_mfa_required` is not included 1105s registers an offense and corrects 1105s when the specification has a metadata hash but no rubygems_mfa_required key 1105s registers an offense and corrects 1105s with rubygems_mfa_required: true 1105s does not register an offense 1105s with rubygems_mfa_required: false 1105s registers an offense and corrects 1105s when the gemspec is blank 1105s does not register an offense 1105s when the specification has an non-hash metadata 1105s registers an offense but does not correct 1105s when metadata is set by key assignment 1105s and `rubygems_mfa_required` is not included 1105s registers an offense 1105s and `rubygems_mfa_required` is included 1105s does not register an offense 1105s when the specification is blank 1105s registers an offense and corrects 1105s 1105s RuboCop::Cop::Lint::CircularArgumentReference 1105s circular argument references in ordinal arguments 1105s when the seemingly-circular default value is a method call 1105s does not register an offense 1105s when the method contains a circular argument reference 1105s registers an offense 1105s when the method does not contain a circular argument reference 1105s does not register an offense 1105s circular argument references in keyword arguments 1105s when the keyword argument is not circular 1105s does not register an offense 1105s when the keyword argument is not circular, but calls a method of some other object with the same name 1105s does not register an offense 1105s when there is one circular argument reference 1105s registers an offense 1105s when the keyword argument is not circular, but calls a method of its own class with a self specification 1105s does not register an offense 1105s when the keyword argument is not circular, and calls a method 1105s does not register an offense 1105s when there are multiple offensive keyword arguments 1105s registers an offense 1105s 1105s RuboCop::Cop::Layout::RedundantLineBreak 1105s when InspectBlocks is true 1105s for an expression that does not fit on a single line 1105s accepts a method call on a multiple lines 1105s with a longer max line length 1105s accepts an assignment containing a method definition 1105s accepts an assignment containing a heredoc 1105s accepts method call with a do keyword that would just surpass the max line length 1105s accepts a complex method call on a multiple lines 1105s registers an offense for a method call with a do keyword that is just under the max line length 1105s accepts a method call followed by binary operations that are too long taken together 1105s for a block 1105s accepts when it is difficult to convert to single line 1105s for an expression that fits on a single line 1105s accepts an assignment containing a case expression 1105s accepts a method call with a block 1105s registers an offense for a method call on multiple lines 1105s registers an offense for a method call with a double quoted split string in parentheses 1105s registers an offense for a method call with a double quoted split string without parentheses 1105s registers an offense for a method call with a split operation 1105s registers an offense for a method call on multiple lines with backslash 1105s accepts a binary expression containing an if expression 1105s registers an offense for a method call with a double and single quoted split string 1105s accepts an assignment containing a begin-end expression 1105s accepts a method call on a single line 1105s accepts an assignment containing an if expression 1106s registers an offense for a method call with a single quoted split string 1106s registers an offense for a method call as right hand side of an assignment 1106s registers an offense for a method call on multiple lines inside a block 1106s accepts a method call on multiple lines if there are comments on them 1106s with LineLength Max 100 1106s registers an offense for a method without parentheses on multiple lines 1106s method chains 1106s registers an offense and corrects with a arguments on multiple lines 1106s does not register an offense with a heredoc argument 1106s properly corrects a method chain on multiple lines 1106s registers an offense and corrects with a string argument on multiple lines 1106s when Layout/SingleLineBlockChain is enabled 1106s accepts a method call chained onto a single line block 1106s for a block 1106s registers an offense when the method call has parentheses 1106s registers an offense when the method call has no arguments 1106s when Layout/SingleLineBlockChain is disabled 1106s reports an offense for a method call chained onto a multiline block 1106s reports an offense for a multiline block without a chained method call 1106s when Layout/SingleLineBlockChain is enabled 1106s reports an offense for a multiline block without a chained method call 1106s when Layout/SingleLineBlockChain is disabled 1106s reports an offense for a method call chained onto a single line block 1106s when InspectBlocks is false 1106s for an expression that fits on a single line 1106s registers an offense for a method call with a split operation 1106s registers an offense for a method call on multiple lines 1106s registers an offense for a method call with a double and single quoted split string 1106s registers an offense for a method call with a single quoted split string 1106s accepts an assignment containing an if expression 1106s registers an offense for a method call with a double quoted split string without parentheses 1106s accepts an assignment containing a begin-end expression 1106s accepts a method call on multiple lines if there are comments on them 1106s registers an offense for a method call on multiple lines inside a block 1106s accepts a method call with a block 1106s accepts a method call on a single line 1106s accepts a binary expression containing an if expression 1106s registers an offense for a method call on multiple lines with backslash 1106s accepts an assignment containing a case expression 1106s registers an offense for a method call with a double quoted split string in parentheses 1106s registers an offense for a method call as right hand side of an assignment 1106s with LineLength Max 100 1106s registers an offense for a method without parentheses on multiple lines 1106s method chains 1106s registers an offense and corrects with a arguments on multiple lines 1106s does not register an offense with a heredoc argument 1107s registers an offense and corrects with a string argument on multiple lines 1107s properly corrects a method chain on multiple lines 1107s when Layout/SingleLineBlockChain is enabled 1107s accepts a method call chained onto a single line block 1107s when Layout/SingleLineBlockChain is disabled 1107s reports an offense for a method call chained onto a single line block 1107s for an expression that does not fit on a single line 1107s accepts a method call on a multiple lines 1107s with a longer max line length 1107s accepts an assignment containing a method definition 1107s accepts a method call followed by binary operations that are too long taken together 1107s accepts an assignment containing a heredoc 1107s accepts a complex method call on a multiple lines 1107s registers an offense for a method call with a do keyword that is just under the max line length 1107s accepts method call with a do keyword that would just surpass the max line length 1107s for a block 1107s accepts when it is difficult to convert to single line 1107s for a block 1107s accepts when the method call has parentheses 1107s accepts when the method call has no arguments 1107s when Layout/SingleLineBlockChain is disabled 1107s accepts a method call chained onto a multiline block 1107s accepts a multiline block without a chained method call 1107s when Layout/SingleLineBlockChain is enabled 1107s accepts a multiline block without a chained method call 1107s 1107s RuboCop::Cop::Lint::NextWithoutAccumulator 1107s given an unrelated block 1107s accepts next with a value 1107s accepts a bare next 1107s behaves like reduce/inject 1107s given a reduce block 1107s accepts next with a value 1107s registers an offense for a bare next 1107s accepts next within a nested block 1107s Ruby 2.7 1107s registers an offense for a bare next 1107s behaves like reduce/inject 1107s given a inject block 1107s accepts next within a nested block 1107s accepts next with a value 1107s registers an offense for a bare next 1107s Ruby 2.7 1107s registers an offense for a bare next 1107s 1107s RuboCop::Cop::Lint::SendWithMixinArgument 1107s does not register an offense when using `extend` 1107s registers an offense when using `send` with `extend` 1107s does not register an offense when using `include` 1107s does not register an offense when using `prepend` 1107s registers an offense when using `public_send` method 1107s registers an offense when using `send` with `include` 1107s registers an offense when using `send` with `prepend` 1107s registers an offense when using `__send__` method 1107s does not register an offense when not using a mixin method 1107s when using namespace for module 1107s registers an offense when using `send` with `include` 1107s when specifying a mixin method as a string 1107s registers an offense when using `send` with `prepend` 1108s registers an offense when using `send` with `include` 1108s registers an offense when using `send` with `extend` 1108s 1108s RuboCop::Cop::Style::StructInheritance 1108s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty 1108s registers an offense when extending instance of Struct without `do` ... `end` and class body is empty and single line definition 1108s registers an offense when extending instance of ::Struct 1108s registers an offense when extending instance of Struct 1108s accepts assignment to Struct.new 1108s accepts assignment to block form of Struct.new 1108s registers an offense when extending instance of Struct with do ... end 1108s accepts assignment to ::Struct.new 1108s registers an offense when extending instance of `Struct` when there is a comment before class declaration 1108s accepts extending DelegateClass 1108s accepts plain class 1108s registers an offense when extending instance of ::Struct with do ... end 1108s 1108s RuboCop::Cop::Style::MagicCommentFormat 1108s ValueCapitalization 1108s when not set 1108s does not change the case of magic comment directives 1108s when uppercase 1108s registers an offense and corrects when the case does not match 1108s when lowercase 1108s registers an offense and corrects when the case does not match 1108s snake case style 1108s accepts a source with no tokens 1108s does not register an offense for incorrect style in comments after the first statement 1108s registers an offense for kebab case in emacs style 1108s registers an offense for kebab case 1108s does not register an offense for dashes in other comments 1108s accepts an empty source 1108s accepts a magic comments in snake case 1108s accepts a frozen string literal in snake case in emacs style 1108s registers an offense for mixed case 1108s invalid config 1108s DirectiveCapitalization 1108s raises an error 1108s ValueCapitalization 1108s raises an error 1108s kebab case style 1108s accepts a source with no tokens 1108s registers an offense for mixed case 1108s registers an offense for snake case 1108s accepts a magic comments in kebab case 1108s does not register an offense for dashes in other comments 1108s registers an offense for snake case in emacs style 1108s accepts an empty source 1108s does not register an offense for incorrect style in comments after the first statement 1108s accepts a frozen string literal in snake case in emacs style 1108s all issues at once 1108s registers and corrects multiple issues 1108s DirectiveCapitalization 1108s when lowercase 1108s registers an offense and corrects when the case does not match 1108s when uppercase 1108s registers an offense and corrects when the case does not match 1108s when not set 1108s does not change the case of magic comment directives 1108s 1108s RuboCop::Cop::Naming::AccessorMethodName 1109s registers an offense for singleton method set_something with one args 1109s accepts method set_something with two args 1109s accepts method set_something with kwoptarg 1109s accepts singleton method set_something with no args 1109s accepts method set_something with kwrestarg 1109s accepts method set_something with no args 1109s registers an offense for singleton method get_something with no args 1109s accepts singleton method get_something with args 1109s accepts method set_something with optarg 1109s registers an offense for method get_something with no args 1109s accepts singleton method set_something with two args 1109s accepts method set_something with blockarg 1109s accepts method set_something with kwarg 1109s accepts method set_something with restarg 1109s accepts method get_something with args 1109s registers an offense for method set_something with one arg 1109s >= Ruby 2.7 1109s accepts method set_something with arguments forwarding 1109s 1109s RuboCop::Formatter::QuietFormatter 1109s #report_file 1109s when the offense is correctable 1109s prints message as-is 1109s when the offense is not corrected 1109s prints message as-is 1109s the file is under the current working directory 1109s prints as relative path 1109s the file is outside of the current working directory 1109s prints as absolute path 1109s when the offense is automatically corrected 1109s prints [Corrected] along with message 1109s #report_summary 1109s when 2 offenses are corrected and 2 offenses correctable 1109s handles pluralization correctly 1109s when a offense detected and a offense correctable 1109s handles pluralization correctly 1109s when a offense detected 1109s handles pluralization correctly 1109s when 2 offenses are corrected 1109s handles pluralization correctly 1109s when no files inspected 1109s handles pluralization correctly 1109s when an offense is corrected 1109s prints about correction 1109s when 2 offenses detected and 2 offenses correctable 1109s handles pluralization correctly 1109s when 2 offenses detected 1109s handles pluralization correctly 1109s when a file inspected and no offenses detected 1109s handles pluralization correctly 1109s 1109s RuboCop::Cop::Lint::NestedPercentLiteral 1109s registers no offense for percent modifier character in isolation 1109s registers offense for nested percent literals 1109s registers no offense for empty array 1109s registers no offense for array 1109s registers offense for multiply nested percent literals 1109s registers no offense for percents in the middle of literals 1109s registers offense for repeated nested percent literals 1109s registers no offense for nestings under percent 1109s when handling invalid UTF8 byte sequence 1109s registers offense for nested percent literal 1109s registers no offense for array 1109s 1109s RuboCop::Cop::RangeHelp 1109s source indicated by #range_with_surrounding_comma 1109s when side is :right 1109s is expected to eq "Error," 1109s when side is :left 1109s is expected to eq ",Error" 1109s when side is :both 1109s is expected to eq ",Error," 1109s #range_with_comments_and_lines 1109s returns a range that includes related comments and whole lines 1109s source indicated by #range_with_surrounding_space 1109s when passing range as a kwarg 1109s behaves like works with various `side`s 1109s when side is :left 1109s is expected to eq " a(2)" 1109s when side is :both 1109s is expected to eq " a(2) " 1109s when side is :right 1110s is expected to eq "a(2) " 1110s when passing range as a positional argument 1110s behaves like works with various `side`s 1110s when side is :right 1110s is expected to eq "a(2) " 1110s when side is :left 1110s is expected to eq " a(2)" 1110s when side is :both 1110s is expected to eq " a(2) " 1110s source indicated by #range_by_whole_lines 1110s with end of one line 1110s with include_final_newline 1110s is expected to eq "puts 'example'\n" 1110s without include_final_newline 1110s is expected to eq "puts 'example'" 1110s when part of a single line is selected 1110s with include_final_newline 1110s is expected to eq "puts 'example'\n" 1110s without include_final_newline 1110s is expected to eq "puts 'example'" 1110s with parts of four lines 1110s with include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" 1110s without include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" 1110s with a whole line plus beginning of next line 1110s without include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'" 1110s with include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'\n" 1110s with parts of two lines 1110s without include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'" 1110s with include_final_newline 1110s is expected to eq "puts 'example'\nputs 'another example'\n" 1110s when source doesn't end with a newline 1110s with include_final_newline 1110s is expected to eq "newline_at_end" 1110s is expected to eq 30 1110s without include_final_newline 1110s is expected to eq "newline_at_end" 1110s with a whole line except newline selected 1110s without include_final_newline 1110s is expected to eq "puts 'example'" 1110s with include_final_newline 1110s is expected to eq "puts 'example'\n" 1110s with beginning of one line 1110s without include_final_newline 1110s is expected to eq "puts 'another example'" 1110s with include_final_newline 1110s is expected to eq "puts 'another example'\n" 1110s 1110s RuboCop::Formatter::DisabledConfigFormatter 1110s when exclude_limit option is passed 1110s respects the file exclusion list limit 1110s with autocorrect supported cop 1110s adds a comment about --autocorrect option 1110s when any offenses are detected 1110s displays YAML configuration disabling all cops with offenses 1110s when there's .rubocop.yml 1110s merges in excludes from .rubocop.yml 1110s when exclude_limit option is omitted 1110s disables the cop with 15 offending files 1110s when no files are inspected 1110s creates a .rubocop_todo.yml even in such case 1110s 1110s RuboCop::Cop::Style::RaiseArgs 1110s when enforced style is exploded 1110s accepts a raise with 3 args 1110s accepts a raise when exception object is assigned to a local variable 1110s accepts exception constructor with keyword arguments 1110s accepts a raise with `new` method without receiver 1110s accepts a raise with msg argument 1110s accepts exception constructor with more than 1 argument 1110s accepts a raise with splatted arguments 1110s accepts a raise with 2 args 1110s ignores a raise with an exception argument 1110s with opposite + correct 1110s reports multiple offenses 1110s reports an offense for opposite + correct 1110s when exception type is in AllowedCompactTypes 1110s accepts exception constructor with no arguments 1110s with more than one argument 1110s accepts exception constructor 1110s with one argument 1110s accepts exception constructor 1110s with a raise with exception object 1110s with no arguments 1110s reports an offense 1110s when used in a logical and expression 1110s registers an offense and autocorrects 1110s with one argument 1110s reports an offense 1111s when used in a ternary expression 1111s registers an offense and autocorrects 1111s when used in a logical or expression 1111s registers an offense and autocorrects 1111s when an exception object is assigned to a local variable 1111s autocorrects to exploded style 1111s when enforced style is compact 1111s accepts a raise with msg argument 1111s accepts a raise with an exception argument 1111s accepts exception constructor with keyword arguments and message argument 1111s with a raise with 2 args and exception object is assigned to a local variable 1111s reports an offense 1111s with a raise with 2 args 1111s reports an offense 1111s with a raise with exception instantiation and message arguments 1111s reports an offense 1111s with correct + opposite 1111s reports multiple offenses 1111s reports an offense 1111s when used in a ternary expression 1111s registers an offense and autocorrects 1111s when used in a logical and expression 1111s registers an offense and autocorrects 1111s when used in a logical or expression 1111s registers an offense and autocorrects 1111s with a raise with 3 args 1111s reports an offense 1111s 1111s RuboCop::Cop::Lint::RescueType 1111s accepts rescue modifier 1111s accepts rescuing a single exception 1111s accepts rescuing nothing 1111s accepts rescuing nothing within a method definition 1111s behaves like offenses 1111s begin rescue 1111s rescuing from 0.0 before another exception 1111s registers an offense and autocorrects 1111s rescuing from 0.0 1111s registers an offense and autocorrects 1111s rescuing from 0.0 after another exception 1111s registers an offense and autocorrects 1111s def rescue ensure 1111s rescuing from 0.0 1111s registers an offense and autocorrects 1111s def rescue 1111s rescuing from 0.0 1111s registers an offense and autocorrects 1111s begin rescue ensure 1111s rescuing from 0.0 1111s registers an offense and autocorrects 1111s behaves like offenses 1111s begin rescue 1111s rescuing from {} before another exception 1111s registers an offense and autocorrects 1111s rescuing from {} after another exception 1111s registers an offense and autocorrects 1111s rescuing from {} 1111s registers an offense and autocorrects 1111s begin rescue ensure 1111s rescuing from {} 1111s registers an offense and autocorrects 1111s def rescue ensure 1111s rescuing from {} 1111s registers an offense and autocorrects 1111s def rescue 1111s rescuing from {} 1111s registers an offense and autocorrects 1111s behaves like offenses 1111s begin rescue 1111s rescuing from nil after another exception 1111s registers an offense and autocorrects 1111s rescuing from nil before another exception 1111s registers an offense and autocorrects 1111s rescuing from nil 1111s registers an offense and autocorrects 1111s begin rescue ensure 1111s rescuing from nil 1111s registers an offense and autocorrects 1111s def rescue ensure 1111s rescuing from nil 1111s registers an offense and autocorrects 1111s def rescue 1111s rescuing from nil 1111s registers an offense and autocorrects 1111s behaves like offenses 1111s def rescue 1111s rescuing from [] 1111s registers an offense and autocorrects 1111s begin rescue 1111s rescuing from [] 1111s registers an offense and autocorrects 1111s rescuing from [] before another exception 1111s registers an offense and autocorrects 1111s rescuing from [] after another exception 1111s registers an offense and autocorrects 1111s begin rescue ensure 1111s rescuing from [] 1111s registers an offense and autocorrects 1111s def rescue ensure 1111s rescuing from [] 1111s registers an offense and autocorrects 1111s behaves like offenses 1111s begin rescue 1111s rescuing from 'string' before another exception 1111s registers an offense and autocorrects 1111s rescuing from 'string' after another exception 1111s registers an offense and autocorrects 1111s rescuing from 'string' 1111s registers an offense and autocorrects 1111s begin rescue ensure 1111s rescuing from 'string' 1112s registers an offense and autocorrects 1112s def rescue 1112s rescuing from 'string' 1112s registers an offense and autocorrects 1112s def rescue ensure 1112s rescuing from 'string' 1112s registers an offense and autocorrects 1112s behaves like offenses 1112s def rescue ensure 1112s rescuing from 0 1112s registers an offense and autocorrects 1112s begin rescue ensure 1112s rescuing from 0 1112s registers an offense and autocorrects 1112s def rescue 1112s rescuing from 0 1112s registers an offense and autocorrects 1112s begin rescue 1112s rescuing from 0 1112s registers an offense and autocorrects 1112s rescuing from 0 after another exception 1112s registers an offense and autocorrects 1112s rescuing from 0 before another exception 1112s registers an offense and autocorrects 1112s behaves like offenses 1112s begin rescue 1112s rescuing from "#{string}" after another exception 1112s registers an offense and autocorrects 1112s rescuing from "#{string}" 1112s registers an offense and autocorrects 1112s rescuing from "#{string}" before another exception 1112s registers an offense and autocorrects 1112s def rescue 1112s rescuing from "#{string}" 1112s registers an offense and autocorrects 1112s begin rescue ensure 1112s rescuing from "#{string}" 1112s registers an offense and autocorrects 1112s def rescue ensure 1112s rescuing from "#{string}" 1112s registers an offense and autocorrects 1112s behaves like offenses 1112s begin rescue 1112s rescuing from :symbol before another exception 1112s registers an offense and autocorrects 1112s rescuing from :symbol 1112s registers an offense and autocorrects 1112s rescuing from :symbol after another exception 1112s registers an offense and autocorrects 1112s def rescue 1112s rescuing from :symbol 1112s registers an offense and autocorrects 1112s def rescue ensure 1112s rescuing from :symbol 1112s registers an offense and autocorrects 1112s begin rescue ensure 1112s rescuing from :symbol 1112s registers an offense and autocorrects 1112s 1112s RuboCop::Formatter::MarkdownFormatter 1113s outputs the cached result in Markdown 1115s outputs the result in Markdown 1115s 1115s RuboCop::Cop::Layout::FirstMethodArgumentLineBreak 1115s ignores kwargs listed on a single line when the arguments are used in `super` 1115s registers an offense and corrects hash arg without a line break before the first pair 1115s registers an offense and corrects hash arg spanning multiple lines 1115s ignores arguments listed on a single line 1115s ignores arguments without parens 1115s ignores methods without arguments 1115s args listed on the first line 1115s registers an offense and corrects using `super` 1115s registers an offense and corrects using safe navigation operator 1115s registers an offense and corrects 1115s 1115s RuboCop::FileFinder 1115s #find_file_upwards 1115s returns nil when file is not found 1115s returns a file to be found upwards 1115s #find_last_file_upwards 1115s returns the last file found upwards 1115s returns nil when file is not found 1115s 1115s RuboCop::Cop::Style::HashTransformKeys 1115s below Ruby 2.5 1115s does not flag even if transform_keys could be used 1115s below Ruby 2.6 1115s does not flag _.to_h{...} 1115s when using Ruby 2.6 or newer 1115s does not flag `_.to_h{...}` when both key & value are transformed 1115s flags _.to_h{...} when transform_keys could be used 1115s does not flag `_.to_h{...}` when its receiver is `with_index` 1115s does not flag _.to_h {...} when key block argument is unused 1115s does not flag `_.to_h{...}` when its receiver is `zip` 1115s does not flag `_.to_h{...}` when its receiver is `each_with_index` 1115s does not flag `_.to_h{...}` when its receiver is an array literal 1115s when using Ruby 2.5 or newer 1115s does not flag `_.map{...}.to_h` when its receiver is `with_index` 1115s correctly autocorrects _.map{...}.to_h with block 1115s correctly autocorrects Hash[_.map{...}] 1115s does not flag `Hash[_.map{...}]` when its receiver is an array literal 1115s does not flag each_with_object when its receiver is array literal 1115s does not flag `each_with_object` when its receiver is `zip` 1115s does not flag `each_with_object` when its receiver is `each_with_index` 1115s does not flag _.map{...}.to_h when both key & value are transformed 1115s does not flag key transformation in the absence of to_h 1115s does not flag key transformation when receiver is array literal 1115s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 1115s does not flag `_.map{...}.to_h` when its receiver is `zip` 1115s does not flag each_with_object when no transformation occurs 1115s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 1115s does not flag each_with_object when both key & value are transformed 1115s does not flag _.map {...}.to_h when key block argument is unused 1115s does not flag each_with_object when key transformation uses value 1115s flags Hash[_.map{...}] when transform_keys could be used 1115s does not flag Hash[_.map{...}] when both key & value are transformed 1115s flags _.map{...}.to_h when transform_keys could be used 1115s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 1115s correctly autocorrects _.map{...}.to_h without block 1115s does not flag `each_with_object` when its receiver is `with_index` 1115s flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` 1115s flags _.map {...}.to_h when transform_keys could be used when wrapped in another block 1115s does not flag `Hash[_.map{...}]` when its receiver is `zip` 1115s does not flag `each_with_object` when its argument is used in the key 1116s does not flag each_with_object when its argument is not modified 1116s with multiline block 1116s flags each_with_object when transform_keys could be used 1116s with safe navigation operator 1116s flags each_with_object when transform_keys could be used 1116s with inline block 1116s flags each_with_object when transform_keys could be used 1116s 1116s RuboCop::Cop::Lint::RequireRelativeSelfPath 1116s does not register an offense when using `require_relative` without argument 1116s does not register an offense when using a variable as an argument of `require_relative` 1116s does not register an offense when the filename is the same but the extension does not match 1116s registers an offense when using `require_relative` with self file path argument 1116s does not register an offense when using `require_relative` without self file path argument 1116s registers an offense when using `require_relative` with self file path argument (with ext) 1116s 1116s RuboCop::Cop::Style::NegatedUnless 1116s does not blow up for empty if condition 1116s does not blow up for empty unless condition 1116s does not blow up on a negated ternary operator 1116s does not blow up for ternary ops 1116s with “prefix” style 1116s registers an offense for prefix 1116s does not register an offense for postfix 1116s with “postfix” style 1116s does not register an offense for prefix 1116s registers an offense for postfix 1116s with “both” style 1116s accepts an unless where the condition is doubly negated 1116s accepts an unless where only part of the condition is negated 1116s registers an offense for unless with exclamation point condition 1116s registers an offense for unless with "not" condition 1116s accepts an unless/else with negative condition 1116s autocorrects by replacing parenthesized unless not with if 1116s 1116s RuboCop::Cop::Style::CaseEquality 1116s when AllowOnConstant is false 1116s registers an offense and does not correct for === when receiver is of some other type 1116s registers an offense and corrects for === when the receiver is a constant 1116s registers an offense and corrects for === when the receiver is a regexp 1116s registers an offense and corrects for === when the receiver is a range 1116s does not fail when the receiver is implicit 1116s does not register an offense for === when the receiver is not a camel cased constant 1116s when AllowOnSelfClass is true 1116s registers an offense and corrects for === when the receiver is a regexp 1116s registers an offense and corrects for === when the receiver is self.klass 1116s registers an offense and corrects for === when the receiver is a range 1117s registers an offense and does not correct for === when receiver is of some other type 1117s does not register an offense for === when the receiver is not a camel cased constant 1117s does not register an offense for === when the receiver is self.class 1117s does not fail when the receiver is implicit 1117s when AllowOnSelfClass is false 1117s registers an offense and corrects for === when the receiver is self.class 1117s registers an offense and does not correct for === when receiver is of some other type 1117s registers an offense and corrects for === when the receiver is a range 1117s registers an offense and corrects for === when the receiver is a regexp 1117s does not register an offense for === when the receiver is not a camel cased constant 1117s does not fail when the receiver is implicit 1117s when AllowOnConstant is true 1117s does not register an offense for === when the receiver is a constant 1117s does not fail when the receiver is implicit 1117s does not register an offense for === when the receiver is not a camel cased constant 1117s registers an offense and corrects for === when the receiver is a regexp 1117s registers an offense and does not correct for === when receiver is of some other type 1117s registers an offense and corrects for === when the receiver is a range 1117s 1117s RuboCop::Cop::Style::OrAssignment 1117s when using unless var; var = something; end 1117s does not register an offense if any of the variables are different 1117s registers an offense for instance variables 1117s registers an offense for global variables 1118s registers an offense for class variables 1118s registers an offense for normal variables 1118s when `then` branch body is empty 1118s registers an offense 1118s when using var = var ? var : something 1118s registers an offense with global variables 1118s registers an offense with instance variables 1118s registers an offense with normal variables 1118s registers an offense with class variables 1118s does not register an offense if any of the variables are different 1118s when using `elsif` statement 1118s does not register an offense 1118s when using var = if var; var; else; something; end 1118s does not register an offense if any of the variables are different 1118s registers an offense with class variables 1118s registers an offense with normal variables 1118s registers an offense with instance variables 1118s registers an offense with global variables 1118s when using var = something unless var 1118s does not register an offense if any of the variables are different 1118s registers an offense for global variables 1119s registers an offense for instance variables 1119s registers an offense for normal variables 1119s registers an offense for class variables 1119s 1119s RuboCop::Cop::Bundler::GemFilename 1119s with EnforcedStyle set to `gems.rb` 1119s with Gemfile.lock file path 1119s registers an offense 1119s with Gemfile file path 1119s registers an offense 1119s with gems.rb file path 1119s does not register an offense 1119s with non-root gems.rb file path 1119s does not register an offense 1119s with non-root Gemfile.lock file path 1119s registers an offense 1119s with non-root gems.locked file path 1119s does not register an offense 1119s with non-root Gemfile file path 1119s registers an offense 1119s with default configuration (EnforcedStyle => `Gemfile`) 1119s with Gemfile.lock file path 1119s does not register an offense 1119s with non-root Gemfile file path 1119s does not register an offense 1119s with gems.rb file path 1119s registers an offense 1119s with non-root gems.locked file path 1119s registers an offense 1119s with non-root Gemfile.lock file path 1119s does not register an offense 1119s with non-root gems.rb file path 1120s registers an offense 1120s with Gemfile file path 1120s does not register an offense 1120s with gems.locked file path 1120s registers an offense 1120s 1120s RuboCop::Cop::Layout::DotPosition 1120s Leading dots style 1120s accepts leading do in multi-line method call 1120s registers an offense for correct + opposite 1120s does not err on method call with no dots 1120s registers an offense for trailing dot in multi-line call 1120s does not err on method call without a method name 1120s registers an offense for only dot line 1120s does not err on method call on same line 1120s when a method spans multiple lines 1120s registers an offense 1120s when there is an intervening line comment 1120s does not register offense 1120s with multiple offenses 1120s registers all of them 1120s when using safe navigation operator 1120s registers an offense for correct + opposite 1120s accepts leading do in multi-line method call 1120s when the receiver is a heredoc 1120s registers an offense 1120s when the receiver has a heredoc argument 1120s as the first argument 1120s registers an offense 1120s with multiple heredocs 1120s registers an offense 1120s with a dynamic heredoc 1120s registers an offense 1120s with another method on the same line 1120s does not register an offense 1120s as the last argument 1120s registers an offense 1120s when there is an intervening blank line 1120s does not register offense 1120s Trailing dots style 1120s registers an offense for leading dot in multi-line call 1120s does not err on method call without a method name 1120s does not get confused by several lines of chained methods 1120s accepts trailing dot in multi-line method call 1120s does not err on method call with multi-line arguments 1120s does not err on method call on same line 1120s does not err on method call with no dots 1120s when using safe navigation operator 1120s accepts trailing dot in multi-line method call 1120s registers an offense for correct + opposite 1120s when there is a heredoc with a following method 1120s does not register an offense for a heredoc 1120s when the receiver has a heredoc argument 1120s with a dynamic heredoc 1120s registers an offense 1120s with another method on the same line 1120s does not register an offense 1120s with multiple heredocs 1120s registers an offense 1120s as the first argument 1120s registers an offense 1120s as the last argument 1120s registers an offense 1120s when the receiver is a heredoc 1120s registers an offense 1120s 1120s RuboCop::Cop::Style::CollectionCompact 1120s registers an offense and corrects when using `reject` and receiver is a variable 1120s registers an offense and corrects when using `select/select!` to reject nils 1120s does not register an offense when using `compact/compact!` 1121s registers an offense and corrects when using `reject` on array to reject nils 1121s registers an offense and corrects when using `reject` on hash to reject nils 1121s registers an offense and corrects when using `reject` with block pass arg and no parentheses 1121s registers an offense and corrects when using `reject` with block pass arg on array to reject nils 1121s does not register an offense when using `reject` to not to rejecting nils 1121s when without receiver 1121s does not register an offense and corrects when using `select/select!` to reject nils 1121s does not register an offense and corrects when using `reject` on array to reject nils 1121s Ruby <= 3.0 1121s does not register an offense and corrects when using `to_enum.reject` on array to reject nils 1121s does not register an offense and corrects when using `lazy.reject` on array to reject nils 1121s Ruby >= 3.1 1121s registers an offense and corrects when using `lazy.reject` on array to reject nils 1121s registers an offense and corrects when using `to_enum.reject` on array to reject nils 1121s 1121s RuboCop::Cop::Layout::SpaceBeforeComment 1121s registers an offense and corrects missing space before an EOL comment 1121s accepts a comment that begins a line 1121s accepts an EOL comment with a preceding space 1121s registers an offense and corrects after a heredoc 1121s accepts a doc comment 1121s 1121s RuboCop::Cop::Style::UnpackFirst 1121s ruby version >= 2.4 1121s registers offense 1121s when using `#unpack` with square brackets 1121s when using `#unpack` with `#at` 1121s when using `#unpack` with `#first` 1121s when using `#unpack` with `#slice` 1121s when using `#unpack` with dot and square brackets 1121s does not register offense 1121s when using `#unpack1` 1121s when using `#unpack` accessing second element 1121s 1121s RuboCop::Cop::Layout::MultilineMethodParameterLineBreaks 1121s when second parameter starts on same line as end of first 1121s registers an offense and corrects 1121s when there are multiple parameters on the first line 1121s registers an offense and corrects starting from the 2nd argument 1121s when many parameter are on multiple lines, two on same line 1121s registers an offense and corrects 1121s when many parameters including hash are on multiple lines, three on same line 1121s registers an offense and corrects 1121s when many parameters are on multiple lines, three on same line 1121s registers an offense and corrects 1121s when one parameter on same line 1121s does not add any offenses 1121s when parameter's default value starts on same line but ends on different line 1121s registers an offense and corrects 1121s when two parameters are on next line 1121s does not add any offenses 1121s when there are no parameters 1121s does not add any offenses 1121s 1121s RuboCop::Cop::Layout::FirstArrayElementLineBreak 1121s ignores elements listed on a single line 1121s ignores properly formatted implicit arrays 1121s array nested in a method call 1121s registers an corrects the offense 1121s masgn implicit arrays 1121s registers and corrects the offense 1121s send implicit arrays 1121s registers and corrects the offense 1121s elements listed on the first line 1121s registers and corrects the offense 1121s word arrays 1121s registers and corrects the offense 1121s 1121s RuboCop::Cop::Layout::ExtraSpacing 1121s when AllowForAlignment is true 1121s accepts space between key and value in a hash with hash rockets 1121s ignores trailing whitespace 1121s accepts aligned values of an implicit hash literal 1121s ignores whitespace at the beginning of the line 1121s registers an offense and corrects double extra spacing in variable assignment 1121s registers an offense and corrects extra spacing before a unary plus in an argument list 1121s registers an offense and corrects extra spacing in class inheritance 1121s registers an offense and corrects alignment with token not preceded by space 1121s ignores whitespace inside a string 1121s registers an offense and corrects extra space before a float 1121s with extra spacing for alignment purposes 1121s such as lining up assignments with empty lines and comments in between 1121s allows it 1121s such as aligning with the same character 1121s allows it 1121s such as aligning = on lines where there are trailing comments 1121s allows it 1121s such as aligning comments on non-adjacent lines 1121s allows it 1121s such as aligning long assignment expressions that include line breaks 1121s allows it 1121s such as aligning tokens with empty line between 1121s allows it 1121s such as aligning trailing comments 1122s allows it 1122s such as lining up assignments 1122s allows it 1122s such as lining up different kinds of assignments 1122s allows it 1122s when spaces are present in a single-line hash literal 1122s registers an offense and corrects hashes with hash rockets 1122s registers an offense and corrects hashes with symbol keys 1122s when AllowBeforeTrailingComments is 1122s false 1122s regsiters offense 1122s does not trigger on only one space before comment 1122s true 1122s allows it 1122s doesn't interfere with AllowForAlignment 1122s being false 1122s such as aligning = on lines where there are trailing comments 1122s registers offense(s) 1122s such as aligning trailing comments 1122s does not register an offense 1122s such as aligning tokens with empty line between 1122s does not register an offense 1122s such as lining up assignments with empty lines and comments in between 1122s registers offense(s) 1122s such as lining up assignments 1122s registers offense(s) 1122s such as aligning with the same character 1122s registers offense(s) 1122s such as lining up different kinds of assignments 1122s registers offense(s) 1122s such as aligning comments on non-adjacent lines 1122s registers offense(s) 1122s such as aligning long assignment expressions that include line breaks 1122s registers offense(s) 1122s being true 1122s such as aligning = on lines where there are trailing comments 1122s allows it 1122s such as lining up assignments with empty lines and comments in between 1122s allows it 1122s such as aligning tokens with empty line between 1122s allows it 1122s such as lining up assignments 1122s allows it 1122s such as aligning with the same character 1122s allows it 1122s such as lining up different kinds of assignments 1122s allows it 1122s such as aligning long assignment expressions that include line breaks 1122s allows it 1122s such as aligning trailing comments 1122s allows it 1122s such as aligning comments on non-adjacent lines 1122s allows it 1122s when AllowForAlignment is false 1122s registers an offense and corrects double extra spacing in variable assignment 1122s registers an offense and corrects extra space before a float 1122s registers an offense and corrects extra spacing before a unary plus in an argument list 1122s registers an offense and corrects alignment with token not preceded by space 1122s registers an offense and corrects extra spacing in class inheritance 1122s accepts aligned values of an implicit hash literal 1122s ignores whitespace at the beginning of the line 1122s accepts space between key and value in a hash with hash rockets 1122s ignores trailing whitespace 1122s ignores whitespace inside a string 1122s with extra spacing for alignment purposes 1122s such as aligning trailing comments 1122s registers offense(s) 1122s such as aligning = on lines where there are trailing comments 1122s registers offense(s) 1122s such as aligning tokens with empty line between 1123s registers offense(s) 1123s such as lining up assignments with empty lines and comments in between 1123s registers offense(s) 1123s such as lining up assignments 1123s registers offense(s) 1123s such as aligning comments on non-adjacent lines 1123s registers offense(s) 1123s such as aligning long assignment expressions that include line breaks 1123s registers offense(s) 1123s such as lining up different kinds of assignments 1123s registers offense(s) 1123s such as aligning with the same character 1123s registers offense(s) 1123s when spaces are present in a single-line hash literal 1123s registers an offense and corrects hashes with symbol keys 1123s registers an offense and corrects hashes with hash rockets 1123s when ForceEqualSignAlignment is true 1123s does not register offenses for multiple complex nested assignments 1123s registers an offense and corrects consecutive assignments that are not aligned 1123s aligns the first assignment with the following assignment 1123s register offenses and correct complex nested assignments 1123s does not register alignment errors on outdented lines 1123s does not register an offense when optarg equals is not aligned with assignment equals sign 1123s registers an offense and corrects consecutive aref assignments which are not aligned 1123s does not register an offense if assignments are aligned 1123s register offenses and correct consecutive attribute assignments which are not aligned 1123s register offenses and correct consecutive operator assignments which are not aligned 1123s does not register an offense if assignments are separated by blanks 1123s 1123s RuboCop::Cop::Lint::MixedRegexpCaptureTypes 1123s registers an offense when both of named and numbered captures are used 1123s does not register offense to a regexp with numbered capture only 1123s does not register offense to a regexp with named capture only 1123s does not register offense when using a Regexp cannot be processed by regexp_parser gem 1123s does not register offense to a regexp with named capture and non-capturing group 1123s when containing a non-regexp literal 1123s does not register an offense when containing a constant 1123s does not register an offense when containing a method 1123s does not register an offense when containing a gvar 1123s does not register an offense when containing a lvar 1123s does not register an offense when containing a ivar 1123s does not register an offense when containing a cvar 1123s 1123s RuboCop::Cop::Metrics::Utils::AbcSizeCalculator 1123s #calculate 1123s if and arithmetic operations 1123s is expected to eq "<2, 8, 4>" 1123s with ||= on a constant 1123s is expected to eq "<1, 0, 1>" 1123s with += 1123s is expected to eq "<2, 0, 0>" 1123s with unused assignments 1123s is expected to eq "<2, 1, 0>" 1123s when counting repeated calls 1123s is expected to eq "<1, 4, 0>" 1123s elsif vs else if 1123s else if 1123s is expected to eq "<0, 5, 4>" 1123s elsif 1123s is expected to eq "<0, 5, 3>" 1123s multiple assignment 1123s is expected to eq "<3, 1, 0>" 1123s when discounting repeated calls 1123s when root receiver is self/nil 1123s is expected to eq "<2, 9, 1>" 1123s when root receiver is a var 1123s is expected to eq "<3, 9, 0>" 1123s when some calls have arguments 1123s is expected to eq "<1, 7, 0>" 1123s with ||= 1124s is expected to eq "<2, 0, 1>" 1124s with a yield 1124s is expected to eq "<0, 1, 0>" 1124s with &&= 1124s is expected to eq "<2, 0, 1>" 1124s same with extra condition 1124s is expected to eq "<2, 9, 5>" 1124s with a known iterating block 1124s is expected to eq "<2, 4, 2>" 1124s method with arguments 1124s is expected to eq "<4, 0, 0>" 1124s with a block 1124s is expected to eq "<2, 3, 0>" 1124s assignment with ternary operator 1124s is expected to eq "<2, 6, 2>" 1124s multiple assignment with method setters 1124s is expected to eq "<3, 5, 0>" 1124s with &.foo 1124s is expected to eq "<0, 4, 2>" 1124s with repeated lvar receivers 1124s is expected to eq "<3, 5, 3>" 1124s with += for setters 1124s is expected to eq "<1, 2, 0>" 1124s with .foo = 1124s is expected to eq "<1, 2, 0>" 1124s same but with 7 arguments 1124s is expected to eq "<9, 3, 0>" 1124s with []= 1124s is expected to eq "<2, 1, 0>" 1124s with a for 1124s is expected to eq "<2, 1, 1>" 1124s equivalent to multiple assignment with method setters 1124s is expected to eq "<3, 5, 0>" 1124s multiple calls with return 1124s is expected to eq "<0, 3, 0>" 1124s 1124s RuboCop::Cop::Naming::AsciiIdentifiers 1124s when AsciiConstants is false 1124s does not get confused by a byte order mark 1124s registers an offense for a variable name with mixed chars 1124s registers an offense for a variable name with non-ascii chars 1124s accepts identifiers with only ascii chars 1124s accepts constants with only ascii chars 1124s does not get confused by an empty file 1124s when AsciiConstants is true 1124s does not get confused by a byte order mark 1124s registers an offense for a constant name with non-ascii chars 1124s registers an offense for a variable name with mixed chars 1124s registers an offense for a variable name with non-ascii chars 1124s does not get confused by an empty file 1124s accepts identifiers with only ascii chars 1124s 1124s RuboCop::Cop::Style::RedundantRegexpEscape 1124s with multibyte characters 1124s removes the escape character at the right position 1124s with a single-line %r@@ regexp 1124s with escaped delimiters inside a character-class 1124s does not register an offense 1124s with escaped delimiters and regexp options 1125s does not register an offense 1125s with escaped delimiters outside a character-class 1125s does not register an offense 1125s without escapes 1125s does not register an offense 1125s with a multi-line %r// regexp 1125s with escaped slashes 1125s does not register an offense 1125s without escapes 1125s does not register an offense 1125s with a single-line %r// regexp 1125s with escaped slashes 1125s does not register an offense 1125s without escapes 1125s does not register an offense 1125s with a single-line `//` regexp 1125s with an escaped 'X' outside a character class 1125s does not register an offense 1125s with an escaped 'Z' inside a character class 1125s does not register an offense 1125s with an escaped 'z' outside a character class 1125s does not register an offense 1125s with an escaped 'B' inside a character class 1125s does not register an offense 1125s with an escaped 'm' outside a character class 1125s does not register an offense 1125s with an escaped 'Q' outside a character class 1125s does not register an offense 1125s with a POSIX character class then allowed escape inside a character class 1125s does not register an offense 1125s with an escaped 'X' inside a character class 1125s does not register an offense 1125s with an escaped 'G' outside a character class 1125s does not register an offense 1125s with an escaped 'y' inside a character class 1125s does not register an offense 1125s with an escaped 'z' inside a character class 1125s does not register an offense 1125s with an escaped 'a' outside a character class 1125s does not register an offense 1125s with an escaped '\' outside a character class 1125s does not register an offense 1125s with an escaped 'd' inside a character class 1125s does not register an offense 1125s with an escaped 'r' outside a character class 1125s does not register an offense 1125s with an escaped 'u0041' outside a character class 1125s does not register an offense 1125s with a line continuation 1125s does not register an offense 1125s with an escaped '^' inside a character class 1125s does not register an offense 1125s with an escaped '$' outside a character class 1125s does not register an offense 1125s with an escaped 'E' outside a character class 1125s does not register an offense 1125s with an escaped 'G' inside a character class 1125s does not register an offense 1125s with an escaped 'P{alpha}' outside a character class 1125s does not register an offense 1125s with an escaped 'u0041' inside a character class 1125s does not register an offense 1125s with an escaped 'Z' outside a character class 1125s does not register an offense 1125s with an escaped interpolation inside a character class 1125s does not register an offense 1125s with an escaped 'n101' inside a character class 1125s does not register an offense 1125s with an escaped 's' outside a character class 1125s does not register an offense 1125s with an escaped 'v' outside a character class 1125s does not register an offense 1125s with an escaped 'C-c' inside a character class 1125s does not register an offense 1125s with an escaped 'b' outside a character class 1125s does not register an offense 1125s with an escaped 'u{0041}' inside a character class 1125s does not register an offense 1125s with an escaped 'B' outside a character class 1125s does not register an offense 1125s with an escaped character class and following escaped char 1125s does not register an offense 1125s with an escaped '-' inside a character class 1125s registers an offense and corrects 1125s with an escaped '?' outside a character class 1125s does not register an offense 1125s with an escaped 'n101' outside a character class 1126s does not register an offense 1126s with an uppercase metacharacter outside a character class 1126s does not register an offense 1126s with escaped slashes 1126s does not register an offense 1126s with an escaped '$' inside a character class 1126s registers an offense and corrects 1126s with an escape inside an interpolated string 1126s does not register an offense 1126s with an escaped 'J' outside a character class 1126s does not register an offense 1126s with an escaped '{' outside a character class 1126s does not register an offense 1126s with an escaped ')' inside a character class 1126s registers an offense and corrects 1126s with a POSIX character class then disallowed escape inside a character class 1126s registers an offense and corrects 1126s with an escaped '+' outside a character class 1126s does not register an offense 1126s with an escaped 'f' inside a character class 1126s does not register an offense 1126s with an escaped 'M-a' outside a character class 1126s does not register an offense 1126s with an escaped 'T' inside a character class 1126s does not register an offense 1126s with an escaped 'N' inside a character class 1126s does not register an offense 1126s with an escaped 'M-a' inside a character class 1126s does not register an offense 1126s with an escaped 'U' inside a character class 1126s does not register an offense 1126s with an escaped '#' outside a character class 1126s does not register an offense 1126s with an escaped '+' inside a character class 1126s registers an offense and corrects 1126s with an escaped 'h' outside a character class 1126s does not register an offense 1126s with an escaped 'D' outside a character class 1126s does not register an offense 1126s with an escaped 'F' inside a character class 1126s does not register an offense 1126s with an escaped 'O' inside a character class 1126s does not register an offense 1126s with an escaped 'E' inside a character class 1126s does not register an offense 1126s with an escaped 'V' outside a character class 1126s does not register an offense 1126s with an escaped 'p{alpha}' outside a character class 1126s does not register an offense 1126s with an escaped 'I' inside a character class 1126s does not register an offense 1126s with an escaped '|' inside a character class 1126s registers an offense and corrects 1126s with an escaped '-' character being the last character inside a character class 1126s registers an offense and corrects 1126s with an escaped '[' outside a character class 1126s does not register an offense 1126s with an escaped '{' inside a character class 1126s registers an offense and corrects 1126s with an escaped 'N' outside a character class 1126s does not register an offense 1126s with an escaped ']' inside a character class 1126s does not register an offense 1126s with a backreference 1126s does not register an offense 1126s with an escaped '+' inside a character class inside a group 1126s registers an offense and corrects 1126s with an escaped 'o' outside a character class 1126s does not register an offense 1126s with an escaped 'W' inside a character class 1126s does not register an offense 1126s with an escaped '*' outside a character class 1127s does not register an offense 1127s with an escaped 'x41' outside a character class 1127s does not register an offense 1127s with an escaped 'V' inside a character class 1127s does not register an offense 1127s with an escaped 'Q' inside a character class 1127s does not register an offense 1127s with multiple escaped metachars inside a character class 1127s registers offenses and corrects 1127s with an escaped 'R' outside a character class 1127s does not register an offense 1127s with an escaped . inside a character class beginning with : 1127s registers an offense and corrects 1127s with an escaped '?' inside a character class 1127s registers an offense and corrects 1127s with an escaped ' ' inside a character class 1127s does not register an offense 1127s with an escaped '\' inside a character class 1127s does not register an offense 1127s with an escaped 'p{alpha}' inside a character class 1127s does not register an offense 1127s with an escaped 'm' inside a character class 1127s does not register an offense 1127s with an escaped 'i' inside a character class 1127s does not register an offense 1127s with an escaped interpolation outside a character class 1127s does not register an offense 1127s with an escaped 'J' inside a character class 1127s does not register an offense 1127s with an escaped 'H' outside a character class 1127s does not register an offense 1127s with an escaped 'R' inside a character class 1127s does not register an offense 1127s with an escaped 'I' outside a character class 1127s does not register an offense 1127s with an escaped 'Y' outside a character class 1127s does not register an offense 1127s with an escaped 'W' outside a character class 1127s does not register an offense 1127s with an escaped 'q' inside a character class 1127s does not register an offense 1127s with a free-spaced mode regex 1127s with a commented redundant escape 1127s does not register an offense 1127s with a commented [ and ] 1127s does not register an offense 1127s with a commented redundant escape on a single line 1127s does not register an offense 1127s with redundant escape preceded by an escaped comment 1127s registers offenses and corrects 1127s with an escaped 'U' outside a character class 1127s does not register an offense 1127s with an uppercase metacharacter inside a character class 1128s does not register an offense 1128s with an escaped '.' inside a character class 1128s registers an offense and corrects 1128s with an invalid g escape 1128s does not register an offense 1128s with an escaped 'A' outside a character class 1128s does not register an offense 1128s with an escaped 'x41' inside a character class 1128s does not register an offense 1128s with an escaped 'r' inside a character class 1128s does not register an offense 1128s with an escaped 'j' inside a character class 1128s does not register an offense 1128s with an escaped 'o' inside a character class 1128s does not register an offense 1128s with an escaped 'q' outside a character class 1128s does not register an offense 1128s with an escaped 'S' inside a character class 1128s does not register an offense 1128s with an escaped '}' outside a character class 1128s does not register an offense 1128s with an escaped '(' outside a character class 1128s does not register an offense 1128s with an escaped '}' inside a character class 1128s registers an offense and corrects 1128s with an escaped 'H' inside a character class 1128s does not register an offense 1128s with an interpolated unnecessary-escape regexp 1128s registers an offense and corrects 1128s without escapes 1128s does not register an offense 1128s with an escaped 'K' inside a character class 1128s does not register an offense 1128s with an escaped 't' outside a character class 1128s does not register an offense 1128s with an escaped 'S' outside a character class 1128s does not register an offense 1128s with an escaped 'w' outside a character class 1128s does not register an offense 1128s with an escaped 'Y' inside a character class 1128s does not register an offense 1128s with an escaped ')' outside a character class 1128s does not register an offense 1128s with an escaped 'a' inside a character class 1128s does not register an offense 1128s with an escaped 'u{0041}' outside a character class 1128s does not register an offense 1128s with an escaped 'L' inside a character class 1128s does not register an offense 1128s with an escaped 'D' inside a character class 1128s does not register an offense 1128s with an escaped 'j' outside a character class 1128s does not register an offense 1128s with an escaped '.' outside a character class 1128s does not register an offense 1128s with an escaped '#' inside a character class 1128s does not register an offense 1128s with an escaped 'K' outside a character class 1128s does not register an offense 1128s with an escaped 'P{alpha}' inside a character class 1128s does not register an offense 1128s with an escaped 'y' outside a character class 1128s does not register an offense 1128s with regexp options and a redundant escape 1128s registers offenses and corrects 1128s with a character class and following escaped char 1128s does not register an offense 1128s with an escaped 'L' outside a character class 1128s does not register an offense 1128s with an escaped 'l' inside a character class 1128s does not register an offense 1128s with an escaped 'b' inside a character class 1128s does not register an offense 1128s with an escaped 't' inside a character class 1128s does not register an offense 1128s with an escaped 'i' outside a character class 1128s does not register an offense 1128s with an escaped 'cc' inside a character class 1128s does not register an offense 1128s with an escaped ']' outside a character class 1128s does not register an offense 1128s with an interpolation followed by redundant escapes 1128s registers offenses and corrects 1128s with an escaped 'v' inside a character class 1128s does not register an offense 1128s with a nested character class containing redundant escape 1128s registers an offense and corrects 1128s with an escaped '(' inside a character class 1128s registers an offense and corrects 1128s with an escaped '-' outside a character class 1128s registers an offense and corrects 1128s with an escaped '|' outside a character class 1128s does not register an offense 1128s with an escaped 'e' inside a character class 1128s does not register an offense 1128s with an escaped 'f' outside a character class 1128s does not register an offense 1128s with a nested character class then allowed escape 1128s does not register an offense 1129s with an escaped 's' inside a character class 1129s does not register an offense 1129s with an escaped 'T' outside a character class 1129s does not register an offense 1129s with an escaped 'A' inside a character class 1129s does not register an offense 1129s with an escaped 'cc' outside a character class 1129s does not register an offense 1129s with an escaped '[' inside a character class 1129s does not register an offense 1129s with an escaped 'l' outside a character class 1129s does not register an offense 1129s with an escaped '-' character being the first character inside a character class 1129s registers an offense and corrects 1129s with an escaped 'd' outside a character class 1129s does not register an offense 1129s with an escaped 'e' outside a character class 1129s does not register an offense 1129s with an escaped '*' inside a character class 1129s registers an offense and corrects 1129s with an escaped ' ' outside a character class 1129s does not register an offense 1129s with an escaped 'O' outside a character class 1129s does not register an offense 1129s with an escaped ' 1129s ' outside a character class 1129s does not register an offense 1129s with an escaped 'C-c' outside a character class 1129s does not register an offense 1129s with an escaped 'F' outside a character class 1129s does not register an offense 1129s with an escaped '^' outside a character class 1129s does not register an offense 1129s with an escaped 'w' inside a character class 1129s does not register an offense 1129s with an escaped 'h' inside a character class 1130s does not register an offense 1130s with a line continuation within a character class 1130s does not register an offense 1130s with a multi-line %r{} regexp 1130s with a redundant escape after a line with comment 1130s registers an offense and corrects 1130s with redundantly-escaped slashes 1130s registers an offense and corrects 1130s without escapes 1130s does not register an offense 1130s with a # inside a character class 1130s does not register an offense 1130s with a single-line %r!! regexp 1130s without escapes 1130s does not register an offense 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s with a single-line %r^^ regexp 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s without escapes 1130s does not register an offense 1130s with a single-line %r{} regexp 1130s with an escaped { or } inside a character class 1130s does not register an offense 1130s with an escaped { or } outside a character class 1130s does not register an offense 1130s without escapes 1130s does not register an offense 1130s with redundantly-escaped slashes 1130s registers an offense and corrects 1130s with a single-line %r<> regexp 1130s without escapes 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s with a single-line %r() regexp 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s without escapes 1130s does not register an offense 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with a single-line %r__ regexp 1130s without escapes 1130s does not register an offense 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with a single-line %r~~ regexp 1130s with escaped delimiters and regexp options 1130s does not register an offense 1130s with escaped delimiters inside a character-class 1130s does not register an offense 1130s without escapes 1130s does not register an offense 1130s with escaped delimiters outside a character-class 1130s does not register an offense 1130s 1130s RuboCop::MagicComment 1130s returns nil for shareable_constant_value when comment is # -*- frozen-string-literal: true -*- 1130s returns "utf-8" for encoding when comment is # coding: utf-8 1130s returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 1130s returns nil for typed when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for typed when comment is # xyz shareable_constant_value: literal xyz 1130s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 1130s returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi 1130s returns nil for frozen_string_literal when comment is # shareable-constant-value: literal 1130s returns "strong" for typed when comment is # typed: strong 1130s returns nil for typed when comment is # vim:fileencoding=utf-8 1130s returns nil for encoding when comment is # frozen-string-literal: true 1130s returns nil for typed when comment is # incoding: utf-8 1130s returns "ignore" for typed when comment is # typed: ignore 1130s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal xyz 1130s returns nil for shareable_constant_value when comment is # typed: ignore 1130s returns nil for typed when comment is # xyz shareable_constant_value: literal 1130s returns nil for typed when comment is # FROZEN-STRING-LITERAL: true 1130s returns nil for typed when comment is # shareable_constant_value: literal 1130s returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns true for frozen_string_literal when comment is # frozen_string_literal: true 1130s returns nil for shareable_constant_value when comment is # frozen_string_literal: true encoding: ascii-8bit 1130s returns nil for encoding when comment is # typed: false 1130s returns nil for encoding when comment is # shareable_constant_value: none 1130s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for typed when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 1130s returns nil for shareable_constant_value when comment is # encoding: utf-8 1130s returns nil for encoding when comment is # incoding: utf-8 1130s returns nil for encoding when comment is # typed:strict 1130s returns nil for frozen_string_literal when comment is # shareable_constant_value: literal 1130s returns nil for typed when comment is # shareable_constant_value: experimental_copy 1130s returns nil for shareable_constant_value when comment is # frozen_string_literal: false 1130s returns "strict" for typed when comment is #typed:strict 1130s returns nil for shareable_constant_value when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_copy 1130s returns nil for typed when comment is # eNcOdInG: utf-8 1130s returns nil for typed when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # ENCODING: utf-8 1130s returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns "literal" for shareable_constant_value when comment is # shareable_constant_value: literal 1130s returns nil for frozen_string_literal when comment is #typed:strict 1130s returns nil for shareable_constant_value when comment is # typed: strict 1130s returns nil for typed when comment is # frozen_string_literal:true 1130s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 1130s returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- 1130s returns "experimental_copy" for shareable_constant_value when comment is # shareable_constant_value: experimental_copy 1130s returns nil for shareable_constant_value when comment is # vim: filetype=python, fileencoding=ascii-8bit 1130s returns nil for encoding when comment is # shareable_constant_value: experimental_copy 1130s returns "literal" for shareable_constant_value when comment is # shareable_constant_value:literal 1130s returns nil for typed when comment is # shareable_constant_value: none 1130s returns nil for frozen_string_literal when comment is # encoding: utf-8 1130s returns nil for shareable_constant_value when comment is # incoding: utf-8 1130s returns "literal" for shareable_constant_value when comment is # sHaReaBLE-CoNstANT-ValUE: literal 1130s returns nil for frozen_string_literal when comment is # shareable_constant_value:literal 1130s returns nil for encoding when comment is # frozen_string_literal: true 1130s returns nil for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 1130s returns nil for encoding when comment is # frozen_string_literal:true 1130s returns nil for encoding when comment is # @typed 1130s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # typed: strong 1130s returns nil for encoding when comment is # xyz shareable_constant_value: literal xyz 1130s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 1130s returns nil for frozen_string_literal when comment is # typed:strict 1130s returns nil for shareable_constant_value when comment is # eNcOdInG: utf-8 1130s returns nil for encoding when comment is # shareable_constant_value: literal 1130s returns nil for shareable_constant_value when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns true for frozen_string_literal when comment is # frozen_string_literal:true 1130s returns nil for typed when comment is # fRoZeN-sTrInG_lItErAl: true 1130s returns "strict" for typed when comment is # typed:strict 1130s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal 1130s returns nil for shareable_constant_value when comment is # 1130s returns false for frozen_string_literal when comment is # frozen_string_literal: false 1130s returns "utf-8" for encoding when comment is # coding: utf-8 1130s returns nil for frozen_string_literal when comment is # shareable_constant_value: experimental_everything 1130s returns "strict" for typed when comment is # typed: strict 1130s returns nil for shareable_constant_value when comment is #typed:strict 1130s returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit 1130s returns nil for encoding when comment is # sHaReaBLE-CoNstANT-ValUE: literal 1130s returns nil for shareable_constant_value when comment is # typed:strict 1130s returns nil for encoding when comment is # frozen_string_literal: invalid 1130s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns "literal" for shareable_constant_value when comment is # shareable-constant-value: literal 1130s returns nil for shareable_constant_value when comment is # encoding: stateless-iso-2022-jp-kddi 1130s returns nil for shareable_constant_value when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 1130s returns nil for typed when comment is # frozen_string_literal: invalid 1130s returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns nil for frozen_string_literal when comment is # typed: ignore 1130s returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid 1130s returns nil for typed when comment is # 1130s returns "none" for shareable_constant_value when comment is # shareable_constant_value: none 1130s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit 1130s returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true 1130s returns nil for shareable_constant_value when comment is # frozen-string-literal: true 1130s returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true 1130s returns nil for typed when comment is # coding: utf-8 1130s returns nil for encoding when comment is # typed: strong 1130s returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit 1130s returns nil for encoding when comment is # vim:fileencoding=utf-8 1130s returns nil for typed when comment is # frozen_string_literal: true 1130s returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi 1130s returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns nil for shareable_constant_value when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 1130s returns nil for typed when comment is # ENCODING: utf-8 1130s returns nil for encoding when comment is #typed:strict 1130s returns nil for typed when comment is # -*- encoding : ascii-8bit -*- 1130s returns nil for shareable_constant_value when comment is # fRoZeN-sTrInG_lItErAl: true 1130s returns nil for frozen_string_literal when comment is # SHAREABLE-CONSTANT-VALUE: literal 1130s returns nil for frozen_string_literal when comment is # typed: true 1130s returns nil for typed when comment is # encoding: ascii-8bit frozen_string_literal: true 1130s returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 1130s returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| 1130s returns nil for shareable_constant_value when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # incoding: utf-8 1130s returns nil for shareable_constant_value when comment is # xyz shareable_constant_value: literal xyz 1130s returns nil for frozen_string_literal when comment is # 1130s returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true 1130s returns nil for shareable_constant_value when comment is # coding: utf-8 1130s returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 1130s returns nil for typed when comment is # vim: filetype=python, fileencoding=ascii-8bit 1130s returns nil for typed when comment is # shareable_constant_value:literal 1130s returns nil for frozen_string_literal when comment is # typed: strict 1130s returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for shareable_constant_value when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1130s returns nil for shareable_constant_value when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns true for frozen_string_literal when comment is # frozen-string-literal: true 1130s returns nil for typed when comment is # encoding: utf-8 1130s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit 1130s returns nil for shareable_constant_value when comment is # frozen_string_literal: invalid 1130s returns nil for encoding when comment is # -*- frozen-string-literal: true -*- 1130s returns nil for encoding when comment is # typed: ignore 1131s returns nil for shareable_constant_value when comment is # typed: strong 1131s returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 1131s returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 1131s returns nil for frozen_string_literal when comment is # coding: utf-8 1131s returns nil for typed when comment is # coding: utf-8 1131s returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- 1131s returns nil for typed when comment is # frozen-string-literal: true 1131s returns nil for frozen_string_literal when comment is # xyz shareable_constant_value: literal 1131s returns "true" for typed when comment is # typed: true 1131s returns nil for typed when comment is # frozen_string_literal: true encoding: ascii-8bit 1131s returns nil for encoding when comment is # shareable_constant_value:literal 1131s returns "false" for typed when comment is # typed: false 1131s returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- 1131s returns nil for typed when comment is # @typed 1131s returns nil for shareable_constant_value when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 1131s returns nil for typed when comment is # shareable_constant_value: experimental_everything 1131s returns nil for encoding when comment is # shareable_constant_value: experimental_everything 1131s returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1131s returns nil for encoding when comment is # typed: true 1131s returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 1131s returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit 1131s returns nil for shareable_constant_value when comment is # coding: utf-8 1131s returns nil for typed when comment is # -*- coding: ASCII-8BIT; typed: strict -*- 1131s returns nil for typed when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1131s returns nil for frozen_string_literal when comment is # coding: utf-8 1131s returns nil for encoding when comment is # shareable-constant-value: literal 1131s returns nil for shareable_constant_value when comment is # encoding: ascii-8bit frozen_string_literal: true 1131s returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true 1131s returns nil for typed when comment is #vim: filetype=ruby, fileencoding=ascii-8bit, typed=strict 1131s returns nil for shareable_constant_value when comment is # ENCODING: utf-8 1131s returns nil for typed when comment is # vim: filetype=ruby, fileencoding=ascii-8bit 1131s returns nil for typed when comment is # frozen_string_literal: true 1131s returns nil for encoding when comment is # SHAREABLE-CONSTANT-VALUE: literal 1131s returns nil for shareable_constant_value when comment is # -*- encoding : ascii-8bit -*- 1131s returns nil for encoding when comment is # typed: strict 1131s returns "experimental_everything" for shareable_constant_value when comment is # shareable_constant_value: experimental_everything 1131s returns nil for frozen_string_literal when comment is # shareable_constant_value: none 1131s returns nil for typed when comment is # SHAREABLE-CONSTANT-VALUE: literal 1131s returns nil for shareable_constant_value when comment is # typed: false 1131s returns nil for frozen_string_literal when comment is # @typed 1131s returns nil for shareable_constant_value when comment is # frozen_string_literal: true 1131s returns "utf-8" for encoding when comment is # ENCODING: utf-8 1131s returns nil for typed when comment is # frozen_string_literal: false 1131s returns nil for encoding when comment is # xyz shareable_constant_value: literal 1131s returns nil for shareable_constant_value when comment is # @typed 1131s returns nil for encoding when comment is # frozen_string_literal: true 1131s returns nil for typed when comment is # -*- frozen-string-literal: true -*- 1131s returns "literal" for shareable_constant_value when comment is # SHAREABLE-CONSTANT-VALUE: literal 1131s returns nil for shareable_constant_value when comment is # typed: true 1131s returns nil for shareable_constant_value when comment is # frozen_string_literal:true 1131s returns nil for frozen_string_literal when comment is # typed: false 1131s returns nil for frozen_string_literal when comment is # sHaReaBLE-CoNstANT-ValUE: literal 1131s returns nil for shareable_constant_value when comment is # vim:fileencoding=utf-8 1131s returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 1131s returns nil for encoding when comment is # frozen_string_literal: false 1131s returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true 1131s returns nil for shareable_constant_value when comment is # FROZEN-STRING-LITERAL: true 1131s returns true for frozen_string_literal when comment is # frozen_string_literal: true 1131s returns nil for encoding when comment is # 1131s returns nil for typed when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- 1131s returns "utf-8" for encoding when comment is # encoding: utf-8 1131s returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true 1131s returns nil for typed when comment is # sHaReaBLE-CoNstANT-ValUE: literal 1131s returns nil for typed when comment is # shareable-constant-value: literal 1131s returns nil for typed when comment is # encoding: stateless-iso-2022-jp-kddi 1131s returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit 1131s #valid? 1131s with an empty string 1131s is expected to equal false 1131s with an frozen string literal comment 1131s is expected to equal true 1131s with an encoding comment 1131s is expected to equal true 1131s with an shareable constant value comment 1131s is expected to equal true 1131s with a non magic comment 1131s is expected to equal false 1131s #valid_shareable_constant_value? 1131s when given comment specified as `literal` 1131s is expected to equal true 1131s when given comment specified as `experimental_everything` 1131s is expected to equal true 1131s when given comment specified as unknown value 1131s is expected to equal false 1131s when given comment specified as `experimental_copy` 1131s is expected to equal true 1131s when given comment specified as `none` 1131s is expected to equal true 1131s when given comment is not specified 1131s is expected to equal false 1131s #without 1131s emacs format 1131s with one token 1131s is expected to eq "" 1131s with multiple tokens 1131s is expected to eq "# -*- frozen_string_literal: true -*-" 1131s simple format 1131s when the comment contains a different magic value 1131s is expected to eq "# frozen-string-literal: true" 1131s when the entire comment is a single value 1131s is expected to eq "" 1131s vim format 1131s when the comment has multiple tokens 1131s is expected to eq "# vim: filetype=ruby" 1131s 1131s RuboCop::Cop::Style::IfUnlessModifier 1131s accepts if-end followed by a chained call using `.` 1131s accepts if-else-end 1131s accepts if/elsif 1131s accepts if-end followed by a chained call using `&.` 1131s adds parens in autocorrect when if-end used with `||` operator 1131s accepts if-end when used as LHS of binary arithmetic 1131s adds parens in autocorrect when if-end used with `&&` operator 1131s accepts code with EOL comment since user might want to keep it 1131s if-end with conditional as body 1131s accepts 1131s when if-end condition is an element of an array 1131s when not short enough to fit on a single line 1131s accepts it in the multiline form 1131s when short enough to fit on a single line 1131s corrects it to the single-line form 1131s multiline unless that fits on one line 1131s registers an offense 1131s when if-end condition has some code after the end keyword 1131s when it is not short enough to fit on a single line 1131s accepts it in the multiline form 1131s when it is short enough to fit on a single line 1131s corrects it to the single-line form 1131s when if-end condition has a first line comment 1131s when it is short enough to fit on a single line 1131s corrects it to the single-line form 1131s when it is not short enough to fit on a single line 1131s accepts it in the multiline form 1131s if-end is argument to a non-parenthesized method call 1131s adds parentheses so as not to change meaning 1131s if-end is argument to a parenthesized method call 1131s adds parentheses because otherwise it would cause SyntaxError 1131s multiline if that fits on one line with comment near end 1131s accepts 1131s behaves like condition modifier cop 1131s for a multiline 'if' 1131s doesn't break when used as RHS of binary arithmetic 1131s accepts it if body spans more than one line 1131s doesn't break when used as RHS of local var assignment 1131s corrects it when assignment is in body 1131s handles inline comments during autocorrection 1131s doesn't break when used as RHS of instance var assignment 1131s handles one-line usage 1131s doesn't break when used as RHS of class var assignment 1131s corrects it if result fits in one line 1131s accepts it when condition has local variable assignment 1131s accepts an empty body 1131s doesn't break when used as RHS of constant assignment 1131s accepts it if single line would not fit on one line 1131s when there is a comment on the first line and some code after the end keyword 1131s does not register an offense 1131s when Layout/LineLength is disabled 1131s registers an offense even for a long modifier statement 1131s accepts multiline condition in modifier form 1131s registers an offense 1131s modifier if that does not fit on one line, but is not the only statement on the line 1131s accepts 1131s when Layout/LineLength is disabled 1132s registers an offense even for a long modifier statement 1132s unless-end with conditional as body 1132s accepts 1132s modifier if that does not fit on one line 1132s when Layout/LineLength is disabled with enable/disable comments 1132s accepts 1132s when Layout/LineLength is enabled 1132s corrects it to normal form 1132s IgnoreCopDirectives 1132s and the long line is too long because IgnoreCopDirectives is false 1132s registers an offense 1132s and the long line is allowed because IgnoreCopDirectives is true 1132s accepts 1132s when variable assignment is used in the branch body of if modifier 1132s registers an offense 1132s when using a method with heredoc argument 1132s accepts 1132s and the long line is too long because AllowURI is false 1132s registers an offense 1132s and the long line is allowed because AllowURI is true 1132s accepts 1132s when Layout/LineLength is disabled in configuration 1132s accepts 1132s when Layout/LineLength is disabled with an EOL comment 1132s accepts 1132s multiline if that fits on one line with comment on first line 1132s registers an offense and preserves comment 1132s with tabs used for indentation 1132s with Layout/IndentationStyle: IndentationWidth config 1132s behaves like with tabs indentation 1132s it fits on one line 1132s registers an offense 1132s it doesn't fit on one line 1132s doesn't register an offense 1132s with Layout/IndentationWidth: Width config 1132s behaves like with tabs indentation 1132s it doesn't fit on one line 1132s doesn't register an offense 1132s it fits on one line 1132s registers an offense 1132s with implicit match conditional 1132s when a multiline if fits on one line 1132s registers an offense 1132s when a multiline if doesn't fit on one line 1132s accepts 1132s when if-end condition is a value in a hash 1132s when it is not short enough to fit on a single line 1132s accepts it in the multiline form 1132s when it is short enough to fit on a single line 1132s corrects it to the single-line form 1132s with a named regexp capture on the LHS 1132s does not register an offense 1132s short multiline if near an else etc 1132s registers an offense 1132s behaves like condition modifier cop 1132s for a multiline 'unless' 1132s doesn't break when used as RHS of class var assignment 1132s handles inline comments during autocorrection 1132s accepts it when condition has local variable assignment 1132s accepts an empty body 1132s corrects it when assignment is in body 1132s accepts it if single line would not fit on one line 1132s accepts it if body spans more than one line 1132s doesn't break when used as RHS of instance var assignment 1132s doesn't break when used as RHS of binary arithmetic 1132s doesn't break when used as RHS of constant assignment 1132s corrects it if result fits in one line 1132s handles one-line usage 1132s doesn't break when used as RHS of local var assignment 1132s when Layout/LineLength is disabled 1132s registers an offense even for a long modifier statement 1132s when there is a comment on the first line and some code after the end keyword 1132s does not register an offense 1132s accepts multiline condition in modifier form 1132s registers an offense 1132s when if-end condition is assigned to a variable 1132s with variable being on the same line 1132s when it is not short enough to fit on a single line 1132s accepts it in the multiline form 1132s when it is short enough to fit on a single line 1132s corrects it to the single-line form 1132s with variable being on the previous line 1132s when it is short enough to fit on a single line 1133s corrects it to the single-line form 1133s when it is not short enough to fit on a single line 1133s accepts it in the multiline form 1133s multiline if that fits on one line 1133s registers an offense 1133s and has two statements separated by semicolon 1133s accepts 1133s 1133s RuboCop::Cop::Style::MixinGrouping 1133s when configured with separated style 1133s when using `include` 1133s allows include call as an argument to another method 1133s registers an offense for several mixins in one call 1133s registers an offense for several mixins in separate calls 1133s when using `extend` 1133s registers an offense for several mixins in one call 1133s when using a mix of diffent methods 1133s registers an offense for some calls having several mixins 1133s when using `prepend` 1133s registers an offense for several mixins in one call 1133s when configured with grouped style 1133s when using `prepend` 1133s registers an offense for single mixins in separate calls, interspersed 1133s registers an offense when other mixins have receivers 1133s registers an offense for single mixins in separate calls 1133s when using `extend` 1133s registers an offense for single mixins in separate calls 1133s when using a mix of diffent methods 1133s allows all different mixin methods 1133s registers an offense with some duplicated mixin methods 1133s when using include 1133s registers an offense for single mixins in separate calls 1133s registers an offense for several mixins in separate calls 1133s allows include with an explicit receiver 1133s 1133s RuboCop::Cop::Lint::UselessElseWithoutRescue 1133s with `else` with `rescue` 1133s accepts 1133s with `else` without `rescue` 1133s registers an offense 1133s 1133s RuboCop::Cop::Style::HashAsLastArrayItem 1133s when EnforcedStyle is no_braces 1133s registers an offense and corrects when hash with braces and trailing comma and new line 1133s does not register an offense when hash without braces 1133s registers an offense and corrects when hash with braces and trailing comma 1133s does not register an offense when the array is all hashes 1133s does not register an offense when hash is not inside array 1133s registers an offense and corrects when hash with braces 1133s does not register an offense when the hash is empty 1133s does not register an offense when passing an implicit array to a setter 1133s does not register an offense when hash is not the last element 1133s when EnforcedStyle is braces 1133s does not register an offense when the array is all hashes 1133s does not register an offense when hash with braces 1133s does not register an offense when using double splat operator 1133s registers an offense and corrects when hash without braces 1133s does not register an offense when hash is not inside array 1133s does not register an offense when the hash is empty 1133s 1133s RuboCop::Cop::Lint::UselessSetterCall 1133s accepts exception assignments without exploding 1133s is not confused by operators ending with = 1133s with singleton method ending with setter call on local object 1133s registers an offense and corrects 1133s when a lvar declared as an argument is no longer the passed object at the end of the method 1133s registers an offense and corrects for the setter call on the lvar 1133s when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method 1133s registers an offense and corrects 1133s with method ending with setter call on local object 1133s registers an offense and corrects 1133s with method ending with setter call on ivar 1133s accepts 1133s when a lvar contains a local object instantiated with literal 1133s registers an offense and corrects for the setter call on the lvar 1133s when a lvar contains an object passed as argument at the end of the method 1133s accepts the setter call on the lvar 1133s when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method 1133s registers an offense and corrects 1133s when a lvar contains an object passed as argument by multiple-assignment at the end of the method 1133s accepts the setter call on the lvar 1133s when a lvar contains a non-local object returned by a method 1133s accepts 1133s when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method 1133s accepts the setter call on the lvar 1133s with method ending with ivar assignment 1133s accepts 1133s with method ending with setter call on argument 1133s accepts 1133s with method ending with square bracket setter on local object 1133s registers an offense and corrects 1133s 1133s RuboCop::Cop::Lint::LiteralAsCondition 1133s accepts literal 2.0 if it's not an and/or operand 1133s registers an offense for literal :"#{a}" in ! 1133s registers an offense for `!2.0` 1133s registers an offense for literal [1] in && 1133s accepts literal :sym if it's not an and/or operand 1134s registers an offense for literal {} in while 1134s registers an offense for `!:sym` 1134s registers an offense for literal 2.0 in post-loop until 1134s registers an offense for literal {} in if 1134s registers an offense for literal 2.0 in a when of a case without anything after case keyword 1134s accepts literal 2.0 in non-toplevel and/or 1134s accepts `true` literal in `while` 1134s registers an offense for literal 2.0 in && 1134s registers an offense for literal {} in until 1134s registers an offense for literal 1 in post-loop until 1134s registers an offense for `!{}` 1134s registers an offense for literal :sym in ! 1134s registers an offense for literal 2.0 in while 1134s registers an offense for literal :"#{a}" in complex ! 1134s registers an offense for literal {} in && 1134s registers an offense for literal [1] in until 1134s registers an offense for literal 1 in if 1134s registers an offense for `not :"#{a}"` 1134s registers an offense for literal {} in complex ! 1134s registers an offense for literal 2.0 in until 1134s registers an offense for `not 1` 1134s registers an offense for literal :"#{a}" in until 1134s registers an offense for literal 1 in complex cond 1134s registers an offense for `!:"#{a}"` 1134s registers an offense for literal [1] in ! 1134s registers an offense for literal [1] in post-loop while 1134s registers an offense for case with a primitive array condition 1134s registers an offense for literal 1 in && 1134s registers an offense for literal :sym in if 1134s registers an offense for literal 2.0 in ! 1134s accepts literal [1] in non-toplevel and/or 1134s registers an offense for literal 2.0 in complex ! 1134s registers an offense for literal [1] in post-loop until 1135s registers an offense for `not 2.0` 1135s registers an offense for literal [1] in a when of a case without anything after case keyword 1135s registers an offense for literal :sym in a when of a case without anything after case keyword 1135s registers an offense for literal {} in ! 1135s registers an offense for literal :"#{a}" in post-loop until 1135s registers an offense for literal :sym in while 1135s registers an offense for literal 1 in post-loop while 1135s registers an offense for literal {} in a when of a case without anything after case keyword 1135s registers an offense for `not {}` 1135s accepts `true` literal in post-loop `while` 1135s registers an offense for literal :sym in complex ! 1135s registers an offense for literal :sym in post-loop until 1135s accepts literal :"#{a}" if it's not an and/or operand 1135s registers an offense for literal :"#{a}" in && 1135s accepts literal [1] if it's not an and/or operand 1135s registers an offense for literal 1 in ! 1135s registers an offense for `![1]` 1135s registers an offense for literal :"#{a}" in if 1135s accepts literal :"#{a}" in a when of a case with something after case keyword 1135s registers an offense for `not :sym` 1135s registers an offense for literal :"#{a}" in while 1135s accepts literal {} in a when of a case with something after case keyword 1135s accepts `false` literal in `until` 1135s registers an offense for literal :"#{a}" in complex cond 1135s registers an offense for literal [1] in case 1135s registers an offense for literal :sym in && 1135s registers an offense for literal 2.0 in post-loop while 1135s accepts `false` literal in post-loop `until` 1135s registers an offense for literal 2.0 in if 1135s registers an offense for literal 2.0 in case 1135s accepts literal [1] in a when of a case with something after case keyword 1135s registers an offense for literal 1 in while 1135s accepts literal {} if it's not an and/or operand 1135s accepts literal :sym in a when of a case with something after case keyword 1135s accepts literal :"#{a}" in non-toplevel and/or 1136s accepts literal 1 if it's not an and/or operand 1136s registers an offense for literal 2.0 in complex cond 1136s registers an offense for literal [1] in complex cond 1136s registers an offense for `!1` 1136s registers an offense for literal :sym in until 1136s accepts literal 1 in non-toplevel and/or 1136s registers an offense for literal {} in case 1136s registers an offense for literal :sym in complex cond 1136s registers an offense for literal [1] in while 1136s accepts dstr literal in case 1136s accepts array literal in case, if it has non-literal elements 1136s registers an offense for literal [1] in complex ! 1136s accepts array literal in case, if it has nested non-literal element 1136s accepts literal 1 in a when of a case with something after case keyword 1136s registers an offense for literal 1 in complex ! 1136s accepts literal {} in non-toplevel and/or 1136s registers an offense for `not [1]` 1136s registers an offense for literal 1 in a when of a case without anything after case keyword 1136s registers an offense for literal {} in post-loop while 1136s registers an offense for literal :"#{a}" in post-loop while 1136s registers an offense for literal [1] in if 1136s registers an offense for literal :sym in post-loop while 1136s registers an offense for literal 1 in case 1136s registers an offense for literal {} in complex cond 1136s registers an offense for literal :sym in case 1136s accepts literal 2.0 in a when of a case with something after case keyword 1136s registers an offense for literal {} in post-loop until 1136s registers an offense for literal 1 in until 1136s accepts literal :sym in non-toplevel and/or 1136s registers an offense for literal :"#{a}" in case 1136s registers an offense for literal :"#{a}" in a when of a case without anything after case keyword 1136s >= Ruby 2.7 1136s registers an offense for case match with a primitive array condition 1136s accepts array literal in case match, if it has nested non-literal element 1136s accepts an offense for case match with a match var 1136s accepts array literal in case match, if it has non-literal elements 1136s accepts dstr literal in case match 1136s >= Ruby 2.7 1136s registers an offense for literal :sym in case match without a match var 1136s accepts literal :sym in a when of a case match 1136s accepts an offense for literal :sym in case match with a match var 1136s >= Ruby 2.7 1136s registers an offense for literal {} in case match without a match var 1137s accepts literal {} in a when of a case match 1137s accepts an offense for literal {} in case match with a match var 1137s >= Ruby 2.7 1137s accepts literal 2.0 in a when of a case match 1137s accepts an offense for literal 2.0 in case match with a match var 1137s registers an offense for literal 2.0 in case match without a match var 1137s >= Ruby 2.7 1137s accepts an offense for literal :"#{a}" in case match with a match var 1137s registers an offense for literal :"#{a}" in case match without a match var 1137s accepts literal :"#{a}" in a when of a case match 1137s >= Ruby 2.7 1137s accepts literal [1] in a when of a case match 1137s registers an offense for literal [1] in case match without a match var 1137s accepts an offense for literal [1] in case match with a match var 1137s >= Ruby 2.7 1137s registers an offense for literal 1 in case match without a match var 1137s accepts an offense for literal 1 in case match with a match var 1137s accepts literal 1 in a when of a case match 1137s 1137s RuboCop::Cop::Style::NegatedWhile 1137s does not blow up for empty until condition 1137s does not blow up for empty while condition 1137s accepts a while where only part of the condition is negated 1137s registers an offense for until with exclamation point condition 1137s registers an offense for while with "not" condition 1137s registers an offense for while with exclamation point condition 1137s autocorrects by replacing while not with until 1137s accepts a while where the condition is doubly negated 1137s autocorrects by replacing until not with while 1137s 1137s RuboCop::Cop::Naming::BlockParameterName 1137s registers offense when param contains uppercase characters 1137s registers offense when param is less than minimum length 1137s does not register for brace block without parameters 1137s registers offense when param ends in number 1137s does not register offense for valid parameter names 1137s can register multiple offenses in one block 1137s does not register for block without parameters 1137s registers offense when param with prefix is less than minimum length 1137s with ForbiddenNames 1137s accepts param that uses a forbidden name's letters 1137s registers offense for param listed as forbidden 1137s with AllowedNames 1137s accepts specified block param names 1137s registers unlisted offensive names 1137s with AllowNamesEndingInNumbers 1137s accept params that end in numbers 1137s 1137s RuboCop::Cop::Lint::FormatParameterMismatch 1137s finds faults even when the string looks like a HEREDOC 1137s registers an offense for String#% 1137s registers an offense when calling Kernel.format and the fields do not match 1137s does not register an offense when using named parameters with escaped `%` 1137s does not register an offense argument is the result of a message send 1137s registers an offense when there are less arguments than expected 1137s constants do not register offenses 1138s registers an offense if extra argument for dynamic width not given 1138s does not register an offense when using named parameters 1138s ignores percent right next to format string 1138s does not register an offense when arguments and fields match 1138s does not register offense for `String#%` when arguments, fields match 1138s does not register an offense when single argument is a hash 1138s registers an offense when there are more arguments than expected 1138s registers offense with sprintf 1138s does not register an offense for sprintf with splat argument 1138s accepts an extra arg for dynamic width with other preceding flags 1138s identifies correctly digits for spacing in format 1138s accepts an extra argument for dynamic width 1138s does not register an offense for format with splat argument 1138s correctly parses different sprintf formats 1138s correctly ignores double percent 1138s registers an offense when calling Kernel.sprintf and the fields do not match 1138s does not register an offense when single argument is not an array 1138s when format is not a string literal 1138s does not register an offense 1138s when argument itself contains format characters and formats in format string and argument are not equal 1138s ignores argument formatting 1138s behaves like variables 1138s does not register an offense for format called on a variable 1138s does not register an offense for format called on a variable 1138s does not register an offense for % called on a variable 1138s when using (digit)$ flag 1138s registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments 1138s does not register an offense 1138s does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments 1138s behaves like variables 1138s does not register an offense for format called on a variable 1138s does not register an offense for format called on a variable 1138s does not register an offense for % called on a variable 1138s behaves like variables 1138s does not register an offense for % called on a variable 1138s does not register an offense for format called on a variable 1138s does not register an offense for format called on a variable 1138s when format is invalid 1138s registers an offense 1138s behaves like variables 1138s does not register an offense for format called on a variable 1138s does not register an offense for % called on a variable 1138s does not register an offense for format called on a variable 1138s when passed an empty array 1138s does not register an offense 1138s when splat argument is present 1138s does not register an offense when args count is less than expected 1138s when args count is more than expected 1138s does not register an offense for `#sprintf` 1138s registers an offense for `#%` 1138s does not register an offense for `#format` 1138s with wildcard 1138s does not register an offense for precision 1138s does not register an offense for multiple wildcards 1138s does not register an offense for width 1138s does not register an offense for width and precision 1138s when multiple arguments are called for 1138s and a single send node is passed 1138s does not register an offense 1138s and a single variable argument is passed 1138s does not register an offense 1138s on format with %<> interpolations 1138s and 1 argument 1138s does not register an offense 1138s and multiple arguments 1138s registers an offense 1138s on format with %{} interpolations 1138s and multiple arguments 1138s registers an offense 1138s and 1 argument 1138s does not register an offense 1138s behaves like variables 1138s does not register an offense for format called on a variable 1138s does not register an offense for % called on a variable 1138s does not register an offense for format called on a variable 1138s 1138s RuboCop::Cop::Style::DefWithParentheses 1138s accepts empty parentheses in one liners 1138s reports an offense for class def with empty parens 1139s accepts def with arg and parens 1139s reports an offense for def with empty parens 1139s accepts def without arguments 1139s Ruby >= 3.0 1139s reports an offense for endless method definition with empty parens 1139s 1139s RuboCop::Cop::Lint::EmptyWhen 1139s when a `when` body is missing 1139s registers an offense when case line has no expression 1139s registers an offense for missing when body followed by else 1139s registers an offense for a missing when body 1139s registers an offense for missing when body with a comment followed by else 1139s registers an offense for missing when ... then body 1139s registers an offense for missing when body with a comment 1139s registers an offense for missing when ... then body followed by else 1139s when a `when` body is present 1139s accepts case with when bodies and else clause 1139s accepts case with when ... then statements 1139s accepts with no case line expression 1139s accepts case with when ... then statements and else clause 1139s accepts case with when bodies 1139s when `AllowComments: true` 1140s accepts an empty when body with a comment 1140s accepts an empty when ... then body with a comment 1140s registers an offense for missing when body without a comment 1140s when `AllowComments: false` 1140s registers an offense for empty when body with a comment 1140s 1140s RuboCop::Cop::Lint::ReturnInVoidContext 1140s with a setter method containing a return without a value 1140s accepts 1140s when return is in top scope 1140s accepts 1140s with a non initialize method containing a return 1140s accepts 1140s with an initialize method containing a return without a value 1140s accepts 1140s with a class method called initialize containing a return 1140s accepts 1140s with a setter method containing a return with a value 1140s registers an offense 1140s with an initialize method containing a return with a value 1140s registers an offense 1140s 1140s RuboCop::Cop::Lint::DeprecatedClassMethods 1140s prefer `File.exist?` over `File.exists?` 1140s registers an offense and corrects File.exists? 1140s registers an offense and corrects ::File.exists? 1140s does not register an offense for File.exist? 1140s prefer `Addrinfo#getnameinfo` over `Socket.gethostbyaddr` 1140s registers an offense for Socket.gethostbyaddr 1140s registers an offense for ::Socket.gethostbyaddr 1140s does not register an offense for method `gethostbyaddr` on other receivers 1140s prefer `block_given?` over `iterator?` 1140s registers an offense and corrects iterator? 1140s does not register an offense for block_given? 1140s does not register an offense for offensive method `iterator?`on other receivers 1140s when using `ENV.dup` 1140s registers an offense 1140s does not register an offense for method calls to `ENV` other than `dup` 1140s when using `ENV.freeze` 1140s registers an offense 1140s does not register an offense for method calls to `ENV` other than `freeze` 1140s when using `ENV.clone` 1140s registers an offense 1140s does not register an offense for method calls to `ENV` other than `clone` 1140s prefer `Dir.exist?` over `Dir.exists?` 1140s registers an offense and corrects ::Dir.exists? 1140s does not register an offense for Dir.exist? 1140s registers an offense and corrects Dir.exists? 1140s does not register an offense for offensive method `exists?`on other receivers 1140s prefer `Addrinfo#getaddrinfo` over `Socket.gethostbyname` 1140s does not register an offense for method `gethostbyname` on other receivers 1140s registers an offense for ::Socket.gethostbyname 1140s registers an offense for Socket.gethostbyname 1140s 1140s RuboCop::Cop::Lint::PercentSymbolArray 1140s detecting colons or commas in a %i/%I string 1140s accepts likely false positive $, 1140s registers an offense and corrects when there are no colons but one comma 1140s registers an offense and corrects when one symbol has a colon but there are no commas 1140s accepts likely false positive $, 1140s registers an offense and corrects when symbols contain colons and are comma separated 1140s accepts tokens without colons or commas 1140s registers an offense and corrects when one symbol has a colon but there are no commas 1140s registers an offense and corrects when there are no colons but one comma 1140s accepts tokens without colons or commas 1140s registers an offense and corrects when symbols contain colons and are comma separated 1140s with binary encoded source 1140s accepts if tokens contain no quotes 1140s registers an offense and corrects when tokens contain quotes 1140s 1140s RuboCop::Formatter::TapFormatter 1140s #file_finished 1140s when any offenses are detected 1140s prints "not ok" 1140s when no offenses are detected 1140s prints "ok" 1140s #report_file 1140s when the source contains multibyte characters 1140s displays text containing the offending source line 1140s #finished 1140s when no offenses are detected 1140s does not report offenses 1140s when any offenses are detected 1140s reports all detected offenses for all failed files 1140s 1140s RuboCop::Cop::Layout::SpaceBeforeBlockBraces 1140s with space before empty braces not allowed 1140s registers an offense and corrects empty braces 1140s accepts empty braces without outer space 1140s with invalid value for EnforcedStyleForEmptyBraces 1140s fails with an error 1140s when EnforcedStyle is no_space 1140s registers an offense and corrects correct + opposite style 1140s registers an offense and corrects braces surrounded by spaces 1140s accepts left brace without outer space 1140s Ruby 2.7 1140s registers an offense and corrects correct + opposite style 1140s with `EnforcedStyle` of `Style/BlockDelimiters` 1140s accepts left brace without outer space 1140s when EnforcedStyle is space 1140s registers an offense and corrects left brace without outer space 1140s registers an offense and corrects opposite + correct style 1140s registers an offense and corrects multiline block where the left brace has no outer space 1141s accepts braces surrounded by spaces 1141s Ruby 2.7 1141s registers an offense and corrects multiline block where the left brace has no outer space 1141s registers an offense and corrects opposite + correct style 1141s with space before empty braces allowed 1141s accepts empty braces with outer space 1141s registers an offense and corrects empty braces 1141s 1141s RuboCop::Cop::Migration::DepartmentName 1141s when a disable comment contains a plain comment 1141s accepts 1141s when an unexpected disable comment format 1141s does not register an offense 1141s when a disable comment has cop names with departments 1141s accepts 1141s when only department name has given 1141s does not register an offense 1141s when a disable comment contains an unexpected character for department name 1141s accepts 1141s when todo/enable comments have cop names without departments 1141s registers offenses and corrects when there is space around `:` 1141s registers offenses and corrects when using a legacy cop name 1141s registers offenses and corrects 1141s 1141s RuboCop::Cop::Lint::SymbolConversion 1141s does not register an offense for a dstr 1141s does not register an offense for a symbol that requires quotes 1141s does not register an offense for a normal symbol 1141s behaves like offense 1141s registers an offense for "foo_bar".to_sym 1141s behaves like offense 1141s registers an offense for "foo-bar".intern 1141s behaves like offense 1141s registers an offense for "foo".to_sym 1141s inside a percent literal array 1141s does not register an offense 1141s in an alias 1141s does not register an offense 1141s in a hash 1141s values 1141s does not register an offense for a normal symbol 1141s registers an offense for a quoted symbol key 1141s registers an offense for a quoted symbol value 1141s keys 1141s does not register an offense for operators 1142s registers and corrects an offense for a quoted symbol that ends with `!` 1142s registers and corrects an offense for a quoted symbol that ends with `?` 1142s does not register an offense for a require quoted symbol 1142s does not register an offense for a normal symbol 1142s does not register an offense for a require quoted symbol that contains `:` 1142s registers an offense for a quoted symbol 1142s does not register an offense for a require quoted symbol that ends with `=` 1142s behaves like offense 1142s registers an offense for :foo.intern 1142s single quoted symbol 1142s does not register an offense 1142s implicit `to_sym` call 1142s does not register an offense 1142s EnforcedStyle: consistent 1142s with a key with = 1142s requires symbols to be quoted 1142s hash where no keys need to be quoted 1142s does not register an offense 1142s with a mix of string and symbol keys 1142s does not register an offense 1142s hash where there are keys needing quoting 1142s registers an offense for unquoted keys 1142s hash where keys are quoted but do not need to be 1142s registers an offense 1142s with different quote styles 1142s does not register an offense 1142s behaves like offense 1142s registers an offense for "foo-bar".to_sym 1142s behaves like offense 1142s registers an offense for :foo.to_sym 1142s behaves like offense 1142s registers an offense for "foo_bar".intern 1142s behaves like offense 1142s registers an offense for :"foo_bar" 1142s behaves like offense 1142s registers an offense for "foo".intern 1142s behaves like offense 1142s registers an offense for :"foo" 1142s 1142s RuboCop::Cop::Layout::InitialIndentation 1142s accepts unindented comment + assignment 1142s accepts empty file 1142s registers an offense and corrects indented assignment disregarding comment 1142s registers an offense for indented method definition 1142s accepts unindented method definition 1142s for a file with byte order mark 1142s registers an offense and corrects indented method call after comment 1142s registers an offense and corrects indented method call 1142s accepts unindented method call 1142s 1142s RuboCop::Cop::Layout::IndentationWidth 1142s with Width set to 2 1142s with class 1143s accepts an empty class body 1143s leaves body unchanged if the first body line is on the same line with an opening of singleton class 1143s registers an offense for bad indentation of a class body 1143s leaves body unchanged if the first body line is on the same line with class keyword 1143s when consistency style is normal 1143s registers offenses for indented_internal_methods indentation 1143s accepts indented public, protected, and private 1143s when consistency style is outdent 1143s accepts access modifier is outdent 1143s with access modifier 1143s registers an offense for bad indentation of sections 1143s registers an offense and corrects for bad modifier indentation before good method definition 1143s when consistency style is indented_internal_methods 1143s registers an offense for normal non-indented internal methods indentation 1143s registers an offense for normal non-indented internal methods indentation when defined in a singleton class 1143s with case 1143s accepts case/when/else laid out as a table 1143s accepts indented when/else plus indented body 1143s accepts case/when/else with then beginning a line 1143s accepts aligned values in when clause 1143s registers an offense for bad indentation in a case/else body 1143s registers an offense for bad indentation in a case/when body 1143s accepts correctly indented case/when/else 1143s with def/rescue/end 1143s registers an offense for bad indentation of bodies 1143s registers an offense for bad indent of defs bodies with a modifier 1143s with module 1143s leaves body unchanged if the first body line is on the same line with module keyword 1143s when consistency style is indented_internal_methods 1143s registers an offense for bad indentation of a module body 1143s accepts normal non-indented internal methods of module functions 1143s when consistency style is normal 1143s accepts an empty module body 1143s registers an offense for bad indentation of a module body 1143s with begin/rescue/else/ensure/end 1143s registers an offense for bad indentation of bodies 1143s with case match 1144s accepts case/in/else laid out as a table 1144s accepts indented in/else plus indented body 1144s accepts correctly indented case/in/else 1144s registers an offense for bad indentation in a case/in body 1144s registers an offense for bad indentation in a case/else body 1144s accepts aligned values in `in` clause 1144s accepts aligned value in `in` clause and `else` is empty 1144s accepts case/in/else with then beginning a line 1144s with while/until 1144s accepts an empty while 1144s registers an offense for bad indentation of an until body 1144s registers an offense for bad indentation of a while body 1144s registers an offense for bad indentation of begin/end/while 1144s with for 1144s registers an offense for bad indentation of a for body 1144s accepts an empty for 1144s with unless 1144s registers an offense for bad indentation of an unless body 1144s accepts an empty unless 1144s with block 1144s does not register an offense for good indentation of `do` ... `ensure` ... `end` block 1144s accepts badly indented code if block end is not on separate line 1144s accepts a correctly indented block body 1144s registers an offense for bad indentation of a do/end body 1144s registers an offense for bad indentation of `do` ... `ensure` ... `end` block 1144s registers an offense for bad indentation of a {} body 1144s accepts an empty block body 1144s Ruby 2.7 1144s registers an offense for bad indentation of a {} body 1144s registers an offense for bad indentation of a do-end body 1144s when using safe navigation operator 1144s registers an offense for bad indentation of a {} body 1144s registers an offense for an if with setter 1144s when consistency style is indented_internal_methods 1144s registers an offense for bad indentation in a do/end body 1144s with if statement 1144s does not correct in scopes that contain block comments 1144s leaves block unchanged if block end is not on its own line 1144s accepts a one line if statement 1144s accepts `rescue`/`ensure` after an empty def 1144s accepts if/then/else/end laid out as another table 1144s accepts indentation after if on new line after assignment 1144s handles lines with only whitespace 1144s accepts `ensure` after an empty def 1144s registers an offense for bad indentation of an else body when if body contains no code 1144s registers and corrects on offense for bad indentation 1144s indents parenthesized expressions 1144s accepts a correctly aligned if/elsif/else/end 1144s accepts `rescue`/`ensure` after an empty body 1144s registers an offense for bad indentation of an elsif body 1144s registers offense for bad indentation of modifier if in else 1145s registers offense for bad indentation of ternary inside else 1145s does not raise any error with empty braces 1145s accepts a correctly aligned if/elsif/else/end as a method argument 1145s leaves rescue ; end unchanged 1145s accepts an if/else branches with rescue clauses 1145s accepts `ensure` after an empty body 1145s accepts an empty if 1145s registers an offense for bad indentation of an if body 1145s registers an offense for bad indentation of an else body 1145s accepts if/elsif/else/end laid out as a table 1145s registers an offense for bad indentation of an else body when if and elsif body contains no code 1145s accepts `rescue` after an empty body 1145s does not indent heredoc strings 1145s accepts `rescue` after an empty def 1145s with assignment 1145s when alignment style is start_of_line 1145s and end is aligned with variable 1145s accepts an if with end aligned with setter 1145s accepts an if with end aligned with variable 1145s accepts an if/else with chaining with a block after the end 1145s accepts an if/else 1145s accepts an if/else with chaining after the end 1145s accepts an if with end aligned with element assignment 1145s and end is aligned with keyword 1145s registers an offense for a while 1145s registers an offense for an if 1145s registers an offense for an if with element assignment 1145s registers an offense for an until 1145s registers an offense for an if with setter 1145s accepts an if/else in assignment on next line 1145s and end is aligned randomly 1145s registers an offense for a while 1145s registers an offense for an if 1145s registers an offense for an until 1145s when alignment style is keyword 1145s and end is aligned with keyword 1145s accepts an if in assignment 1145s accepts an until in assignment 1145s accepts an if/else in assignment on next line 1145s accepts an if/else in assignment 1145s accepts a while in assignment 1145s and end is aligned with variable 1145s registers an offense for an if 1146s registers and corrects bad indentation 1146s registers an offense for a while 1146s when alignment style is variable 1146s and end is aligned randomly 1146s registers an offense for an until 1146s registers an offense for a while 1146s registers an offense for an if 1146s and end is aligned with keyword 1146s registers an offense for an if with setter 1146s registers an offense for a while 1146s accepts an if/else in assignment on next line 1146s registers an offense for an until 1146s registers an offense for an if with element assignment 1146s registers an offense for an if 1146s and end is aligned with variable 1146s accepts an if/else with chaining with a block after the end 1146s accepts an if/else with chaining after the end 1146s accepts an if/else 1146s accepts an if with end aligned with element assignment 1146s accepts an if with end aligned with setter 1146s accepts an if with end aligned with variable 1146s with def/defs 1146s when end is aligned with def 1146s accepts an empty defs body 1146s accepts an empty def body 1146s with an assignment 1146s registers an offense for bad indentation of a defs body 1146s registers an offense for bad indentation of a def body 1146s when modifier and def are on the same line 1146s registers an offense for bad indentation of a def body 1146s registers an offense for bad indentation of a defs body 1146s accepts a correctly aligned body 1146s when end is aligned with start of line 1146s registers an offense for bad indentation of a defs body 1146s accepts an empty defs body 1146s registers an offense for bad indentation of a def body 1146s with an assignment 1146s accepts an empty def body 1146s when multiple modifiers and def are on the same line 1146s registers an offense for bad indentation of a def body 1146s accepts a correctly aligned body 1146s registers an offense for bad indentation of a defs body 1146s when multiple modifiers are used in a block anda method call is made at end of the block 1146s registers an offense for bad indentation of a def 1146s accepts a correctly aligned body 1146s registers an offense for bad indentation of a def body 1146s when modifier and def are on the same line 1146s registers an offense for bad indentation of a defs body 1146s registers an offense for bad indentation of a def body 1146s accepts a correctly aligned body 1146s with Width set to 4 1146s registers and corrects offense for bad indentation 1146s with if statement 1146s registers an offense for bad indentation of an if body 1146s for a file with byte order mark 1146s accepts correctly indented method definition 1146s with ignored patterns set 1146s accepts unindented lines for those keywords 1146s 1146s RuboCop::Cop::InternalAffairs::ExampleHeredocDelimiter 1146s when unexpected heredoc delimiter is used in multi-line heredoc 1146s registers an offense 1146s when unexpected heredoc delimiter is used at non RuboCop specific expectation 1146s does not register an offense 1146s when expected heredoc delimiter is used at RuboCop specific expectation 1146s does not register an offense 1146s when unexpected heredoc delimiter is used in single-line heredoc 1146s registers an offense 1146s when unexpected heredoc delimiter is used but heredoc body contains an expected delimiter line 1146s does not register an offense 1146s 1146s RuboCop::Formatter::OffenseCountFormatter 1146s #finished 1146s when output tty is true 1146s has a progress bar 1146s when there are many offenses 1146s when --display-style-guide was not given 1146s sorts by offense count first and then by cop name 1146s when --display-style-guide was given 1146s shows links and sorts by offense count first and then by cop name 1146s #report_summary 1146s when an offense is detected 1146s shows the cop and the offense count 1146s #file_finished 1146s when no offenses are detected 1146s does not add to offense_counts 1146s when any offenses are detected 1146s increments the count for the cop in offense_counts 1146s 1146s RuboCop::Cop::Lint::RedundantCopEnableDirective 1146s registers offense and corrects redundant enabling of same cop 1146s registers offense and corrects unnecessary enable 1146s registers multiple offenses and corrects the same comment 1146s registers correct offense when combined with necessary enable 1146s registers an offense and corrects when the first cop is unnecessarily enabled 1146s registers correct offense when combined with necessary enable, no white-space after comma 1146s when cop is disabled in the configuration 1146s registers an offense if enabling it twice 1146s registers no offense when enabling the cop 1146s when last cop is unnecessarily enabled 1147s registers an offense and corrects when there is no space between the cops and the comma 1147s registers an offense and corrects 1147s when all cops are unnecessarily enabled 1147s on separate lines 1147s registers an offense and corrects when there is extra white space 1147s on the same line 1147s registers an offense and corrects 1147s when middle cop is unnecessarily enabled 1147s registers an offense and corrects 1147s registers an offense and corrects when there is extra white space 1147s all switch 1147s registers offense and corrects unnecessary enable all 1147s when at least one cop was disabled 1147s does not register offense 1147s when all department enabled 1147s registers offense and corrects unnecessary enable 1147s registers an offense and corrects when the first department is unnecessarily enabled 1147s registers multiple offenses and corrects the same comment 1147s registers offense and corrects redundant enabling of department of same cop 1147s registers offense and corrects redundant enabling of cop of same department 1148s registers correct offense when combined with necessary enable 1148s registers offense and corrects redundant enabling of same department 1148s 1148s RuboCop::Cop::Naming::VariableName 1148s when configured for snake_case 1148s registers an offense for camel case in instance variable name 1148s accepts screaming snake case globals 1148s registers an offense for correct + opposite 1148s registers an offense for camel case in class variable name 1148s accepts assigning to camel case constant 1148s registers an offense for keyword arguments 1148s registers an offense for camel case when invoking method args 1148s registers an offense for camel case in local variable name 1148s registers an offense for method arguments 1148s registers an offense for block arguments 1148s registers an offense for camel case local variables marked as unused 1148s registers an offense for rest arguments 1148s accepts one symbol size local variables 1148s registers an offense for keyword rest arguments 1148s accepts local variables marked as unused 1148s accepts screaming snake case constants 1148s accepts assignment with indexing of self 1148s registers an offense for default method arguments 1148s when AllowedIdentifiers is set 1148s does not register an offense for a method name that is allowed 1148s does not register an offense for a local variable name that is allowed 1148s does not register an offense for a class variable name that is allowed 1148s does not register an offense for a global variable name that is allowed 1148s does not register an offense for a instance variable name that is allowed 1148s does not register an offense for a symbol that is allowed 1148s when AllowedPatterns is set 1148s does not register an offense for a method name that matches the allowed pattern 1148s does not register an offense for a class variable name that matches the allowed pattern 1148s does not register an offense for a instance variable name that matches the allowed pattern 1148s does not register an offense for a local variable name that matches the allowed pattern 1148s does not register an offense for a global variable name that matches the allowed pattern 1148s does not register an offense for a symbol that matches the allowed pattern 1148s when configured for camelCase 1148s accepts one symbol size local variables 1148s registers an offense for snake case in local variable name 1148s registers an offense for default method arguments 1148s registers an offense for opposite + correct 1148s accepts camel case in instance variable name 1148s accepts with non-ascii characters 1148s accepts screaming snake case globals 1148s accepts local variables marked as unused 1148s registers an offense for keyword rest arguments 1148s accepts assignment with indexing of self 1148s registers an offense for rest arguments 1148s registers an offense for snake case in method parameter 1149s registers an offense for block arguments 1149s registers an offense for camel case when invoking method args 1149s registers an offense for keyword arguments 1149s accepts assigning to camel case constant 1149s accepts camel case in local variable name 1149s accepts screaming snake case constants 1149s accepts camel case local variables marked as unused 1149s accepts camel case in class variable name 1149s when AllowedPatterns is set 1149s does not register an offense for a symbol that matches the allowed pattern 1149s does not register an offense for a instance variable name that matches the allowed pattern 1149s does not register an offense for a class variable name that matches the allowed pattern 1149s does not register an offense for a method name that matches the allowed pattern 1149s does not register an offense for a global variable name that matches the allowed pattern 1149s does not register an offense for a local variable name that matches the allowed pattern 1149s when AllowedIdentifiers is set 1149s does not register an offense for a global variable name that is allowed 1149s does not register an offense for a symbol that is allowed 1149s does not register an offense for a method name that is allowed 1149s does not register an offense for a class variable name that is allowed 1149s does not register an offense for a instance variable name that is allowed 1149s does not register an offense for a local variable name that is allowed 1149s 1149s RuboCop::Cop::InternalAffairs::CopDescription 1149s The description starts with `This cop ...` 1149s registers an offense and corrects if using just a verb 1149s registers an offense if using an auxiliary verb 1149s registers an offense if the description like `This cop is ...` 1149s The description starts with a word such as verb 1149s does not register if the description like `Checks` 1149s does not register if the description starts with non-verb word 1149s There is no description comment 1149s does not register offense 1149s 1149s RuboCop::Cop::Lint::RequireParentheses 1149s registers an offense for missing parentheses around expression with || operator 1149s accepts method call with parentheses in ternary 1149s registers an offense for missing parentheses around expression with && operator 1149s accepts calls to methods that are setters 1149s accepts parentheses around expression with boolean operator 1149s accepts missing parentheses around expression with + operator 1149s accepts calls to methods that are operators 1149s accepts method calls without parentheses followed by keyword and/or 1149s accepts missing parentheses when using ternary operator 1149s accepts method calls that are all operations 1149s accepts missing parentheses when using ternary operator in square bracksts 1149s accepts missing parentheses when method is not a predicate 1149s accepts condition that is not a call 1150s registers an offense for missing parentheses around expression in ternary 1150s when using safe navigation operator 1150s registers an offense for missing parentheses around expression with && operator 1150s 1150s RuboCop::Formatter::TextUtil 1150s pluralize 1150s will not change 0 to no 1150s will pluralize negative quantities less than -1 1150s will pluralize -1 1150s will not pluralize 1 1150s will change 0 to no when configured 1150s will pluralize quantities greater than 1 1150s will pluralize fractions 1150s 1150s RuboCop::Formatter::EmacsStyleFormatter 1150s #finished 1150s does not report summary 1150s #file_finished 1150s displays parsable text 1150s when the offense is automatically corrected 1150s prints [Corrected] along with message 1150s when the offense is marked as todo 1150s prints [Todo] along with message 1150s when the offense message contains a newline 1150s strips newlines out of the error message 1150s 1150s RuboCop::Cop::Style::MutableConstant 1150s Strict: false 1150s allows method call assignments 1150s behaves like immutable objects 1150s allows 'foo' + 'bar' to be assigned to a constant 1150s allows 'foo' + 'bar' to be ||= to a constant 1150s behaves like immutable objects 1150s allows ENV['foo'] to be assigned to a constant 1150s allows ENV['foo'] to be ||= to a constant 1150s behaves like immutable objects 1150s allows FOO - BAR to be ||= to a constant 1150s allows FOO - BAR to be assigned to a constant 1150s behaves like mutable objects 1150s when assigning with = 1150s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1150s when assigning with ||= 1150s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1150s behaves like immutable objects 1150s allows ::ENV['foo'] to be ||= to a constant 1150s allows ::ENV['foo'] to be assigned to a constant 1150s behaves like immutable objects 1150s allows :sym to be ||= to a constant 1150s allows :sym to be assigned to a constant 1150s behaves like string literal 1150s Ruby 2.7 or lower 1150s when the frozen string literal comment is false 1150s behaves like mutable objects 1150s when assigning with ||= 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when assigning with = 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when the frozen string literal comment is true 1150s does not register an offense when using interpolated heredoc constant 1150s does not register an offense when using a multiline string 1150s behaves like immutable objects 1150s allows <<~HERE 1150s foo 1150s bar 1150s HERE 1150s to be assigned to a constant 1150s allows <<~HERE 1150s foo 1150s bar 1150s HERE 1150s to be ||= to a constant 1150s behaves like immutable objects 1150s allows "#{a}" to be assigned to a constant 1150s allows "#{a}" to be ||= to a constant 1150s when the frozen string literal comment is missing 1150s behaves like mutable objects 1150s when assigning with ||= 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when assigning with = 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s Ruby 3.0 or higher 1150s when the frozen string literal comment is false 1150s behaves like mutable objects 1150s when assigning with = 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when assigning with ||= 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when the frozen string literal comment is true 1150s registers an offense when using interpolated heredoc constant 1150s does not register an offense when using a multiline string 1150s registers an offense when using a multiline string with interpolation 1150s behaves like mutable objects 1150s when assigning with ||= 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when assigning with = 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s behaves like immutable objects 1150s allows <<~HERE 1150s foo 1150s bar 1150s HERE 1150s to be assigned to a constant 1150s allows <<~HERE 1150s foo 1150s bar 1150s HERE 1150s to be ||= to a constant 1150s when the frozen string literal comment is missing 1150s behaves like mutable objects 1150s when assigning with = 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s when assigning with ||= 1150s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1150s behaves like immutable objects 1150s allows FOO + BAR to be ||= to a constant 1150s allows FOO + BAR to be assigned to a constant 1150s Ruby 2.7 or lower 1150s when assigning a range (erange) without parenthesis 1150s adds parentheses when autocorrecting 1150s does not insert parenthesis to range enclosed in parentheses 1150s when using shareable_constant_values 1150s behaves like literals that are not frozen 1150s behaves like immutable objects 1150s allows ENV['foo'] to be ||= to a constant 1151s allows ENV['foo'] to be assigned to a constant 1151s behaves like immutable objects 1151s allows 1.5 to be ||= to a constant 1151s allows 1.5 to be assigned to a constant 1151s behaves like immutable objects 1151s allows FOO - BAR to be ||= to a constant 1151s allows FOO - BAR to be assigned to a constant 1151s behaves like immutable objects 1151s allows :sym to be ||= to a constant 1151s allows :sym to be assigned to a constant 1151s behaves like immutable objects 1151s allows FOO + BAR to be ||= to a constant 1151s allows FOO + BAR to be assigned to a constant 1151s behaves like immutable objects 1151s allows 'foo' + 'bar' to be ||= to a constant 1151s allows 'foo' + 'bar' to be assigned to a constant 1151s behaves like mutable objects 1151s when assigning with = 1151s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1151s when assigning with ||= 1151s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1151s behaves like immutable objects 1151s allows ::ENV['foo'] to be assigned to a constant 1151s allows ::ENV['foo'] to be ||= to a constant 1151s behaves like mutable objects 1151s when assigning with = 1151s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1151s when assigning with ||= 1151s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1151s behaves like immutable objects 1151s allows 1 to be assigned to a constant 1151s allows 1 to be ||= to a constant 1151s behaves like mutable objects 1151s when assigning with = 1151s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1151s when assigning with ||= 1151s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1151s behaves like mutable objects 1151s when assigning with = 1151s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1151s when assigning with ||= 1151s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1151s behaves like literals that are not frozen 1151s behaves like immutable objects 1151s allows 1 to be ||= to a constant 1151s allows 1 to be assigned to a constant 1151s behaves like immutable objects 1151s allows FOO - BAR to be ||= to a constant 1151s allows FOO - BAR to be assigned to a constant 1151s behaves like immutable objects 1151s allows 1.5 to be ||= to a constant 1151s allows 1.5 to be assigned to a constant 1151s behaves like immutable objects 1151s allows ENV['foo'] to be assigned to a constant 1151s allows ENV['foo'] to be ||= to a constant 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1151s behaves like immutable objects 1151s allows 'foo' + 'bar' to be assigned to a constant 1151s allows 'foo' + 'bar' to be ||= to a constant 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1151s behaves like immutable objects 1151s allows ::ENV['foo'] to be assigned to a constant 1151s allows ::ENV['foo'] to be ||= to a constant 1151s behaves like immutable objects 1151s allows :sym to be ||= to a constant 1151s allows :sym to be assigned to a constant 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1151s behaves like mutable objects 1151s when assigning with ||= 1151s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1151s when assigning with = 1151s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1151s behaves like immutable objects 1152s allows FOO + BAR to be ||= to a constant 1152s allows FOO + BAR to be assigned to a constant 1152s behaves like literals that are not frozen 1152s behaves like mutable objects 1152s when assigning with ||= 1152s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1152s when assigning with = 1152s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1152s behaves like immutable objects 1152s allows :sym to be ||= to a constant 1152s allows :sym to be assigned to a constant 1152s behaves like immutable objects 1152s allows ENV['foo'] to be ||= to a constant 1152s allows ENV['foo'] to be assigned to a constant 1152s behaves like immutable objects 1152s allows ::ENV['foo'] to be assigned to a constant 1152s allows ::ENV['foo'] to be ||= to a constant 1152s behaves like immutable objects 1152s allows FOO + BAR to be ||= to a constant 1152s allows FOO + BAR to be assigned to a constant 1152s behaves like mutable objects 1152s when assigning with ||= 1152s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1152s when assigning with = 1152s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1152s behaves like mutable objects 1152s when assigning with ||= 1152s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1152s when assigning with = 1152s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1152s behaves like immutable objects 1152s allows 1.5 to be ||= to a constant 1152s allows 1.5 to be assigned to a constant 1152s behaves like mutable objects 1152s when assigning with ||= 1152s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1152s when assigning with = 1152s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1152s behaves like mutable objects 1152s when assigning with ||= 1152s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1152s when assigning with = 1152s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1152s behaves like immutable objects 1152s allows 1 to be assigned to a constant 1152s allows 1 to be ||= to a constant 1152s behaves like immutable objects 1152s allows 'foo' + 'bar' to be ||= to a constant 1152s allows 'foo' + 'bar' to be assigned to a constant 1152s behaves like immutable objects 1152s allows FOO - BAR to be assigned to a constant 1152s allows FOO - BAR to be ||= to a constant 1152s behaves like literals that are not frozen 1152s behaves like immutable objects 1152s allows FOO - BAR to be ||= to a constant 1152s allows FOO - BAR to be assigned to a constant 1152s behaves like immutable objects 1152s allows 1 to be ||= to a constant 1152s allows 1 to be assigned to a constant 1152s behaves like mutable objects 1152s when assigning with ||= 1153s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1153s when assigning with = 1153s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1153s behaves like immutable objects 1153s allows 1.5 to be ||= to a constant 1153s allows 1.5 to be assigned to a constant 1153s behaves like immutable objects 1153s allows :sym to be assigned to a constant 1153s allows :sym to be ||= to a constant 1153s behaves like immutable objects 1153s allows FOO + BAR to be ||= to a constant 1153s allows FOO + BAR to be assigned to a constant 1153s behaves like mutable objects 1153s when assigning with = 1153s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1153s when assigning with ||= 1153s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1153s behaves like mutable objects 1153s when assigning with = 1153s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1153s when assigning with ||= 1153s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1153s behaves like immutable objects 1153s allows ENV['foo'] to be assigned to a constant 1153s allows ENV['foo'] to be ||= to a constant 1153s behaves like mutable objects 1153s when assigning with ||= 1153s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1153s when assigning with = 1153s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1153s behaves like immutable objects 1153s allows 'foo' + 'bar' to be ||= to a constant 1153s allows 'foo' + 'bar' to be assigned to a constant 1153s behaves like immutable objects 1153s allows ::ENV['foo'] to be assigned to a constant 1153s allows ::ENV['foo'] to be ||= to a constant 1153s behaves like mutable objects 1153s when assigning with ||= 1153s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1153s when assigning with = 1153s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1153s when assigning a range (irange) without parenthesis 1153s does not insert parenthesis to range enclosed in parentheses 1153s adds parentheses when autocorrecting 1153s when assigning a regexp 1153s registers an offense 1153s Ruby 3.0 or higher 1153s raises offense when shareable_constant_value is specified as an inline comment 1153s raises offense only for shareable_constant_value as none when set in the order of: literal, none and experimental_everything 1153s when assigning a range (irange) 1153s does not register an offense when without parenthesis 1153s does not register an offense when with parenthesis 1153s when using shareable_constant_value 1153s behaves like literals that are frozen 1153s behaves like immutable objects 1153s allows FOO - BAR to be assigned to a constant 1153s allows FOO - BAR to be ||= to a constant 1153s behaves like immutable objects 1153s allows 'str' to be assigned to a constant 1153s allows 'str' to be ||= to a constant 1153s behaves like immutable objects 1153s allows 1.5 to be ||= to a constant 1153s allows 1.5 to be assigned to a constant 1153s behaves like immutable objects 1153s allows { a: 1, b: 2 } to be ||= to a constant 1153s allows { a: 1, b: 2 } to be assigned to a constant 1153s behaves like immutable objects 1153s allows [1, 2, 3] to be assigned to a constant 1154s allows [1, 2, 3] to be ||= to a constant 1154s behaves like immutable objects 1154s allows 'foo' + 'bar' to be assigned to a constant 1154s allows 'foo' + 'bar' to be ||= to a constant 1154s behaves like immutable objects 1154s allows FOO + BAR to be ||= to a constant 1154s allows FOO + BAR to be assigned to a constant 1154s behaves like immutable objects 1154s allows :sym to be assigned to a constant 1154s allows :sym to be ||= to a constant 1154s behaves like immutable objects 1154s allows ENV['foo'] to be ||= to a constant 1154s allows ENV['foo'] to be assigned to a constant 1154s behaves like immutable objects 1154s allows 1 to be ||= to a constant 1154s allows 1 to be assigned to a constant 1154s behaves like immutable objects 1154s allows "top#{1 + 2}" to be assigned to a constant 1154s allows "top#{1 + 2}" to be ||= to a constant 1154s behaves like immutable objects 1154s allows ::ENV['foo'] to be assigned to a constant 1154s allows ::ENV['foo'] to be ||= to a constant 1154s behaves like immutable objects 1154s allows %w(a b c) to be assigned to a constant 1154s allows %w(a b c) to be ||= to a constant 1154s behaves like literals that are frozen 1154s behaves like immutable objects 1154s allows FOO - BAR to be ||= to a constant 1154s allows FOO - BAR to be assigned to a constant 1154s behaves like immutable objects 1154s allows %w(a b c) to be ||= to a constant 1154s allows %w(a b c) to be assigned to a constant 1154s behaves like immutable objects 1154s allows "top#{1 + 2}" to be ||= to a constant 1154s allows "top#{1 + 2}" to be assigned to a constant 1154s behaves like immutable objects 1154s allows 1.5 to be assigned to a constant 1154s allows 1.5 to be ||= to a constant 1154s behaves like immutable objects 1154s allows FOO + BAR to be assigned to a constant 1154s allows FOO + BAR to be ||= to a constant 1154s behaves like immutable objects 1154s allows 1 to be assigned to a constant 1154s allows 1 to be ||= to a constant 1154s behaves like immutable objects 1154s allows 'str' to be ||= to a constant 1154s allows 'str' to be assigned to a constant 1154s behaves like immutable objects 1154s allows [1, 2, 3] to be assigned to a constant 1154s allows [1, 2, 3] to be ||= to a constant 1154s behaves like immutable objects 1154s allows :sym to be assigned to a constant 1154s allows :sym to be ||= to a constant 1154s behaves like immutable objects 1154s allows { a: 1, b: 2 } to be assigned to a constant 1154s allows { a: 1, b: 2 } to be ||= to a constant 1154s behaves like immutable objects 1154s allows ENV['foo'] to be ||= to a constant 1154s allows ENV['foo'] to be assigned to a constant 1154s behaves like immutable objects 1154s allows ::ENV['foo'] to be ||= to a constant 1154s allows ::ENV['foo'] to be assigned to a constant 1154s behaves like immutable objects 1155s allows 'foo' + 'bar' to be assigned to a constant 1155s allows 'foo' + 'bar' to be ||= to a constant 1155s behaves like literals that are not frozen 1155s behaves like immutable objects 1155s allows :sym to be assigned to a constant 1155s allows :sym to be ||= to a constant 1155s behaves like mutable objects 1155s when assigning with ||= 1155s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1155s when assigning with = 1155s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1155s behaves like mutable objects 1155s when assigning with ||= 1155s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1155s when assigning with = 1155s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1155s behaves like immutable objects 1155s allows 1 to be ||= to a constant 1155s allows 1 to be assigned to a constant 1155s behaves like immutable objects 1155s allows FOO - BAR to be assigned to a constant 1155s allows FOO - BAR to be ||= to a constant 1155s behaves like mutable objects 1155s when assigning with = 1155s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1155s when assigning with ||= 1155s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1155s behaves like immutable objects 1155s allows ENV['foo'] to be assigned to a constant 1155s allows ENV['foo'] to be ||= to a constant 1155s behaves like immutable objects 1155s allows 'foo' + 'bar' to be assigned to a constant 1155s allows 'foo' + 'bar' to be ||= to a constant 1155s behaves like immutable objects 1155s allows ::ENV['foo'] to be ||= to a constant 1155s allows ::ENV['foo'] to be assigned to a constant 1155s behaves like mutable objects 1155s when assigning with ||= 1155s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1155s when assigning with = 1155s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1155s behaves like immutable objects 1155s allows FOO + BAR to be ||= to a constant 1155s allows FOO + BAR to be assigned to a constant 1155s behaves like immutable objects 1155s allows 1.5 to be assigned to a constant 1155s allows 1.5 to be ||= to a constant 1155s behaves like mutable objects 1155s when assigning with = 1155s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1155s when assigning with ||= 1155s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1155s behaves like literals that are frozen 1155s behaves like immutable objects 1155s allows 'foo' + 'bar' to be assigned to a constant 1155s allows 'foo' + 'bar' to be ||= to a constant 1155s behaves like immutable objects 1155s allows 1 to be ||= to a constant 1155s allows 1 to be assigned to a constant 1155s behaves like immutable objects 1155s allows 'str' to be assigned to a constant 1155s allows 'str' to be ||= to a constant 1155s behaves like immutable objects 1155s allows %w(a b c) to be assigned to a constant 1155s allows %w(a b c) to be ||= to a constant 1155s behaves like immutable objects 1155s allows :sym to be ||= to a constant 1155s allows :sym to be assigned to a constant 1155s behaves like immutable objects 1155s allows 1.5 to be ||= to a constant 1155s allows 1.5 to be assigned to a constant 1155s behaves like immutable objects 1155s allows FOO - BAR to be assigned to a constant 1155s allows FOO - BAR to be ||= to a constant 1155s behaves like immutable objects 1155s allows [1, 2, 3] to be ||= to a constant 1155s allows [1, 2, 3] to be assigned to a constant 1155s behaves like immutable objects 1155s allows ::ENV['foo'] to be assigned to a constant 1155s allows ::ENV['foo'] to be ||= to a constant 1155s behaves like immutable objects 1155s allows { a: 1, b: 2 } to be ||= to a constant 1155s allows { a: 1, b: 2 } to be assigned to a constant 1155s behaves like immutable objects 1155s allows "top#{1 + 2}" to be ||= to a constant 1155s allows "top#{1 + 2}" to be assigned to a constant 1155s behaves like immutable objects 1155s allows FOO + BAR to be ||= to a constant 1155s allows FOO + BAR to be assigned to a constant 1155s behaves like immutable objects 1156s allows ENV['foo'] to be ||= to a constant 1156s allows ENV['foo'] to be assigned to a constant 1156s when assigning a regexp 1156s does not register an offense 1156s when assigning a range (erange) 1156s does not register an offense when with parenthesis 1156s does not register an offense when without parenthesis 1156s behaves like mutable objects 1156s when assigning with = 1156s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1156s when assigning with ||= 1156s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1156s behaves like immutable objects 1156s allows 1.5 to be assigned to a constant 1156s allows 1.5 to be ||= to a constant 1156s behaves like mutable objects 1156s when assigning with ||= 1156s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1156s when assigning with = 1156s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1156s splat expansion 1156s expansion of a range 1156s registers an offense and corrects to use to_a.freeze 1156s with parentheses 1156s registers an offense and corrects to use to_a.freeze 1156s behaves like mutable objects 1156s when assigning with ||= 1156s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1156s when assigning with = 1156s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1156s behaves like immutable objects 1156s allows 1 to be ||= to a constant 1156s allows 1 to be assigned to a constant 1156s behaves like mutable objects 1156s when assigning with = 1156s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1156s when assigning with ||= 1156s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1156s when assigning an array without brackets 1156s adds brackets when autocorrecting 1156s does not insert brackets for %w() arrays 1156s Strict: true 1156s allows calls to freeze 1156s freezes a heredoc 1157s behaves like immutable objects 1157s allows Struct.new(:a, :b) to be ||= to a constant 1157s allows Struct.new(:a, :b) to be assigned to a constant 1157s behaves like mutable objects 1157s when assigning with = 1157s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1157s when assigning with ||= 1157s registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze 1157s behaves like immutable objects 1157s allows ENV['foo'] to be assigned to a constant 1157s allows ENV['foo'] to be ||= to a constant 1157s behaves like immutable objects 1157s allows ::OTHER_CONST to be ||= to a constant 1157s allows ::OTHER_CONST to be assigned to a constant 1157s when assigning an array without brackets 1157s adds brackets when autocorrecting 1157s does not insert brackets for %w() arrays 1157s behaves like immutable objects 1157s allows Struct.new to be assigned to a constant 1157s allows Struct.new to be ||= to a constant 1157s behaves like mutable objects 1157s when assigning with = 1157s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1157s when assigning with ||= 1157s registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze 1157s when assigning with an operator 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like operator methods 1157s registers an offense and corrects with parens and freeze 1157s behaves like immutable objects 1157s allows OTHER_CONST to be ||= to a constant 1157s allows OTHER_CONST to be assigned to a constant 1157s splat expansion 1157s expansion of a range 1157s registers an offense and corrects to use to_a.freeze 1157s with parentheses 1157s registers an offense and corrects to use to_a.freeze 1157s behaves like immutable objects 1157s allows 1.5 to be assigned to a constant 1157s allows 1.5 to be ||= to a constant 1157s behaves like mutable objects 1157s when assigning with ||= 1157s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1157s when assigning with = 1157s registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze 1157s behaves like string literal 1157s Ruby 3.0 or higher 1157s when the frozen string literal comment is false 1157s behaves like mutable objects 1157s when assigning with = 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when assigning with ||= 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when the frozen string literal comment is true 1157s does not register an offense when using a multiline string 1157s registers an offense when using a multiline string with interpolation 1157s registers an offense when using interpolated heredoc constant 1157s behaves like immutable objects 1157s allows <<~HERE 1157s foo 1157s bar 1157s HERE 1157s to be assigned to a constant 1157s allows <<~HERE 1157s foo 1157s bar 1157s HERE 1157s to be ||= to a constant 1157s behaves like mutable objects 1157s when assigning with ||= 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when assigning with = 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when the frozen string literal comment is missing 1157s behaves like mutable objects 1157s when assigning with = 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when assigning with ||= 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s Ruby 2.7 or lower 1157s when the frozen string literal comment is false 1157s behaves like mutable objects 1157s when assigning with = 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when assigning with ||= 1157s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1157s when the frozen string literal comment is true 1157s does not register an offense when using a multiline string 1157s does not register an offense when using interpolated heredoc constant 1157s behaves like immutable objects 1157s allows "#{a}" to be assigned to a constant 1157s allows "#{a}" to be ||= to a constant 1157s behaves like immutable objects 1157s allows <<~HERE 1157s foo 1157s bar 1157s HERE 1157s to be assigned to a constant 1157s allows <<~HERE 1157s foo 1157s bar 1157s HERE 1157s to be ||= to a constant 1157s when the frozen string literal comment is missing 1157s behaves like mutable objects 1157s when assigning with = 1158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1158s when assigning with ||= 1158s registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze 1158s behaves like mutable objects 1158s when assigning with ||= 1158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1158s when assigning with = 1158s registers an offense for 'str' assigned to a constant and corrects by adding .freeze 1158s operators that produce unfrozen objects 1158s registers an offense when operating on multiple strings 1158s registers an offense when operating on a constant and a string 1158s behaves like immutable objects 1158s allows 1 to be assigned to a constant 1158s allows 1 to be ||= to a constant 1158s behaves like immutable objects 1158s allows ::Struct.new to be ||= to a constant 1158s allows ::Struct.new to be assigned to a constant 1158s behaves like mutable objects 1158s when assigning with ||= 1158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1158s when assigning with = 1158s registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze 1158s behaves like immutable objects 1158s allows Namespace::OTHER_CONST to be ||= to a constant 1158s allows Namespace::OTHER_CONST to be assigned to a constant 1158s behaves like immutable objects 1158s allows Struct.new(:node) do 1158s def assignment? 1158s true 1158s end 1158s end 1158s to be ||= to a constant 1158s allows Struct.new(:node) do 1158s def assignment? 1158s true 1158s end 1158s end 1158s to be assigned to a constant 1158s behaves like immutable objects 1158s allows ::ENV['foo'] to be assigned to a constant 1158s allows ::ENV['foo'] to be ||= to a constant 1158s when assigning with multiple operator calls 1158s registers an offense and corrects with parens and freeze 1158s behaves like immutable objects 1158s allows ::Namespace::OTHER_CONST to be assigned to a constant 1158s allows ::Namespace::OTHER_CONST to be ||= to a constant 1158s behaves like immutable objects 1158s allows :sym to be assigned to a constant 1158s allows :sym to be ||= to a constant 1158s methods and operators that produce frozen objects 1158s accepts operating on multiple integers 1158s accepts checking fixed size 1158s accepts operating on a constant and a float 1158s accepts assigning to an environment variable with a fallback 1158s accepts comparison operators 1158s accepts operating on multiple floats 1158s accepts operating on a constant and an interger 1158s behaves like mutable objects 1158s when assigning with ||= 1158s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 1158s when assigning with = 1158s registers an offense for Something.new assigned to a constant and corrects by adding .freeze 1158s 1158s RuboCop::Cop::Style::BarePercentLiterals 1158s when EnforcedStyle is bare_percent 1158s and strings are dynamic 1158s accepts %() 1158s accepts %q 1158s accepts "" string with interpolation 1158s accepts regular expressions 1158s accepts heredoc 1158s accepts __FILE__ 1158s accepts '' 1158s registers an offense for %Q() 1158s accepts "" 1158s and strings are static 1158s accepts "" string with interpolation 1158s registers an offense for %Q() 1158s accepts '' 1158s accepts heredoc 1158s accepts %() 1158s accepts __FILE__ 1158s accepts %q 1158s accepts regular expressions 1158s accepts "" 1158s when EnforcedStyle is percent_q 1158s and strings are dynamic 1158s registers an offense for %() 1158s accepts heredoc 1158s accepts "" 1158s accepts "" string with interpolation 1158s accepts __FILE__ 1158s accepts %Q() 1159s accepts '' 1159s accepts %q 1159s accepts regular expressions 1159s and strings are static 1159s accepts "" 1159s accepts regular expressions 1159s accepts "" string with interpolation 1159s accepts %q 1159s registers an offense for %() 1159s accepts '' 1159s accepts %Q() 1159s accepts heredoc 1159s accepts __FILE__ 1159s 1159s RuboCop::Cop::Style::TrailingUnderscoreVariable 1159s configured to allow named underscore variables 1159s does not register an offense for underscores at the beginning 1159s does not register an offense for multiple named underscores preceded by a splat variable 1159s registers an offense for multiple underscore variables preceded by a splat underscore variable 1159s registers an offense when multiple underscores are used as the last variables of parallel assignment 1159s does not register an offense for a named variable preceded by a names splat underscore variable 1159s does not register an offense for a named underscore variable preceded by a splat variable 1159s does not register an offense for named variables that start with an underscore 1159s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 1159s does not register an offense when there are no underscores 1159s registers an offense for an underscore as the last param when there is also an underscore as the first param 1159s does not register an offense for complex nested assignments without trailing underscores 1159s registers an offense when underscore is the second to last variable and blank is the last variable 1159s registers an offense for complex nested assignments with trailing underscores 1159s registers an offense when underscore is the only variable in parallel assignment 1159s registers an offense for splat underscore as the last variable 1159s does not register an offense for multiple underscores preceded by a splat variable 1159s does not register an offense for an underscore preceded by a splat variable 1159s does not register an offense for an underscore variable preceded by a named splat underscore variable 1159s registers an offense for nested assignments with trailing underscores 1159s does not register an offense for multiple underscore variables preceded by a named splat underscore variable 1159s registers an offense when the last variable of parallel assignment is an underscore 1159s does not register an offense for a named splat underscore as the last variable 1159s does not register an offense for nested assignments without trailing underscores 1159s does not register an offense for an underscore preceded by a splat variable and another underscore 1159s autocorrect 1159s with parentheses 1159s leaves parentheses but removes trailing underscores and commas 1159s removes assignment part when it is the only variable 1159s removes assignment part when every assignment is to `_` 1159s leaves parentheses but removes trailing underscores 1159s configured to not allow named underscore variables 1159s does not register an offense for underscores at the beginning 1159s registers an offense for an underscore variable preceded by a named splat underscore variable 1159s does not register an offense for multiple underscores preceded by a splat variable 1160s does not register an offense for an underscore preceded by a splat variable 1160s registers an offense for nested assignments with trailing underscores 1160s registers an offense for multiple underscore variables preceded by a named splat underscore variable 1160s does not register an offense for nested assignments without trailing underscores 1160s does not register an offense for a named underscore preceded by a splat variable 1160s does not register an offense for multiple named underscores preceded by a splat variable 1160s registers an offense when underscore is the second to last variable and blank is the last variable 1160s registers an offense for named variables that start with an underscore 1160s registers an offense for a named splat underscore as the last variable 1160s does not register an offense when there are no underscores 1160s registers an offense for splat underscore as the last variable 1160s registers an offense when multiple underscores are used as the last variables of parallel assignment 1160s registers an offense for an underscore as the last param when there is also an underscore as the first param 1160s registers an offense for an underscore preceded by a named splat underscore 1160s does not register an offense for complex nested assignments without trailing underscores 1160s does not register an offense for a named underscore variable preceded by a splat variable 1160s registers an offense when underscore is the only variable in parallel assignment 1160s registers an offense for multiple underscore variables preceded by a splat underscore variable 1160s does not register an offense for an underscore preceded by a splat variable and another underscore 1160s does not register an offense for a named variable preceded by a names splat underscore variable 1160s registers an offense when the last variable of parallel assignment is an underscore 1160s does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain 1160s registers an offense for complex nested assignments with trailing underscores 1160s autocorrect 1160s with parentheses 1160s removes assignment part when every assignment is to `_` 1160s leaves parentheses but removes trailing underscores and commas 1160s removes assignment part when it is the only variable 1160s leaves parentheses but removes trailing underscores 1160s 1160s RuboCop::Cop::Style::TrailingBodyOnModule 1160s autocorrects with comment after body 1160s autocorrects when there are multiple semicolons 1160s registers offense with multi-line module 1160s registers an offense when body trails after module definition 1160s accepts regular module 1160s registers offense when module definition uses semicolon 1160s when module is not on first line of processed_source 1160s autocorrects offense 1160s 1160s RuboCop::Cop::Style::RedundantCondition 1160s when regular condition (if) 1160s accepts different when the condition does not match the branch 1160s accepts elsif 1160s when condition and if_branch are same 1160s does not register an offense when the branches are the same with different receivers 1161s does not register an offense when using assignment by hash key access 1161s registers an offense and corrects when `raise` without argument parentheses in `else` 1161s does not register offenses when the branches contains assignment but target not matched 1161s does not register offenses when using `nil?` and the branches contains method which has multiple arguments 1161s accepts an elsif branch 1161s does not register offenses when the branches contains hash key access 1161s registers an offense and corrects when using modifier if 1161s registers an offense and corrects when using operator method in `else` 1161s registers an offense and corrects when the branches contains method call with non-braced hash 1161s registers an offense and corrects when the else branch contains an irange 1161s registers an offense and corrects when the branches contains method call 1161s registers an offense and corrects when the branches contains parenthesized method call 1161s registers an offense and corrects 1161s registers an offense and corrects when the branches contains assignment method 1161s registers an offense and corrects when the branches contains assignment 1161s registers an offense and corrects when the branches contains arithmetic operation 1161s registers an offense and corrects multiline nodes 1161s registers an offense and correct when the branches are the same with the same receivers 1161s registers an offense and corrects complex one liners 1161s registers an offense and corrects when a method without argument parentheses in `else` 1161s accepts complex else branches 1161s registers an offense and corrects when defined inside method and the branches contains assignment 1161s does not register offenses when using `nil?` and the branches contains assignment 1161s accepts when using ternary if in `else` branch 1161s autocorrects when using `<<` method higher precedence than `||` operator 1161s registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch 1161s registers an offense and corrects when the branches contains method call with braced hash 1161s registers an offense and corrects modifier nodes offense 1161s when inverted condition (unless) 1161s registers no offense 1161s when condition and else branch are same 1161s accepts complex unless branches 1161s registers an offense 1161s ternary expression (?:) 1161s accepts expressions when the condition and if branch do not match 1161s when condition and if_branch are same 1161s registers an offense and corrects class vars 1161s registers an offense and corrects when the else branch contains `and` 1161s registers an offense and corrects when the else branch contains `rescue` 1161s registers an offense and corrects when the else branch contains an irange 1161s registers an offense and corrects with ternary expression and the branches contains chained parenthesized method call 1161s registers an offense and corrects when the else branch contains an erange 1161s registers an offense and corrects functions 1161s registers an offense and corrects with ternary expression and the branches contains parenthesized method call 1161s registers an offense and corrects brackets accesses 1161s registers an offense and corrects nested vars 1161s registers an offense and corrects 1161s 1161s RuboCop::Cop::InternalAffairs::RedundantLetRuboCopConfigNew 1161s registers an offense when using `let(:config)` and `:config` is already specified in `describe` 1161s does not register an offense when using `let(:config)` with arguments to `RuboCop::Config.new` 1161s registers an offense when using `let(:config)` with no argument `RuboCop::Config.new` and `:config` is specified 1161s registers an offense when using `let(:config)` and `:config` is not specified in `describe` 1161s 1161s RuboCop::Cop::Security::JSONLoad 1161s registers an offense and corrects JSON.load 1161s does not register an offense for JSON under another namespace 1161s registers an offense and corrects JSON.restore 1161s allows JSON.parse 1161s allows JSON.dump 1161s 1161s RuboCop::Cop::VariableForce 1161s #process_node 1161s when processing a regexp with a line break at the start of capture parenthesis 1161s does not raise an error 1161s when processing an empty regex 1161s does not raise an error 1161s when processing lvar node 1161s when the variable is not yet declared 1161s does not raise error 1161s when processing a regex with regopt 1161s does not raise an error 1161s 1161s RuboCop::Cop::Style::SymbolProc 1161s registers an offense when receiver is some value and using `select` with a block 1162s registers an offense when receiver is an array literal and using `reject` with a block 1162s accepts proc with 1 argument 1162s registers an offense for a block when method in body is unary -/+ 1162s accepts a block with an unused argument with an method call 1162s registers an offense when receiver is an array literal and using `select` with a block 1162s does not register an offense when receiver is a array literal and using `min` with a block 1162s registers an offense for a block with parameterless method call on param 1162s accepts block with no arguments 1162s accepts block with more than 1 expression in body 1162s accepts Proc.new with 1 argument 1162s registers an offense when receiver is a hash literal and using `min` with a block 1162s registers an offense when receiver is some value and using `reject` with a block 1162s accepts block with more than 1 arguments 1162s registers an offense for safe navigation operator 1162s accepts a block with an unused argument with an lvar 1162s accepts empty block body 1162s autocorrects correctly when there are no arguments in parentheses 1162s does not crash with a bare method call 1162s autocorrects multiple aliases with symbols as proc 1162s accepts ::Proc.new with 1 argument 1162s accepts block with a block argument 1162s accepts block with adding a comma after the sole argument 1162s does not register an offense when receiver is a hash literal and using `reject` with a block 1162s accepts block with splat params 1162s does not register an offense when receiver is a hash literal and using `select` with a block 1162s does not register an offense when receiver is a array literal and using `max` with a block 1162s accepts lambda with 1 argument 1162s registers an offense when receiver is a hash literal and using `max` with a block 1162s accepts block when method in body is not called on block arg 1162s autocorrects correctly when args have a trailing comma 1162s numblocks 1162s registers an offense when receiver is an array literal and using `select` with a numblock 1162s does not register an offense when receiver is a hash literal and using `select` with a numblock 1162s registers an offense when receiver is an hash literal and using `max` with a numblock 1162s accepts proc with 1 numbered parameter 1162s registers an offense for a block with a numbered parameter 1162s registers an offense when receiver is an hash literal and using `min` with a numblock 1162s accepts block with only second numbered parameter 1162s does not register an offense when receiver is a array literal and using `min` with a numblock 1162s does not register an offense when receiver is a array literal and using `max` with a numblock 1162s accepts lambda with 1 numbered parameter 1162s does not register an offense when receiver is a hash literal and using `reject` with a numblock 1162s accepts block with multiple numbered parameters 1162s accepts ::Proc.new with 1 numbered parameter 1162s registers an offense when receiver is an array literal and using `reject` with a numblock 1162s registers an offense when receiver is some value and using `reject` with a numblock 1162s accepts Proc.new with 1 numbered parameter 1162s registers an offense when receiver is some value and using `select` with a numblock 1162s when `AllowMethodsWithArguments: true` 1162s when method has no arguments 1162s registers an offense 1162s when method has arguments 1162s does not register an offense 1162s when `super` has arguments 1162s does not register an offense 1162s when `AllowMethodsWithArguments: false` 1162s when method has arguments 1162s registers an offense 1162s when `super` has arguments 1162s registers an offense 1162s when AllowedPatterns is enabled 1162s accepts ignored method 1162s when the method has arguments 1163s registers an offense 1163s AllowComments: true 1163s accepts block with parameterless method call on param and contains a comment 1163s registers an offense for a block with parameterless method call on paramand not contains a comment 1163s when AllowedMethods is enabled 1163s accepts ignored method 1163s when `super` has no arguments 1163s registers an offense 1163s 1163s RuboCop::Cop::InternalAffairs::NumblockHandler 1163s does not register an offense for cops with on_numblock alias 1163s does not register an offense for cops with on_numblock alias_method 1163s does not register an offense for cops with on_numblock method 1163s registers an offense for cops with forgotten numblock handlers 1163s 1163s RuboCop::Formatter::JUnitFormatter 1163s #file_finished 1163s displays a non-offense element in parsable text 1163s displays an offense for `classname='test_2` in parsable text 1164s displays start of parsable text 1164s displays end of parsable text 1164s displays an offense for `classname='test_1` in parsable text 1164s 1164s RuboCop::Cop::Style::YodaCondition 1164s enforce yoda 1164s registers an offense for number on right 1164s accepts string literal on left 1165s accepts accessor and variable on right in boolean expression 1165s accepts method call on receiver on right 1165s registers an offense for number on right of comparison 1165s registers an offense for boolean literal on right 1165s accepts instance variable on right 1165s accepts negation 1165s registers an offense for string literal on right 1165s accepts assignment 1165s accepts variable on right after assignment 1165s registers an offense for nil on right 1165s accepts global variable on right 1165s accepts arrays of numbers on both sides 1165s accepts safe navigation on right 1165s accepts class variable on right 1165s accepts number on left of <=> 1165s accepts subtraction on right of comparison 1165s accepts numbers on both sides 1165s accepts string literal on right of case equality check 1165s with EnforcedStyle: require_for_equality_operators_only 1165s registers an offense for equality check 1165s registers an offense for negated equality check 1165s accepts nil on right of comparison 1165s accepts mixed order in comparisons 1165s accepts number on right of comparison 1165s within an if or ternary statement 1165s registers an offense for number on right of <= in ternary condition 1165s registers an offense for number on right in modifier if 1165s registers an offense number on right of comparison in if condition 1165s registers an offense number on right in if condition 1165s registers an offense for number on right of >= in ternary condition 1165s registers an offense for nil on right in ternary condition 1165s enforce not yoda 1165s accepts safe navigation on left 1165s accepts global variable on left 1165s accepts instance variable on left 1165s accepts method call on receiver on left 1165s registers an offense for boolean literal on left 1165s accepts __FILE__ on left in program name check 1165s accepts negation 1165s accepts string literal on right 1165s accepts __FILE__ on left in negated program name check 1165s accepts assignment 1165s accepts number on both sides 1165s accepts number on left of <=> 1165s accepts class variable on left 1165s accepts variable on left after assign 1165s accepts interpolated string on left 1165s registers an offense number on left 1165s accepts interpolated regex on left 1165s accepts array of numbers on both sides 1165s registers an offense for nil on left 1166s accepts string literal on left of case equality check 1166s registers an offense number on left of comparison 1166s registers an offense for string literal on left 1166s accepts subtraction expression on left of comparison 1166s accepts accessor and variable on left in boolean expression 1166s within an if or ternary statement 1166s registers an offense for number on left in if condition 1166s registers an offense for number on left in modifier if 1166s registers an offense for nil on left in ternary condition 1166s registers an offense for number on left of <= in ternary condition 1166s registers an offense for number on left of comparison in if condition 1166s registers an offense for number on left of >= in ternary condition 1166s with EnforcedStyle: forbid_for_equality_operators_only 1166s accepts number on left of comparison 1166s accepts mixed order in comparisons 1166s registers an offense for negated equality check 1166s accepts nil on left of comparison 1166s registers an offense for equality check 1166s 1166s RuboCop::Cop::Metrics::BlockNesting 1166s accepts if/elsif 1166s accepts `Max` levels of nesting 1166s `Max + 2` levels of `if` nesting 1166s registers an offense 1166s nested `while` 1166s registers an offense 1166s nested `until` 1167s registers an offense 1167s when CountBlocks is true 1167s nested inline block 1167s registers an offense 1167s nested multiline block 1167s registers an offense 1167s nested `rescue` 1167s registers an offense 1167s `Max + 1` levels of `if` nesting 1167s registers an offense 1167s nested modifier `until` 1167s registers an offense 1167s Multiple nested `ifs` at same level 1167s registers 2 offenses 1167s nested `for` 1167s registers an offense 1167s when CountBlocks is false 1167s accepts nested inline blocks 1167s accepts nested multiline blocks 1167s nested `case` 1167s registers an offense 1167s nested modifier `while` 1167s registers an offense 1167s 1167s RuboCop::Cop::InternalAffairs::UselessMessageAssertion 1167s registers an offense for described_class::MSG in let 1167s registers an offense for specs that assert using the MSG 1167s registers an offense for specs that expect offense using the MSG 1167s does not register an offense for an assertion about the message 1167s 1167s RuboCop::Cop::Bundler::InsecureProtocolSource 1167s registers an offense when using `source :gemcutter` 1167s does not register an offense when using `source 'https://rubygems.org'` 1167s registers an offense when using `source :rubygems` 1167s registers an offense when using `source :rubyforge` 1167s when `AllowHttpProtocol: true` 1167s does not register an offense when using `source 'http://rubygems.org'` 1167s when `AllowHttpProtocol: false` 1167s registers an offense when using `source 'http://rubygems.org'` 1167s 1167s RuboCop::Cop::Style::MinMax 1167s with an array literal containing calls to `#min` and `#max` 1167s when the expression stands alone 1167s does not register an offense if the receivers do not match 1167s does not register an offense if there are additional elements 1167s does not register an offense if the receiver is implicit 1167s registers an offense if the receivers match 1167s when the expression is used in a parallel assignment 1167s registers an offense if the receivers match 1167s does not register an offense if the receivers do not match 1167s does not register an offense if the receiver is implicit 1168s does not register an offense if there are additional elements 1168s when the expression is used as a return value 1168s does not register an offense if the receivers do not match 1168s registers an offense if the receivers match 1168s does not register an offense if the receiver is implicit 1168s does not register an offense if there are additional elements 1168s 1168s RuboCop::Cop::Style::PercentLiteralDelimiters 1168s `%I` interpolated symbol array 1168s does not register an offense for preferred delimiters 1168s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1168s registers an offense for other delimiters 1168s `%i` symbol array 1168s registers an offense for other delimiters 1168s does not register an offense for non-preferred delimiters enclosing escaped delimiters 1168s does not register an offense for preferred delimiters 1168s `%x` interpolated system call 1168s does not register an offense for other delimiters when containing preferred delimiter characters 1168s registers an offense for other delimiters 1168s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1169s does not register an offense for preferred delimiters 1169s `%w` string array 1169s does not register an offense for preferred delimiters with not a pairing delimiter 1169s does not register an offense for preferred delimiters with only a closing delimiter 1169s does not register an offense for preferred delimiters 1169s registers an offense for other delimiters 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s does not register an offense for preferred delimiters with a pairing delimiters 1169s `default` override 1169s allows individual preferred delimiters to override `default` 1169s allows all preferred delimiters to be set with one key 1169s `%s` symbol 1169s registers an offense for other delimiters 1169s does not register an offense for preferred delimiters 1169s `%` interpolated string 1169s registers an offense for a string with no content 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s registers an offense for other delimiters 1169s registers an offense when the source contains invalid characters 1169s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1169s does not register an offense for preferred delimiters 1169s `%W` interpolated string array 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s does not register an offense for preferred delimiters 1169s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1169s registers an offense for other delimiters 1169s autocorrect 1169s preserves indentation when correcting a multiline array 1169s fixes a string array in a scope 1169s preserves irregular indentation when correcting a multiline array 1169s preserves line breaks when fixing a multiline array 1169s behaves like escape characters 1169s corrects %i with \t in it 1169s corrects %i with \n in it 1169s behaves like escape characters 1169s corrects %w with \t in it 1169s corrects %w with \n in it 1169s behaves like escape characters 1169s corrects %x with \t in it 1169s corrects %x with \n in it 1169s behaves like escape characters 1169s corrects %Q with \t in it 1169s corrects %Q with \n in it 1169s behaves like escape characters 1169s corrects %W with \n in it 1169s corrects %W with \t in it 1169s behaves like escape characters 1169s corrects % with \n in it 1169s corrects % with \t in it 1169s behaves like escape characters 1169s corrects %q with \n in it 1169s corrects %q with \t in it 1169s behaves like escape characters 1169s corrects %r with \n in it 1169s corrects %r with \t in it 1169s behaves like escape characters 1169s corrects %s with \t in it 1169s corrects %s with \n in it 1169s `%q` string 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s registers an offense for other delimiters 1169s does not register an offense for preferred delimiters 1169s invalid cop config 1169s raises an error when invalid configuration is specified 1169s `%r` interpolated regular expression 1169s does not register an offense for preferred delimiters 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s registers an offense for other delimiters 1169s registers an offense for a regular expression with option 1169s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1169s `%Q` interpolated string 1169s does not register an offense for preferred delimiters 1169s registers an offense for other delimiters 1169s does not register an offense for other delimiters when containing preferred delimiter characters 1169s registers an offense for other delimiters when containing preferred delimiter characters in interpolation 1169s 1169s RuboCop::Cop::Style::RedundantSort 1169s registers an offense when last is called on sort_by no block 1169s registers an offense when slice(0) is called on sort_by 1169s registers an offense when [](0) is called on sort 1169s does not register an offense when sort has an argument 1169s registers an offense when first is called on sort_by with line breaks 1170s does not register an offense when first is used before sort 1170s registers an offense when [0] is called on sort_by 1170s registers an offense when [-1] is called on sort 1170s registers an offense when [](-1) is called on sort_by 1170s registers an offense when at(-1) is called with sort 1170s does not register an offense when sort_by is used without first 1170s does not register an offense when sort_by is not given a block 1170s registers an offense when slice(-1) is called on sort_by 1170s registers an offense when first is called on sort_by no block 1170s registers an offense when last is called with sort 1170s registers an offense when [0] is called on sort 1170s registers an offense when first is called on sort_by with line breaks and `and` operator 1170s registers an offense when first is called on sort_by with line breaks and `||` operator 1170s does not register an offense when first has an argument 1170s registers an offense when [-1] is called on sort_by 1170s does not register an offense for sort_by!(&:something).last 1170s does not register an offense for sort!.first 1170s registers an offense when first is called on sort_by 1170s registers an offense when at(0) is called on sort_by 1170s registers an offense when first is called on sort_by with line breaks and `&&` operator 1170s registers an offense when slice(0) is called on sort 1170s registers an offense with `sort_by { a || b }` 1170s registers an offense when first is called with sort 1171s registers an offense when first is called on sort_by with line breaks and `or` operator 1171s does not register an offense when first is used without sort_by 1171s registers an offense when last is called on sort_by 1171s registers an offense when last is called on sort with comparator 1171s when not taking first or last element 1171s does not register an offense when at(-2) is called on sort_by 1171s does not register an offense when [1] is called on sort 1171s does not register an offense when [-1] is called on sort with an argument 1171s >= Ruby 2.7 1171s when using numbered parameter 1171s registers an offense and corrects when at(0) is called on sort_by 1171s registers an offense and corrects when last is called on sort with comparator 1171s registers an offense and corrects when first is called on sort_by 1171s 1171s RuboCop::Cop::Layout::MultilineBlockLayout 1171s doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine 1171s does not remove a trailing comma when only one argument is present 1171s registers an offense and corrects for missing newline before opening parenthesis `(` for block body 1171s registers an offense and corrects a line break within destructured arguments 1171s registers an offense and corrects for missing newline in do/end block with params 1171s registers an offense for missing newline in do/end block w/o params 1171s registers offenses and corrects for lambdas 1171s does not register an offense for one-line do/end blocks 1171s autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block 1171s does not register offenses when there are too many parameters to fit on one line 1171s registers an offense and corrects line-break within arguments 1171s registers an offense and corrects line-break before arguments 1171s registers offenses when there are not too many parameters to fit on one line 1171s does not register offenses when there is a newline for {} block 1171s does not register offenses when there is a newline for do/end block 1171s registers an offense and corrects for missing newline in {} block with params 1171s does not register an offense for one-line {} blocks 1171s autocorrects nested parens correctly 1171s registers offenses and corrects for new lambda literal syntax 1171s registers an offense and corrects line-break before arguments with empty block 1171s registers an offense and corrects for missing newline in {} block w/o params 1171s registers an offense and corrects a line-break within arguments 1171s registers an offense and corrects a do/end block with a mult-line body 1171s does not error out when the block is empty 1171s considers the extra space required to join the lines together 1171s Ruby 2.7 1171s registers an offense and corrects for missing newline in do/end block with params 1171s registers an offense and corrects for missing newline in {} block w/o params 1171s 1171s RuboCop::Cop::Style::EachWithObject 1171s finds inject and reduce with passed in and returned hash 1171s correctly autocorrects 1171s ignores inject and reduce with passed in, but not returned hash 1171s correctly autocorrects with return value only 1171s ignores inject and reduce with empty body 1171s ignores inject and reduce passed in symbol 1171s ignores inject and reduce with condition as body 1171s does not blow up for reduce with no arguments 1171s ignores inject/reduce with assignment to accumulator param in block 1171s Ruby 2.7 1171s finds inject and reduce with passed in and returned hash and numblock 1171s when a simple literal is passed as initial value 1171s ignores inject/reduce 1171s 1171s RuboCop::Cop::Lint::ShadowedException 1171s modifier rescue 1171s accepts rescue in its modifier form 1171s multiple rescues 1171s accepts rescuing exceptions in order of level with multiple exceptions in a group 1171s ignores expressions of non-const 1171s registers an offense when a higher level exception is rescued before a lower level exception 1172s registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group 1172s registers an offense rescuing out of order exceptions when there is an ensure 1172s accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions 1172s accepts rescuing custom exceptions in multiple rescue groups 1172s registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue 1172s accepts rescuing a known exception between unknown exceptions 1172s accepts rescuing a known exception before an unknown exceptions 1172s accepts many (>= 7) rescue groups 1172s accepts rescuing a known exception after an unknown exceptions 1172s registers an offense rescuing Exception before an unknown exceptions 1172s accepts rescuing exceptions in order of level 1172s exceptions from different ancestry chains 1172s accepts rescuing exceptions in one order 1172s accepts rescuing exceptions in another order 1172s last rescue does not specify exception class 1172s highlights range ending at rescue keyword 1172s splat arguments 1172s accepts splat arguments passed to multiple rescues 1172s does not register an offense for splat arguments rescued after rescuing a known exception 1172s registers an offense for splat arguments rescued after rescuing Exception 1172s single rescue 1172s accepts rescuing a single exception 1172s accepts an empty rescue 1172s accepts rescuing a multiple exceptions that are not ancestors that have an else 1172s rescue a exception without causing constant name deprecation warning 1172s registers an offense rescuing Exception with any other error or exception 1172s accepts rescue containing multiple same error code exceptions 1172s accepts rescuing a single exception that has an else 1172s accepts rescuing a single exception that is assigned to a variable 1173s accepts rescuing a single custom exception 1173s accepts rescuing a custom exception and a standard exception 1173s accepts rescuing a single exception that has an ensure 1173s registers an offense for the same exception multiple times 1173s accepts rescuing multiple custom exceptions 1173s accepts splat arguments passed to rescue 1173s registers an offense rescuing exceptions that are ancestors of each other 1173s when there are multiple levels of exceptions in the same rescue 1173s registers an offense for two exceptions 1173s registers an offense for more than two exceptions 1173s 1173s RuboCop::Cop::Lint::EmptyFile 1173s does not register an offense when the file contains comments 1173s registers an offense when the file is empty 1173s does not register an offense when the file contains code 1173s when AllowComments is false 1173s registers an offense when the file contains comments 1173s 1173s RuboCop::Cop::Lint::DuplicateElsifCondition 1173s registers an offense for repeated elsif conditions 1173s does not register an offense for partially repeated elsif conditions 1173s registers an offense for subsequent repeated elsif conditions 1173s registers multiple offenses for multiple repeated elsif conditions 1173s does not register an offense for non-repeated elsif conditions 1173s 1173s RuboCop::Cop::Style::StderrPuts 1173s registers no offense when using `STDERR.puts` with no arguments 1173s registers no offense when using `$stderr.puts` with no arguments 1173s registers an offense when using `STDERR.puts('hello')` 1173s registers an offense when using `$stderr.puts('hello')` 1173s registers an offense when using `::STDERR.puts('hello')` 1173s 1173s RuboCop::Cop::Layout::LineEndStringConcatenationIndentation 1173s when EnforcedStyle is aligned 1173s accepts a multiline string literal 1173s accepts indented strings in implicit return statement of a method definition after other statement 1173s accepts a heredoc string ... 1173s accepts indented strings in implicit return statement of a block 1173s registers an offense for unaligned strings in hash literal values 1173s accepts indented strings in implicit return statement of a method definition 1173s registers an offense for aligned strings in an if/elsif/else statement 1173s accepts single line string literal concatenation 1173s accepts string literal with line break concatenated with other string 1173s registers an offense for indented string 1173s accepts indented strings in implicit return statement of a singleton method definition 1173s accepts an empty heredoc string with interpolation 1173s registers an offense for third part of a string if it is aligned only with the first 1173s accepts aligned strings in method call 1173s accepts indented strings in ordinary statement 1173s accepts a heredoc string with interpolation 1173s for assignment with x = 1173s registers an offense for indented strings 1173s accepts aligned strings 1173s for assignment with x += 1173s registers an offense for indented strings 1173s accepts aligned strings 1173s for assignment with X = 1173s accepts aligned strings 1173s registers an offense for indented strings 1173s for assignment with x ||= 1173s accepts aligned strings 1173s registers an offense for indented strings 1173s for assignment with @x = 1173s accepts aligned strings 1173s registers an offense for indented strings 1173s for assignment with $x = 1173s registers an offense for indented strings 1173s accepts aligned strings 1173s when EnforcedStyle is indented 1173s accepts a heredoc string with interpolation 1173s accepts indented strings in implicit return statement of a block 1173s registers an offense for unaligned third part of string 1173s accepts a multiline string literal 1173s registers an offense for aligned strings in hash literal values 1173s registers an offense for aligned string 1173s accepts a heredoc string ... 1173s accepts indented strings in ordinary statement 1173s registers an offense for aligned strings in an if/elsif/else statement 1173s accepts indented strings in implicit return statement of a method definition 1173s accepts string literal with line break concatenated with other string 1174s accepts indented strings in implicit return statement of a singleton method definition 1174s accepts an empty heredoc string with interpolation 1174s accepts single line string literal concatenation 1174s accepts indented strings 1174s accepts indented strings in implicit return statement of a method definition after other statement 1174s for assignment with x ||= 1174s registers an offense for aligned strings 1174s accepts indented strings 1174s for assignment with x = 1174s registers an offense for aligned strings 1174s accepts indented strings 1174s when IndentationWidth is 1 1174s accepts indented strings 1174s for assignment with @x = 1174s registers an offense for aligned strings 1174s accepts indented strings 1174s for assignment with x += 1174s accepts indented strings 1174s registers an offense for aligned strings 1174s for assignment with $x = 1174s accepts indented strings 1174s registers an offense for aligned strings 1174s for assignment with X = 1174s accepts indented strings 1174s registers an offense for aligned strings 1174s 1174s RuboCop::Cop::Layout::CaseIndentation 1174s when `when` is on the same line as `case` 1174s registers an offense but does not autocorrect 1174s with EnforcedStyle: end 1174s with IndentOneStep: false 1174s `case` ... `when` 1174s with everything on a single line 1174s does not register an offense 1174s `when` and `end` same line 1174s does not register an offense 1174s `else` and `end` same line 1174s does not register an offense 1174s regarding assignment where the right hand side is a `case` 1174s accepts a correctly indented assignment 1174s registers an offense and corrects an assignment indented some other way 1174s `case` ... `in` 1174s with everything on a single line 1174s does not register an offense 1174s regarding assignment where the right hand side is a `case` 1174s registers an offense and corrects an assignment indented some other way 1174s accepts a correctly indented assignment 1174s `in` and `end` same line 1174s does not register an offense 1174s with IndentOneStep: true 1174s `case` ... `in` 1174s with everything on a single line 1174s does not register an offense 1174s regarding assignment where the right hand side is a `case` 1174s registers an offense and corrects an assignment indented some other way 1174s accepts a correctly indented assignment 1174s registers an offense and corrects an assignment indented as `case` 1174s `case` ... `when` 1174s with everything on a single line 1174s does not register an offense 1174s regarding assignment where the right hand side is a `case` 1174s registers an offense and corrects an assignment indented as `case` 1174s accepts a correctly indented assignment 1174s registers an offense and corrects an assignment indented some other way 1174s with EnforcedStyle: case 1174s with IndentOneStep: true 1174s `case` ... `when` 1174s accepts a `when` clause that's 2 spaces deeper than `case` 1174s registers an offense and corrects a `when` clause that is equally indented with `case` 1174s when indentation width is overridden for this cop only 1175s respects cop-specific IndentationWidth 1175s regarding assignment where the right hand side is a `case` 1175s accepts a correctly indented assignment 1175s registers an offense and corrects an assignment indented some other way 1175s with everything on a single line 1175s does not register an offense 1175s `case` ... `in` 1175s accepts an `in` clause that's 2 spaces deeper than `case` 1175s registers an offense and corrects an `in` clause that is equally indented with `case` 1175s when indentation width is overridden for this cop only 1175s respects cop-specific IndentationWidth 1175s regarding assignment where the right hand side is a `case` 1175s registers an offense and corrects an assignment indented some other way 1175s accepts a correctly indented assignment 1175s with everything on a single line 1175s does not register an offense 1175s with IndentOneStep: false 1175s `case` ... `when` 1175s doesn't get confused by symbols named `case` or `when` 1175s doesn't get confused by strings with `case` in them 1175s accepts a `when` clause that's equally indented with `case` 1175s accepts correctly indented whens in complex combinations 1175s registers an offense and corrects a `when` clause that is indented deeper than `case` 1175s regarding assignment where the right hand side is a `case` 1175s accepts a correctly indented assignment 1175s registers an offense and corrects assignment indented some other way 1175s registers an offense and corrects correct + opposite style 1175s registers an offense and corrects assignment indented as end 1175s with everything on a single line 1175s does not register an offense 1175s `case` ... `in` 1175s accepts correctly indented whens in complex combinations 1175s accepts an `in` clause that's equally indented with `case` 1175s doesn't get confused by strings with `case` in them 1175s registers an offense and corrects an `in` clause that is indented deeper than `case` 1175s doesn't get confused by symbols named `case` or `in` 1175s regarding assignment where the right hand side is a `case` 1175s registers an offense and corrects assignment indented as `end` 1175s accepts a correctly indented assignment 1175s registers an offense and corrects correct + opposite style 1175s registers an offense and corrects assignment indented some other way 1175s with everything on a single line 1175s does not register an offense 1175s 1175s RuboCop::Cop::Layout::HeredocIndentation 1175s quoted by 1175s registers an offense for too deep indented with empty line 1176s registers an offense for not indented enough with empty line 1176s displays message to use `<<~` instead of `<<-` 1176s accepts for indented, with `~` 1176s registers an offense for first line minus-level indented, with `-` 1176s registers an offense for too deep indented with whitespace line 1176s displays message to use `<<~` instead of `<<` 1176s registers an offense for minus level indented 1176s registers an offense for too deep indented 1176s does not register an offense when not indented but with whitespace, with `-` 1176s accepts for not indented but with whitespace 1176s registers an offense for not indented, with `~` 1176s accepts for indented, but without `~` 1176s accepts for an empty line 1176s registers an offense for not indented, without `~` 1176s accepts for include empty lines 1176s accepts for indented, but with `-` 1176s registers an offense for not indented enough with whitespace line 1176s registers an offense for not indented 1176s when Layout/LineLength is configured 1176s accepts for long heredoc 1176s quoted by " 1176s accepts for an empty line 1176s accepts for not indented but with whitespace 1176s accepts for indented, but without `~` 1176s displays message to use `<<~` instead of `<<-` 1176s registers an offense for too deep indented with empty line 1176s registers an offense for not indented, without `~` 1176s registers an offense for too deep indented 1176s registers an offense for first line minus-level indented, with `-` 1176s registers an offense for not indented 1176s registers an offense for minus level indented 1176s accepts for indented, but with `-` 1176s registers an offense for not indented enough with whitespace line 1176s registers an offense for not indented enough with empty line 1176s registers an offense for not indented, with `~` 1176s accepts for include empty lines 1176s displays message to use `<<~` instead of `<<` 1176s does not register an offense when not indented but with whitespace, with `-` 1176s registers an offense for too deep indented with whitespace line 1176s accepts for indented, with `~` 1176s when Layout/LineLength is configured 1176s accepts for long heredoc 1176s quoted by ` 1176s registers an offense for first line minus-level indented, with `-` 1176s does not register an offense when not indented but with whitespace, with `-` 1176s registers an offense for not indented enough with whitespace line 1177s accepts for not indented but with whitespace 1177s registers an offense for too deep indented with whitespace line 1177s accepts for indented, with `~` 1177s registers an offense for not indented enough with empty line 1177s accepts for an empty line 1177s displays message to use `<<~` instead of `<<` 1177s registers an offense for not indented, with `~` 1177s registers an offense for too deep indented with empty line 1177s accepts for indented, but with `-` 1177s accepts for include empty lines 1177s accepts for indented, but without `~` 1177s registers an offense for not indented, without `~` 1178s displays message to use `<<~` instead of `<<-` 1178s registers an offense for minus level indented 1178s registers an offense for not indented 1178s registers an offense for too deep indented 1178s when Layout/LineLength is configured 1178s accepts for long heredoc 1178s quoted by ' 1178s accepts for indented, but without `~` 1178s registers an offense for minus level indented 1178s displays message to use `<<~` instead of `<<` 1178s registers an offense for not indented, without `~` 1178s accepts for an empty line 1178s does not register an offense when not indented but with whitespace, with `-` 1178s registers an offense for first line minus-level indented, with `-` 1178s accepts for indented, but with `-` 1178s accepts for include empty lines 1178s registers an offense for too deep indented 1178s displays message to use `<<~` instead of `<<-` 1178s registers an offense for not indented, with `~` 1178s registers an offense for not indented enough with whitespace line 1178s registers an offense for not indented 1178s registers an offense for too deep indented with empty line 1178s registers an offense for not indented enough with empty line 1178s registers an offense for too deep indented with whitespace line 1178s accepts for indented, with `~` 1178s accepts for not indented but with whitespace 1178s when Layout/LineLength is configured 1178s accepts for long heredoc 1178s 1178s RuboCop::Cop::Style::ConditionalAssignment 1178s IncludeTernaryExpressions false 1178s allows assigning any variable type to ternary 1178s SingleLineConditionsOnly false 1178s corrects assignment to a multiline if else condition 1179s corrects assignment to an if elsif else with multiple elsifs 1179s corrects assignment to a case when else with multiple whens 1179s corrects assignment to a case when else condition 1179s corrects assignment to an unless else condition 1179s corrects assignment to a multiline if elsif else condition 1179s behaves like all assignment types 1179s registers an offense any assignment to case when 1179s allows any assignment to if without else 1179s does not crash when used inside rescue 1179s registers an offense for any assignment to unless else 1179s registers an offense any assignment to if else 1179s registers an offense for any assignment to ternary 1179s behaves like multiline all variable types offense 1179s assigning any variable type to a multiline if else 1179s assigning any variable type to an if else with multiline in one branch 1179s assigning any variable type to a multiline unless else 1179s assigning any variable type to a multiline case when 1179s assigning any variable type to a multiline if elsif else 1179s behaves like multiline all assignment types offense 1179s any assignment to a multiline if else 1179s any assignment to a multiline unless else 1179s any assignment to a multiline case when 1179s behaves like multiline all assignment types offense 1179s any assignment to a multiline unless else 1179s any assignment to a multiline if else 1179s any assignment to a multiline case when 1179s behaves like single line condition autocorrect 1179s corrects assignment to an if elsif else with multiple elsifs 1179s corrects assignment to an if elsif else condition 1179s corrects assignment to an unless else condition 1179s corrects assignment to a case when else condition 1179s corrects assignment to a case when else with multiple whens 1179s corrects assignment to a ternary operator 1179s corrects assignment to an if else condition 1179s behaves like multiline all variable types offense 1179s assigning any variable type to a multiline if else 1179s assigning any variable type to a multiline if elsif else 1179s assigning any variable type to a multiline case when 1179s assigning any variable type to a multiline unless else 1179s assigning any variable type to an if else with multiline in one branch 1179s behaves like multiline all assignment types offense 1179s any assignment to a multiline if else 1179s any assignment to a multiline case when 1179s any assignment to a multiline unless else 1179s behaves like all assignment types 1179s registers an offense any assignment to case when 1179s registers an offense for any assignment to ternary 1179s does not crash when used inside rescue 1179s registers an offense any assignment to if else 1179s allows any assignment to if without else 1179s registers an offense for any assignment to unless else 1179s behaves like all assignment types 1179s registers an offense any assignment to case when 1179s registers an offense for any assignment to unless else 1179s allows any assignment to if without else 1180s registers an offense for any assignment to ternary 1180s registers an offense any assignment to if else 1180s does not crash when used inside rescue 1180s behaves like all assignment types 1180s registers an offense for any assignment to ternary 1180s registers an offense for any assignment to unless else 1180s does not crash when used inside rescue 1180s registers an offense any assignment to case when 1180s registers an offense any assignment to if else 1180s allows any assignment to if without else 1180s behaves like multiline all variable types offense 1180s assigning any variable type to an if else with multiline in one branch 1180s assigning any variable type to a multiline if else 1180s assigning any variable type to a multiline case when 1180s assigning any variable type to a multiline unless else 1180s assigning any variable type to a multiline if elsif else 1180s behaves like all assignment types 1180s does not crash when used inside rescue 1180s registers an offense any assignment to case when 1180s registers an offense any assignment to if else 1180s registers an offense for any assignment to unless else 1180s allows any assignment to if without else 1180s registers an offense for any assignment to ternary 1180s behaves like multiline all assignment types offense 1180s any assignment to a multiline unless else 1180s any assignment to a multiline case when 1180s any assignment to a multiline if else 1180s behaves like multiline all assignment types offense 1180s any assignment to a multiline unless else 1180s any assignment to a multiline case when 1180s any assignment to a multiline if else 1180s behaves like all assignment types 1180s does not crash when used inside rescue 1180s registers an offense any assignment to if else 1180s registers an offense any assignment to case when 1180s allows any assignment to if without else 1180s registers an offense for any assignment to unless else 1180s registers an offense for any assignment to ternary 1180s behaves like multiline all assignment types offense 1180s any assignment to a multiline case when 1180s any assignment to a multiline unless else 1180s any assignment to a multiline if else 1180s behaves like multiline all assignment types offense 1180s any assignment to a multiline unless else 1180s any assignment to a multiline case when 1180s any assignment to a multiline if else 1180s behaves like multiline all variable types offense 1180s assigning any variable type to a multiline unless else 1180s assigning any variable type to an if else with multiline in one branch 1180s assigning any variable type to a multiline if elsif else 1181s assigning any variable type to a multiline case when 1181s assigning any variable type to a multiline if else 1181s behaves like multiline all assignment types offense 1181s any assignment to a multiline if else 1181s any assignment to a multiline case when 1181s any assignment to a multiline unless else 1181s behaves like all assignment types 1181s allows any assignment to if without else 1181s registers an offense any assignment to if else 1181s registers an offense for any assignment to ternary 1181s registers an offense for any assignment to unless else 1181s does not crash when used inside rescue 1181s registers an offense any assignment to case when 1181s behaves like multiline all variable types offense 1181s assigning any variable type to a multiline if elsif else 1181s assigning any variable type to a multiline unless else 1181s assigning any variable type to a multiline case when 1181s assigning any variable type to a multiline if else 1181s assigning any variable type to an if else with multiline in one branch 1181s behaves like all variable types 1181s allows assignment to if without else 1181s registers an offense assigning any variable type to ternary 1181s registers an offense for assigning any variable type to case when 1181s registers an offense assigning any variable type to unless else 1181s registers an offense assigning any variable type to if elsewith multiple assignment 1181s registers an offense assigning any variable type to if elsif else 1181s registers an offense assigning any variable type to if else 1182s does not crash for rescue assignment 1182s >= Ruby 2.7 1182s registers an offense for assigning any variable type to case in 1182s behaves like all assignment types 1182s allows any assignment to if without else 1182s registers an offense for any assignment to unless else 1182s does not crash when used inside rescue 1182s registers an offense any assignment to if else 1182s registers an offense for any assignment to ternary 1182s registers an offense any assignment to case when 1182s behaves like multiline all assignment types offense 1182s any assignment to a multiline if else 1182s any assignment to a multiline unless else 1182s any assignment to a multiline case when 1182s behaves like multiline all variable types offense 1182s assigning any variable type to a multiline if else 1182s assigning any variable type to a multiline unless else 1182s assigning any variable type to an if else with multiline in one branch 1182s assigning any variable type to a multiline case when 1182s assigning any variable type to a multiline if elsif else 1182s behaves like all variable types 1182s registers an offense assigning any variable type to ternary 1182s does not crash for rescue assignment 1182s registers an offense for assigning any variable type to case when 1182s registers an offense assigning any variable type to if elsewith multiple assignment 1182s registers an offense assigning any variable type to if elsif else 1182s registers an offense assigning any variable type to unless else 1182s registers an offense assigning any variable type to if else 1182s allows assignment to if without else 1182s >= Ruby 2.7 1182s registers an offense for assigning any variable type to case in 1182s behaves like all variable types 1182s registers an offense assigning any variable type to ternary 1182s registers an offense assigning any variable type to if else 1183s registers an offense assigning any variable type to if elsif else 1183s allows assignment to if without else 1183s registers an offense assigning any variable type to unless else 1183s registers an offense for assigning any variable type to case when 1183s registers an offense assigning any variable type to if elsewith multiple assignment 1183s does not crash for rescue assignment 1183s >= Ruby 2.7 1183s registers an offense for assigning any variable type to case in 1183s behaves like multiline all assignment types offense 1183s any assignment to a multiline unless else 1183s any assignment to a multiline if else 1183s any assignment to a multiline case when 1183s behaves like all assignment types 1183s registers an offense for any assignment to unless else 1183s registers an offense for any assignment to ternary 1183s allows any assignment to if without else 1183s registers an offense any assignment to if else 1183s does not crash when used inside rescue 1183s registers an offense any assignment to case when 1183s behaves like multiline all assignment types offense 1183s any assignment to a multiline if else 1183s any assignment to a multiline unless else 1183s any assignment to a multiline case when 1183s behaves like all variable types 1183s registers an offense for assigning any variable type to case when 1183s does not crash for rescue assignment 1183s registers an offense assigning any variable type to unless else 1183s registers an offense assigning any variable type to if else 1183s registers an offense assigning any variable type to if elsif else 1183s allows assignment to if without else 1183s registers an offense assigning any variable type to ternary 1183s registers an offense assigning any variable type to if elsewith multiple assignment 1183s >= Ruby 2.7 1183s registers an offense for assigning any variable type to case in 1183s behaves like multiline all assignment types offense 1183s any assignment to a multiline case when 1183s any assignment to a multiline unless else 1183s any assignment to a multiline if else 1183s behaves like multiline all assignment types offense 1183s any assignment to a multiline if else 1184s any assignment to a multiline unless else 1184s any assignment to a multiline case when 1184s behaves like multiline all assignment types offense 1184s any assignment to a multiline case when 1184s any assignment to a multiline if else 1184s any assignment to a multiline unless else 1184s behaves like all assignment types 1184s does not crash when used inside rescue 1184s registers an offense any assignment to case when 1184s registers an offense for any assignment to unless else 1184s registers an offense any assignment to if else 1184s allows any assignment to if without else 1184s registers an offense for any assignment to ternary 1184s behaves like all assignment types 1184s does not crash when used inside rescue 1184s registers an offense any assignment to case when 1184s registers an offense any assignment to if else 1184s registers an offense for any assignment to unless else 1184s registers an offense for any assignment to ternary 1184s allows any assignment to if without else 1184s behaves like multiline all variable types offense 1184s assigning any variable type to a multiline unless else 1184s assigning any variable type to an if else with multiline in one branch 1184s assigning any variable type to a multiline if else 1184s assigning any variable type to a multiline case when 1185s assigning any variable type to a multiline if elsif else 1185s behaves like multiline all assignment types offense 1185s any assignment to a multiline unless else 1185s any assignment to a multiline if else 1185s any assignment to a multiline case when 1185s behaves like all assignment types 1185s registers an offense any assignment to if else 1185s registers an offense for any assignment to unless else 1185s does not crash when used inside rescue 1185s allows any assignment to if without else 1185s registers an offense for any assignment to ternary 1185s registers an offense any assignment to case when 1185s behaves like all assignment types 1185s does not crash when used inside rescue 1185s registers an offense for any assignment to unless else 1185s allows any assignment to if without else 1185s registers an offense any assignment to if else 1185s registers an offense any assignment to case when 1185s registers an offense for any assignment to ternary 1185s behaves like all assignment types 1185s does not crash when used inside rescue 1185s allows any assignment to if without else 1185s registers an offense for any assignment to ternary 1185s registers an offense any assignment to case when 1185s registers an offense for any assignment to unless else 1185s registers an offense any assignment to if else 1185s behaves like all variable types 1185s registers an offense assigning any variable type to if elsewith multiple assignment 1185s does not crash for rescue assignment 1185s registers an offense assigning any variable type to ternary 1185s registers an offense assigning any variable type to unless else 1185s allows assignment to if without else 1185s registers an offense assigning any variable type to if elsif else 1185s registers an offense for assigning any variable type to case when 1185s registers an offense assigning any variable type to if else 1185s >= Ruby 2.7 1185s registers an offense for assigning any variable type to case in 1185s behaves like multiline all assignment types offense 1185s any assignment to a multiline unless else 1185s any assignment to a multiline if else 1185s any assignment to a multiline case when 1185s behaves like all variable types 1185s does not crash for rescue assignment 1185s registers an offense assigning any variable type to if elsewith multiple assignment 1185s registers an offense assigning any variable type to ternary 1185s registers an offense assigning any variable type to if else 1185s registers an offense assigning any variable type to if elsif else 1186s allows assignment to if without else 1186s registers an offense assigning any variable type to unless else 1186s registers an offense for assigning any variable type to case when 1186s >= Ruby 2.7 1186s registers an offense for assigning any variable type to case in 1186s behaves like multiline all assignment types offense 1186s any assignment to a multiline unless else 1186s any assignment to a multiline case when 1186s any assignment to a multiline if else 1186s behaves like all variable types 1186s allows assignment to if without else 1186s registers an offense assigning any variable type to ternary 1186s does not crash for rescue assignment 1186s registers an offense for assigning any variable type to case when 1186s registers an offense assigning any variable type to unless else 1186s registers an offense assigning any variable type to if elsewith multiple assignment 1186s registers an offense assigning any variable type to if elsif else 1186s registers an offense assigning any variable type to if else 1186s >= Ruby 2.7 1186s registers an offense for assigning any variable type to case in 1186s behaves like all assignment types 1186s registers an offense any assignment to case when 1186s registers an offense any assignment to if else 1186s does not crash when used inside rescue 1186s registers an offense for any assignment to unless else 1186s allows any assignment to if without else 1186s registers an offense for any assignment to ternary 1186s behaves like all assignment types 1186s allows any assignment to if without else 1186s registers an offense for any assignment to ternary 1186s registers an offense any assignment to case when 1186s registers an offense any assignment to if else 1186s registers an offense for any assignment to unless else 1186s does not crash when used inside rescue 1186s behaves like multiline all assignment types offense 1186s any assignment to a multiline if else 1186s any assignment to a multiline case when 1186s any assignment to a multiline unless else 1186s behaves like multiline all assignment types offense 1186s any assignment to a multiline if else 1186s any assignment to a multiline case when 1186s any assignment to a multiline unless else 1186s behaves like all assignment types 1186s allows any assignment to if without else 1186s registers an offense any assignment to if else 1186s does not crash when used inside rescue 1186s registers an offense any assignment to case when 1186s registers an offense for any assignment to unless else 1186s registers an offense for any assignment to ternary 1186s behaves like all assignment types 1186s registers an offense for any assignment to unless else 1186s registers an offense any assignment to if else 1187s does not crash when used inside rescue 1187s registers an offense for any assignment to ternary 1187s allows any assignment to if without else 1187s registers an offense any assignment to case when 1187s behaves like all assignment types 1187s registers an offense any assignment to case when 1187s allows any assignment to if without else 1187s registers an offense for any assignment to ternary 1187s registers an offense any assignment to if else 1187s registers an offense for any assignment to unless else 1187s does not crash when used inside rescue 1187s SingleLineConditionsOnly true 1187s corrects assignment to a namespaced constant 1187s allows a method call in the subject of a ternary operator 1187s registers an offense for assignment using []= 1187s registers an offense for assignment to case when then else 1187s registers an offense for assignment to an if then else 1187s registers an offense for assignment using a method that ends with an equal sign 1187s corrects assignment when without `else` branch 1187s behaves like multiline all assignment types allow 1187s any assignment to a multiline unless else 1187s any assignment to a multiline if else 1187s any assignment to a multiline case when 1187s behaves like all assignment types 1187s registers an offense for any assignment to ternary 1187s registers an offense any assignment to if else 1187s registers an offense for any assignment to unless else 1187s registers an offense any assignment to case when 1187s allows any assignment to if without else 1187s does not crash when used inside rescue 1187s behaves like multiline all assignment types allow 1187s any assignment to a multiline if else 1187s any assignment to a multiline case when 1187s any assignment to a multiline unless else 1187s behaves like multiline all assignment types allow 1187s any assignment to a multiline case when 1187s any assignment to a multiline unless else 1187s any assignment to a multiline if else 1187s behaves like multiline all assignment types allow 1187s any assignment to a multiline unless else 1187s any assignment to a multiline if else 1187s any assignment to a multiline case when 1187s behaves like multiline all assignment types allow 1187s any assignment to a multiline case when 1187s any assignment to a multiline if else 1187s any assignment to a multiline unless else 1187s behaves like all assignment types 1187s allows any assignment to if without else 1187s registers an offense for any assignment to unless else 1187s registers an offense any assignment to if else 1187s does not crash when used inside rescue 1187s registers an offense any assignment to case when 1188s registers an offense for any assignment to ternary 1188s behaves like multiline all assignment types allow 1188s any assignment to a multiline case when 1188s any assignment to a multiline unless else 1188s any assignment to a multiline if else 1188s behaves like all assignment types 1188s registers an offense any assignment to if else 1188s allows any assignment to if without else 1188s registers an offense any assignment to case when 1188s registers an offense for any assignment to ternary 1188s does not crash when used inside rescue 1188s registers an offense for any assignment to unless else 1188s behaves like all assignment types 1188s registers an offense for any assignment to unless else 1188s does not crash when used inside rescue 1188s registers an offense any assignment to case when 1188s registers an offense any assignment to if else 1188s allows any assignment to if without else 1188s registers an offense for any assignment to ternary 1188s behaves like all assignment types 1188s registers an offense any assignment to if else 1188s does not crash when used inside rescue 1188s registers an offense any assignment to case when 1188s allows any assignment to if without else 1188s registers an offense for any assignment to unless else 1188s registers an offense for any assignment to ternary 1188s behaves like multiline all assignment types allow 1188s any assignment to a multiline case when 1188s any assignment to a multiline unless else 1188s any assignment to a multiline if else 1188s behaves like single line condition autocorrect 1188s corrects assignment to an if elsif else with multiple elsifs 1188s corrects assignment to an if elsif else condition 1188s corrects assignment to a case when else condition 1188s corrects assignment to a case when else with multiple whens 1188s corrects assignment to a ternary operator 1188s corrects assignment to an unless else condition 1188s corrects assignment to an if else condition 1188s behaves like all variable types 1188s does not crash for rescue assignment 1188s registers an offense assigning any variable type to ternary 1188s registers an offense assigning any variable type to if else 1188s registers an offense for assigning any variable type to case when 1188s registers an offense assigning any variable type to if elsewith multiple assignment 1188s registers an offense assigning any variable type to if elsif else 1188s registers an offense assigning any variable type to unless else 1188s allows assignment to if without else 1188s >= Ruby 2.7 1188s registers an offense for assigning any variable type to case in 1188s behaves like multiline all assignment types allow 1189s any assignment to a multiline if else 1189s any assignment to a multiline case when 1189s any assignment to a multiline unless else 1189s behaves like all assignment types 1189s registers an offense for any assignment to ternary 1189s registers an offense any assignment to case when 1189s registers an offense for any assignment to unless else 1189s allows any assignment to if without else 1189s does not crash when used inside rescue 1189s registers an offense any assignment to if else 1189s behaves like all assignment types 1189s registers an offense for any assignment to unless else 1189s allows any assignment to if without else 1189s registers an offense any assignment to case when 1189s does not crash when used inside rescue 1189s registers an offense any assignment to if else 1189s registers an offense for any assignment to ternary 1189s behaves like all assignment types 1189s registers an offense for any assignment to ternary 1189s registers an offense for any assignment to unless else 1189s registers an offense any assignment to if else 1189s registers an offense any assignment to case when 1189s does not crash when used inside rescue 1189s allows any assignment to if without else 1189s behaves like all variable types 1189s registers an offense assigning any variable type to if elsif else 1189s does not crash for rescue assignment 1189s registers an offense assigning any variable type to ternary 1189s registers an offense for assigning any variable type to case when 1189s registers an offense assigning any variable type to if elsewith multiple assignment 1189s registers an offense assigning any variable type to if else 1189s allows assignment to if without else 1189s registers an offense assigning any variable type to unless else 1189s >= Ruby 2.7 1189s registers an offense for assigning any variable type to case in 1189s behaves like multiline all variable types allow 1189s assigning any variable type to a multiline if else 1189s assigning any variable type to a multiline case when 1189s assigning any variable type to a multiline if elsif else 1189s assigning any variable type to a multiline unless else 1189s assigning any variable type to an if else with multiline in one branch 1189s behaves like all variable types 1189s registers an offense assigning any variable type to if elsif else 1189s does not crash for rescue assignment 1189s registers an offense assigning any variable type to ternary 1190s registers an offense assigning any variable type to if elsewith multiple assignment 1190s registers an offense assigning any variable type to if else 1190s allows assignment to if without else 1190s registers an offense assigning any variable type to unless else 1190s registers an offense for assigning any variable type to case when 1190s >= Ruby 2.7 1190s registers an offense for assigning any variable type to case in 1190s behaves like all variable types 1190s registers an offense for assigning any variable type to case when 1190s allows assignment to if without else 1190s does not crash for rescue assignment 1190s registers an offense assigning any variable type to if elsif else 1190s registers an offense assigning any variable type to if elsewith multiple assignment 1190s registers an offense assigning any variable type to if else 1190s registers an offense assigning any variable type to ternary 1190s registers an offense assigning any variable type to unless else 1190s >= Ruby 2.7 1190s registers an offense for assigning any variable type to case in 1190s behaves like all assignment types 1190s registers an offense any assignment to case when 1190s allows any assignment to if without else 1190s does not crash when used inside rescue 1190s registers an offense for any assignment to ternary 1190s registers an offense for any assignment to unless else 1190s registers an offense any assignment to if else 1190s behaves like all assignment types 1190s registers an offense for any assignment to unless else 1190s registers an offense any assignment to if else 1190s allows any assignment to if without else 1190s registers an offense for any assignment to ternary 1190s does not crash when used inside rescue 1190s registers an offense any assignment to case when 1190s behaves like multiline all assignment types allow 1190s any assignment to a multiline unless else 1190s any assignment to a multiline if else 1190s any assignment to a multiline case when 1190s behaves like all assignment types 1190s registers an offense any assignment to case when 1190s registers an offense for any assignment to unless else 1190s allows any assignment to if without else 1190s registers an offense any assignment to if else 1190s does not crash when used inside rescue 1191s registers an offense for any assignment to ternary 1191s behaves like multiline all assignment types allow 1191s any assignment to a multiline if else 1191s any assignment to a multiline unless else 1191s any assignment to a multiline case when 1191s behaves like all assignment types 1191s registers an offense any assignment to if else 1191s does not crash when used inside rescue 1191s allows any assignment to if without else 1191s registers an offense any assignment to case when 1191s registers an offense for any assignment to unless else 1191s registers an offense for any assignment to ternary 1191s behaves like all assignment types 1191s does not crash when used inside rescue 1191s registers an offense for any assignment to ternary 1191s registers an offense any assignment to case when 1191s registers an offense for any assignment to unless else 1191s registers an offense any assignment to if else 1191s allows any assignment to if without else 1191s behaves like multiline all variable types allow 1191s assigning any variable type to a multiline if elsif else 1191s assigning any variable type to a multiline unless else 1191s assigning any variable type to a multiline if else 1191s assigning any variable type to an if else with multiline in one branch 1191s assigning any variable type to a multiline case when 1191s behaves like all assignment types 1191s allows any assignment to if without else 1191s registers an offense for any assignment to unless else 1191s does not crash when used inside rescue 1191s registers an offense any assignment to case when 1191s registers an offense for any assignment to ternary 1191s registers an offense any assignment to if else 1191s behaves like all variable types 1191s does not crash for rescue assignment 1191s registers an offense assigning any variable type to if else 1191s registers an offense assigning any variable type to unless else 1191s registers an offense for assigning any variable type to case when 1191s allows assignment to if without else 1191s registers an offense assigning any variable type to ternary 1191s registers an offense assigning any variable type to if elsewith multiple assignment 1192s registers an offense assigning any variable type to if elsif else 1192s >= Ruby 2.7 1192s registers an offense for assigning any variable type to case in 1192s behaves like multiline all assignment types allow 1192s any assignment to a multiline unless else 1192s any assignment to a multiline if else 1192s any assignment to a multiline case when 1192s for loop 1192s ignores pseudo assignments in a for loop 1192s behaves like multiline all variable types allow 1192s assigning any variable type to a multiline if else 1192s assigning any variable type to a multiline if elsif else 1192s assigning any variable type to an if else with multiline in one branch 1192s assigning any variable type to a multiline case when 1192s assigning any variable type to a multiline unless else 1192s behaves like all assignment types 1192s registers an offense any assignment to if else 1192s registers an offense any assignment to case when 1192s does not crash when used inside rescue 1192s registers an offense for any assignment to unless else 1192s registers an offense for any assignment to ternary 1192s allows any assignment to if without else 1192s behaves like all assignment types 1192s registers an offense for any assignment to unless else 1192s registers an offense for any assignment to ternary 1192s registers an offense any assignment to case when 1192s registers an offense any assignment to if else 1192s does not crash when used inside rescue 1192s allows any assignment to if without else 1192s behaves like all assignment types 1192s allows any assignment to if without else 1192s registers an offense for any assignment to ternary 1192s registers an offense any assignment to case when 1192s registers an offense for any assignment to unless else 1192s does not crash when used inside rescue 1192s registers an offense any assignment to if else 1192s behaves like multiline all assignment types allow 1192s any assignment to a multiline if else 1192s any assignment to a multiline unless else 1192s any assignment to a multiline case when 1192s behaves like all assignment types 1192s does not crash when used inside rescue 1192s registers an offense any assignment to if else 1192s registers an offense any assignment to case when 1192s allows any assignment to if without else 1192s registers an offense for any assignment to ternary 1192s registers an offense for any assignment to unless else 1192s behaves like multiline all assignment types allow 1192s any assignment to a multiline unless else 1192s any assignment to a multiline if else 1192s any assignment to a multiline case when 1192s behaves like all variable types 1193s registers an offense for assigning any variable type to case when 1193s does not crash for rescue assignment 1193s registers an offense assigning any variable type to ternary 1193s allows assignment to if without else 1193s registers an offense assigning any variable type to unless else 1193s registers an offense assigning any variable type to if else 1193s registers an offense assigning any variable type to if elsewith multiple assignment 1193s registers an offense assigning any variable type to if elsif else 1193s >= Ruby 2.7 1193s registers an offense for assigning any variable type to case in 1193s behaves like all variable types 1193s registers an offense assigning any variable type to ternary 1193s registers an offense assigning any variable type to if else 1193s registers an offense for assigning any variable type to case when 1193s does not crash for rescue assignment 1193s registers an offense assigning any variable type to if elsewith multiple assignment 1193s allows assignment to if without else 1193s registers an offense assigning any variable type to unless else 1193s registers an offense assigning any variable type to if elsif else 1193s >= Ruby 2.7 1193s registers an offense for assigning any variable type to case in 1193s behaves like multiline all assignment types allow 1193s any assignment to a multiline if else 1193s any assignment to a multiline unless else 1193s any assignment to a multiline case when 1193s behaves like multiline all variable types allow 1193s assigning any variable type to a multiline if elsif else 1193s assigning any variable type to an if else with multiline in one branch 1193s assigning any variable type to a multiline unless else 1193s assigning any variable type to a multiline case when 1193s assigning any variable type to a multiline if else 1193s behaves like multiline all assignment types allow 1193s any assignment to a multiline if else 1193s any assignment to a multiline case when 1193s any assignment to a multiline unless else 1193s behaves like multiline all variable types allow 1193s assigning any variable type to a multiline if elsif else 1193s assigning any variable type to a multiline unless else 1193s assigning any variable type to an if else with multiline in one branch 1193s assigning any variable type to a multiline case when 1193s assigning any variable type to a multiline if else 1193s behaves like all assignment types 1193s registers an offense any assignment to if else 1193s registers an offense any assignment to case when 1193s does not crash when used inside rescue 1193s allows any assignment to if without else 1194s registers an offense for any assignment to ternary 1194s registers an offense for any assignment to unless else 1194s behaves like multiline all assignment types allow 1194s any assignment to a multiline unless else 1194s any assignment to a multiline case when 1194s any assignment to a multiline if else 1194s behaves like multiline all variable types allow 1194s assigning any variable type to an if else with multiline in one branch 1194s assigning any variable type to a multiline case when 1194s assigning any variable type to a multiline unless else 1194s assigning any variable type to a multiline if else 1194s assigning any variable type to a multiline if elsif else 1194s behaves like multiline all assignment types allow 1194s any assignment to a multiline if else 1194s any assignment to a multiline unless else 1194s any assignment to a multiline case when 1194s behaves like multiline all variable types allow 1194s assigning any variable type to a multiline if else 1194s assigning any variable type to a multiline case when 1194s assigning any variable type to a multiline if elsif else 1194s assigning any variable type to an if else with multiline in one branch 1194s assigning any variable type to a multiline unless else 1194s behaves like multiline all assignment types allow 1194s any assignment to a multiline if else 1194s any assignment to a multiline unless else 1194s any assignment to a multiline case when 1194s behaves like multiline all assignment types allow 1194s any assignment to a multiline unless else 1194s any assignment to a multiline case when 1194s any assignment to a multiline if else 1194s 1194s RuboCop::Cop::Style::ImplicitRuntimeError 1194s does not register an offense for `raise` with an error class 1194s registers an offense for `raise` without error class 1194s does not register an offense for `fail` without arguments 1194s does not register an offense for `fail` with an error class 1194s does not register an offense for `raise` without arguments 1194s registers an offense for `fail` with a multiline string 1194s registers an offense for `raise` with a multiline string 1194s registers an offense for `fail` without error class 1194s 1194s RuboCop::Cop::Style::NestedFileDirname 1194s Ruby <= 3.0 1194s does not register an offense when using `File.dirname(path)` nested two times 1194s Ruby >= 3.1 1194s registers and corrects an offense when using `File.dirname(path)` nested three times 1194s does not register an offense when using non nested `File.dirname(path)` 1194s registers and corrects an offense when using `File.dirname(path)` nested two times 1194s does not register an offense when using `File.dirname(path, 2)` 1194s 1194s RuboCop::Cop::Style::RedundantFreeze 1194s allows .freeze on method call 1194s behaves like immutable objects 1194s registers an offense for frozen 'foo'.count 1194s behaves like immutable objects 1194s registers an offense for frozen 1.5 1194s behaves like mutable objects 1194s allows (a + b) with freeze 1194s behaves like immutable objects 1194s registers an offense for frozen ('a' > 'b') 1194s when the receiver is a string literal 1194s Regexp and Range literals 1194s Ruby 2.7 or lower 1194s behaves like mutable objects 1194s allows (1..5) with freeze 1194s behaves like mutable objects 1194s allows (1...5) with freeze 1194s behaves like mutable objects 1194s allows /./ with freeze 1194s Ruby 3.0 or higher 1194s behaves like immutable objects 1194s registers an offense for frozen (1...5) 1194s behaves like immutable objects 1194s registers an offense for frozen (1..5) 1194s behaves like immutable objects 1195s registers an offense for frozen /./ 1195s Ruby 3.0 or higher 1195s when the frozen string literal comment is true 1195s behaves like mutable objects 1195s allows "#{a}" with freeze 1195s when the frozen string literal comment is missing 1195s behaves like mutable objects 1195s allows "#{a}" with freeze 1195s when the frozen string literal comment is false 1195s behaves like mutable objects 1195s allows "#{a}" with freeze 1195s Ruby 2.7 or lower 1195s when the frozen string literal comment is false 1195s behaves like mutable objects 1195s allows "#{a}" with freeze 1195s when the frozen string literal comment is true 1195s behaves like immutable objects 1195s registers an offense for frozen "#{a}" 1195s when the frozen string literal comment is missing 1195s behaves like mutable objects 1195s allows "#{a}" with freeze 1195s behaves like immutable objects 1195s registers an offense for frozen :sym 1195s behaves like mutable objects 1195s allows { a: 1, b: 2 } with freeze 1195s behaves like immutable objects 1195s registers an offense for frozen (a > b) 1195s behaves like mutable objects 1195s allows [1, 2, 3] with freeze 1195s behaves like mutable objects 1195s allows ([42] * 42) with freeze 1195s behaves like mutable objects 1195s allows "top#{1 + 2}" with freeze 1195s behaves like mutable objects 1195s allows ('a' * 20) with freeze 1195s behaves like immutable objects 1195s registers an offense for frozen :"" 1195s behaves like immutable objects 1195s registers an offense for frozen [1, 2, 3].size 1195s behaves like mutable objects 1195s allows ('a' + 'b') with freeze 1195s behaves like mutable objects 1195s allows ENV['foo'] with freeze 1195s behaves like immutable objects 1195s registers an offense for frozen (2 > 1) 1195s behaves like immutable objects 1195s registers an offense for frozen (1 + 2) 1195s behaves like immutable objects 1195s registers an offense for frozen 1 1195s behaves like mutable objects 1195s allows 'str' with freeze 1195s behaves like mutable objects 1195s allows ::ENV['foo'] with freeze 1195s 1195s RuboCop::Cop::Layout::ClosingHeredocIndentation 1195s accepts correctly indented closing heredoc when heredoc contents with blank line 1195s registers an offense for bad indentation of a closing heredoc 1195s accepts correctly indented closing heredoc when heredoc contents is after closing heredoc 1195s accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty 1195s accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` 1195s does not register an offense for a << heredoc 1195s accepts correctly indented closing heredoc when heredoc contents is before closing heredoc 1195s accepts correctly indented closing heredoc when aligned at the beginning of method definition 1195s accepts correctly indented closing heredoc 1195s registers an offense for incorrectly indented empty heredocs 1195s does not register an offense for correctly indented empty heredocs 1195s 1195s RuboCop::Cop::Naming::PredicateName 1195s with method definition macros 1195s registers an offense when using an internal affair macro 1195s registers an offense when using `define_method` 1195s accepts method name when corrected name is invalid identifier 1195s without method definition macros 1196s accepts method name when corrected name is invalid identifier 1196s does not register any offenses when using an internal affair macro 1196s registers an offense when using `define_method` 1196s without restricted prefixes 1196s registers an offense when method name starts with "is" 1196s accepts method name that starts with unknown prefix 1196s registers an offense when method name starts with "has" 1196s accepts method name when corrected name is invalid identifier 1196s with permitted predicate names 1196s accepts method name which is in permitted list 1196s with restricted prefixes 1196s registers an offense when method name starts with "is" 1196s accepts method name that starts with unknown prefix 1196s accepts method name when corrected name is invalid identifier 1196s accepts method name that is an assignment 1196s registers an offense when method name starts with "has" 1196s 1196s RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets 1196s does not register offense for any kind of reference brackets 1196s when EnforcedStyle is compact 1196s registers an offense and corrects 2-dimensional array with extra spaces 1196s accepts multiline array 1196s does not register offense for valid 2-dimensional array 1196s registers an offense and corrects space between 2 closing brackets 1196s does not register offense for valid 4-dimensional array 1196s registers an offense and corrects space between 2 opening brackets 1196s does not register offense for valid 3-dimensional array 1196s registers an offense and corrects 3-dimensional array with extra spaces 1196s behaves like space inside arrays 1196s does not register offense for arrays with spaces 1196s accepts square brackets called with method call syntax 1196s does not register offense for arrays using ref brackets 1196s registers an offense and corrects array brackets with no leading whitespace 1196s registers an offense and corrects array brackets with no trailing whitespace 1196s registers an offense and corrects multiline array on end bracket with trailing method 1196s does not register offense when 2 arrays on one line 1196s does not register offense for valid multiline array 1196s does not register offense when bottom bracket gets its own line & has trailing method 1196s register an offense and corrects when 2 arrays are on one line 1196s accepts space inside array brackets with comment 1196s does not register offense for indented array when bottom bracket gets its own line & is misaligned 1196s accepts square brackets as method name 1196s registers an offense and corrects multiline array on end bracket 1196s registers an offense and corrects an array missing whitespace when there is more than one array on a line 1196s does not register offense for array when brackets get their own line 1196s multiline, 2-dimensional array with newlines 1196s registers an offense and corrects at the end of array 1196s registers an offense and corrects at the beginning of array 1196s multiline, 2-dimensional array with spaces 1196s registers an offense and corrects at the end of array 1196s registers an offense and corrects at the beginning of array 1196s with space inside empty brackets not allowed 1196s accepts empty brackets with no space inside 1196s registers an offense and corrects empty brackets with multiple spaces inside 1196s registers an offense and corrects empty brackets with 1 space inside 1196s registers an offense and corrects multiline spaces 1196s when EnforcedStyle is no_space 1196s registers an offense and corrects an array when two on one line 1196s registers an offense and corrects 2 arrays on one line 1196s registers an offense and corrects multiline array on end bracket 1196s does not register offense for valid 2-dimensional array 1196s does not register offense when 2 arrays on one line 1196s registers an offense and corrects array brackets with trailing whitespace 1196s accepts square brackets called with method call syntax 1196s does not register offense for arrays with no spaces 1196s does not register offense for array when brackets get own line 1196s does not register offense for indented array when bottom bracket gets its own line & is misaligned 1196s does not register offense when bottom bracket gets its own line indented with tabs 1196s accepts square brackets as method name 1196s registers an offense and corrects multiline array on end bracket with trailing method 1196s does not register offense for arrays using ref brackets 1196s registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started 1196s does not register offense for valid multiline array 1196s does not register offense when bottom bracket gets its own line & has trailing method 1196s accepts space inside array brackets if with comment 1196s does not register offense when contains an array literal as an argument after a heredoc is started 1196s registers an offense and corrects array brackets with leading whitespace 1196s accepts a multiline array with whitespace before end bracket 1196s with space inside empty braces allowed 1196s registers an offense and corrects empty brackets with more than one space inside 1196s accepts empty brackets with space inside 1196s registers an offense and corrects empty brackets with no space inside 1196s when EnforcedStyle is space 1196s does not register offense for valid 2-dimensional array 1196s behaves like space inside arrays 1196s does not register offense for indented array when bottom bracket gets its own line & is misaligned 1196s register an offense and corrects when 2 arrays are on one line 1196s does not register offense for valid multiline array 1196s does not register offense when bottom bracket gets its own line & has trailing method 1196s does not register offense for arrays with spaces 1196s registers an offense and corrects array brackets with no leading whitespace 1196s does not register offense for array when brackets get their own line 1196s accepts square brackets called with method call syntax 1196s does not register offense when 2 arrays on one line 1196s does not register offense for arrays using ref brackets 1196s registers an offense and corrects array brackets with no trailing whitespace 1196s registers an offense and corrects an array missing whitespace when there is more than one array on a line 1196s registers an offense and corrects multiline array on end bracket with trailing method 1196s registers an offense and corrects multiline array on end bracket 1196s accepts space inside array brackets with comment 1196s accepts square brackets as method name 1196s 1196s RuboCop::Cop::Style::SymbolLiteral 1196s accepts string syntax when symbols have special chars in them 1196s accepts string syntax when symbol start with a digit 1197s registers an offense for word-line symbols using string syntax 1197s accepts string syntax when symbols have whitespaces in them 1197s 1197s RuboCop::Cop::Style::RandomWithOffset 1197s registers an offense when using offset - rand(irange) 1197s registers an offense when using ::Random.rand(int).pred 1197s registers an offense when using rand(erange) + offset 1197s registers an offense when using offset + Random.rand(int) 1197s registers an offense when using ::Kernel.rand 1197s registers an offense when using rand(int).pred 1197s does not register an offense when using rand(irange).succ with a non-integer range value 1197s registers an offense when using rand(irange).succ 1197s registers an offense when using offset - rand(erange) 1197s registers an offense when using rand(int).next 1197s registers an offense when using rand(irange) - offset 1197s registers an offense when using offset - rand(int) 1197s does not register an offense when using range with double dots 1197s registers an offense when using rand(erange) - offset 1197s registers an offense when using Random.rand 1197s registers an offense when using rand(irange) + offset 1197s registers an offense when using rand(int) + offset 1197s does not register an offense when using range with triple dots 1197s registers an offense when using offset + rand(int) 1197s does not register an offense when using rand(erange).pred with a non-integer range value 1197s registers an offense when using ::Random.rand 1197s registers an offense when using Random.rand(int).succ 1197s does not register an offense when using rand(irange) + offset with a non-integer range value 1197s registers an offense when using offset - ::Random.rand(int) 1197s registers an offense when using rand(erange).succ 1197s registers an offense when using rand(int) - offset 1197s registers an offense when using rand(int).succ 1197s does not register an offense when using offset - rand(erange) with a non-integer range value 1197s registers an offense when using Kernel.rand 1197s 1197s RuboCop::Cop::Lint::DuplicateHashKey 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `"#{some_method_call}"` hash keys 1197s when there is a duplicated key in the hash literal 1197s registers an offense 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `/.#{some_method_call}/` hash keys 1197s when there are two duplicated keys in a hash 1197s registers two offenses 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `{ :sym => some_method_call }` hash keys 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `some_method_call(x, y)` hash keys 1197s behaves like duplicated literal key 1197s registers an offense for duplicated `1.0` hash keys 1197s behaves like duplicated literal key 1197s registers an offense for duplicated `[1, 2, 3]` hash keys 1197s behaves like duplicated literal key 1197s registers an offense for duplicated `(false or true)` hash keys 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `(x && false)` hash keys 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `[some_method_call]` hash keys 1197s behaves like duplicated literal key 1197s registers an offense for duplicated `%r{abx}ixo` hash keys 1197s behaves like duplicated non literal key 1197s does not register an offense for duplicated `some_method_call` hash keys 1197s behaves like duplicated literal key 1197s registers an offense for duplicated `false` hash keys 1197s When there is no duplicated key in the hash 1197s does not register an offense 1197s behaves like duplicated non literal key 1198s does not register an offense for duplicated `(x == false)` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `(1)` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `1` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `nil` hash keys 1198s When a key is duplicated three times in a hash literal 1198s registers two offenses 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `{ a: 1, b: 2 }` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `(false && true)` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `(false <=> true)` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `/./` hash keys 1198s behaves like duplicated non literal key 1198s does not register an offense for duplicated `{ some_method_call => :sym }` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `!true` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `'str'` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys 1198s target ruby version >= 2.6 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `(42..)` hash keys 1198s behaves like duplicated non literal key 1198s does not register an offense for duplicated `(x or false)` hash keys 1198s behaves like duplicated literal key 1198s registers an offense for duplicated `"#{2}"` hash keys 1198s 1198s RuboCop::Cop::Layout::FirstHashElementLineBreak 1198s ignores implicit hashes in method calls that are improperly formatted 1198s ignores elements listed on a single line 1198s registers an offense and corrects elements listed on the first line 1198s ignores implicit hashes in method calls without parens 1198s registers an offense and corrects hash nested in a method call 1198s ignores implicit hashes in method calls with parens 1198s registers an offense and corrects single element multi-line hash 1198s 1198s RuboCop::Cop::Layout::FirstArrayElementIndentation 1198s when array is method argument 1198s and argument are not surrounded by parentheses 1198s accepts a correctly indented multi-line array with brackets 1198s accepts indent based on the left bracket when the outer hash key and the left bracket is not on the same line 1198s registers an offense and corrects incorrectly indented multi-line array with brackets 1198s accepts bracketless array 1198s 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 1198s accepts single line array with brackets 1198s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 1198s 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 1198s and arguments are surrounded by parentheses 1198s and EnforcedStyle is special_inside_parentheses 1198s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 1198s accepts special indentation for second argument 1198s accepts indent based on the preceding left parenthesis when the right bracket and its following pair is on the same line 1198s accepts special indentation for first argument 1198s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 1198s registers an offense and corrects 'align_brackets' indentation 1198s 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 1198s accepts normal indentation for array within array 1198s registers an offense and corrects 'consistent' indentation 1198s when using safe navigation operator 1198s registers an offense and corrects 'consistent' indentation 1198s and EnforcedStyle is consistent 1198s 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 1198s accepts normal indentation for second argument 1198s accepts indent based on the left brace when the outer hash key and the left bracket is not on the same line 1198s 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 1198s registers an offense for incorrectly indented multi-line array that is the value of a single pair hash 1198s accepts normal indentation for first argument 1198s registers an offense and corrects incorrect indentation 1198s when array is argument to setter 1199s registers an offense and corrects incorrectly indented first element 1199s accepts correctly indented first element 1199s when array is right hand side in assignment 1199s accepts single line array 1199s accepts a first element on the same line as the left bracket 1199s registers an offense and corrects incorrectly indented first element 1199s accepts multi-assignments with no brackets 1199s accepts multi-assignments with brackets 1199s accepts an empty array 1199s accepts several elements per line 1199s accepts correctly indented first element 1199s when array is operand 1199s registers an offense and corrects incorrectly indented first element 1199s registers an offense and corrects incorrectly indented ] 1199s accepts correctly indented first element 1199s when indentation width is overridden for this cop 1199s registers an offense and corrects incorrectly indented 1st element 1199s accepts correctly indented first element 1199s when EnforcedStyle is align_brackets 1199s accepts correctly indented first element 1199s accepts a first element on the same line as the left bracket 1199s accepts several elements per line 1199s accepts multi-assignments with no brackets 1199s accepts single line array 1199s registers an offense and corrects incorrectly indented ] 1199s accepts an empty array 1199s accepts multi-assignments with brackets 1199s when 'special_inside_parentheses' style is used 1199s registers an offense and corrects incorrect indentation 1199s when indentation width is overridden for this cop 1199s registers an offense and corrects indentation that does not match IndentationWidth 1199s accepts correctly indented first element 1199s when 'consistent' style is used 1199s registers an offense and corrects incorrectly indented 1st element 1199s registers an offense and corrects incorrect indentation 1199s 1199s RuboCop::Cop::Layout::LeadingEmptyLines 1199s registers an offense and corrects a new line before code 1200s accepts not having a blank line before a comment 1200s registers an offense and corrects multiple new lines before a class 1200s allows an empty input 1200s registers an offense and corrects a new line before a class 1200s accepts not having a blank line before code 1200s allows blank lines without any comments or code 1200s registers an offense and corrects a new line before a comment 1200s accepts not having a blank line before a class 1200s autocorrect 1200s in collaboration 1200s does not invoke conflicts with other cops 1200s 1200s RuboCop::Cop::Style::TernaryParentheses 1200s when configured to enforce parentheses omission 1200s accepts condition including a range 1200s with a complex condition 1200s registers an offense for defined with variable in condition 1200s registers an offense for equality check 1200s registers an offense for boolean expression using keyword 1200s registers an offense for arithmetic expression 1200s registers an offense for defined with nested constant in condition 1200s registers an offense for boolean expression 1200s registers an offense for negated condition 1200s registers an offense for defined with class method in condition 1200s registers an offense for defined with method chain in condition 1200s registers an offense for query method on object 1200s accepts parens around inner boolean expression 1200s with an unparenthesized method call condition 1200s registers an offense when calling method with a parameter 1200s registers an offense for defined check 1200s when calling method on a receiver 1200s registers an offense 1200s when calling method on a constant receiver 1200s registers an offense 1200s when calling method on a literal receiver 1200s registers an offense 1200s when calling method with multiple arguments 1200s registers an offense 1200s with one line pattern matching 1200s does not register an offense 1200s with an assignment condition 1200s accepts safe assignment 1200s accepts safe assignment as part of multiple assignment 1200s registers an offense for equality check 1200s accepts double safe assignment 1200s behaves like safe assignment disabled 1200s registers an offense for parens around outer assignment 1200s registers an offense for parens around assignment 1200s registers an offense for parens around inner assignment 1200s with a simple condition 1200s registers an offense for yield in condition 1200s registers an offense for query method in condition 1200s registers an offense for multi-line boolean expression 1200s accepts multi-line boolean expression starting on following line 1200s registers an offense for accessor in condition 1200s with no space between the parentheses and question mark 1200s registers an offense 1200s with one line pattern matching 1200s does not register an offense 1200s configured for parentheses on complex and there are parens 1200s accepts condition including a range 1200s with method call condition 1200s registers an offense for defined check 1200s registers an offense when calling method with a parameter 1200s registers an offense when calling method on a receiver 1200s without accessor in method call parameters 1200s registers an offense for array include? with parens 1200s registers an offense for array include? without parens 1200s with accessor in method call parameters 1200s registers an offense for array include? without parens 1200s registers an offense for array include? with multiple parameters without parens 1200s registers an offense for array include? with multiple parameters with parens 1200s with a simple condition 1200s registers an offense for query method in condition 1200s registers an offense for yield in condition 1200s registers an offense with preceding boolean keyword expression 1200s registers an offense for save navigation 1200s registers an offense for accessor in condition 1200s with an assignment condition 1200s accepts equality check 1201s accepts accepts safe multiple assignment 1201s accepts safe assignment 1201s accepts safe assignment as part of multiple assignment 1201s behaves like safe assignment disabled 1201s registers an offense for parens around inner assignment 1201s registers an offense for parens around outer assignment 1201s registers an offense for parens around assignment 1201s with a complex condition 1201s registers an offense for defined with variable in condition 1201s registers an offense when calling method on a receiver 1201s accepts boolean expression 1201s accepts boolean expression using keywords 1201s registers an offense for defined with class method in condition 1201s registers an offense for defined with nested constant in condition 1201s registers an offense for defined with method chain in condition 1201s configured for parentheses on complex and there are no parens 1201s with complex condition 1201s registers an offense for comparison 1201s registers an offense for compound boolean expression 1201s registers an offense comparison with exponentiation 1201s registers an offense for arithmetic and equality check 1201s registers an offense for comparison with multiplication 1201s registers an offense for boolean expression 1201s registers an offense for comparison with method call on receiver 1201s registers an offense for subtraction expression 1201s registers an offense for addition expression 1201s registers an offense for boolean expression with inner parens 1201s with an assignment condition 1201s registers an offense for equality check 1201s accepts safe assignment 1201s when configured to enforce parentheses inclusion 1201s with a complex condition 1201s registers an offense when calling method on a receiver 1201s registers an offense for defined? with class method in condition 1201s registers an offense for boolean expression containing parens 1201s registers an offense for negated condition 1201s registers an offense for defined? with method chain in condition 1201s registers an offense for boolean expression using keyword 1201s registers an offense for arithmetic condition 1201s registers an offense for defined? with nested constant in condition 1201s registers an offense for defined? with variable in condition 1201s registers an offense for equality check 1201s registers an offense for boolean expression 1201s with an assignment condition 1201s accepts safe assignment in condition 1201s registers an offense for double assignment 1201s registers an offense for double assignment with equality check in condition 1201s registers an offense for triple assignment 1201s with a simple condition 1201s registers an offense for query method in condition 1201s registers an offense for yield in condition 1201s registers an offense for accessor in condition 1201s 1201s RuboCop::Cop::Style::GuardClause 1201s registers an offense when using `and return` in `then` branch 1201s doesn't register an error if condition has multiple lines 1201s does not register an offense when assigning the result of a guard condition with `else` 1201s does not report an offense if break is inside if..elsif..else..end 1202s registers an offense when using `|| raise` in `else` branch 1202s registers an error with raise "error" in the if branch 1202s accepts a method with empty parentheses as its body 1202s doesn't register an error if control flow expr has multiple lines 1202s does not report an offense if break is inside elsif 1202s registers an error if non-control-flow branch has multiple lines 1202s registers an error with break in the else branch 1202s doesn't register an error if condition has multiple lines 1202s registers an error with break in the if branch 1202s accepts a method which body is if / unless with else 1202s registers an offense when using `|| raise` in `then` branch 1202s registers an error with raise "error" in the else branch 1202s does not report an offense if next is inside if..elsif..else..end 1202s does not report an offense if next is inside elsif 1202s registers an error with return in the else branch 1202s registers an error with return in the if branch 1202s accepts a method whose body is a modifier if / unless 1202s registers an error with next in the if branch 1202s doesn't register an error if condition has multiple lines 1202s registers an error if non-control-flow branch has multiple lines 1202s doesn't register an error if control flow expr has multiple lines 1202s does not report an offense if return is inside elsif 1202s does not report an offense if return is inside if..elsif..else..end 1202s accepts a method which body does not end with if / unless 1202s registers an offense when using `and return` in `else` branch 1202s does not report an offense if body is if..elsif..end 1202s doesn't report an offense if condition has multiple lines 1202s does not report an offense if raise "error" is inside if..elsif..else..end 1202s doesn't register an error if control flow expr has multiple lines 1202s registers an error if non-control-flow branch has multiple lines 1202s registers an error if non-control-flow branch has multiple lines 1202s registers an error with next in the else branch 1202s doesn't register an error if condition has multiple lines 1202s doesn't register an error if control flow expr has multiple lines 1202s does not report an offense if raise "error" is inside elsif 1202s MinBodyLength: 1 1202s reports an offense for if whose body has 1 line 1202s behaves like reports offense 1202s reports an offense if method body is if / unless without else 1202s reports an offense if method body ends with if / unless without else 1202s method in module 1202s registers an offense for singleton methods 1202s registers an offense for instance method 1202s AllowConsecutiveConditionals: false 1202s reports an offense when not allowed same depth multiple if statement andpreceding expression is a conditional at the same depth 1202s Invalid MinBodyLength 1202s fails with an error 1202s with Metrics/MaxLineLength disabled 1202s registers an offense with modifier example code regardless of length 1202s MinBodyLength: 4 1202s accepts a method whose body has 3 lines 1202s behaves like reports offense 1202s reports an offense if method body ends with if / unless without else 1202s reports an offense if method body is if / unless without else 1202s with Metrics/MaxLineLength enabled 1202s when the correction is too long for a single line 1202s with a nested `if` node 1202s does registers an offense 1202s with a trivial body 1202s does not register an offense 1202s with a nested `begin` node 1203s does registers an offense 1203s AllowConsecutiveConditionals: true 1203s reports an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 1203s does not register an offense when allowed same depth multiple if statement andpreceding expression is not a conditional at the same depth 1203s 1203s RuboCop::Cop::Style::MultilineBlockChain 1203s accepts a chain of blocks spanning one line 1203s accepts a chain of calls followed by a multi-line block 1203s accepts a multi-line block chained with calls on one line 1203s with multi-line block chaining 1203s registers an offense for a chain where the second block is single-line 1203s accepts a chain where the first block is single-line 1203s registers an offense for a slightly more complicated case 1203s registers an offense for a simple case 1203s registers two offenses for a chain of three blocks 1203s Ruby 2.7 1203s registers an offense for a slightly more complicated case 1203s 1203s RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands 1203s registers an offense for `===` with duplicate operands 1203s registers an offense for `!=` with duplicate operands 1203s registers an offense for `|` with duplicate operands 1203s does not crash on operator without any argument 1203s does not register an offense when using binary operator with different operands 1203s registers an offense for `<=` with duplicate operands 1203s registers an offense for `>` with duplicate operands 1203s registers an offense for `-` with duplicate operands 1203s registers an offense for `<=>` with duplicate operands 1203s registers an offense for `/` with duplicate operands 1203s registers an offense for `||` with duplicate operands 1203s registers an offense for `&&` with duplicate operands 1203s does not register an offense for `+` with duplicate operands 1203s registers an offense for `<` with duplicate operands 1203s does not register an offense for `*` with duplicate operands 1203s registers an offense for `%` with duplicate operands 1203s does not register an offense when using arithmetic operator with numerics 1203s registers an offense for `==` with duplicate operands 1203s does not register an offense for `<<` with duplicate operands 1203s does not register an offense for `**` with duplicate operands 1203s registers an offense for `^` with duplicate operands 1203s does not register an offense for `>>` with duplicate operands 1203s registers an offense for `>=` with duplicate operands 1203s registers an offense for `=~` with duplicate operands 1203s 1203s RuboCop::Cop::Style::DateTime 1203s registers an offense when using ::DateTime for current time 1203s does not register an offense when using DateTime for historic date 1203s does not register an offense when using DateTime in another namespace 1203s does not register an offense when using Time for current time 1203s registers an offense when using DateTime for modern date 1203s does not register an offense when using Date for modern date 1203s registers an offense when using DateTime for current time 1203s does not register an offense when using ::DateTime for historic date 1203s when configured to not allow #to_datetime 1203s registers an offense 1203s when configured to allow #to_datetime 1203s does not register an offense 1203s 1203s RuboCop::Cop::Lint::DuplicateRescueException 1203s registers an offense when duplicate exception exists 1203s registers an offense when multiple duplicate exceptions exist 1203s registers an offense when duplicate exception splat exists 1203s registers an offense when duplicate exception exists within rescues with empty `rescue` branch 1203s registers an offense when duplicate exception exists within rescues with `else` branch 1203s does not register an offense when there are no duplicate exceptions 1203s 1203s RuboCop::Cop::Security::CompoundHash 1203s does not register an offense when delegating to a single object 1203s registers an offense if .hash is called on any elements of a hashed array 1203s registers an offense when using XOR between an array hash and a class 1204s registers an offense when using XOR operator in the implementation of a dynamic hash method 1204s registers an offense when using XOR operator in the implementation of the hash method, even if intermediate variable is used 1204s registers an offense when using addition in the implementation of the hash method 1204s registers an offense when delegating to Array#hash for a single value 1204s registers an offense when using XOR involving super 1204s registers an offense for complex usage 1204s registers an offense when using addition assignment operator in the implementation of the hash method 1204s registers an offense when using XOR assignment operator in the implementation of the hash method 1204s registers an offense when using XOR operator in the implementation of the hash method 1204s registers an offense when using XOR operator in the implementation of the hash method, even without sub-calls to hash 1204s registers an offense when using XOR and bitshifts 1204s registers an offense when using XOR operator in the implementation of the hash singleton method 1204s registers an offense when using multiplication in the implementation of the hash method 1204s registers an offense when using multiplication assignment operator in the implementation of the hash method 1204s does not register an offense when delegating to Array#hash 1204s registers an offense when using bitshift and OR 1204s registers an offense when using XOR operator in the implementation of a dynamic hash singleton method 1204s 1204s RuboCop::Cop::InternalAffairs::UselessRestrictOnSend 1204s registers an offense when using `RESTRICT_ON_SEND` and not defines send callback method 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias_method 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` with alias_method 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `after_send` 1204s does not register an offense when using `RESTRICT_ON_SEND` and defines `on_send` with alias 1204s 1204s RuboCop::Cop::Style::BlockComments 1204s autocorrects a block comment into a regular comment 1204s autocorrects an empty block comment by removing it 1204s accepts regular comments 1204s autocorrects a block comment into a regular comment (without trailingnewline) 1204s registers an offense for block comments 1204s 1204s RuboCop::Cop::Style::EndBlock 1204s reports an offense and corrects END block 1204s does not report offenses for other blocks 1204s 1204s RuboCop::Cop::Layout::ArrayAlignment 1204s when aligned with first parameter 1204s autocorrects array within array with too little indentation 1204s registers an offense and corrects misaligned array elements 1204s accepts the first element being on a new row 1204s accepts single line array 1204s accepts aligned array with fullwidth characters 1204s does not register an offense or try to correct parallel assignment 1204s does not indent heredoc strings when autocorrecting 1204s autocorrects array within array with too much indentation 1205s accepts aligned array keys 1205s accepts several elements per line 1205s autocorrects misaligned array with the first element on a new row 1205s when aligned with fixed indentation 1205s autocorrects misaligned array with the first element on a new row 1205s accepts several elements per line 1205s accepts single line array 1205s accepts aligned array with fullwidth characters 1205s does not indent heredoc strings when autocorrecting 1205s autocorrects array within array with too little indentation 1205s does not register an offense or try to correct parallel assignment 1205s registers an offense and corrects misaligned array elements 1205s accepts aligned array keys 1205s autocorrects array within array with too much indentation 1205s accepts the first element being on a new row 1205s 1205s RuboCop::Cop::Layout::MultilineArrayBraceLayout 1205s ignores empty arrays 1205s ignores implicit arrays 1205s ignores single-line arrays 1205s behaves like multiline literal brace layout 1205s same_line style 1205s opening brace on separate line from first element 1205s detects closing brace on different line from last element 1205s allows closing brace on same line as last multiline element 1205s allows closing brace on same line as last element 1205s opening brace on same line as first element 1205s allows closing brace on same line from last element 1205s autocorrects closing brace on different line as last element 1205s allows closing brace on same line as multi-line element 1205s detects closing brace on different line from multiline element 1205s with a chained call on the closing brace 1205s and a comment after the last element 1205s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1205s but no comment after the last element 1205s autocorrects the closing brace 1205s heredoc 1205s detects heredoc structures that are safe to add to 1205s ignores heredocs that could share a last line 1205s new_line style 1205s opening brace on separate line from first element 1205s detects closing brace on same line as last element 1205s allows closing brace on separate line from last element 1205s allows closing brace on separate line from last multiline element 1205s opening brace on same line as first element 1205s allows closing brace on different line from last element 1205s autocorrects closing brace on same line as last element 1205s detects closing brace on same line as last multiline element 1205s allows closing brace on different line from multi-line element 1205s symmetrical style 1205s opening brace on separate line from first element 1205s allows closing brace on separate line from last element 1205s detects closing brace on same line as last element 1205s allows closing brace on separate line from last multiline element 1205s opening brace on same line as first element 1205s allows closing brace on same line as last element 1205s autocorrects closing brace on different line from last element 1205s allows closing brace on same line as last multiline element 1205s detects closing brace on different line from last element 1205s with a chained call on the closing brace 1205s and a comment after the last element 1205s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1205s but no comment after the last element 1205s autocorrects the closing brace 1205s when comment present before closing brace 1205s corrects closing brace without crashing 1205s behaves like multiline literal brace layout trailing comma 1205s symmetrical style 1205s opening brace on same line as first element 1205s last element has a trailing comma 1205s autocorrects closing brace on different line from last element 1205s same_line style 1205s opening brace on same line as first element 1205s last element has a trailing comma 1205s autocorrects closing brace on different line as last element 1205s behaves like multiline literal brace layout method argument 1205s when arguments to a method 1205s and a comment after the last element 1206s detects closing brace on separate line from last element 1206s but no comment after the last element 1206s autocorrects the closing brace 1206s 1206s RuboCop::Cop::Style::SelfAssignment 1206s registers an offense for non-shorthand assignment || and @@x 1206s registers an offense for non-shorthand assignment & and @x 1206s registers an offense for non-shorthand assignment & and x 1206s registers an offense for non-shorthand assignment * and @x 1206s registers an offense for non-shorthand assignment * and x 1206s registers an offense for non-shorthand assignment | and @x 1206s registers an offense for non-shorthand assignment / and x 1206s registers an offense for non-shorthand assignment + and @x 1206s registers an offense for non-shorthand assignment + and x 1206s registers an offense for non-shorthand assignment || and @x 1206s registers an offense for non-shorthand assignment & and @@x 1206s registers an offense for non-shorthand assignment ** and x 1206s registers an offense for non-shorthand assignment + and @@x 1206s registers an offense for non-shorthand assignment - and @@x 1206s registers an offense for non-shorthand assignment / and @x 1206s registers an offense for non-shorthand assignment && and x 1206s registers an offense for non-shorthand assignment || and x 1206s registers an offense for non-shorthand assignment | and @@x 1206s registers an offense for non-shorthand assignment - and x 1206s registers an offense for non-shorthand assignment ** and @@x 1206s registers an offense for non-shorthand assignment && and @x 1206s registers an offense for non-shorthand assignment * and @@x 1206s registers an offense for non-shorthand assignment - and @x 1206s registers an offense for non-shorthand assignment | and x 1206s registers an offense for non-shorthand assignment && and @@x 1206s registers an offense for non-shorthand assignment ** and @x 1206s registers an offense for non-shorthand assignment / and @@x 1206s 1206s RuboCop::Cop::Lint::HashCompareByIdentity 1206s does not register an offense for hash methods without `object_id` as key 1206s registers an offense when using hash method with `object_id` as a key 1206s registers an offense when using hash methods with `object_id` on receiver as a key 1206s 1206s RuboCop::Cop::Style::StringChars 1206s registers and corrects an offense when using `split` without parentheses 1206s does not register an offense when using `chars` 1206s registers and corrects an offense when using `split('')` 1206s registers and corrects an offense when using `split("")` 1206s does not register an offense when using `split(/ /)` 1206s does not register an offense when using `split` 1206s registers and corrects an offense when using `split(//)` 1206s 1206s RuboCop::Cop::Style::RedundantBegin 1206s accepts a def with a begin block after a statement 1206s does not register an offense when using `begin` for logical operator conditions 1206s does not register an offense when using `begin` for method argument 1206s does not register an offense when using `begin` with no statements for or assignment 1206s reports an offense for single line def with redundant begin block 1206s registers and corrects an offense when using multi-line `if` in `begin` block 1206s accepts when one-liner `begin` block has multiple statements with modifier condition 1206s registers and corrects an offense when using `begin` with single statement that called a block for or assignment 1206s does not register an offense when using `begin` for assignment 1206s reports an offense for def with redundant begin block 1206s does not register an offense when using body of `begin` is empty 1206s reports an offense when multi-line `begin` block has single statement and it is inside condition 1206s reports an offense when assigning nested blocks which contain `begin` blocks 1206s registers an offense and corrects when using `begin` without `rescue` or `ensure` 1206s reports an offense when assigning nested `begin` blocks 1206s doesn't modify spacing when autocorrecting 1206s accepts when multi-line `begin` block has multiple statements with modifier condition 1206s accepts a defs with required begin block 1207s registers and corrects an offense when using modifier `if` single statement in `begin` block 1207s does not register an offense when using `begin` for semantic operator conditions 1207s does not register an offense when using `begin` with `while` 1207s reports an offense when one-liner `begin` block has single statement with modifier condition 1207s does not register an offense when using `begin` with `until` 1207s accepts a def with required begin block 1207s autocorrects when there are trailing comments 1207s reports an offense when multi-line `begin` block has single statement with modifier condition 1207s does not register an offense when using `begin` for or assignment and method call 1207s does not register an offense when using `begin` with multiple statement for or assignment 1207s does not register an offense when using `begin` with `ensure` 1207s reports an offense for defs with redundant begin block 1207s registers and corrects an offense when using `begin` with single statement for or assignment 1207s does not register an offense when using `begin` with `rescue` 1207s Ruby 2.7 1207s reports an offense when assigning nested blocks which contain `begin` blocks 1207s >= ruby 2.5 1207s accepts a block with a begin block after a statement 1207s accepts a {} block with a begin-end 1207s accepts super with block 1207s registers an offense for a do-end block with redundant begin-end 1207s accepts a stabby lambda with a begin-end 1207s when using endless method definition 1207s accepts when `begin` block has no statements 1207s accepts when `begin` block has multiple statements 1207s registers when `begin` block has a single statement 1207s < Ruby 2.5 1207s accepts a do-end block with a begin-end 1207s 1207s RuboCop::TargetRuby 1207s when TargetRubyVersion is set 1207s does not read .ruby-version 1207s uses TargetRubyVersion 1207s does not read Gemfile.lock or gems.locked 1207s when TargetRubyVersion is not set 1207s when .ruby-version is not present 1207s and Gemfile.lock exists 1207s uses the default Ruby when rbx is in Gemfile.lock 1207s uses the default Ruby when Ruby is not in Gemfile.lock 1207s uses the default Ruby when jruby is in Gemfile.lock 1207s uses MRI Ruby version when it is present in Gemfile.lock 1207s uses MRI Ruby version when it has multiple digits 1207s and gems.locked exists 1207s uses the default Ruby when jruby is in gems.locked 1207s uses the default Ruby when Ruby is not in gems.locked 1207s uses MRI Ruby version when it has multiple digits 1207s uses MRI Ruby version when it is present in gems.locked 1207s uses the default Ruby when rbx is in gems.locked 1207s when bundler lock files are not present 1207s uses the default target ruby version 1207s gemspec file 1207s when file contains `required_ruby_version` as a string 1207s sets target_ruby from inclusive range 1207s sets target_ruby from exclusive range 1207s sets target_ruby from approximate version 1207s when file contains `required_ruby_version` as an array 1207s sets target_ruby to the minimal version satisfying the requirements 1207s sets target_ruby from required_ruby_version with many requirements 1207s when file contains `required_ruby_version` as a requirement 1207s sets target_ruby from required_ruby_version from inclusive requirement range 1207s sets first known ruby version that satisfies requirement 1207s when file does not contain `required_ruby_version` 1207s sets default target_ruby 1207s when .tool-versions is present 1207s when .tool-versions does not contain a ruby version 1208s uses the default ruby version 1208s when .tool-versions contains a ruby version 1208s does not read Gemfile.lock, gems.locked 1208s reads it to determine the target ruby version 1208s when .ruby-version is in a parent directory 1208s reads it to determine the target ruby version 1208s when .ruby-version is present 1208s does not read .tool-versions, Gemfile.lock or gems.locked 1208s when .ruby-version contains a JRuby version 1208s uses the default target ruby version 1208s when the MRI version contains multiple digits 1208s reads it to determine the target ruby version 1208s when .ruby-version contains an MRI version 1208s reads it to determine the target ruby version 1208s when .ruby-version contains a Rbx version 1208s uses the default target ruby version 1208s when .ruby-version contains a version prefixed by "ruby-" 1208s correctly determines the target ruby version 1208s when .ruby-version contains "system" version 1208s uses the default target ruby version 1208s when .ruby-version is not in a parent directory 1208s when gems.locked is in a parent directory 1208s does 1208s when Gemfile.lock is in a parent directory 1208s does 1208s 1208s RuboCop::Cop::Lint::SafeNavigationWithEmpty 1208s in a conditional 1208s does not register an offense on `.empty?` 1208s registers an offense and corrects on `&.empty?` 1208s outside a conditional 1208s registers no offense 1208s 1208s RuboCop::Cop::Layout::IndentationConsistency 1208s with block 1208s does not autocorrect an offense within another offense 1208s accepts an empty block body 1208s accepts a correctly indented block body 1208s registers an offense and corrects bad indentation in a {} body 1208s registers an offense and correct bad indentation in a do/end body 1208s with unless 1208s registers an offense and corrects bad indentation in an unless body 1208s accepts an empty unless 1208s with module 1208s registers an offense and corrects bad indentation in a module body 1208s accepts an empty module body 1208s registers an offense and corrects bad indentation of private methods 1208s even when there are no public methods 1208s registers an offense and corrects bad indentation of private methods 1208s with top-level code 1208s accepts an empty expression string interpolation 1208s accepts when using access modifier at the top level 1208s registers and corrects an offense when using access modifier and indented method definition at the top level 1208s with class 1208s with normal style configured 1208s registers an offense and corrects bad indentation in a class body 1208s registers an offense and corrects bad indentation in def but not for outdented public, protected, and private 1208s accepts an empty class body 1208s accepts indented public, protected, and private 1208s with indented_internal_methods style configured 1208s accepts different indentation in different visibility sections 1208s accepts different indentation in different visibility sections when using `Struct.new` 1208s with if statement 1208s accepts an if/else in assignment on next line with end aligned with if 1208s registers an offense and corrects bad indentation in an elsif body 1208s accepts an if/else in assignment with end aligned with variable and chaining after the end 1208s accepts an if/else in assignment with end aligned with if 1208s accepts if/elsif/else/end laid out as a table 1208s accepts an if/else in assignment with end aligned with variable and chaining with a block after the end 1208s registers an offense and corrects bad indentation in an if body 1208s accepts an if/else branches with rescue clauses 1208s accepts an if in assignment with end aligned with variable 1208s accepts if/then/else/end laid out as another table 1208s accepts a one line if statement 1208s accepts if/elsif/else/end with fullwidth characters 1209s accepts an if/else in assignment with end aligned with variable 1209s accepts an if in assignment with end aligned with if 1209s accepts a correctly aligned if/elsif/else/end 1209s accepts an empty if 1209s registers an offense and corrects bad indentation in an else body 1209s with case 1209s accepts case/when/else laid out as a table 1209s accepts correctly indented case/when/else 1209s accepts case/when/else with then beginning a line 1209s accepts indented when/else plus indented body 1209s registers an offense and corrects bad indentation in a case/else body 1209s registers an offense and corrects bad indentation in a case/when body 1209s with def/defs 1209s accepts an empty def body 1209s registers an offense and corrects bad indentation in a def body 1209s accepts an empty defs body 1209s registers an offense and corrects bad indentation in a defs body 1209s with for 1209s registers an offense and corrects bad indentation in a for body 1209s accepts an empty for 1209s with while/until 1209s registers an offense and corrects bad indentation in begin/end/while 1209s registers an offense and corrects bad indentation in an until body 1209s registers an offense and corrects bad indentation in a while body 1209s accepts an empty while 1209s 1209s RuboCop::Cop::InternalAffairs::LocationLineEqualityComparison 1209s registers an offense and corrects when using `loc.first_line` 1209s registers an offense and corrects when using `first_line` 1209s does not register an offense when using `same_line?` 1209s registers and corrects an offense when comparing `#loc.line` with LHS and RHS 1209s registers an offense and corrects when using `source_range.first_line` 1209s registers and corrects an offense when comparing `#loc.source_range` with LHS and RHS 1209s 1209s RuboCop::Cop::Style::SignalException 1209s when enforced style is `fail` 1209s registers an offense for raise in begin section 1209s accepts `raise` with explicit receiver 1209s registers an offense for raise in def body 1209s registers an offense for raise in rescue section 1210s registers an offense for `raise` with `Kernel` as explicit receiver 1210s when enforced style is `semantic` 1210s registers one offense for each raise 1210s accepts raise in def with multiple rescues 1210s accepts raise in rescue section 1210s registers an offense for raise not in a begin/rescue/end 1210s accepts `raise` and `fail` with explicit receiver 1210s registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver 1210s registers an offense for raise in begin section 1210s registers an offense for `raise` and `fail` with `Kernel` as explicit receiver 1210s registers an offense for fail in rescue section 1210s accepts raise in def rescue section 1210s is not confused by nested begin/rescue 1210s registers an offense for fail in def rescue section 1210s registers only offense for one raise that should be fail 1210s registers an offense for raise in def body 1210s registers an offense for fail in second rescue 1210s when enforced style is `raise` 1210s accepts `fail` if a custom `fail` singleton method is defined 1210s accepts `fail` if a custom `fail` instance method is defined 1210s accepts `fail` with explicit receiver 1210s registers an offense for fail in def body 1210s registers an offense for `fail` with `Kernel` as explicit receiver 1210s registers an offense for fail in begin section 1210s registers an offense for fail in rescue section 1210s 1210s RuboCop::Cop::Style::MultilineMemoization 1210s EnforcedStyle: keyword 1210s with a multiline memoization 1210s without a `begin` and `end` block 1210s allows with a conditional on the first line 1210s allows with another block on the first line 1210s allows with a conditional on the following line 1210s allows with another block on the following line 1210s with a single line memoization 1210s allows expression on first line 1210s allows expression on the following line 1210s with a multiline memoization 1210s without a `begin` and `end` block 1210s when the expression is wrapped in parentheses 1210s registers an offense with multiline expression 1210s registers an offense when expression starts on first line 1210s registers an offense when expression starts on following line 1210s EnforcedStyle: braces 1210s with a single line memoization 1210s allows expression on the following line 1210s allows expression on first line 1210s with a multiline memoization 1210s without a `begin` and `end` block 1210s allows with another block on the following line 1210s allows with another block on the first line 1210s allows with a conditional on the following line 1210s allows with a conditional on the first line 1210s with a multiline memoization 1210s without braces 1210s when the expression is wrapped in `begin` and `end` keywords 1210s registers an offense for begin...end block on following line 1210s registers an offense for begin...end block on first line 1210s 1210s RuboCop::Cop::VisibilityHelp 1210s #node_visibility 1210s with visibility block public 1210s is expected to eq :public 1210s without visibility block 1210s is expected to eq :public 1210s with inline private 1210s is expected to eq :private 1210s with inline private with symbol 1210s is expected to eq :private 1210s with visibility block private after public 1210s is expected to eq :private 1210s with visibility block private 1210s is expected to eq :private 1210s with inline public 1210s is expected to eq :public 1210s 1210s RuboCop::Cop::Style::RescueModifier 1210s does not register an offense for normal rescue with ensure 1210s does not register an offense for normal rescue 1210s registers an offense for modifier rescue 1210s handles parentheses around a rescue modifier 1210s handles modifier rescue in a method 1210s does not register an offense for nested normal rescue 1210s handles modifier rescue in normal rescue 1210s registers an offense for modifier rescue around parallel assignment 1210s handles more complex expression with modifier rescue 1210s when a singleton method has implicit begin 1210s accepts normal rescue 1210s handles modifier rescue in body of implicit begin 1210s excluded file 1210s processes excluded files with issue 1210s when an instance method has implicit begin 1210s handles modifier rescue in body of implicit begin 1210s accepts normal rescue 1210s autocorrect 1210s corrects doubled rescue modifiers 1210s corrects complex rescue modifier 1210s 1210s RuboCop::Cop::Style::RedundantException 1210s reports an offense for a fail with ::RuntimeError.new 1210s reports an offense for a raise with RuntimeError.new 1210s accepts rescue w/ non redundant error 1210s reports an offense for a fail with ::RuntimeError and () 1210s reports an offense for a raise with ::RuntimeError and () 1210s accepts a fail with ::RuntimeError if it does not have 2 args 1210s reports an offense for a raise with RuntimeError 1210s reports an offense for a fail with RuntimeError.new 1211s accepts rescue w/ non redundant error 1211s accepts rescue w/ non redundant error 1211s reports an offense for a fail with RuntimeError 1211s accepts a raise with RuntimeError if it does not have 2 args 1211s reports an offense for a raise with ::RuntimeError.new 1211s reports an offense for a fail with ::RuntimeError.new 1211s reports an offense for a fail with ::RuntimeError 1211s accepts rescue w/ non redundant error 1211s accepts a raise with ::RuntimeError if it does not have 2 args 1211s reports an offense for a raise with RuntimeError and () 1211s reports an offense for a raise with ::RuntimeError.new 1211s reports an offense for a raise with ::RuntimeError 1211s reports an offense for a fail with RuntimeError.new 1211s reports an offense for a raise with RuntimeError.new 1211s reports an offense for a fail with RuntimeError and () 1211s accepts a fail with RuntimeError if it does not have 2 args 1211s 1211s RuboCop::Cop::Style::RedundantSelfAssignment 1211s registers an offense and corrects when assigning to attribute of `self` 1211s does not register an offense when lhs and receiver are different 1211s registers an offense and corrects when assigning to attribute of non `self` 1211s does not register an offense when there is no a receiver 1211s does not register an offense when assigning to attribute of `self` the result from other object 1211s when lhs and receiver are the same 1211s registers an offense and corrects when assigning to global variable 1211s registers an offense and corrects when assigning to local variable 1211s registers an offense and corrects when assigning to instance variable 1211s registers an offense and corrects when assigning to class variable 1211s 1211s RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral 1211s accepts non array percent literals 1211s for i type and ["[", "]"] delimiters 1211s accepts literals without additional spaces 1211s accepts literals with escaped spaces 1211s accepts newlines and additional following alignment spaces 1211s accepts literals with escaped and additional spaces 1211s accepts multi-line literals 1211s registers an offense for multiple spaces between items 1211s accepts multi-line literals within a method 1211s registers an offense for unnecessary spaces 1211s for I type and ["!", "!"] delimiters 1211s accepts newlines and additional following alignment spaces 1211s registers an offense for unnecessary spaces 1211s accepts multi-line literals within a method 1211s accepts literals without additional spaces 1211s accepts literals with escaped spaces 1211s accepts multi-line literals 1211s registers an offense for multiple spaces between items 1211s accepts literals with escaped and additional spaces 1211s for W type and ["(", ")"] delimiters 1211s accepts multi-line literals 1211s accepts newlines and additional following alignment spaces 1211s accepts literals without additional spaces 1211s registers an offense for unnecessary spaces 1211s accepts multi-line literals within a method 1211s accepts literals with escaped spaces 1211s accepts literals with escaped and additional spaces 1211s registers an offense for multiple spaces between items 1211s for w type and ["[", "]"] delimiters 1211s accepts multi-line literals 1211s accepts multi-line literals within a method 1211s registers an offense for unnecessary spaces 1211s registers an offense for multiple spaces between items 1211s accepts literals with escaped spaces 1211s accepts literals with escaped and additional spaces 1211s accepts literals without additional spaces 1211s accepts newlines and additional following alignment spaces 1211s for i type and ["(", ")"] delimiters 1211s registers an offense for multiple spaces between items 1211s accepts multi-line literals 1211s accepts literals with escaped spaces 1211s accepts literals without additional spaces 1211s accepts literals with escaped and additional spaces 1211s accepts multi-line literals within a method 1211s accepts newlines and additional following alignment spaces 1211s registers an offense for unnecessary spaces 1211s for W type and ["[", "]"] delimiters 1212s accepts newlines and additional following alignment spaces 1212s registers an offense for unnecessary spaces 1212s accepts multi-line literals within a method 1212s accepts literals with escaped and additional spaces 1212s accepts multi-line literals 1212s accepts literals with escaped spaces 1212s accepts literals without additional spaces 1212s registers an offense for multiple spaces between items 1212s for I type and ["(", ")"] delimiters 1212s accepts literals with escaped and additional spaces 1212s registers an offense for multiple spaces between items 1212s accepts literals without additional spaces 1212s accepts literals with escaped spaces 1212s registers an offense for unnecessary spaces 1212s accepts multi-line literals 1212s accepts newlines and additional following alignment spaces 1212s accepts multi-line literals within a method 1212s for i type and ["!", "!"] delimiters 1212s registers an offense for multiple spaces between items 1212s accepts newlines and additional following alignment spaces 1212s registers an offense for unnecessary spaces 1212s accepts multi-line literals within a method 1212s accepts literals with escaped spaces 1212s accepts literals without additional spaces 1212s accepts literals with escaped and additional spaces 1212s accepts multi-line literals 1212s for w type and ["(", ")"] delimiters 1212s accepts multi-line literals within a method 1212s accepts newlines and additional following alignment spaces 1212s accepts literals with escaped spaces 1212s accepts multi-line literals 1212s registers an offense for unnecessary spaces 1212s accepts literals with escaped and additional spaces 1212s accepts literals without additional spaces 1212s registers an offense for multiple spaces between items 1212s for W type and ["!", "!"] delimiters 1212s accepts literals with escaped and additional spaces 1212s accepts newlines and additional following alignment spaces 1212s accepts multi-line literals within a method 1212s registers an offense for unnecessary spaces 1212s accepts literals without additional spaces 1212s accepts multi-line literals 1212s accepts literals with escaped spaces 1212s registers an offense for multiple spaces between items 1212s for i type and ["{", "}"] delimiters 1212s accepts multi-line literals within a method 1212s accepts newlines and additional following alignment spaces 1212s registers an offense for unnecessary spaces 1212s registers an offense for multiple spaces between items 1212s accepts literals without additional spaces 1212s accepts literals with escaped spaces 1212s accepts literals with escaped and additional spaces 1212s accepts multi-line literals 1212s for I type and ["[", "]"] delimiters 1213s accepts multi-line literals within a method 1213s accepts newlines and additional following alignment spaces 1213s registers an offense for unnecessary spaces 1213s accepts literals with escaped and additional spaces 1213s registers an offense for multiple spaces between items 1213s accepts literals with escaped spaces 1213s accepts multi-line literals 1213s accepts literals without additional spaces 1213s for W type and ["{", "}"] delimiters 1213s registers an offense for unnecessary spaces 1213s accepts newlines and additional following alignment spaces 1213s accepts literals without additional spaces 1213s accepts multi-line literals 1213s accepts multi-line literals within a method 1213s accepts literals with escaped spaces 1213s registers an offense for multiple spaces between items 1213s accepts literals with escaped and additional spaces 1213s for w type and ["!", "!"] delimiters 1213s accepts multi-line literals 1213s accepts literals without additional spaces 1213s registers an offense for unnecessary spaces 1213s accepts multi-line literals within a method 1213s accepts literals with escaped and additional spaces 1213s accepts literals with escaped spaces 1213s accepts newlines and additional following alignment spaces 1213s registers an offense for multiple spaces between items 1213s for I type and ["{", "}"] delimiters 1213s accepts literals without additional spaces 1213s accepts multi-line literals within a method 1213s registers an offense for multiple spaces between items 1213s accepts newlines and additional following alignment spaces 1213s accepts literals with escaped and additional spaces 1213s accepts literals with escaped spaces 1213s registers an offense for unnecessary spaces 1213s accepts multi-line literals 1213s for w type and ["{", "}"] delimiters 1213s registers an offense for multiple spaces between items 1213s accepts multi-line literals within a method 1213s accepts newlines and additional following alignment spaces 1213s accepts multi-line literals 1213s registers an offense for unnecessary spaces 1213s accepts literals without additional spaces 1213s accepts literals with escaped spaces 1213s accepts literals with escaped and additional spaces 1213s 1213s RuboCop::Cop::Style::StringLiteralsInInterpolation 1213s configured with double quotes preferred 1213s registers an offense for single quotes within embedded expression in a heredoc string 1213s registers an offense for single quotes within embedded expression 1213s when configured with a bad value 1213s fails 1213s configured with single quotes preferred 1213s registers an offense for double quotes within embedded expression 1213s registers an offense for double quotes within embedded expression in a heredoc string 1213s can handle a built-in constant parsed as string 1213s can handle character literals 1213s accepts double quotes on static strings within a method 1213s accepts double quotes on a static string 1213s accepts double quotes on a broken static string 1213s 1213s RuboCop::Cop::Style::RedundantInitialize 1213s registers and corrects an offense for an `initialize` method with no arguments that calls `super` with no arguments 1213s registers an offense for an `initialize` method with a default argument that does nothing 1213s does not register an offense for a method not named `initialize` that only calls super 1213s does not register an offense for an empty `initialize` method with a splat` 1213s does not register an offense for an empty `initialize` method with a splat` and super 1214s does not register an offense for an `initialize` method that calls `super` with no arguments 1214s registers an offense for an `initialize` method with a default keyword argument that does nothing 1214s registers and corrects an offense for an `initialize` method with arguments that only calls `super` with explicit args 1214s does not register an offense for an empty `initialize` method with a argument forwarding` 1214s does not register an offense for an `initialize` method that calls another method 1214s does not register an offense for an empty method not named `initialize` 1214s does not register an offense for an `initialize` method that calls another method after `super` 1214s registers and corrects an offense for an empty `initialize` method 1214s does not register an offense for an `initialize` method with only a comment 1214s does not register an offense for an `initialize` method with a default keyword argument that calls `super` 1214s does not register an offense for an empty `initialize` method with a kwsplat` 1214s does not register an offense for an `initialize` method with a default argument that calls `super` 1214s registers and corrects an offense for an `initialize` method that only calls `super` 1214s registers and corrects an offense for an `initialize` method with arguments that only calls `super` 1214s does not register an offense for an `initialize` method that calls another method before `super` 1214s does not register an offense for an `initialize` method that calls `super` with a different argument list 1214s when `AllowComments: false` 1214s registers and corrects an offense for an `initialize` method with only a comment 1214s 1214s RuboCop::Cop::Style::HashLikeCase 1214s MinBranchesCount: 3 1214s does not register an offense when branches count is less than required 1214s MinBranchesCount: 2 1214s does not register an offense when using `case-when` with literals of different types as conditions 1214s does not register an offense when `case` has an `else` branch 1214s registers an offense when using `case-when` with symbol conditions and literal bodies of the same type 1214s does not register an offense when using `case-when` with non-literals in conditions 1214s does not register an offense when using `case-when` with literal bodies of different types 1214s does not register an offense when using `case-when` with non-literal bodies 1214s registers an offense when using `case-when` with string conditions and literal bodies of the same type 1214s 1214s RuboCop::Cop::Layout::ClosingParenthesisIndentation 1214s accepts begin nodes that are not grouped expressions 1214s for method definitions 1214s with no line break before 1st parameter 1214s accepts empty () 1214s registers an offense for misaligned ) 1214s accepts a correctly aligned ) 1214s with line break before 1st parameter 1214s accepts a correctly aligned ) 1214s registers an offense for misaligned ) 1214s for method calls 1214s with line break before 1st parameter 1214s accepts a correctly aligned ) 1214s registers an offense for misaligned ) 1214s without arguments 1214s accepts a correctly aligned ) against ( 1214s accepts empty () 1214s can handle indentation up against the left edge 1214s with no line break before 1st parameter 1214s accepts a correctly indented ) inside a block 1214s registers an offense for misaligned ) 1214s accepts a correctly aligned ) 1214s accepts a correctly indented ) 1214s does not register an offense when using keyword arguments 1214s registers an offense and corrects misindented ) when ) is aligned with the params 1214s with first multiline arg on new line 1215s accepts ) on the same level as ( with args on same line 1215s accepts ) on the same level as ( with second arg on new line 1215s for method chains 1215s registers an offense and corrects method chains 1215s can handle multiple chains with differing breaks 1215s when using safe navigation operator 1215s registers an offense and corrects misaligned ) 1215s for method assignments with indented parameters 1215s without arguments 1215s accepts empty () 1215s accepts a correctly aligned ) against ( 1215s can handle indentation up against the method 1215s registers an offense for misaligned ) 1215s can handle indentation up against the left edge 1215s with no line break before 1st parameter 1215s accepts a correctly indented ) 1215s can handle individual arguments that are broken over lines 1215s can handle inner method calls 1215s registers an offense for misaligned ) 1215s accepts a correctly aligned ) 1215s can handle hash arguments that are not broken over lines 1215s can handle indentation up against the left edge 1215s with line break before 1st parameter 1215s registers an offense for misaligned ) 1215s accepts a correctly aligned ) 1215s for grouped expressions 1215s with no line break before 1st operand 1215s accepts a correctly aligned ) 1215s accepts ) that does not begin its line 1215s registers an offense for misaligned ) 1215s with line break before 1st operand 1215s registers an offense for misaligned ) 1215s accepts a correctly aligned ) 1215s 1215s RuboCop::PathUtil 1215s #relative_path 1215s supports custom base paths 1215s builds paths relative to PWD by default as a stop-gap 1215s #match_path? 1215s matches strings to the full path 1215s matches glob expressions 1215s does not match invalid UTF-8 paths 1215s does not match file in a subdirectory 1215s does not match dir/** for file in hidden dir 1215s matches regexps 1215s matches dir/** for hidden file 1215s #absolute? 1215s returns a falsey value for a path beginning with a directory name 1215s returns a truthy value for a path beginning with slash 1215s 1215s RuboCop::Cop::Layout::SpaceAfterColon 1215s accepts colons denoting required keyword argument 1215s registers an offense and corrects colon without space after it 1215s registers an offense and corrects a keyword optional argument without a space 1215s accepts hash rockets 1215s accepts required keyword arguments 1215s accepts if 1215s accepts hashes with a space after colons 1215s accepts colons in symbols 1215s accepts colons in strings 1215s accepts colon in ternary followed by space 1215s Ruby >= 3.1 1215s accepts colons denoting hash value omission argument 1215s does not register an offense colon without space after it when using hash value omission 1215s 1215s RuboCop::Cop::Generator::RequireFileInjector 1215s when a `require_relative` entry does not exist from before 1215s injects a `require_relative` statement on the right line in the root file 1215s when using an unknown department 1215s inserts a `require_relative` statement to the bottom of the file 1215s when a `require` entry already exists 1215s does not write to any file 1215s when a cop of style department already exists 1215s injects a `require_relative` statement on the end of style department 1215s 1215s RuboCop::Cop::Layout::EmptyLines 1215s does not register an offense for empty lines in a string 1215s does not register an offense for heredocs with empty lines inside 1215s registers an offense for consecutive empty lines 1215s does not register an offense for comments 1215s does not register an offense when there are no tokens 1215s 1215s RuboCop::Cop::Style::WhileUntilModifier 1215s behaves like condition modifier cop 1215s for a multiline 'while' 1215s handles inline comments during autocorrection 1216s doesn't break when used as RHS of instance var assignment 1216s doesn't break when used as RHS of binary arithmetic 1216s accepts it if single line would not fit on one line 1216s handles one-line usage 1216s accepts an empty body 1216s corrects it if result fits in one line 1216s accepts it when condition has local variable assignment 1216s corrects it when assignment is in body 1216s doesn't break when used as RHS of constant assignment 1216s doesn't break when used as RHS of class var assignment 1216s doesn't break when used as RHS of local var assignment 1216s accepts it if body spans more than one line 1216s accepts multiline condition in modifier form 1216s registers an offense 1216s when Layout/LineLength is disabled 1216s registers an offense even for a long modifier statement 1216s when there is a comment on the first line and some code after the end keyword 1216s does not register an offense 1216s behaves like condition modifier cop 1216s for a multiline 'until' 1216s doesn't break when used as RHS of binary arithmetic 1216s accepts it if body spans more than one line 1216s accepts an empty body 1216s accepts it if single line would not fit on one line 1216s handles one-line usage 1216s corrects it if result fits in one line 1216s doesn't break when used as RHS of constant assignment 1216s doesn't break when used as RHS of local var assignment 1216s doesn't break when used as RHS of instance var assignment 1216s handles inline comments during autocorrection 1216s doesn't break when used as RHS of class var assignment 1216s accepts it when condition has local variable assignment 1216s corrects it when assignment is in body 1216s accepts multiline condition in modifier form 1216s registers an offense 1216s when Layout/LineLength is disabled 1216s registers an offense even for a long modifier statement 1216s when there is a comment on the first line and some code after the end keyword 1216s does not register an offense 1216s 1216s RuboCop::Cop::Style::InverseMethods 1216s registers an offense for !(foo != bar) 1216s registers an offense for comparing snake case constants on the left 1216s registers an offense for calling !.none? with a block 1216s registers an offense for !foo.odd? 1216s registers an offense for !(foo < bar) 1216s allows a method call without a not 1216s registers an offense for calling !.none? with a symbol proc 1216s registers an offense for !foo.even? 1216s registers an offense for not (foo !~ bar) 1216s registers an offense for !(foo !~ bar) 1217s allows comparing camel case constants on the left 1217s registers an offense for !foo.include? 1217s allows comparing camel case constants on the right 1217s registers an offense for !foo.present? 1217s allows an inverse method with a block when double negation is used 1217s registers an offense for !foo.none? 1217s registers an offense for !(foo == bar) 1217s allows an inverse method when double negation is used 1217s registers an offense for !foo.exclude? 1217s registers an offense for !foo.blank? 1217s registers an offense for not (foo < bar) 1217s registers an offense for not (foo > bar) 1217s registers an offense for calling !.any? inside parens 1217s registers an offense for not (foo == bar) 1217s registers an offense for not (foo != bar) 1217s registers an offense for comparing snake case constants on the right 1217s registers an offense for !(foo =~ bar) 1217s allows an inverse method in a block with next 1217s registers an offense for !(foo > bar) 1217s registers an offense for not (foo =~ bar) 1217s registers an offense for !foo.any? 1217s behaves like all variable types 1217s registers an offense for calling not foo.none? 1217s registers an offense for calling !foo.none? 1217s inverse blocks 1217s corrects an inverted method call when using `BasicObject#!` 1217s corrects a complex inverted method call 1217s registers a single offense for nested inverse method calls 1217s registers an offense for a multiline method call where the last method is inverted 1217s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 1217s registers an offense for foo.reject { |e| !e } 1217s corrects an inverted method call 1218s registers an offense for foo.select! { |e| !e } 1218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 1218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 1218s registers an offense for a multiline inverted equality block 1218s registers an offense for foo.reject! { |e| !e } 1218s corrects an inverted method call when using `BasicObject#!` 1218s registers an offense for an inverted equality block 1218s registers an offense for an inverted equality block 1218s registers a single offense for nested inverse method calls 1218s registers an offense for foo.select { |e| !e } 1218s corrects an inverted method call when using `BasicObject#!` with spaces before the method call 1218s registers an offense for a multiline inverted equality block 1218s registers a single offense for nested inverse method calls 1218s corrects an inverted method call 1218s corrects an inverted method call 1218s corrects an inverted do end method call 1218s registers an offense for a multiline inverted equality block 1218s registers a single offense for nested inverse method calls 1219s registers an offense for a multiline inverted equality block 1219s corrects a complex inverted method call 1219s corrects a complex inverted method call 1219s registers an offense for a multiline method call where the last method is inverted 1219s registers an offense for an inverted equality block 1219s corrects an inverted do end method call 1219s corrects an inverted method call when using `BasicObject#!` 1219s corrects a complex inverted method call 1219s corrects an inverted do end method call 1219s corrects an inverted method call when using `BasicObject#!` 1219s registers an offense for a multiline method call where the last method is inverted 1219s registers an offense for a multiline method call where the last method is inverted 1219s corrects an inverted do end method call 1219s corrects an inverted method call 1219s registers an offense for an inverted equality block 1219s behaves like all variable types 1219s registers an offense for calling not foo.bar.none? 1219s registers an offense for calling !foo.bar.none? 1219s behaves like all variable types 1219s registers an offense for calling not FOO::BAR.none? 1219s registers an offense for calling !FOO::BAR.none? 1219s behaves like all variable types 1219s registers an offense for calling !FOO.none? 1219s registers an offense for calling not FOO.none? 1219s behaves like all variable types 1219s registers an offense for calling not @@foo.none? 1219s registers an offense for calling !@@foo.none? 1219s behaves like all variable types 1219s registers an offense for calling !@foo.none? 1219s registers an offense for calling not @foo.none? 1219s behaves like all variable types 1219s registers an offense for calling not foo["bar"].none? 1219s registers an offense for calling !foo["bar"].none? 1219s behaves like all variable types 1219s registers an offense for calling !$foo.none? 1219s registers an offense for calling not $foo.none? 1219s Ruby 2.7 1220s registers an offense for calling !.none? with a numblock 1220s 1220s RuboCop::Cop::Layout::EmptyComment 1220s does not register an offense when using comment text with leading and trailing blank lines 1220s registers an offense and corrects using single line empty comment 1220s register offenses and correct multiple aligned empty comments next to code 1220s register offenses and correct multiple empty comments next to code 1220s registers an offense and corrects using multiline empty comments 1220s does not register an offense when using comment text 1220s registers an offense and corrects an empty comment without space next to code 1220s registers an offense and corrects using an empty comment next to code 1220s allow border comment (default) 1220s does not register an offense when using border comment 1220s disallow border comment 1220s registers an offense and corrects using single line empty comment 1220s registers an offense and corrects using border comment 1220s allow margin comment (default) 1220s does not register an offense when using margin comment 1220s disallow margin comment 1220s registers an offense and corrects using margin comment 1220s 1220s RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout 1220s ignores single-line defs 1220s ignores defs without params 1220s ignores implicit defs 1220s same_line style 1220s opening brace on separate line from first element 1220s allows closing brace on same line as last multiline element 1220s detects closing brace on different line from last element 1220s allows closing brace on same line as last element 1220s opening brace on same line as first element 1220s allows closing brace on same line from last element 1220s detects closing brace on different line from multiline element 1220s autocorrects closing brace on different line as last element 1220s allows closing brace on same line as multi-line element 1220s new_line style 1220s opening brace on same line as first element 1220s autocorrects closing brace on same line as last element 1220s detects closing brace on same line as last multiline element 1220s allows closing brace on different line from last element 1220s allows closing brace on different line from multi-line element 1220s opening brace on separate line from first element 1220s allows closing brace on separate line from last element 1220s detects closing brace on same line as last element 1220s allows closing brace on separate line from last multiline element 1220s symmetrical style 1220s opening brace on same line as first element 1220s allows closing brace on same line as last multiline element 1220s detects closing brace on different line from last element 1220s allows closing brace on same line as last element 1220s autocorrects closing brace on different line from last element 1220s opening brace on separate line from first element 1220s allows closing brace on separate line from last element 1220s allows closing brace on separate line from last multiline element 1220s detects closing brace on same line as last element 1220s heredoc 1220s ignores heredocs that could share a last line 1220s detects heredoc structures that are safe to add to 1220s 1220s RuboCop::Cop::Style::Encoding 1220s registers an offense when encoding present and UTF-8 1220s registers an offense when encoding present on 2nd line after shebang 1221s does not register an offense when no encoding present 1221s registers an offense and corrects the magic comment follows another magic comment 1221s does not register an offense when encoding is not at the top of the file 1221s registers an offense and corrects if there are multiple encoding magic comments 1221s does not register an offense on a different magic comment type 1221s does not register an offense when encoding is in the wrong place 1221s does not register an offense when encoding present but not UTF-8 1221s vim comments 1221s registers an offense and corrects 1221s emacs comment 1221s registers an offense for encoding 1221s only removes encoding if there are other editor comments 1221s 1221s RuboCop::Cop::Style::HashTransformValues 1221s below Ruby 2.6 1221s does not flag _.to_h{...} 1221s when using Ruby 2.4 or newer 1221s does not flag `each_with_object` when its receiver is `each_with_index` 1221s does not flag `_.map{...}.to_h` when its receiver is `each_with_index` 1221s flags _.map {...}.to_h when transform_values could be used when wrapped in another block 1221s flags _.map {...}.to_h when transform_values could be used 1221s does not flag `Hash[_.map{...}]` when its receiver is an array literal 1221s does not flag `_.map{...}.to_h` when its receiver is `with_index` 1221s does not flag Hash[_.map{...}] when both key & value are transformed 1221s does not flag `Hash[_.map{...}]` when its receiver is `with_index` 1221s does not flag `_.map{...}.to_h` when its receiver is `zip` 1221s does not flag `each_with_object` when its receiver is `with_index` 1221s does not flag each_with_object when both key & value are transformed 1221s does not flag `Hash[_.map{...}]` when its receiver is `zip` 1221s flags Hash[_.map{...}] when transform_values could be used 1221s does not flag _.map{...}.to_h when both key & value are transformed 1221s does not flag each_with_object when no transformation occurs 1222s does not flag each_with_object when receiver is array literal 1222s correctly autocorrects _.map{...}.to_h with block 1222s does not flag each_with_object when value transformation uses key 1222s does not flag `each_with_object` when its argument is used in the value 1222s does not flag `Hash[_.map{...}]` when its receiver is `each_with_index` 1222s does not flag each_with_object when its argument is not modified 1222s does not flag value transformation when receiver is array literal 1222s does not flag _.map {...}.to_h when value block argument is unused 1222s does not flag `each_with_object` when its receiver is `zip` 1222s flags _.map {...}.to_h when transform_values could be used when line break before `to_h` 1222s does not flag value transformation in the absence of to_h 1222s with safe navigation operator 1222s flags each_with_object when transform_values could be used 1222s with inline block 1222s flags each_with_object when transform_values could be used 1222s with multiline block 1222s flags each_with_object when transform_values could be used 1222s when using Ruby 2.6 or newer 1222s does not flag _.to_h {...} when value block argument is unused 1222s register and corrects an offense _.to_h{...} when value is a hash literal and is not enclosed in braces 1222s does not flag `_.to_h{...}` when its receiver is `zip` 1222s flags _.to_h{...} when transform_values could be used 1222s does not flag `_.to_h{...}` when its receiver is an array literal 1222s does not flag `_.to_h{...}` when its receiver is `with_index` 1222s does not flag `_.to_h{...}` when its receiver is `each_with_index` 1222s does not flag `_.to_h{...}` when both key & value are transformed 1222s register and corrects an offense _.to_h{...} when value is a hash literal and is enclosed in braces 1222s below Ruby 2.4 1222s does not flag even if transform_values could be used 1222s 1222s RuboCop::Cop::Lint::DuplicateCaseCondition 1222s registers an offense for subsequent repeated case conditionals 1222s registers multiple offenses for multiple repeated case conditionals 1222s registers multiple offenses for repeated multi-value conditionals 1222s accepts non-redundant case expressions with an else expression 1222s accepts trivial case expressions 1222s registers an offense for repeated case conditionals 1222s accepts non-redundant case expressions 1222s registers an offense for repeated logical operator when expressions 1222s accepts similar but not equivalent && expressions 1222s 1222s RuboCop::Cop::Gemspec::OrderedDependencies 1222s when different dependencies are consecutive 1222s does not register any offenses 1222s When using method call to gem names 1222s does not register any offenses 1222s behaves like ordered dependency 1222s when add_runtime_dependency 1222s When gems are alphabetically sorted 1222s does not register any offenses 1222s when each individual group of line is sorted 1222s does not register any offenses 1222s when dependency is separated by multiline comment 1222s with TreatCommentsAsGroupSeparators: true 1222s accepts 1222s with TreatCommentsAsGroupSeparators: false 1222s registers an offense 1222s when gems are not alphabetically sorted 1222s registers an offense 1222s When using a local variable in an argument of dependent gem 1222s does not register any offenses 1222s behaves like ordered dependency 1222s when add_dependency 1222s when dependency is separated by multiline comment 1222s with TreatCommentsAsGroupSeparators: false 1222s registers an offense 1222s with TreatCommentsAsGroupSeparators: true 1222s accepts 1222s when each individual group of line is sorted 1222s does not register any offenses 1222s when gems are not alphabetically sorted 1222s registers an offense 1222s When gems are alphabetically sorted 1222s does not register any offenses 1222s behaves like ordered dependency 1222s when add_development_dependency 1222s when gems are not alphabetically sorted 1222s registers an offense 1222s when dependency is separated by multiline comment 1222s with TreatCommentsAsGroupSeparators: false 1223s registers an offense 1223s with TreatCommentsAsGroupSeparators: true 1223s accepts 1223s When gems are alphabetically sorted 1223s does not register any offenses 1223s when each individual group of line is sorted 1223s does not register any offenses 1223s 1223s RuboCop::Cop::Lint::UnmodifiedReduceAccumulator 1223s behaves like reduce/inject 1223s does not affect inject called with no block args 1223s does not affect inject called without a block 1223s given a inject block 1223s does not register an offense when returning the accumulator in an expression 1223s registers an offense for values returned with `break` 1223s does not register an offense when shovelling the accumulator 1223s does not register an offense when op-assigning the accumulator 1223s registers an offense when mutating the accumulator with the element but not returning it 1223s does not register an offense when returning a method called on the accumulator 1223s registers an offense when returning the element 1223s does not register an offense when calling a method on the accumulator with the element 1223s does not register an offense with the accumulator in heredoc 1224s registers an offense when returning an expression with the element 1224s does not register an offense if the return value cannot be determined 1224s does not register an offense with the accumulator in interpolation 1224s registers an offense when returning an index setter on the accumulator 1224s registers an offense when called with no argument 1224s does not register an offense when returning accumulator[element] 1224s registers an offense when returning accumulator[element]= 1224s does not register an offense when or-assigning the accumulator 1224s allows break with no value 1224s does not register an offense when and-assigning the accumulator 1224s allows the element to be the return value if the accumulator is returned in any branch 1224s does not register an offense when mutating the element with the another value 1224s does not register an offense when mutating the element with the accumulator 1224s does not register an offense when returning the accumulator in a boolean statement 1224s does not look inside inner blocks 1224s does not register an offense when returning a method called with the accumulator 1224s registers an offense for values returned with `next` 1224s does not register an offense when assigning the accumulator 1224s does not register an offense when comparing 1224s does not register an offense when returning the accumulator 1224s registers an offense with the element in interpolation 1224s does not register an offense when returning a literal 1224s registers an offense with the element in heredoc 1224s registers an offense when returning an index of the accumulator 1225s registers an offense for every violating return value 1225s numblocks 1225s registers an offense when returning the element 1225s does not register an offense when when returning the accumulator 1225s argument count 1225s ignores when there is a splat argument 1225s ignores when there are not enough block arguments 1225s registers an offense when there are more than two arguments but the element is returned 1225s behaves like reduce/inject 1225s does not affect reduce called with no block args 1225s does not affect reduce called without a block 1225s given a reduce block 1225s does not register an offense when mutating the element with the another value 1225s does not register an offense when op-assigning the accumulator 1225s does not register an offense when returning the accumulator 1225s does not register an offense when and-assigning the accumulator 1225s registers an offense when mutating the accumulator with the element but not returning it 1225s does not register an offense when returning a literal 1225s registers an offense with the element in interpolation 1225s does not register an offense if the return value cannot be determined 1225s does not register an offense with the accumulator in interpolation 1225s does not register an offense when assigning the accumulator 1225s does not register an offense when returning a method called on the accumulator 1225s registers an offense when returning an index setter on the accumulator 1225s registers an offense with the element in heredoc 1225s does not register an offense when returning a method called with the accumulator 1225s does not register an offense when calling a method on the accumulator with the element 1225s registers an offense when returning an index of the accumulator 1225s registers an offense when returning accumulator[element]= 1225s registers an offense for values returned with `break` 1225s registers an offense for values returned with `next` 1225s allows the element to be the return value if the accumulator is returned in any branch 1225s does not register an offense when returning the accumulator in a boolean statement 1225s does not register an offense when or-assigning the accumulator 1225s registers an offense when called with no argument 1225s registers an offense for every violating return value 1225s registers an offense when returning the element 1225s registers an offense when returning an expression with the element 1225s does not register an offense when returning accumulator[element] 1225s does not look inside inner blocks 1225s does not register an offense when returning the accumulator in an expression 1225s does not register an offense when mutating the element with the accumulator 1225s does not register an offense with the accumulator in heredoc 1225s allows break with no value 1225s does not register an offense when comparing 1225s does not register an offense when shovelling the accumulator 1225s argument count 1225s registers an offense when there are more than two arguments but the element is returned 1225s ignores when there are not enough block arguments 1225s ignores when there is a splat argument 1225s numblocks 1225s does not register an offense when when returning the accumulator 1226s registers an offense when returning the element 1226s 1226s RuboCop::Cop::Badge 1226s exposes cop name 1226s compares by value 1226s can be converted to a string with the Department/CopName format 1226s exposes department name 1226s .new 1226s assigns department 1226s assigns department 1226s assigns department 1226s assigns name 1226s assigns department 1226s assigns name 1226s assigns name 1226s assigns name 1226s #qualified? 1226s says `Department/CopName` is qualified 1226s says `Deep/Department/CopName` is qualified 1226s says `CopName` is not qualified 1226s #camel_case 1226s converts "foo_bar" to CamelCase 1226s converts "lint" to CamelCase 1226s converts "rspec" to CamelCase 1226s .for 1226s parses cop class name 1226s parses cop class name 1226s parses cop class name 1226s parses cop class name 1226s parses cop class name 1226s .parse 1226s parses identifier 1226s parses identifier 1226s parses identifier 1226s parses identifier 1226s parses identifier 1226s parses identifier 1226s 1226s RuboCop::Cop::Style::EndlessMethod 1226s Ruby >= 3.0 1226s EnforcedStyle: allow_single_line 1226s registers an offense and corrects for a multiline endless method 1226s does not register an offense for an endless method 1226s registers an offense and corrects for a multiline endless method with arguments 1226s registers an offense and corrects for a multiline endless method with begin 1226s does not register an offense for an endless method with arguments 1226s EnforcedStyle: disallow 1226s registers an offense for an endless method 1226s registers an offense for an endless method with arguments 1226s EnforcedStyle: allow_always 1226s does not register an offense for a multiline endless method 1226s does not register an offense for a multiline endless method with arguments 1226s does not register an offense for an endless method 1226s does not register an offense for an endless method with arguments 1226s does not register an offense for a multiline endless method with begin 1226s 1226s RuboCop::CLI --auto-gen-config 1226s --auto-gen-config 1231s generates a todo list that removes the reports 1232s generates Exclude if no EnforcedStyle solves all offenses 1234s overwrites an existing todo file 1236s can generate Exclude properties with a given limit 1238s does not generate configuration for the Syntax cop 1240s generates EnforcedStyle parameter if it solves all offenses 1242s does not include offense counts when --no-offense-counts is used 1243s can be called when there are no files to inspection 1245s honors rubocop:disable comments 1247s generates Exclude instead of Max when --auto-gen-only-exclude is used 1248s can generate a todo list 1249s includes --auto-gen-only-exclude in the command comment when given 1251s does not include a timestamp when --no-auto-gen-timestamp is used 1251s when .rubocop.yml inherits from two other files 1254s bases other cops' configuration on the code base's current maximum line length 1254s when working with a cop who do not support autocorrection 1255s can generate a todo list 1255s when hash value omission enabled 1256s generates Exclude if it solves all offenses 1256s when existing config file has a YAML document start header 1258s inserts `inherit_from` key after hearder 1258s console output 1259s displays report summary but no offenses 1259s when duplicated default configuration parameter 1260s parameters are displayed without duplication 1260s with Layout/LineLength:Max overridden 1260s when .rubocop.yml has Layout/LineLength disabled 1262s skips the cop from both phases of the run 1262s when .rubocop.yml has Layout/LineLength:Max less than code base max 1264s bases other cops' configuration on the overridden LineLength:Max 1264s when .rubocop.yml has Layout/LineLength:Max more than code base max 1265s bases other cops' configuration on the overridden LineLength:Max 1265s for existing configuration with Exclude 1271s leaves out Excludes that appear in .rubocop.yml but are merged for the cop 1272s generates Excludes that appear in .rubocop.yml 1277s leaves out Excludes that appear in .rubocop.yml but are merged globally 1277s when .rubocop.yml is empty 1279s bases other cops' configuration on the code base's current maximum line length 1279s when .rubocop.yml inherits only from .rubocop_todo.yml 1282s bases other cops' configuration on the code base's current maximum line length 1282s when .rubocop.yml inherits only from .rubocop_todo.yml in an array 1284s bases other cops' configuration on the code base's current maximum line length 1284s when cop is not safe to autocorrect 1286s can generate a todo list, with the appropriate flag 1286s when different styles appear in different files 1288s disables cop if --exclude-limit is exceeded 1289s generates Exclude list if --exclude-limit is not exceeded 1289s when --no-exclude-limit is given 1293s always prefers Exclude to Enabled 1293s when .rubocop.yml does not exist 1294s bases other cops' configuration on the code base's current maximum line length 1294s when .rubocop.yml doesn't inherit 1296s bases other cops' configuration on the code base's current maximum line length 1296s when .rubocop.yml inherits from another file and .rubocop_todo.yml 1298s bases other cops' configuration on the code base's current maximum line length 1298s when --config is used 1299s can generate a todo list if default .rubocop.yml exists 1301s can generate a todo list 1301s when working in a subdirectory 1302s can generate a todo list 1302s when inheriting from a URL 1302s when there are multiple entries 1304s can generate a todo list 1304s when there is a single entry 1305s can generate a todo list 1305s when .rubocop.yml inherits from another file 1308s bases other cops' configuration on the code base's current maximum line length 1308s 1308s RuboCop::Cop::Style::EvalWithLocation 1308s registers an offense when using `#eval` with `binding` only 1308s registers an offense when using `#instance_eval` without any arguments 1308s registers an offense when using `#eval` without lineno 1308s registers an offense when using `::Kernel.eval` without any arguments 1308s does not register an offense when using eval with block argument 1308s accepts `eval` with a string, a filename and `__LINE__` on a new line 1308s registers an offense when using `#module_eval` without any arguments 1308s accepts `eval` with a string, a filename and `__LINE__` 1308s accepts `eval` with a heredoc, a filename and `__LINE__ + 1` 1308s does not register an offense if `eval` is called on another object 1308s registers an offense when using `eval` with improper arguments 1308s registers an offense when using `Kernel.eval` without any arguments 1308s registers an offense when using `#class_eval` with an incorrect lineno 1308s registers an offense when using `instance_eval` with improper arguments 1308s registers an offense when using `#instance_eval` with a string argument in parentheses 1308s registers an offense when using correct file argument but incorrect line 1308s registers an offense when using `#class_eval` without any arguments 1308s registers an offense when using `#eval` without any arguments 1308s registers an offense when using `#eval` with a string on a new line 1308s registers an offense when using `#eval` with a heredoc and an incorrect line number 1308s registers an offense when using `class_eval` with improper arguments 1308s registers an offense when using `module_eval` with improper arguments 1308s registers an offense when using `#eval` with an incorrect line number 1308s accepts `eval` with a code that is a variable 1308s 1308s RuboCop::Cop::Layout::SpaceBeforeFirstArg 1308s for method calls without parentheses 1308s registers an offense for method call with no spaces before the first arg 1308s registers an offense and corrects method call with two spaces before the first arg 1308s accepts + operator 1308s accepts a method call with one space before the first arg 1308s accepts setter call 1308s accepts multiple space containing line break 1308s when AllowForAlignment is false 1308s registers an offense and corrects method calls with aligned first arguments 1308s when using safe navigation operator 1308s registers an offense and corrects method call with two spaces before the first arg 1308s when AllowForAlignment is true 1308s accepts method calls with aligned first arguments 1308s when a vertical argument positions are aligned 1308s registers an offense 1308s for method calls with parentheses 1308s accepts a method call with space after the left parenthesis 1309s accepts a method call without space 1309s 1309s RuboCop::Cop::Layout::MultilineHashBraceLayout 1309s ignores single-line hashes 1309s ignores empty hashes 1309s ignores implicit hashes 1309s behaves like multiline literal brace layout trailing comma 1309s same_line style 1309s opening brace on same line as first element 1309s last element has a trailing comma 1309s autocorrects closing brace on different line as last element 1309s symmetrical style 1309s opening brace on same line as first element 1309s last element has a trailing comma 1309s autocorrects closing brace on different line from last element 1309s behaves like multiline literal brace layout 1309s symmetrical style 1309s opening brace on same line as first element 1309s allows closing brace on same line as last element 1309s detects closing brace on different line from last element 1309s allows closing brace on same line as last multiline element 1309s autocorrects closing brace on different line from last element 1309s with a chained call on the closing brace 1309s and a comment after the last element 1309s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1309s but no comment after the last element 1309s autocorrects the closing brace 1309s opening brace on separate line from first element 1309s allows closing brace on separate line from last element 1309s allows closing brace on separate line from last multiline element 1309s detects closing brace on same line as last element 1309s same_line style 1309s opening brace on same line as first element 1309s detects closing brace on different line from multiline element 1309s allows closing brace on same line as multi-line element 1309s autocorrects closing brace on different line as last element 1309s allows closing brace on same line from last element 1309s with a chained call on the closing brace 1309s and a comment after the last element 1309s detects closing brace on separate line from last elementbut does not autocorrect the closing brace 1309s but no comment after the last element 1309s autocorrects the closing brace 1309s opening brace on separate line from first element 1309s detects closing brace on different line from last element 1309s allows closing brace on same line as last element 1309s allows closing brace on same line as last multiline element 1309s new_line style 1309s opening brace on same line as first element 1309s allows closing brace on different line from last element 1309s detects closing brace on same line as last multiline element 1309s autocorrects closing brace on same line as last element 1309s allows closing brace on different line from multi-line element 1309s opening brace on separate line from first element 1309s detects closing brace on same line as last element 1309s allows closing brace on separate line from last multiline element 1309s allows closing brace on separate line from last element 1309s heredoc 1309s ignores heredocs that could share a last line 1309s detects heredoc structures that are safe to add to 1309s behaves like multiline literal brace layout method argument 1309s when arguments to a method 1309s and a comment after the last element 1309s detects closing brace on separate line from last element 1309s but no comment after the last element 1309s autocorrects the closing brace 1309s 1309s RuboCop::Cop::Style::MissingRespondToMissing 1309s allows method_missing and respond_to_missing? implemented as instance methods 1309s registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method 1309s registers an offense when method_missing is implemented as a class methods 1310s allows method_missing and respond_to_missing? when defined with inline access modifier 1310s registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method 1310s registers an offense when respond_to_missing? is not implemented 1310s allows method_missing and respond_to_missing? implemented as class methods 1310s allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier 1310s 1310s RuboCop::Cop::Lint::EmptyEnsure 1310s registers an offense and corrects empty ensure 1310s does not register an offense for non-empty ensure 1310s 1310s RuboCop::Cop::Style::PercentQLiterals 1310s when EnforcedStyle is upper_case_q 1310s without interpolation 1310s accepts double quotes 1310s accepts %Q 1310s registers offense for %q 1310s accepts single quotes 1310s with special characters 1310s accepts %Q 1310s accepts %q 1310s with interpolation 1310s accepts double quotes 1310s accepts single quotes 1310s accepts %q 1310s accepts %Q 1310s when EnforcedStyle is lower_case_q 1310s without interpolation 1310s accepts %q 1310s accepts single quotes 1310s accepts double quotes 1310s registers offense for %Q 1310s with special characters 1310s accepts %q 1310s accepts %Q 1310s with interpolation 1310s accepts %q 1310s accepts single quotes 1310s accepts %Q 1310s accepts double quotes 1310s 1310s RuboCop::Cop::Lint::SafeNavigationConsistency 1310s registers a single offense and corrects when safe navigation is used multiple times 1310s registers an offense and corrects using unsafe navigation with grouped conditions 1310s allows calls to methods that nil responds to 1310s registers an offense and corrects unsafe navigation that appears before safe navigation 1310s registers and corrects multiple offenses 1310s registers an offense and corrects when there is code before or after the condition 1310s registers an offense and corrects using safe navigation inside of separated conditions 1310s registers an offense and corrects using safe navigation on the right of && 1310s registers an offense and corrects using safe navigation on the right of || 1310s allows safe navigation when different variables are used 1310s allows && without safe navigation 1310s registers an offense and corrects assignment 1310s registers an offense and corrects using safe navigation on the left of && 1310s registers an offense and corrects using unsafe navigation with both && and || 1310s allows || without safe navigation 1310s registers an offense and corrects using safe navigation on the left of || 1310s registers an offense but does not correct non dot method calls 1310s registers an offense and corrects using unsafe navigation and the safe navigation appears in a group 1310s registers an offense and corrects using safe navigation in conditions on the right hand side 1310s 1310s RuboCop::Cop::Lint::OrAssignmentToConstant 1310s registers an offense with or-assignment to a constant 1310s does not register an offense with or-assignment to a class variable 1310s does not register an offense with or-assignment to an attribute 1311s does not register an offense with plain assignment to a constant 1311s does not register an offense with or-assignment to a global variable 1311s does not register an offense with or-assignment to an instance variable 1311s does not register an offense with or-assignment to a local variable 1311s 1311s RuboCop::Cop::Lint::InterpolationCheck 1311s registers an offense and corrects for interpolation in single quoted string 1311s does not register an offense for interpolation in a regexp 1311s does not register an offense for an escaped interpolation 1311s does not crash for \xff 1311s does not register an offense for escaped crab claws in dstr 1311s does not register an offense for properly interpolation strings 1311s registers an offense for interpolation in single quoted split string 1311s does not register offense for strings in %w() 1311s does not register an offense for interpolation in nested strings 1311s registers an offense and corrects when including interpolation and double quoted string in single quoted string 1311s registers an offense for interpolation in double + single quoted split string 1311s 1311s RuboCop::Cop::Style::AndOr 1311s when style is conditionals 1311s registers an offense for "or" in until condition 1311s accepts "or" outside of conditional 1311s accepts && inside of conditional 1311s registers an offense for "and" in until condition 1311s accepts "and" in post-until body 1311s registers an offense for "or" in if condition 1311s registers an offense for "or" in while condition 1311s registers an offense for "and" in post-while condition 1311s accepts || outside of conditional 1311s accepts "and" in while body 1311s registers an offense for "or" in post-until condition 1311s registers an offense for "and" in while condition 1311s accepts "and" outside of conditional 1311s accepts "or" in until body 1311s accepts "or" in post-while body 1311s accepts "or" in while body 1311s accepts && outside of conditional 1311s accepts || inside of conditional 1311s accepts "and" in until body 1311s accepts "and" in if body 1311s registers an offense for "and" in post-until condition 1311s registers an offense for "and" in if condition 1311s accepts "and" in post-while body 1311s registers an offense for "or" in post-while condition 1311s accepts "or" in post-until body 1311s accepts "or" in if body 1311s when style is always 1312s autocorrects "and" with && in method calls (4) 1312s autocorrects "or" with || in method calls (2) 1312s autocorrects "and" with && and adds parentheses to expr 1312s warns on short-circuit (or) 1312s autocorrects "or" with || in method calls (3) 1312s warns on short-circuit (and) 1312s autocorrects "and" inside def 1312s also warns on while (or) 1312s also warns on until (and) 1312s registers an offense for "and" 1312s autocorrects "or" with || and doesn't add extra parentheses 1312s registers an offense for "or" 1312s autocorrects "and" with an Enumerable accessor on either side 1312s autocorrects "or" with an assignment on the left 1312s also warns on non short-circuit (or) 1312s also warns on until (or) 1312s autocorrects "or" with || and adds parentheses to expr 1312s also warns on non short-circuit (and) 1312s autocorrects "and" with && in method calls (3) 1312s autocorrects "and" with && in method calls 1312s also warns on non short-circuit (or) (unless) 1312s autocorrects "or" with an assignment on the right 1312s also warns on non short-circuit (and) (unless) 1312s autocorrects "or" with || in method calls (4) 1312s also warns on while (and) 1312s autocorrects "and" with && in method calls (2) 1312s autocorrects "or" inside def 1312s autocorrects "or" with || in method calls 1312s autocorrects "and" with && and doesn't add extra parentheses 1313s when `or` precedes `and` 1313s registers an offense and corrects 1313s with predicate method with arg without space on right 1313s autocorrects "or" with || and adds parens 1313s autocorrects "and" with && and adds parens 1313s with two predicate methods with args without spaces on right 1313s autocorrects "and" with && and adds parens 1313s autocorrects "or" with || and adds parens 1313s with `not` expression on left 1313s autocorrects "and" with && and adds parens 1313s with one predicate method without space on right and another method 1313s autocorrects "and" with && and adds parens 1313s autocorrects "or" with || and adds parens 1313s within a nested begin node 1313s autocorrects "and" with && and adds parens 1313s with obj.method= arg on left 1313s autocorrects "and" with && and adds parens 1313s with !obj.method arg on right 1313s autocorrects "and" with && and adds parens 1313s with obj.method = arg on left 1313s autocorrects "and" with && and adds parens 1313s when left hand side is a comparison method 1313s autocorrects "and" with && and adds parens 1313s when `and` precedes `or` 1313s registers an offense and corrects 1313s with !obj.method arg on left 1313s autocorrects "and" with && and adds parens 1313s when `or` precedes `&&` 1313s registers an offense and corrects 1313s with !variable on left 1313s doesn't crash and burn 1313s with a file which contains __FILE__ 1313s autocorrects "or" with || 1313s when `and` precedes `||` 1313s registers an offense and corrects 1313s within a nested begin node with one child only 1313s autocorrects "and" with && and adds parens 1313s with `not` expression on right 1313s autocorrects "and" with && and adds parens 1313s 1313s RuboCop::Cop::Lint::EmptyExpression 1313s when used as an assignment 1313s registers an offense for the assigned value 1313s when used as a return value 1313s registers an offense in the return value of a method 1313s registers an offense in the return value of a case statement 1313s registers an offense in the return value of a condition 1313s when used as a standalone expression 1313s registers an offense 1313s with nested empty expressions 1313s registers an offense 1313s when used in a condition 1313s registers an offense in the return value of a ternary operator 1313s registers an offense inside `elsif` 1313s registers an offense inside `when` 1313s registers an offense inside `if` 1313s registers an offense in the condition of a ternary operator 1313s registers an offense inside `case` 1313s 1313s RuboCop::Cop::Metrics::AbcSize 1313s when Max is 0 1313s accepts an empty `define_method` 1313s registers an offense for complex content including A, B, and C scores 1313s registers an offense for a `define_method` 1313s registers an offense for an if modifier 1313s treats safe navigation method calls like regular method calls + a condition 1313s registers an offense for an assignment of an element 1313s registers an offense for an assignment of a local variable 1313s accepts an empty method 1313s when CountRepeatedAttributes is `true` 1313s counts repeated attributes 1313s Ruby 2.7 1313s registers an offense for a `define_method` with numblock 1313s when method is in list of allowed methods 1313s when AllowedPatterns is enabled 1313s does not register an offense when defining an instance method 1313s does not register an offense when using `define_method` 1313s does not register an offense when defining a class method 1313s when AllowedMethods is enabled 1314s does not register an offense when defining an instance method 1314s does not register an offense when using `define_method` 1314s does not register an offense when defining a class method 1314s when CountRepeatedAttributes is `false` 1314s does not count repeated attributes 1314s when Max is 2 1314s accepts two assignments 1314s when Max is 10.3 1314s reports size and max as <10, 10, 40> 42.43/10.3 1314s when Max is 2.3 1314s accepts a total score of 2.24 1314s when Max is 1000.3 1317s reports size and max as <1000, 1000, 4000> 4243/1000 1317s when Max is 100.321 1317s reports size and max as <100, 100, 400> 424.3/100.3 1317s when Max is 1.3 1317s reports size and max as <1, 1, 4> 4.24/1.3 1317s 1317s RuboCop::Cop::Lint::AmbiguousRange 1317s for an irange 1317s registers an offense and corrects when there are clauses on both sides 1317s does not register an offense if the range is composed of literals 1317s registers an offense and corrects when not parenthesized 1317s can handle a beginningless range 1317s can handle an endless range 1317s does not register an offense for a constant 1317s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 1317s does not register an offense for `self` 1317s does not register an offense for a variable 1317s registers an offense and corrects when one side is parenthesized but the other is not 1317s does not register an offense if the range is parenthesized 1317s method calls 1317s with RequireParenthesesForMethodChains: false 1317s does not register an offense for a chained method call with parens 1317s does not register an offense for a chained method call without parens 1317s behaves like common behavior 1317s requires parens when calling a method on a basic literal 1317s does not register an offense for a non-chained method call 1317s does not register an offense for a unary - 1317s does not register an offense for a unary + 1317s with RequireParenthesesForMethodChains: true 1317s does not register an offense for a chained method call with parens 1317s registers an offense for a chained method call without parens 1317s behaves like common behavior 1317s does not register an offense for a unary - 1317s requires parens when calling a method on a basic literal 1317s does not register an offense for a non-chained method call 1317s does not register an offense for a unary + 1317s for an erange 1317s does not register an offense for `self` 1317s registers an offense and corrects when one side is parenthesized but the other is not 1317s registers an offense and corrects when the entire range is parenthesized but contains complex boundaries 1317s registers an offense and corrects when not parenthesized 1317s does not register an offense if the range is composed of literals 1317s can handle an endless range 1317s does not register an offense for a constant 1317s does not register an offense for a variable 1317s registers an offense and corrects when there are clauses on both sides 1317s can handle a beginningless range 1317s does not register an offense if the range is parenthesized 1317s method calls 1317s with RequireParenthesesForMethodChains: true 1317s registers an offense for a chained method call without parens 1317s does not register an offense for a chained method call with parens 1317s behaves like common behavior 1317s does not register an offense for a non-chained method call 1317s does not register an offense for a unary + 1317s does not register an offense for a unary - 1317s requires parens when calling a method on a basic literal 1317s with RequireParenthesesForMethodChains: false 1317s does not register an offense for a chained method call with parens 1317s does not register an offense for a chained method call without parens 1317s behaves like common behavior 1317s does not register an offense for a non-chained method call 1317s does not register an offense for a unary + 1317s requires parens when calling a method on a basic literal 1317s does not register an offense for a unary - 1317s 1317s RuboCop::Cop::Style::InfiniteLoop 1317s accepts modifier while true if loop {} would change semantics 1317s registers an offense for a until loop with nil as condition 1317s registers an offense for a while loop with [1] as condition 1317s registers an offense for while true if loop {} would work because it is an instance variable being assigned 1318s registers an offense for a while loop with 2.0 as condition 1318s accepts while true if loop {} would change semantics 1318s registers an offense for a while loop with 1 as condition 1318s registers an offense for a while loop with {} as condition 1318s accepts Kernel#loop 1318s registers an offense for until false if loop {} would work because of previous assignment in a while loop 1318s registers an offense for while true or until false if loop {} would work because of an earlier assignment 1319s registers an offense for until false if loop {} would work because the assigned variable is not used afterwards 1319s registers an offense for a until loop with false as condition 1319s registers an offense for modifier until false if loop {} would not change semantics 1319s behaves like autocorrector 1319s autocorrects begin-end-until with one statement 1319s autocorrects single line modifier until 1319s autocorrects the usage of until without do 1319s autocorrects begin-end-until with two statements 1319s autocorrects single line modifier until with and 1320s autocorrects the usage of until with do 1320s with non-default indentation width 1320s autocorrects multi-line modifier until and indents correctly 1320s behaves like autocorrector 1320s autocorrects the usage of while without do 1320s autocorrects single line modifier while 1320s autocorrects begin-end-while with two statements 1320s autocorrects begin-end-while with one statement 1321s autocorrects the usage of while with do 1321s autocorrects single line modifier while with and 1321s with non-default indentation width 1321s autocorrects multi-line modifier while and indents correctly 1321s 1321s RuboCop::Cop::Layout::SpaceAfterNot 1321s registers an offense and corrects space after ! with the negated receiver wrapped in parentheses 1321s accepts space after not keyword 1321s registers an offense and corrects a single space after ! 1321s accepts no space after ! 1322s registers an offense and corrects multiple spaces after ! 1322s 1322s RuboCop::Cop::Naming::RescuedExceptionsVariableName 1322s with the `PreferredName` setup 1322s registers offenses when using `foo` and `bar` in multiple rescues 1322s does not register an offense when using `exception` 1322s registers an offense when using `_e` 1322s registers an offense when using `e` 1322s does not register an offense when using `_exception` 1322s with default config 1322s with explicit rescue 1322s with method as `Exception` 1322s does not register an offense with expected variable name 1322s registers an offense with unexpected variable name 1322s does not register an offense without variable name 1322s with `Exception` variable 1322s registers offenses when using `foo` and `bar` in multiple rescues 1322s registers an offense when using `exc` 1322s registers an offense when using `exc` and renames its usage 1322s does not register an offense when using `e` 1322s does not register an offense when using _e followed by e 1322s does not register an offense when using `_e` 1322s registers an offense when using `_exc` 1322s with lower letters class name 1322s does not register an offense 1322s shadowing an external variable 1322s does not register an offense 1322s with splat operator as `Exception` list 1323s does not register an offense without variable name 1323s registers an offense with unexpected variable name 1323s does not register an offense with expected variable name 1323s without `Exception` variable 1323s does not register an offense 1323s with variable being referenced 1323s renames the variable references when autocorrecting 1323s with implicit rescue 1323s with `Exception` variable 1323s registers an offense when using `exc` 1323s registers an offense when using `_exc` 1323s does not register an offense when using `e` 1323s does not register an offense when using `_e` 1323s without `Exception` variable 1323s does not register an offense 1323s when the variable is reassigned 1323s only corrects the exception variable 1323s only corrects uses of the exception 1323s with nested rescues 1323s handles it 1323s when the variable is reassigned using multiple assignment 1323s only corrects uses of the exception 1323s with multiple branches 1323s registers and corrects each offense 1323s 1323s RuboCop::Cop::InternalAffairs::RedundantContextConfigParameter 1323s does not register an offense when not using `:config` 1323s does not register an offense when using `:ruby30` only 1323s registers an offense when using `:config` parameter with other parameters 1323s registers an offense when using `:config` parameter 1323s does not register an offense when using `:config` in other than `context` 1323s 1323s RuboCop::Cop::Style::IfWithBooleanLiteralBranches 1323s when condition is a logical operator and operands do not known whether to return boolean value 1323s does not register an offense when using `if foo && bar` with opposite boolean literal branches 1323s does not register an offense when using `if foo && bar` with boolean literal branches 1323s does not register an offense when using `unless foo && bar` with boolean literal branches 1323s does not register an offense when using `unless foo || bar` with opposite boolean literal branches 1323s does not register an offense when using `unless foo || bar` with boolean literal branches 1323s does not register an offense when using `if foo || bar` with boolean literal branches 1323s does not register an offense when using `unless foo && bar` with opposite boolean literal branches 1323s does not register an offense when using `if foo || bar` with opposite boolean literal branches 1323s when using `elsif` with boolean literal branches 1323s does not register an offense when using multiple `elsif` with boolean literal branches 1323s registers and corrects an offense when using single `elsif` with boolean literal branches 1323s when double negative is used in condition 1323s registers and corrects an offense when using `if !!condition` with opposite boolean literal branches 1323s registers and corrects an offense when using `if !!condition` with boolean literal branches 1323s when complex condition 1323s does not register an offense when using `if (foo? && bar) || baz?` with boolean literal branches 1323s registers and corrects an offense when using `if foo? || bar && baz?` with boolean literal branches 1323s does not register an offense when using `if foo? && (bar || baz)?` with boolean literal branches 1323s does not register an offense when using `if foo? && bar || baz?` with boolean literal branches 1323s does not register an offense when using `if foo? || bar || baz?` with boolean literal branches 1324s registers and corrects an offense when using `if foo? && bar && baz?` with boolean literal branches 1324s register and corrects an offense when using `if (foo? || bar) && baz?` with boolean literal branches 1324s registers and corrects an offense when using `if foo? || (bar && baz)?` with boolean literal branches 1324s when `AllowedMethods: nonzero?` 1324s does not register an offense when using `nonzero?` 1324s when condition is a predicate method 1324s registers and corrects an offense when using `unless foo.do_something?` with boolean literal branches 1324s registers and corrects an offense when using `if foo.do_something?` with boolean literal branches 1324s registers and corrects an offense when using `unless foo.do_something?` with opposite boolean literal branches 1324s registers and corrects an offense when using `if foo.do_something?` with opposite boolean literal branches 1324s registers and corrects an offense when using `elsif foo.do_something?` with boolean literal branches 1324s registers and corrects an offense when using `elsif foo.do_something?` with opposite boolean literal branches 1324s when condition is a logical operator and all operands are predicate methods 1324s registers and corrects an offense when using `if foo? && bar?` with opposite boolean literal branches 1324s registers and corrects an offense when using `unless foo? || bar?` with opposite boolean literal branches 1324s registers and corrects an offense when using `if foo? && bar? && baz?` with boolean literal branches 1324s registers and corrects an offense when using `if foo? && bar? || baz?` with boolean literal branches 1324s registers and corrects an offense when using `unless foo? || bar?` with boolean literal branches 1324s registers and corrects an offense when using `if foo? && bar?` with boolean literal branches 1324s when condition is a method that does not known whether to return boolean value 1324s does not register an offense when using `unless condition` with opposite boolean literal branches 1324s does not register an offense when using `unless condition` with boolean literal branches 1324s does not register an offense when using `if condition` with boolean literal branches 1324s does not register an offense when using `if condition` with opposite boolean literal branches 1324s when condition is a comparison method 1324s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1324s registers and corrects an offense when using ternary operator with boolean literal branches 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1324s registers and corrects an offense when using ternary operator with boolean literal branches 1324s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1324s registers and corrects an offense when using ternary operator with boolean literal branches 1324s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using ternary operator with boolean literal branches 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1324s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s does not register an offense when using a branch that is not boolean literal 1324s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1324s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1324s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1324s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1324s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1325s does not register an offense when using a branch that is not boolean literal 1325s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1325s registers and corrects an offense when using ternary operator with boolean literal branches 1325s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1325s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1325s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1325s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1325s registers and corrects an offense when using opposite ternary operator with boolean literal branches 1325s registers and corrects an offense when using `unless foo == bar` with opposite boolean literal branches 1325s registers and corrects an offense when using ternary operator with boolean literal branches 1325s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1325s registers and corrects an offense when using `if` with boolean literal branches directly under `def` 1325s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1325s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1325s registers and corrects an offense when using `unless foo == bar` with boolean literal branches 1325s registers and corrects an offense when using ternary operator with boolean literal branches 1325s registers and corrects an offense when using `if foo == bar` with opposite boolean literal branches 1325s registers and corrects an offense when using `if foo == bar` with boolean literal branches 1325s 1325s RuboCop::Cop::Lint::RefinementImportMethods 1325s Ruby >= 3.1 1325s does not register an offense when using `include` with a receiver in `refine` block 1325s registers an offense when using `prepend` in `refine` block 1325s registers an offense when using `include` in `refine` block 1325s does not register an offense when using `import_methods` in `refine` block 1325s Ruby <= 3.0 1325s does not register an offense when using `prepend` in `refine` block 1325s does not register an offense when using `include` in `refine` block 1326s 1326s Pending: (Failures listed here are expected and do not affect your suite's status) 1326s 1326s 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 1326s # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. 1326s Failure/Error: 1326s expect_offense(<<~RUBY) 1326s def some_method 1326s total = 0 1326s foo = 0 1326s 1326s while total < 100 1326s total += 1 1326s foo += 1 1326s ^^^ Useless assignment to variable - `foo`. 1326s end 1326s 1326s Diff: 1326s @@ -5,7 +5,6 @@ 1326s while total < 100 1326s total += 1 1326s foo += 1 1326s - ^^^ Useless assignment to variable - `foo`. 1326s end 1326s 1326s total 1326s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:123:in `expect_offense' 1326s # ./spec/rubocop/cop/lint/useless_assignment_spec.rb:341:in `block (3 levels) in ' 1326s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 1326s 1326s Failures: 1326s 1326s 1) RuboCop::Cop::Style::RedundantRegexpCharacterClass with a character class containing an escaped-0 does not register an offense 1326s Failure/Error: expect_no_offenses('foo = /[\032]/') 1326s 1326s expected: "foo = /[\\032]/" 1326s got: "foo = /[\\032]/ ^^^^^^ Redundant single-element character class, `[\\032]` can be replaced with `\\032`.\n" 1326s 1326s (compared using ==) 1326s 1326s Diff: 1326s @@ -1 +1 @@ 1326s -foo = /[\032]/ 1326s +foo = /[\032]/ ^^^^^^ Redundant single-element character class, `[\032]` can be replaced with `\032`. 1326s # /usr/share/rubygems-integration/all/gems/rubocop-1.39.0/lib/rubocop/rspec/expect_offense.rb:184:in `expect_no_offenses' 1326s # ./spec/rubocop/cop/style/redundant_regexp_character_class_spec.rb:315:in `block (3 levels) in ' 1326s # /usr/share/rubygems-integration/all/gems/webmock-3.25.1/lib/webmock/rspec.rb:39:in `block (2 levels) in ' 1326s 1326s Finished in 14 minutes 52 seconds (files took 37.14 seconds to load) 1326s 19119 examples, 1 failure, 1 pending 1326s 1326s Failed examples: 1326s 1326s 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 1326s 1326s Randomized with seed 15202 1326s 1331s /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 1332s mv ./.gem2deb.lib lib 1332s autopkgtest [19:58:27]: test gem2deb-test-runner: -----------------------] 1334s autopkgtest [19:58:29]: test gem2deb-test-runner: - - - - - - - - - - results - - - - - - - - - - 1334s gem2deb-test-runner FAIL non-zero exit status 1 1335s autopkgtest [19:58:30]: @@@@@@@@@@@@@@@@@@@@ summary 1335s gem2deb-test-runner FAIL non-zero exit status 1