Input buildinfo: https://buildinfos.debian.net/buildinfo-pool/r/rubocop/rubocop_0.89.1+dfsg-2_all.buildinfo Use metasnap for getting required timestamps New buildinfo file: /tmp/rubocop-0.89.1+dfsg-2opzbjt18/rubocop_0.89.1+dfsg-2_all.buildinfo Get source package info: rubocop=0.89.1+dfsg-2 Source URL: http://snapshot.notset.fr/mr/package/rubocop/0.89.1+dfsg-2/srcfiles?fileinfo=1 env -i PATH=/usr/sbin:/usr/bin:/sbin:/bin TMPDIR=/tmp mmdebstrap --arch=amd64 --include=adduser=3.118 autoconf=2.71-2 automake=1:1.16.5-1.1 autopoint=0.21-4 autotools-dev=20180224.1+nmu1 base-files=12 base-passwd=3.5.52 bash=5.1-5 binutils=2.37-10 binutils-common=2.37-10 binutils-x86-64-linux-gnu=2.37-10 bsdextrautils=2.37.2-4 bsdutils=1:2.37.2-4 build-essential=12.9 bzip2=1.0.8-5 ca-certificates=20211016 coreutils=8.32-4.1 cpp=4:11.2.0-2 cpp-11=11.2.0-12 dash=0.5.11+git20210903+057cd650a4ed-3 debconf=1.5.79 debhelper=13.5.2 debianutils=5.5-1 devscripts=2.21.6 dh-autoreconf=20 dh-strip-nondeterminism=1.12.1-1 diffutils=1:3.7-5 dirmngr=2.2.27-2 dpkg=1.20.9 dpkg-dev=1.20.9 dwz=0.14-1 fakeroot=1.26-1 file=1:5.41-2 findutils=4.8.0-1 g++=4:11.2.0-2 g++-11=11.2.0-12 gcc=4:11.2.0-2 gcc-11=11.2.0-12 gcc-11-base=11.2.0-12 gem2deb=1.8 gem2deb-test-runner=1.8 gettext=0.21-4 gettext-base=0.21-4 gnupg=2.2.27-2 gnupg-l10n=2.2.27-2 gnupg-utils=2.2.27-2 gpg=2.2.27-2 gpg-agent=2.2.27-2 gpg-wks-client=2.2.27-2 gpg-wks-server=2.2.27-2 gpgconf=2.2.27-2 gpgsm=2.2.27-2 gpgv=2.2.27-2 grep=3.7-1 groff-base=1.22.4-7 gzip=1.10-4 hostname=3.23 init-system-helpers=1.60 intltool-debian=0.35.0+20060710.5 javascript-common=11+nmu1 libacl1=2.3.1-1 libarchive-zip-perl=1.68-1 libasan6=11.2.0-12 libassuan0=2.5.5-1 libatomic1=11.2.0-12 libattr1=1:2.5.1-1 libaudit-common=1:3.0.6-1 libaudit1=1:3.0.6-1+b1 libb-hooks-op-check-perl=0.22-1+b3 libbinutils=2.37-10 libblkid1=2.37.2-4 libbsd0=0.11.3-1 libbz2-1.0=1.0.8-5 libc-bin=2.32-5 libc-dev-bin=2.32-5 libc6=2.32-5 libc6-dev=2.32-5 libcap-ng0=0.7.9-2.2+b1 libcap2=1:2.44-1 libcc1-0=11.2.0-12 libclass-method-modifiers-perl=2.13-1 libclass-xsaccessor-perl=1.19-3+b7 libcom-err2=1.46.4-1 libcrypt-dev=1:4.4.26-1 libcrypt1=1:4.4.26-1 libctf-nobfd0=2.37-10 libctf0=2.37-10 libdb5.3=5.3.28+dfsg1-0.8 libdebconfclient0=0.261 libdebhelper-perl=13.5.2 libdevel-callchecker-perl=0.008-1+b2 libdpkg-perl=1.20.9 libdynaloader-functions-perl=0.003-1.1 libedit2=3.1-20210910-1 libelf1=0.186-1 libencode-locale-perl=1.05-1.1 libexpat1=2.4.1-3 libfakeroot=1.26-1 libffi8=3.4.2-3 libfile-dirlist-perl=0.05-2 libfile-homedir-perl=1.006-1 libfile-listing-perl=6.14-1 libfile-stripnondeterminism-perl=1.12.1-1 libfile-touch-perl=0.12-1 libfile-which-perl=1.23-1 libgcc-11-dev=11.2.0-12 libgcc-s1=11.2.0-12 libgcrypt20=1.9.4-4 libgdbm-compat4=1.22-1 libgdbm6=1.22-1 libgmp-dev=2:6.2.1+dfsg-3 libgmp10=2:6.2.1+dfsg-3 libgmpxx4ldbl=2:6.2.1+dfsg-3 libgnutls30=3.7.2-2 libgomp1=11.2.0-12 libgpg-error0=1.42-3 libgssapi-krb5-2=1.18.3-7 libhogweed6=3.7.3-1 libhtml-parser-perl=3.76-1 libhtml-tagset-perl=3.20-4 libhtml-tree-perl=5.07-2 libhttp-cookies-perl=6.10-1 libhttp-date-perl=6.05-1 libhttp-message-perl=6.35-1 libhttp-negotiate-perl=6.01-1 libicu67=67.1-7 libidn2-0=2.3.2-2 libimport-into-perl=1.002005-1 libio-html-perl=1.004-2 libio-pty-perl=1:1.15-2 libio-socket-ssl-perl=2.072-1 libipc-run-perl=20200505.0-1 libisl23=0.24-2 libitm1=11.2.0-12 libjs-jquery=3.5.1+dfsg+~3.5.5-8 libjs-jquery-easing=12-3 libjs-jquery-fancybox=12-3 libjs-jquery-mousewheel=1:3.1.13-3.1 libjs-jquery-ui=1.13.0+dfsg-1 libk5crypto3=1.18.3-7 libkeyutils1=1.6.1-2 libkrb5-3=1.18.3-7 libkrb5support0=1.18.3-7 libksba8=1.6.0-2 libldap-2.4-2=2.4.59+dfsg-1 liblsan0=11.2.0-12 liblwp-mediatypes-perl=6.04-1 liblwp-protocol-https-perl=6.10-1 liblz4-1=1.9.3-2 liblzma5=5.2.5-2 libmagic-mgc=1:5.41-2 libmagic1=1:5.41-2 libmd0=1.0.4-1 libmodule-runtime-perl=0.016-1 libmoo-perl=2.005004-3 libmount1=2.37.2-4 libmpc3=1.2.1-1 libmpdec3=2.5.1-2 libmpfr6=4.1.0-3 libncursesw6=6.3-1 libnet-http-perl=6.21-1 libnet-ssleay-perl=1.90-1 libnettle8=3.7.3-1 libnpth0=1.6-3 libnsl-dev=1.3.0-2 libnsl2=1.3.0-2 libp11-kit0=0.24.0-6 libpam-modules=1.4.0-10 libpam-modules-bin=1.4.0-10 libpam-runtime=1.4.0-10 libpam0g=1.4.0-10 libparams-classify-perl=0.015-1+b3 libpcre2-8-0=10.39-3 libpcre3=2:8.39-13 libperl5.32=5.32.1-6 libpipeline1=1.5.4-1 libpython3-stdlib=3.9.8-1 libpython3.9-minimal=3.9.9-1 libpython3.9-stdlib=3.9.9-1 libquadmath0=11.2.0-12 libreadline8=8.1-2 librole-tiny-perl=2.002004-1 libruby2.7=2.7.4-1+b1 libruby3.0=3.0.2-5 libsasl2-2=2.1.27+dfsg2-2 libsasl2-modules-db=2.1.27+dfsg2-2 libseccomp2=2.5.3-2 libselinux1=3.3-1+b1 libsemanage-common=3.3-1 libsemanage2=3.3-1+b1 libsepol2=3.3-1 libsigsegv2=2.13-1 libsmartcols1=2.37.2-4 libsqlite3-0=3.36.0-2 libssl1.1=1.1.1l-1 libstdc++-11-dev=11.2.0-12 libstdc++6=11.2.0-12 libsub-override-perl=0.09-2 libsub-quote-perl=2.006006-1 libsystemd0=249.7-1 libtasn1-6=4.18.0-4 libtimedate-perl=2.3300-2 libtinfo6=6.3-1 libtirpc-common=1.3.2-2 libtirpc-dev=1.3.2-2 libtirpc3=1.3.2-2 libtool=2.4.6-15 libtry-tiny-perl=0.31-1 libtsan0=11.2.0-12 libubsan1=11.2.0-12 libuchardet0=0.0.7-1 libudev1=249.7-1 libunistring2=0.9.10-6 liburi-perl=5.10-1 libuuid1=2.37.2-4 libwww-perl=6.59-1 libwww-robotrules-perl=6.02-1 libxml2=2.9.12+dfsg-5+b1 libyaml-0-2=0.2.2-1 libzstd1=1.4.8+dfsg-3 linux-libc-dev=5.15.5-1 login=1:4.8.1-2 lsb-base=11.1.0 m4=1.4.18-5 make=4.3-4.1 man-db=2.9.4-2 mawk=1.3.4.20200120-2 media-types=4.0.0 ncurses-base=6.3-1 ncurses-bin=6.3-1 netbase=6.3 openssl=1.1.1l-1 passwd=1:4.8.1-2 patch=2.7.6-7 patchutils=0.4.2-1 perl=5.32.1-6 perl-base=5.32.1-6 perl-modules-5.32=5.32.1-6 perl-openssl-defaults=5 pinentry-curses=1.1.0-4 po-debconf=1.0.21+nmu1 pry=0.13.1-2 publicsuffix=20211207.1025-1 python3=3.9.8-1 python3-minimal=3.9.8-1 python3.9=3.9.9-1 python3.9-minimal=3.9.9-1 rake=13.0.3-1 readline-common=8.1-2 rpcsvc-proto=1.4.2-4 rubocop=0.89.1+dfsg-1 ruby=1:2.7.6 ruby-addressable=2.8.0-1 ruby-all-dev=1:2.7.6 ruby-ast=2.4.1-1 ruby-coderay=1.1.3-5 ruby-crack=0.4.4-2 ruby-diff-lcs=1.4.4-1 ruby-docile=1.1.5-2 ruby-hashdiff=1.0.1-1 ruby-method-source=1.0.0-2 ruby-minitest=5.13.0-1 ruby-net-telnet=0.1.1-2 ruby-parallel=1.21.0-1 ruby-power-assert=1.1.7-2 ruby-progressbar=1.11.0-1 ruby-public-suffix=4.0.6+ds-1 ruby-rainbow=3.0.0-3 ruby-regexp-parser=1.7.1-2 ruby-rspec=3.10.0c1e1m2s3-1 ruby-rspec-core=3.10.0c1e1m2s3-1 ruby-rspec-expectations=3.10.0c1e1m2s3-1 ruby-rspec-mocks=3.10.0c1e1m2s3-1 ruby-rspec-support=3.10.0c1e1m2s3-1 ruby-rubocop-ast=0.6.0-1 ruby-rubocop-rspec=1.42.0-1 ruby-rubygems=3.2.27-3 ruby-safe-yaml=1.0.5-1 ruby-simplecov=0.19.1-1 ruby-simplecov-html=0.12.3-1 ruby-test-unit=3.3.9-1 ruby-unicode-display-width=1.6.1-1 ruby-webmock=3.8.3-1 ruby-whitequark-parser=3.0.2.0-2 ruby-xmlrpc=0.3.2-1 ruby2.7=2.7.4-1+b1 ruby2.7-dev=2.7.4-1+b1 ruby3.0=3.0.2-5 ruby3.0-dev=3.0.2-5 rubygems-integration=1.18 sed=4.8-1 sensible-utils=0.0.17 sysvinit-utils=3.00-1 tar=1.34+dfsg-1 tzdata=2021e-1 util-linux=2.37.2-4 wdiff=1.2.2-2+b1 xz-utils=5.2.5-2 zlib1g=1:1.2.11.dfsg-2 --variant=apt --aptopt=Acquire::Check-Valid-Until "false" --aptopt=Acquire::http::Dl-Limit "1000"; --aptopt=Acquire::https::Dl-Limit "1000"; --aptopt=Acquire::Retries "5"; --aptopt=APT::Get::allow-downgrades "true"; --keyring=/usr/share/keyrings/ --essential-hook=chroot "$1" sh -c "apt-get --yes install fakeroot util-linux" --essential-hook=copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ --essential-hook=chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211209T025217Z/ unstable main deb-src http://snapshot.notset.fr/archive/debian/20211209T025217Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211209T093106Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211205T210857Z/ unstable main' >> /etc/apt/sources.list && apt-get update" --customize-hook=chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash --customize-hook=chroot "$1" env sh -c "apt-get source --only-source -d rubocop=0.89.1+dfsg-2 && mkdir -p /build/rubocop-X6PyPL && dpkg-source --no-check -x /*.dsc /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg && chown -R builduser:builduser /build/rubocop-X6PyPL" --customize-hook=chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg && env DEB_BUILD_OPTIONS="parallel=4" LANG="C.UTF-8" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1638993038" dpkg-buildpackage -uc -a amd64 --build=all" --customize-hook=sync-out /build/rubocop-X6PyPL /tmp/rubocop-0.89.1+dfsg-2opzbjt18 bookworm /dev/null deb http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable main I: automatically chosen mode: root I: chroot architecture amd64 is equal to the host's architecture I: automatically chosen format: tar I: using /tmp/mmdebstrap.QIZB2Z0Tlf as tempdir I: running apt-get update... I: downloading packages with apt... I: extracting archives... I: installing essential packages... I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "apt-get --yes install fakeroot util-linux"' exec /tmp/mmdebstrap.QIZB2Z0Tlf Reading package lists... Building dependency tree... util-linux is already the newest version (2.37.2-4). The following NEW packages will be installed: fakeroot libfakeroot 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 134 kB of archives. After this operation, 397 kB of additional disk space will be used. Get:1 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable/main amd64 libfakeroot amd64 1.26-1 [47.3 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable/main amd64 fakeroot amd64 1.26-1 [87.1 kB] debconf: delaying package configuration, since apt-utils is not installed Fetched 134 kB in 0s (849 kB/s) Selecting previously unselected package libfakeroot:amd64. (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 ... 4673 files and directories currently installed.) Preparing to unpack .../libfakeroot_1.26-1_amd64.deb ... Unpacking libfakeroot:amd64 (1.26-1) ... Selecting previously unselected package fakeroot. Preparing to unpack .../fakeroot_1.26-1_amd64.deb ... Unpacking fakeroot (1.26-1) ... Setting up libfakeroot:amd64 (1.26-1) ... Setting up fakeroot (1.26-1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode Processing triggers for libc-bin (2.32-5) ... I: running special hook: copy-in /usr/share/keyrings/debian-archive-bullseye-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-security-automatic.gpg /usr/share/keyrings/debian-archive-bullseye-stable.gpg /usr/share/keyrings/debian-archive-buster-automatic.gpg /usr/share/keyrings/debian-archive-buster-security-automatic.gpg /usr/share/keyrings/debian-archive-buster-stable.gpg /usr/share/keyrings/debian-archive-keyring.gpg /usr/share/keyrings/debian-archive-removed-keys.gpg /usr/share/keyrings/debian-archive-stretch-automatic.gpg /usr/share/keyrings/debian-archive-stretch-security-automatic.gpg /usr/share/keyrings/debian-archive-stretch-stable.gpg /usr/share/keyrings/debian-ports-archive-keyring-removed.gpg /usr/share/keyrings/debian-ports-archive-keyring.gpg /usr/share/keyrings/debian-keyring.gpg /etc/apt/trusted.gpg.d/ I: running --essential-hook in shell: sh -c 'chroot "$1" sh -c "rm /etc/apt/sources.list && echo 'deb http://snapshot.notset.fr/archive/debian/20211209T025217Z/ unstable main deb-src http://snapshot.notset.fr/archive/debian/20211209T025217Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211209T093106Z/ unstable main deb http://snapshot.notset.fr/archive/debian/20211205T210857Z/ unstable main' >> /etc/apt/sources.list && apt-get update"' exec /tmp/mmdebstrap.QIZB2Z0Tlf Get:1 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable InRelease [165 kB] Get:2 http://snapshot.notset.fr/archive/debian/20211209T093106Z unstable InRelease [165 kB] Hit:3 http://snapshot.notset.fr/archive/debian/20211205T210857Z unstable InRelease Ign:4 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main amd64 Packages Ign:4 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main Sources Ign:5 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main amd64 Packages Get:4 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main Sources [12.5 MB] Get:5 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main amd64 Packages [12.0 MB] Ign:6 http://snapshot.notset.fr/archive/debian/20211209T093106Z unstable/main amd64 Packages Err:6 http://snapshot.notset.fr/archive/debian/20211209T093106Z unstable/main amd64 Packages 404 Not Found [IP: 10.13.0.253 80] Ign:6 http://snapshot.notset.fr/archive/debian/20211209T093106Z unstable/main amd64 Packages Get:6 http://snapshot.notset.fr/archive/debian/20211209T093106Z unstable/main amd64 Packages [12.0 MB] Fetched 36.9 MB in 33s (1117 kB/s) Reading package lists... I: installing remaining packages inside the chroot... I: running --customize-hook in shell: sh -c 'chroot "$1" useradd --no-create-home -d /nonexistent -p "" builduser -s /bin/bash' exec /tmp/mmdebstrap.QIZB2Z0Tlf I: running --customize-hook in shell: sh -c 'chroot "$1" env sh -c "apt-get source --only-source -d rubocop=0.89.1+dfsg-2 && mkdir -p /build/rubocop-X6PyPL && dpkg-source --no-check -x /*.dsc /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg && chown -R builduser:builduser /build/rubocop-X6PyPL"' exec /tmp/mmdebstrap.QIZB2Z0Tlf Reading package lists... NOTICE: 'rubocop' packaging is maintained in the 'Git' version control system at: https://salsa.debian.org/ruby-team/rubocop.git Please use: git clone https://salsa.debian.org/ruby-team/rubocop.git to retrieve the latest (possibly unreleased) updates to the package. Need to get 769 kB of source archives. Get:1 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main rubocop 0.89.1+dfsg-2 (dsc) [2377 B] Get:2 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main rubocop 0.89.1+dfsg-2 (tar) [755 kB] Get:3 http://snapshot.notset.fr/archive/debian/20211209T025217Z unstable/main rubocop 0.89.1+dfsg-2 (diff) [12.4 kB] Fetched 769 kB in 1s (1138 kB/s) Download complete and in download only mode W: Download is performed unsandboxed as root as file 'rubocop_0.89.1+dfsg-2.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) dpkg-source: info: extracting rubocop in /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg dpkg-source: info: unpacking rubocop_0.89.1+dfsg.orig.tar.xz dpkg-source: info: unpacking rubocop_0.89.1+dfsg-2.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying 02-disable-tests-relying-on-rubygems-features.diff dpkg-source: info: applying 04-adjust-tests-due-to-rubocop-logo-removal-from-package.diff dpkg-source: info: applying 05-fix-gemspec.diff dpkg-source: info: applying 07-skip-tests-requiring-rubocop-performance.diff dpkg-source: info: applying 08-simplify-style-mixinusage.patch dpkg-source: info: applying 09-skip-failing-test.patch I: running --customize-hook in shell: sh -c 'chroot "$1" env --unset=TMPDIR runuser builduser -c "cd /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg && env DEB_BUILD_OPTIONS="parallel=4" LANG="C.UTF-8" LC_ALL="C.UTF-8" LC_COLLATE="C.UTF-8" SOURCE_DATE_EPOCH="1638993038" dpkg-buildpackage -uc -a amd64 --build=all"' exec /tmp/mmdebstrap.QIZB2Z0Tlf dpkg-buildpackage: info: source package rubocop dpkg-buildpackage: info: source version 0.89.1+dfsg-2 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Daniel Leidert dpkg-source --before-build . debian/rules clean dh clean --buildsystem=ruby --with ruby dh_auto_clean -O--buildsystem=ruby dh_ruby --clean dh_ruby --clean dh_autoreconf_clean -O--buildsystem=ruby dh_clean -O--buildsystem=ruby debian/rules binary-indep dh binary-indep --buildsystem=ruby --with ruby dh_update_autotools_config -i -O--buildsystem=ruby dh_autoreconf -i -O--buildsystem=ruby dh_auto_configure -i -O--buildsystem=ruby dh_ruby --configure dh_auto_build -i -O--buildsystem=ruby dh_ruby --build dh_ruby --build dh_auto_test -i -O--buildsystem=ruby dh_ruby --test create-stamp debian/debhelper-build-stamp dh_testroot -i -O--buildsystem=ruby dh_prep -i -O--buildsystem=ruby dh_auto_install --destdir=debian/rubocop/ -i -O--buildsystem=ruby dh_ruby --install /build/rubocop-X6PyPL/rubocop-0.89.1\+dfsg/debian/rubocop dh_ruby --install /usr/bin/ruby2.7 -S gem build --config-file /dev/null --verbose /tmp/d20211212-2297516-1bdsycg/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: open-ended dependency on parser (>= 2.7.1.1) is not recommended if parser is semantically versioned, use: add_runtime_dependency 'parser', '~> 2.7', '>= 2.7.1.1' WARNING: open-ended dependency on regexp_parser (>= 1.7) is not recommended if regexp_parser is semantically versioned, use: add_runtime_dependency 'regexp_parser', '~> 1.7' WARNING: open-ended dependency on rexml (>= 0) is not recommended use a bounded requirement, such as '~> x.y' WARNING: See https://guides.rubygems.org/specification-reference/ for help Successfully built RubyGem Name: rubocop Version: 0.89.1 File: rubocop-0.89.1.gem /usr/bin/ruby2.7 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/rubocop/usr/share/rubygems-integration/all /tmp/d20211212-2297516-1bdsycg/rubocop-0.89.1.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/assets/output.html.erb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/config/default.yml /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/exe/rubocop /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/ast_aliases.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cached_data.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/auto_genenerate_config.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/base.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/execute_runner.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/init_dotfile.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/show_cops.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/command/version.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cli/environment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/comment_config.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config_loader.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config_loader_resolver.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config_obsoletion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config_store.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/config_validator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/autocorrect_logic.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/badge.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/base.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/bundler/duplicated_gem.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/bundler/gem_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/bundler/insecure_protocol_source.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/bundler/ordered_gems.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/commissioner.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/cop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/alignment_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/condition_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/each_to_for_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/empty_line_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/for_to_each_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/line_break_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/ordered_gem_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/parentheses_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/percent_literal_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/punctuation_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/space_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/string_literal_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/correctors/unused_arg_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/force.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/gemspec/duplicated_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/gemspec/ordered_dependencies.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/gemspec/required_ruby_version.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/generator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/generator/configuration_injector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/generator/require_file_injector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/ignored_node.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/method_name_equal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/node_destructuring.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/node_type_predicate.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/offense_location_keyword.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/redundant_location_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/redundant_message_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/internal_affairs/useless_message_assertion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/access_modifier_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/argument_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/array_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/assignment_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/block_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/block_end_newline.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/case_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/class_structure.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/closing_heredoc_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/closing_parenthesis_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/comment_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/condition_position.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/def_end_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/dot_position.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/else_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_line_after_guard_clause.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_line_after_magic_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_line_between_defs.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_arguments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_begin_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_block_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_class_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_method_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/empty_lines_around_module_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/end_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/end_of_line.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/extra_spacing.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_argument_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_array_element_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_array_element_line_break.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_hash_element_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_hash_element_line_break.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_method_argument_line_break.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_method_parameter_line_break.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/first_parameter_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/hash_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/heredoc_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/indentation_consistency.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/indentation_style.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/indentation_width.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/initial_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/leading_comment_space.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/leading_empty_lines.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/line_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_array_brace_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_array_line_breaks.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_assignment_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_block_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_hash_brace_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_method_call_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/multiline_operation_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/parameter_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/rescue_ensure_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_after_colon.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_after_comma.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_after_method_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_after_not.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_after_semicolon.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_around_block_parameters.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_around_keyword.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_around_method_call_operator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_around_operators.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_before_block_braces.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_before_comma.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_before_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_before_first_arg.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_before_semicolon.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_in_lambda_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_array_percent_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_block_braces.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_parens.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_range_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_reference_brackets.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/space_inside_string_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/trailing_empty_lines.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/layout/trailing_whitespace.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/legacy/corrections_proxy.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/legacy/corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ambiguous_block_association.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ambiguous_operator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ambiguous_regexp_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/assignment_in_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/big_decimal_new.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/boolean_symbol.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/circular_argument_reference.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/constant_resolution.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/debugger.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/deprecated_class_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/duplicate_case_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/duplicate_elsif_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/duplicate_hash_key.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/duplicate_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/duplicate_rescue_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/each_with_object_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/else_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/empty_conditional_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/empty_ensure.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/empty_expression.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/empty_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/empty_when.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ensure_return.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/erb_new_arguments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/flip_flop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/float_comparison.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/float_out_of_range.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/format_parameter_mismatch.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/heredoc_method_call_position.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/implicit_string_concatenation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ineffective_access_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/inherit_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/interpolation_check.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/literal_as_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/literal_in_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/loop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/missing_cop_enable_directive.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/missing_super.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/mixed_regexp_capture_types.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/multiple_comparison.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/nested_method_definition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/nested_percent_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/next_without_accumulator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/non_deterministic_require_order.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/non_local_exit_from_iterator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/number_conversion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/ordered_magic_comments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/out_of_range_regexp_ref.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/percent_string_array.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/percent_symbol_array.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/raise_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/rand_one.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_cop_enable_directive.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_require_statement.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_splat_expansion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_string_coercion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_with_index.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/redundant_with_object.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/regexp_as_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/require_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/rescue_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/rescue_type.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/return_in_void_context.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/safe_navigation_chain.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/safe_navigation_consistency.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/safe_navigation_with_empty.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/script_permission.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/self_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/send_with_mixin_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/shadowed_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/shadowed_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/shadowing_outer_local_variable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/struct_new_override.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/suppressed_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/syntax.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/to_json.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/top_level_return_with_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/unified_integer.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/unreachable_code.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/unreachable_loop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/unused_block_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/unused_method_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/uri_escape_unescape.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/uri_regexp.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/useless_access_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/useless_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/useless_else_without_rescue.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/useless_setter_call.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/lint/void.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/message_annotator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/abc_size.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/block_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/block_nesting.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/class_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/cyclomatic_complexity.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/method_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/module_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/parameter_lists.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/perceived_complexity.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/utils/abc_size_calculator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/utils/code_length_calculator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/utils/iterating_block.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/migration/department_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/allowed_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/annotation_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/array_min_size.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/array_syntax.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/auto_corrector.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/check_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/check_line_breakable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/code_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/configurable_enforced_style.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/configurable_formatting.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/configurable_max.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/configurable_naming.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/configurable_numbering.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/def_node.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/documentation_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/duplication.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/empty_lines_around_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/empty_parameter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/end_keyword_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/enforce_superclass.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/first_element_line_break.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/frozen_string_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/hash_alignment_styles.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/hash_transform_method.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/heredoc.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/ignored_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/ignored_pattern.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/integer_node.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/line_length_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/match_range.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/method_complexity.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/method_preference.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/min_body_length.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/multiline_element_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/multiline_element_line_breaks.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/multiline_expression_indentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/negative_conditional.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/nil_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/on_normal_if_unless.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/ordered_gem_node.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/percent_array.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/percent_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/preceding_following_alignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/preferred_delimiters.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/range_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/rational_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/regexp_literal_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/rescue_node.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/safe_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/space_after_punctuation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/space_before_punctuation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/statement_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/string_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/string_literals_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/surrounding_space.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/target_ruby_version.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/trailing_body.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/trailing_comma.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/uncommunicative_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/unused_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/mixin/visibility_help.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/accessor_method_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/ascii_identifiers.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/binary_operator_parameter_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/block_parameter_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/class_and_module_camel_case.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/constant_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/file_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/heredoc_delimiter_case.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/heredoc_delimiter_naming.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/memoized_instance_variable_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/method_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/method_parameter_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/predicate_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/variable_name.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/naming/variable_number.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/offense.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/registry.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/security/eval.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/security/json_load.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/security/marshal_load.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/security/open.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/security/yaml_load.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/severity.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/access_modifier_declarations.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/accessor_grouping.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/alias.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/and_or.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/array_coercion.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/array_join.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/ascii_comments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/attr.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/auto_resource_cleanup.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/bare_percent_literals.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/begin_block.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/bisected_attr_accessor.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/block_comments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/block_delimiters.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/case_equality.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/case_like_if.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/character_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/class_and_module_children.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/class_check.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/class_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/class_vars.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/collection_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/colon_method_call.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/colon_method_definition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/command_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/comment_annotation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/commented_keyword.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/conditional_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/constant_visibility.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/copyright.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/date_time.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/def_with_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/dir.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/documentation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/documentation_method.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/double_cop_disable_directive.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/double_negation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/each_for_simple_loop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/each_with_object.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_block_parameter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_case_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_else.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_lambda_parameter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/empty_method.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/encoding.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/end_block.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/eval_with_location.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/even_odd.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/expand_path_arguments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/explicit_block_argument.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/exponential_notation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/float_division.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/for.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/format_string.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/format_string_token.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/frozen_string_literal_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/global_std_stream.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/global_vars.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/guard_clause.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_as_last_array_item.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_each_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_like_case.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_syntax.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_transform_keys.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/hash_transform_values.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/identical_conditional_branches.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/if_inside_else.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/if_unless_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/if_with_semicolon.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/implicit_runtime_error.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/infinite_loop.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/inline_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/inverse_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/ip_addresses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/lambda.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/lambda_call.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/line_end_concatenation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_call_with_args_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_call_without_args_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_called_on_do_end_block.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/method_def_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/min_max.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/missing_else.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/missing_respond_to_missing.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/mixin_grouping.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/mixin_usage.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/module_function.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_block_chain.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_if_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_if_then.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_memoization.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_method_signature.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_ternary_operator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiline_when_then.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/multiple_comparison.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/mutable_constant.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/negated_if.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/negated_unless.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/negated_while.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/nested_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/nested_parenthesized_calls.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/nested_ternary_operator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/next.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/nil_comparison.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/non_nil_check.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/not.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/numeric_literal_prefix.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/numeric_literals.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/numeric_predicate.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/one_line_conditional.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/option_hash.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/optional_arguments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/optional_boolean_parameter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/or_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/parallel_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/parentheses_around_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/percent_literal_delimiters.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/percent_q_literals.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/perl_backrefs.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/preferred_hash_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/proc.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/raise_args.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/random_with_offset.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_begin.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_capital_w.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_conditional.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_fetch_block.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_file_extension_in_require.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_freeze.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_percent_q.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_regexp_character_class.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_regexp_escape.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_return.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_self.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_sort.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/redundant_sort_by.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/regexp_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/rescue_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/rescue_standard_error.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/return_nil.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/safe_navigation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/sample.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/self_assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/semicolon.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/send.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/signal_exception.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/single_argument_dig.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/single_line_block_params.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/single_line_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/slicing_with_range.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/special_global_vars.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/stabby_lambda_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/stderr_puts.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/string_concatenation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/string_hash_keys.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/string_literals.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/string_literals_in_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/string_methods.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/strip.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/struct_inheritance.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/symbol_array.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/symbol_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/symbol_proc.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/ternary_parentheses.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_body_on_class.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_body_on_method_definition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_body_on_module.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_comma_in_arguments.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_comma_in_array_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_comma_in_block_args.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_method_end_statement.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trailing_underscore_variable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/trivial_accessors.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/unless_else.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/unpack_first.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/variable_interpolation.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/when_then.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/while_until_do.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/while_until_modifier.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/word_array.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/yoda_condition.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/style/zero_length_predicate.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/team.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/tokens_util.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/util.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/utils/format_string.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/assignment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/branch.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/branchable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/reference.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/scope.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/variable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cop/variable_force/variable_table.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/cops_documentation_generator.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/core_ext/string.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/error.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/ext/processed_source.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/file_finder.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/auto_gen_config_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/base_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/clang_style_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/colorizable.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/disabled_config_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/emacs_style_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/file_list_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/formatter_set.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/fuubar_style_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/html_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/json_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/junit_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/offense_count_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/pacman_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/progress_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/quiet_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/simple_text_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/tap_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/text_util.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/formatter/worst_offenders_formatter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/magic_comment.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/name_similarity.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/options.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/path_util.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/platform.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rake_task.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/remote_config.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/result_cache.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rspec/cop_helper.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rspec/expect_offense.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rspec/host_environment_simulation_helper.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rspec/shared_contexts.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/rspec/support.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/runner.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/string_interpreter.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/target_finder.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/target_ruby.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/version.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/warning.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/gems/rubocop-0.89.1/lib/rubocop/yaml_duplication_checker.rb /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all/bin/rubocop Successfully installed rubocop-0.89.1 1 gem installed mkdir -p debian/rubocop/usr/bin mv debian/rubocop/usr/share/rubygems-integration/all/bin/rubocop debian/rubocop/usr/bin cd debian/rubocop/usr/share/rubygems-integration/all rm -rf bin rm -rf build_info rm -rf cache rm -rf doc rm -rf extensions rmdir plugins cd gems/rubocop-0.89.1 rm -f chmod 644 lib/rubocop.rb lib/rubocop/ast_aliases.rb lib/rubocop/cached_data.rb lib/rubocop/cli.rb lib/rubocop/cli/command.rb lib/rubocop/cli/command/auto_genenerate_config.rb lib/rubocop/cli/command/base.rb lib/rubocop/cli/command/execute_runner.rb lib/rubocop/cli/command/init_dotfile.rb lib/rubocop/cli/command/show_cops.rb lib/rubocop/cli/command/version.rb lib/rubocop/cli/environment.rb lib/rubocop/comment_config.rb lib/rubocop/config.rb lib/rubocop/config_loader.rb lib/rubocop/config_loader_resolver.rb lib/rubocop/config_obsoletion.rb lib/rubocop/config_store.rb lib/rubocop/config_validator.rb lib/rubocop/cop/autocorrect_logic.rb lib/rubocop/cop/badge.rb lib/rubocop/cop/base.rb lib/rubocop/cop/bundler/duplicated_gem.rb lib/rubocop/cop/bundler/gem_comment.rb lib/rubocop/cop/bundler/insecure_protocol_source.rb lib/rubocop/cop/bundler/ordered_gems.rb lib/rubocop/cop/commissioner.rb lib/rubocop/cop/cop.rb lib/rubocop/cop/corrector.rb lib/rubocop/cop/correctors/alignment_corrector.rb lib/rubocop/cop/correctors/condition_corrector.rb lib/rubocop/cop/correctors/each_to_for_corrector.rb lib/rubocop/cop/correctors/empty_line_corrector.rb lib/rubocop/cop/correctors/for_to_each_corrector.rb lib/rubocop/cop/correctors/lambda_literal_to_method_corrector.rb lib/rubocop/cop/correctors/line_break_corrector.rb lib/rubocop/cop/correctors/multiline_literal_brace_corrector.rb lib/rubocop/cop/correctors/ordered_gem_corrector.rb lib/rubocop/cop/correctors/parentheses_corrector.rb lib/rubocop/cop/correctors/percent_literal_corrector.rb lib/rubocop/cop/correctors/punctuation_corrector.rb lib/rubocop/cop/correctors/space_corrector.rb lib/rubocop/cop/correctors/string_literal_corrector.rb lib/rubocop/cop/correctors/unused_arg_corrector.rb lib/rubocop/cop/force.rb lib/rubocop/cop/gemspec/duplicated_assignment.rb lib/rubocop/cop/gemspec/ordered_dependencies.rb lib/rubocop/cop/gemspec/required_ruby_version.rb lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb lib/rubocop/cop/generator.rb lib/rubocop/cop/generator/configuration_injector.rb lib/rubocop/cop/generator/require_file_injector.rb lib/rubocop/cop/ignored_node.rb lib/rubocop/cop/internal_affairs.rb lib/rubocop/cop/internal_affairs/method_name_equal.rb lib/rubocop/cop/internal_affairs/node_destructuring.rb lib/rubocop/cop/internal_affairs/node_type_predicate.rb lib/rubocop/cop/internal_affairs/offense_location_keyword.rb lib/rubocop/cop/internal_affairs/redundant_location_argument.rb lib/rubocop/cop/internal_affairs/redundant_message_argument.rb lib/rubocop/cop/internal_affairs/useless_message_assertion.rb lib/rubocop/cop/layout/access_modifier_indentation.rb lib/rubocop/cop/layout/argument_alignment.rb lib/rubocop/cop/layout/array_alignment.rb lib/rubocop/cop/layout/assignment_indentation.rb lib/rubocop/cop/layout/block_alignment.rb lib/rubocop/cop/layout/block_end_newline.rb lib/rubocop/cop/layout/case_indentation.rb lib/rubocop/cop/layout/class_structure.rb lib/rubocop/cop/layout/closing_heredoc_indentation.rb lib/rubocop/cop/layout/closing_parenthesis_indentation.rb lib/rubocop/cop/layout/comment_indentation.rb lib/rubocop/cop/layout/condition_position.rb lib/rubocop/cop/layout/def_end_alignment.rb lib/rubocop/cop/layout/dot_position.rb lib/rubocop/cop/layout/else_alignment.rb lib/rubocop/cop/layout/empty_comment.rb lib/rubocop/cop/layout/empty_line_after_guard_clause.rb lib/rubocop/cop/layout/empty_line_after_magic_comment.rb lib/rubocop/cop/layout/empty_line_between_defs.rb lib/rubocop/cop/layout/empty_lines.rb lib/rubocop/cop/layout/empty_lines_around_access_modifier.rb lib/rubocop/cop/layout/empty_lines_around_arguments.rb lib/rubocop/cop/layout/empty_lines_around_attribute_accessor.rb lib/rubocop/cop/layout/empty_lines_around_begin_body.rb lib/rubocop/cop/layout/empty_lines_around_block_body.rb lib/rubocop/cop/layout/empty_lines_around_class_body.rb lib/rubocop/cop/layout/empty_lines_around_exception_handling_keywords.rb lib/rubocop/cop/layout/empty_lines_around_method_body.rb lib/rubocop/cop/layout/empty_lines_around_module_body.rb lib/rubocop/cop/layout/end_alignment.rb lib/rubocop/cop/layout/end_of_line.rb lib/rubocop/cop/layout/extra_spacing.rb lib/rubocop/cop/layout/first_argument_indentation.rb lib/rubocop/cop/layout/first_array_element_indentation.rb lib/rubocop/cop/layout/first_array_element_line_break.rb lib/rubocop/cop/layout/first_hash_element_indentation.rb lib/rubocop/cop/layout/first_hash_element_line_break.rb lib/rubocop/cop/layout/first_method_argument_line_break.rb lib/rubocop/cop/layout/first_method_parameter_line_break.rb lib/rubocop/cop/layout/first_parameter_indentation.rb lib/rubocop/cop/layout/hash_alignment.rb lib/rubocop/cop/layout/heredoc_argument_closing_parenthesis.rb lib/rubocop/cop/layout/heredoc_indentation.rb lib/rubocop/cop/layout/indentation_consistency.rb lib/rubocop/cop/layout/indentation_style.rb lib/rubocop/cop/layout/indentation_width.rb lib/rubocop/cop/layout/initial_indentation.rb lib/rubocop/cop/layout/leading_comment_space.rb lib/rubocop/cop/layout/leading_empty_lines.rb lib/rubocop/cop/layout/line_length.rb lib/rubocop/cop/layout/multiline_array_brace_layout.rb lib/rubocop/cop/layout/multiline_array_line_breaks.rb lib/rubocop/cop/layout/multiline_assignment_layout.rb lib/rubocop/cop/layout/multiline_block_layout.rb lib/rubocop/cop/layout/multiline_hash_brace_layout.rb lib/rubocop/cop/layout/multiline_hash_key_line_breaks.rb lib/rubocop/cop/layout/multiline_method_argument_line_breaks.rb lib/rubocop/cop/layout/multiline_method_call_brace_layout.rb lib/rubocop/cop/layout/multiline_method_call_indentation.rb lib/rubocop/cop/layout/multiline_method_definition_brace_layout.rb lib/rubocop/cop/layout/multiline_operation_indentation.rb lib/rubocop/cop/layout/parameter_alignment.rb lib/rubocop/cop/layout/rescue_ensure_alignment.rb lib/rubocop/cop/layout/space_after_colon.rb lib/rubocop/cop/layout/space_after_comma.rb lib/rubocop/cop/layout/space_after_method_name.rb lib/rubocop/cop/layout/space_after_not.rb lib/rubocop/cop/layout/space_after_semicolon.rb lib/rubocop/cop/layout/space_around_block_parameters.rb lib/rubocop/cop/layout/space_around_equals_in_parameter_default.rb lib/rubocop/cop/layout/space_around_keyword.rb lib/rubocop/cop/layout/space_around_method_call_operator.rb lib/rubocop/cop/layout/space_around_operators.rb lib/rubocop/cop/layout/space_before_block_braces.rb lib/rubocop/cop/layout/space_before_comma.rb lib/rubocop/cop/layout/space_before_comment.rb lib/rubocop/cop/layout/space_before_first_arg.rb lib/rubocop/cop/layout/space_before_semicolon.rb lib/rubocop/cop/layout/space_in_lambda_literal.rb lib/rubocop/cop/layout/space_inside_array_literal_brackets.rb lib/rubocop/cop/layout/space_inside_array_percent_literal.rb lib/rubocop/cop/layout/space_inside_block_braces.rb lib/rubocop/cop/layout/space_inside_hash_literal_braces.rb lib/rubocop/cop/layout/space_inside_parens.rb lib/rubocop/cop/layout/space_inside_percent_literal_delimiters.rb lib/rubocop/cop/layout/space_inside_range_literal.rb lib/rubocop/cop/layout/space_inside_reference_brackets.rb lib/rubocop/cop/layout/space_inside_string_interpolation.rb lib/rubocop/cop/layout/trailing_empty_lines.rb lib/rubocop/cop/layout/trailing_whitespace.rb lib/rubocop/cop/legacy/corrections_proxy.rb lib/rubocop/cop/legacy/corrector.rb lib/rubocop/cop/lint/ambiguous_block_association.rb lib/rubocop/cop/lint/ambiguous_operator.rb lib/rubocop/cop/lint/ambiguous_regexp_literal.rb lib/rubocop/cop/lint/assignment_in_condition.rb lib/rubocop/cop/lint/big_decimal_new.rb lib/rubocop/cop/lint/binary_operator_with_identical_operands.rb lib/rubocop/cop/lint/boolean_symbol.rb lib/rubocop/cop/lint/circular_argument_reference.rb lib/rubocop/cop/lint/constant_resolution.rb lib/rubocop/cop/lint/debugger.rb lib/rubocop/cop/lint/deprecated_class_methods.rb lib/rubocop/cop/lint/deprecated_open_ssl_constant.rb lib/rubocop/cop/lint/disjunctive_assignment_in_constructor.rb lib/rubocop/cop/lint/duplicate_case_condition.rb lib/rubocop/cop/lint/duplicate_elsif_condition.rb lib/rubocop/cop/lint/duplicate_hash_key.rb lib/rubocop/cop/lint/duplicate_methods.rb lib/rubocop/cop/lint/duplicate_rescue_exception.rb lib/rubocop/cop/lint/each_with_object_argument.rb lib/rubocop/cop/lint/else_layout.rb lib/rubocop/cop/lint/empty_conditional_body.rb lib/rubocop/cop/lint/empty_ensure.rb lib/rubocop/cop/lint/empty_expression.rb lib/rubocop/cop/lint/empty_interpolation.rb lib/rubocop/cop/lint/empty_when.rb lib/rubocop/cop/lint/ensure_return.rb lib/rubocop/cop/lint/erb_new_arguments.rb lib/rubocop/cop/lint/flip_flop.rb lib/rubocop/cop/lint/float_comparison.rb lib/rubocop/cop/lint/float_out_of_range.rb lib/rubocop/cop/lint/format_parameter_mismatch.rb lib/rubocop/cop/lint/heredoc_method_call_position.rb lib/rubocop/cop/lint/implicit_string_concatenation.rb lib/rubocop/cop/lint/ineffective_access_modifier.rb lib/rubocop/cop/lint/inherit_exception.rb lib/rubocop/cop/lint/interpolation_check.rb lib/rubocop/cop/lint/literal_as_condition.rb lib/rubocop/cop/lint/literal_in_interpolation.rb lib/rubocop/cop/lint/loop.rb lib/rubocop/cop/lint/missing_cop_enable_directive.rb lib/rubocop/cop/lint/missing_super.rb lib/rubocop/cop/lint/mixed_regexp_capture_types.rb lib/rubocop/cop/lint/multiple_comparison.rb lib/rubocop/cop/lint/nested_method_definition.rb lib/rubocop/cop/lint/nested_percent_literal.rb lib/rubocop/cop/lint/next_without_accumulator.rb lib/rubocop/cop/lint/non_deterministic_require_order.rb lib/rubocop/cop/lint/non_local_exit_from_iterator.rb lib/rubocop/cop/lint/number_conversion.rb lib/rubocop/cop/lint/ordered_magic_comments.rb lib/rubocop/cop/lint/out_of_range_regexp_ref.rb lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb lib/rubocop/cop/lint/percent_string_array.rb lib/rubocop/cop/lint/percent_symbol_array.rb lib/rubocop/cop/lint/raise_exception.rb lib/rubocop/cop/lint/rand_one.rb lib/rubocop/cop/lint/redundant_cop_disable_directive.rb lib/rubocop/cop/lint/redundant_cop_enable_directive.rb lib/rubocop/cop/lint/redundant_require_statement.rb lib/rubocop/cop/lint/redundant_splat_expansion.rb lib/rubocop/cop/lint/redundant_string_coercion.rb lib/rubocop/cop/lint/redundant_with_index.rb lib/rubocop/cop/lint/redundant_with_object.rb lib/rubocop/cop/lint/regexp_as_condition.rb lib/rubocop/cop/lint/require_parentheses.rb lib/rubocop/cop/lint/rescue_exception.rb lib/rubocop/cop/lint/rescue_type.rb lib/rubocop/cop/lint/return_in_void_context.rb lib/rubocop/cop/lint/safe_navigation_chain.rb lib/rubocop/cop/lint/safe_navigation_consistency.rb lib/rubocop/cop/lint/safe_navigation_with_empty.rb lib/rubocop/cop/lint/script_permission.rb lib/rubocop/cop/lint/self_assignment.rb lib/rubocop/cop/lint/send_with_mixin_argument.rb lib/rubocop/cop/lint/shadowed_argument.rb lib/rubocop/cop/lint/shadowed_exception.rb lib/rubocop/cop/lint/shadowing_outer_local_variable.rb lib/rubocop/cop/lint/struct_new_override.rb lib/rubocop/cop/lint/suppressed_exception.rb lib/rubocop/cop/lint/syntax.rb lib/rubocop/cop/lint/to_json.rb lib/rubocop/cop/lint/top_level_return_with_argument.rb lib/rubocop/cop/lint/underscore_prefixed_variable_name.rb lib/rubocop/cop/lint/unified_integer.rb lib/rubocop/cop/lint/unreachable_code.rb lib/rubocop/cop/lint/unreachable_loop.rb lib/rubocop/cop/lint/unused_block_argument.rb lib/rubocop/cop/lint/unused_method_argument.rb lib/rubocop/cop/lint/uri_escape_unescape.rb lib/rubocop/cop/lint/uri_regexp.rb lib/rubocop/cop/lint/useless_access_modifier.rb lib/rubocop/cop/lint/useless_assignment.rb lib/rubocop/cop/lint/useless_else_without_rescue.rb lib/rubocop/cop/lint/useless_setter_call.rb lib/rubocop/cop/lint/void.rb lib/rubocop/cop/message_annotator.rb lib/rubocop/cop/metrics/abc_size.rb lib/rubocop/cop/metrics/block_length.rb lib/rubocop/cop/metrics/block_nesting.rb lib/rubocop/cop/metrics/class_length.rb lib/rubocop/cop/metrics/cyclomatic_complexity.rb lib/rubocop/cop/metrics/method_length.rb lib/rubocop/cop/metrics/module_length.rb lib/rubocop/cop/metrics/parameter_lists.rb lib/rubocop/cop/metrics/perceived_complexity.rb lib/rubocop/cop/metrics/utils/abc_size_calculator.rb lib/rubocop/cop/metrics/utils/code_length_calculator.rb lib/rubocop/cop/metrics/utils/iterating_block.rb lib/rubocop/cop/metrics/utils/repeated_csend_discount.rb lib/rubocop/cop/migration/department_name.rb lib/rubocop/cop/mixin/alignment.rb lib/rubocop/cop/mixin/allowed_methods.rb lib/rubocop/cop/mixin/annotation_comment.rb lib/rubocop/cop/mixin/array_min_size.rb lib/rubocop/cop/mixin/array_syntax.rb lib/rubocop/cop/mixin/auto_corrector.rb lib/rubocop/cop/mixin/check_assignment.rb lib/rubocop/cop/mixin/check_line_breakable.rb lib/rubocop/cop/mixin/code_length.rb lib/rubocop/cop/mixin/configurable_enforced_style.rb lib/rubocop/cop/mixin/configurable_formatting.rb lib/rubocop/cop/mixin/configurable_max.rb lib/rubocop/cop/mixin/configurable_naming.rb lib/rubocop/cop/mixin/configurable_numbering.rb lib/rubocop/cop/mixin/def_node.rb lib/rubocop/cop/mixin/documentation_comment.rb lib/rubocop/cop/mixin/duplication.rb lib/rubocop/cop/mixin/empty_lines_around_body.rb lib/rubocop/cop/mixin/empty_parameter.rb lib/rubocop/cop/mixin/end_keyword_alignment.rb lib/rubocop/cop/mixin/enforce_superclass.rb lib/rubocop/cop/mixin/first_element_line_break.rb lib/rubocop/cop/mixin/frozen_string_literal.rb lib/rubocop/cop/mixin/hash_alignment_styles.rb lib/rubocop/cop/mixin/hash_transform_method.rb lib/rubocop/cop/mixin/heredoc.rb lib/rubocop/cop/mixin/ignored_methods.rb lib/rubocop/cop/mixin/ignored_pattern.rb lib/rubocop/cop/mixin/integer_node.rb lib/rubocop/cop/mixin/interpolation.rb lib/rubocop/cop/mixin/line_length_help.rb lib/rubocop/cop/mixin/match_range.rb lib/rubocop/cop/mixin/method_complexity.rb lib/rubocop/cop/mixin/method_preference.rb lib/rubocop/cop/mixin/min_body_length.rb lib/rubocop/cop/mixin/multiline_element_indentation.rb lib/rubocop/cop/mixin/multiline_element_line_breaks.rb lib/rubocop/cop/mixin/multiline_expression_indentation.rb lib/rubocop/cop/mixin/multiline_literal_brace_layout.rb lib/rubocop/cop/mixin/negative_conditional.rb lib/rubocop/cop/mixin/nil_methods.rb lib/rubocop/cop/mixin/on_normal_if_unless.rb lib/rubocop/cop/mixin/ordered_gem_node.rb lib/rubocop/cop/mixin/parentheses.rb lib/rubocop/cop/mixin/percent_array.rb lib/rubocop/cop/mixin/percent_literal.rb lib/rubocop/cop/mixin/preceding_following_alignment.rb lib/rubocop/cop/mixin/preferred_delimiters.rb lib/rubocop/cop/mixin/range_help.rb lib/rubocop/cop/mixin/rational_literal.rb lib/rubocop/cop/mixin/regexp_literal_help.rb lib/rubocop/cop/mixin/rescue_node.rb lib/rubocop/cop/mixin/safe_assignment.rb lib/rubocop/cop/mixin/space_after_punctuation.rb lib/rubocop/cop/mixin/space_before_punctuation.rb lib/rubocop/cop/mixin/statement_modifier.rb lib/rubocop/cop/mixin/string_help.rb lib/rubocop/cop/mixin/string_literals_help.rb lib/rubocop/cop/mixin/surrounding_space.rb lib/rubocop/cop/mixin/target_ruby_version.rb lib/rubocop/cop/mixin/trailing_body.rb lib/rubocop/cop/mixin/trailing_comma.rb lib/rubocop/cop/mixin/uncommunicative_name.rb lib/rubocop/cop/mixin/unused_argument.rb lib/rubocop/cop/mixin/visibility_help.rb lib/rubocop/cop/naming/accessor_method_name.rb lib/rubocop/cop/naming/ascii_identifiers.rb lib/rubocop/cop/naming/binary_operator_parameter_name.rb lib/rubocop/cop/naming/block_parameter_name.rb lib/rubocop/cop/naming/class_and_module_camel_case.rb lib/rubocop/cop/naming/constant_name.rb lib/rubocop/cop/naming/file_name.rb lib/rubocop/cop/naming/heredoc_delimiter_case.rb lib/rubocop/cop/naming/heredoc_delimiter_naming.rb lib/rubocop/cop/naming/memoized_instance_variable_name.rb lib/rubocop/cop/naming/method_name.rb lib/rubocop/cop/naming/method_parameter_name.rb lib/rubocop/cop/naming/predicate_name.rb lib/rubocop/cop/naming/rescued_exceptions_variable_name.rb lib/rubocop/cop/naming/variable_name.rb lib/rubocop/cop/naming/variable_number.rb lib/rubocop/cop/offense.rb lib/rubocop/cop/registry.rb lib/rubocop/cop/security/eval.rb lib/rubocop/cop/security/json_load.rb lib/rubocop/cop/security/marshal_load.rb lib/rubocop/cop/security/open.rb lib/rubocop/cop/security/yaml_load.rb lib/rubocop/cop/severity.rb lib/rubocop/cop/style/access_modifier_declarations.rb lib/rubocop/cop/style/accessor_grouping.rb lib/rubocop/cop/style/alias.rb lib/rubocop/cop/style/and_or.rb lib/rubocop/cop/style/array_coercion.rb lib/rubocop/cop/style/array_join.rb lib/rubocop/cop/style/ascii_comments.rb lib/rubocop/cop/style/attr.rb lib/rubocop/cop/style/auto_resource_cleanup.rb lib/rubocop/cop/style/bare_percent_literals.rb lib/rubocop/cop/style/begin_block.rb lib/rubocop/cop/style/bisected_attr_accessor.rb lib/rubocop/cop/style/block_comments.rb lib/rubocop/cop/style/block_delimiters.rb lib/rubocop/cop/style/case_equality.rb lib/rubocop/cop/style/case_like_if.rb lib/rubocop/cop/style/character_literal.rb lib/rubocop/cop/style/class_and_module_children.rb lib/rubocop/cop/style/class_check.rb lib/rubocop/cop/style/class_methods.rb lib/rubocop/cop/style/class_vars.rb lib/rubocop/cop/style/collection_methods.rb lib/rubocop/cop/style/colon_method_call.rb lib/rubocop/cop/style/colon_method_definition.rb lib/rubocop/cop/style/command_literal.rb lib/rubocop/cop/style/comment_annotation.rb lib/rubocop/cop/style/commented_keyword.rb lib/rubocop/cop/style/conditional_assignment.rb lib/rubocop/cop/style/constant_visibility.rb lib/rubocop/cop/style/copyright.rb lib/rubocop/cop/style/date_time.rb lib/rubocop/cop/style/def_with_parentheses.rb lib/rubocop/cop/style/dir.rb lib/rubocop/cop/style/disable_cops_within_source_code_directive.rb lib/rubocop/cop/style/documentation.rb lib/rubocop/cop/style/documentation_method.rb lib/rubocop/cop/style/double_cop_disable_directive.rb lib/rubocop/cop/style/double_negation.rb lib/rubocop/cop/style/each_for_simple_loop.rb lib/rubocop/cop/style/each_with_object.rb lib/rubocop/cop/style/empty_block_parameter.rb lib/rubocop/cop/style/empty_case_condition.rb lib/rubocop/cop/style/empty_else.rb lib/rubocop/cop/style/empty_lambda_parameter.rb lib/rubocop/cop/style/empty_literal.rb lib/rubocop/cop/style/empty_method.rb lib/rubocop/cop/style/encoding.rb lib/rubocop/cop/style/end_block.rb lib/rubocop/cop/style/eval_with_location.rb lib/rubocop/cop/style/even_odd.rb lib/rubocop/cop/style/expand_path_arguments.rb lib/rubocop/cop/style/explicit_block_argument.rb lib/rubocop/cop/style/exponential_notation.rb lib/rubocop/cop/style/float_division.rb lib/rubocop/cop/style/for.rb lib/rubocop/cop/style/format_string.rb lib/rubocop/cop/style/format_string_token.rb lib/rubocop/cop/style/frozen_string_literal_comment.rb lib/rubocop/cop/style/global_std_stream.rb lib/rubocop/cop/style/global_vars.rb lib/rubocop/cop/style/guard_clause.rb lib/rubocop/cop/style/hash_as_last_array_item.rb lib/rubocop/cop/style/hash_each_methods.rb lib/rubocop/cop/style/hash_like_case.rb lib/rubocop/cop/style/hash_syntax.rb lib/rubocop/cop/style/hash_transform_keys.rb lib/rubocop/cop/style/hash_transform_values.rb lib/rubocop/cop/style/identical_conditional_branches.rb lib/rubocop/cop/style/if_inside_else.rb lib/rubocop/cop/style/if_unless_modifier.rb lib/rubocop/cop/style/if_unless_modifier_of_if_unless.rb lib/rubocop/cop/style/if_with_semicolon.rb lib/rubocop/cop/style/implicit_runtime_error.rb lib/rubocop/cop/style/infinite_loop.rb lib/rubocop/cop/style/inline_comment.rb lib/rubocop/cop/style/inverse_methods.rb lib/rubocop/cop/style/ip_addresses.rb lib/rubocop/cop/style/lambda.rb lib/rubocop/cop/style/lambda_call.rb lib/rubocop/cop/style/line_end_concatenation.rb lib/rubocop/cop/style/method_call_with_args_parentheses.rb lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb lib/rubocop/cop/style/method_call_with_args_parentheses/require_parentheses.rb lib/rubocop/cop/style/method_call_without_args_parentheses.rb lib/rubocop/cop/style/method_called_on_do_end_block.rb lib/rubocop/cop/style/method_def_parentheses.rb lib/rubocop/cop/style/min_max.rb lib/rubocop/cop/style/missing_else.rb lib/rubocop/cop/style/missing_respond_to_missing.rb lib/rubocop/cop/style/mixin_grouping.rb lib/rubocop/cop/style/mixin_usage.rb lib/rubocop/cop/style/module_function.rb lib/rubocop/cop/style/multiline_block_chain.rb lib/rubocop/cop/style/multiline_if_modifier.rb lib/rubocop/cop/style/multiline_if_then.rb lib/rubocop/cop/style/multiline_memoization.rb lib/rubocop/cop/style/multiline_method_signature.rb lib/rubocop/cop/style/multiline_ternary_operator.rb lib/rubocop/cop/style/multiline_when_then.rb lib/rubocop/cop/style/multiple_comparison.rb lib/rubocop/cop/style/mutable_constant.rb lib/rubocop/cop/style/negated_if.rb lib/rubocop/cop/style/negated_unless.rb lib/rubocop/cop/style/negated_while.rb lib/rubocop/cop/style/nested_modifier.rb lib/rubocop/cop/style/nested_parenthesized_calls.rb lib/rubocop/cop/style/nested_ternary_operator.rb lib/rubocop/cop/style/next.rb lib/rubocop/cop/style/nil_comparison.rb lib/rubocop/cop/style/non_nil_check.rb lib/rubocop/cop/style/not.rb lib/rubocop/cop/style/numeric_literal_prefix.rb lib/rubocop/cop/style/numeric_literals.rb lib/rubocop/cop/style/numeric_predicate.rb lib/rubocop/cop/style/one_line_conditional.rb lib/rubocop/cop/style/option_hash.rb lib/rubocop/cop/style/optional_arguments.rb lib/rubocop/cop/style/optional_boolean_parameter.rb lib/rubocop/cop/style/or_assignment.rb lib/rubocop/cop/style/parallel_assignment.rb lib/rubocop/cop/style/parentheses_around_condition.rb lib/rubocop/cop/style/percent_literal_delimiters.rb lib/rubocop/cop/style/percent_q_literals.rb lib/rubocop/cop/style/perl_backrefs.rb lib/rubocop/cop/style/preferred_hash_methods.rb lib/rubocop/cop/style/proc.rb lib/rubocop/cop/style/raise_args.rb lib/rubocop/cop/style/random_with_offset.rb lib/rubocop/cop/style/redundant_assignment.rb lib/rubocop/cop/style/redundant_begin.rb lib/rubocop/cop/style/redundant_capital_w.rb lib/rubocop/cop/style/redundant_condition.rb lib/rubocop/cop/style/redundant_conditional.rb lib/rubocop/cop/style/redundant_exception.rb lib/rubocop/cop/style/redundant_fetch_block.rb lib/rubocop/cop/style/redundant_file_extension_in_require.rb lib/rubocop/cop/style/redundant_freeze.rb lib/rubocop/cop/style/redundant_interpolation.rb lib/rubocop/cop/style/redundant_parentheses.rb lib/rubocop/cop/style/redundant_percent_q.rb lib/rubocop/cop/style/redundant_regexp_character_class.rb lib/rubocop/cop/style/redundant_regexp_escape.rb lib/rubocop/cop/style/redundant_return.rb lib/rubocop/cop/style/redundant_self.rb lib/rubocop/cop/style/redundant_sort.rb lib/rubocop/cop/style/redundant_sort_by.rb lib/rubocop/cop/style/regexp_literal.rb lib/rubocop/cop/style/rescue_modifier.rb lib/rubocop/cop/style/rescue_standard_error.rb lib/rubocop/cop/style/return_nil.rb lib/rubocop/cop/style/safe_navigation.rb lib/rubocop/cop/style/sample.rb lib/rubocop/cop/style/self_assignment.rb lib/rubocop/cop/style/semicolon.rb lib/rubocop/cop/style/send.rb lib/rubocop/cop/style/signal_exception.rb lib/rubocop/cop/style/single_argument_dig.rb lib/rubocop/cop/style/single_line_block_params.rb lib/rubocop/cop/style/single_line_methods.rb lib/rubocop/cop/style/slicing_with_range.rb lib/rubocop/cop/style/special_global_vars.rb lib/rubocop/cop/style/stabby_lambda_parentheses.rb lib/rubocop/cop/style/stderr_puts.rb lib/rubocop/cop/style/string_concatenation.rb lib/rubocop/cop/style/string_hash_keys.rb lib/rubocop/cop/style/string_literals.rb lib/rubocop/cop/style/string_literals_in_interpolation.rb lib/rubocop/cop/style/string_methods.rb lib/rubocop/cop/style/strip.rb lib/rubocop/cop/style/struct_inheritance.rb lib/rubocop/cop/style/symbol_array.rb lib/rubocop/cop/style/symbol_literal.rb lib/rubocop/cop/style/symbol_proc.rb lib/rubocop/cop/style/ternary_parentheses.rb lib/rubocop/cop/style/trailing_body_on_class.rb lib/rubocop/cop/style/trailing_body_on_method_definition.rb lib/rubocop/cop/style/trailing_body_on_module.rb lib/rubocop/cop/style/trailing_comma_in_arguments.rb lib/rubocop/cop/style/trailing_comma_in_array_literal.rb lib/rubocop/cop/style/trailing_comma_in_block_args.rb lib/rubocop/cop/style/trailing_comma_in_hash_literal.rb lib/rubocop/cop/style/trailing_method_end_statement.rb lib/rubocop/cop/style/trailing_underscore_variable.rb lib/rubocop/cop/style/trivial_accessors.rb lib/rubocop/cop/style/unless_else.rb lib/rubocop/cop/style/unpack_first.rb lib/rubocop/cop/style/variable_interpolation.rb lib/rubocop/cop/style/when_then.rb lib/rubocop/cop/style/while_until_do.rb lib/rubocop/cop/style/while_until_modifier.rb lib/rubocop/cop/style/word_array.rb lib/rubocop/cop/style/yoda_condition.rb lib/rubocop/cop/style/zero_length_predicate.rb lib/rubocop/cop/team.rb lib/rubocop/cop/tokens_util.rb lib/rubocop/cop/util.rb lib/rubocop/cop/utils/format_string.rb lib/rubocop/cop/variable_force.rb lib/rubocop/cop/variable_force/assignment.rb lib/rubocop/cop/variable_force/branch.rb lib/rubocop/cop/variable_force/branchable.rb lib/rubocop/cop/variable_force/reference.rb lib/rubocop/cop/variable_force/scope.rb lib/rubocop/cop/variable_force/variable.rb lib/rubocop/cop/variable_force/variable_table.rb lib/rubocop/cops_documentation_generator.rb lib/rubocop/core_ext/string.rb lib/rubocop/error.rb lib/rubocop/ext/processed_source.rb lib/rubocop/file_finder.rb lib/rubocop/formatter/auto_gen_config_formatter.rb lib/rubocop/formatter/base_formatter.rb lib/rubocop/formatter/clang_style_formatter.rb lib/rubocop/formatter/colorizable.rb lib/rubocop/formatter/disabled_config_formatter.rb lib/rubocop/formatter/emacs_style_formatter.rb lib/rubocop/formatter/file_list_formatter.rb lib/rubocop/formatter/formatter_set.rb lib/rubocop/formatter/fuubar_style_formatter.rb lib/rubocop/formatter/html_formatter.rb lib/rubocop/formatter/json_formatter.rb lib/rubocop/formatter/junit_formatter.rb lib/rubocop/formatter/offense_count_formatter.rb lib/rubocop/formatter/pacman_formatter.rb lib/rubocop/formatter/progress_formatter.rb lib/rubocop/formatter/quiet_formatter.rb lib/rubocop/formatter/simple_text_formatter.rb lib/rubocop/formatter/tap_formatter.rb lib/rubocop/formatter/text_util.rb lib/rubocop/formatter/worst_offenders_formatter.rb lib/rubocop/magic_comment.rb lib/rubocop/name_similarity.rb lib/rubocop/options.rb lib/rubocop/path_util.rb lib/rubocop/platform.rb lib/rubocop/rake_task.rb lib/rubocop/remote_config.rb lib/rubocop/result_cache.rb lib/rubocop/rspec/cop_helper.rb lib/rubocop/rspec/expect_offense.rb lib/rubocop/rspec/host_environment_simulation_helper.rb lib/rubocop/rspec/shared_contexts.rb lib/rubocop/rspec/support.rb lib/rubocop/runner.rb lib/rubocop/string_interpreter.rb lib/rubocop/target_finder.rb lib/rubocop/target_ruby.rb lib/rubocop/version.rb lib/rubocop/warning.rb lib/rubocop/yaml_duplication_checker.rb find lib/ -type d -empty -delete cd - cd - Rewriting shebang line of /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/bin/rubocop dh_installchangelogs -prubocop /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/CHANGELOG.md upstream /usr/bin/ruby2.7 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby2.7 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all:/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -e gem\ \"rubocop\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby2.7 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all:/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/2.7.0:/var/lib/gems/2.7.0:/usr/local/lib/ruby/gems/2.7.0:/usr/lib/ruby/gems/2.7.0:/usr/lib/x86_64-linux-gnu/ruby/gems/2.7.0:/usr/share/rubygems-integration/2.7.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.7.0 ruby2.7 -S rake -f debian/ruby-tests.rake /usr/bin/ruby2.7 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb --format documentation Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 44618 RuboCop::Cop::Layout::ExtraSpacing when AllowForAlignment is false ignores whitespace inside a string registers an offense and corrects extra spacing before a unary plus in an argument list registers an offense and corrects alignment with token not preceded by space ignores trailing whitespace ignores whitespace at the beginning of the line registers an offense and corrects extra spacing in class inheritance registers an offense and corrects double extra spacing in variable assignment accepts aligned values of an implicit hash literal registers an offense and corrects extra space before a float accepts space between key and value in a hash with hash rockets with extra spacing for alignment purposes such as aligning long assignment expressions that include line breaks registers offense(s) such as aligning tokens with empty line between registers offense(s) such as lining up assignments with empty lines and comments in between registers offense(s) such as lining up different kinds of assignments registers offense(s) such as lining up assignments registers offense(s) such as aligning comments on non-adjacent lines registers offense(s) such as aligning with the same character registers offense(s) such as aligning = on lines where there are trailing comments registers offense(s) when spaces are present in a single-line hash literal registers an offense and corrects hashes with symbol keys registers an offense and corrects hashes with hash rockets when AllowBeforeTrailingComments is true allows it doesn't interfere with AllowForAlignment being false such as aligning tokens with empty line between registers offense(s) such as aligning long assignment expressions that include line breaks registers offense(s) such as aligning = on lines where there are trailing comments registers offense(s) such as lining up assignments registers offense(s) such as aligning comments on non-adjacent lines registers offense(s) such as aligning with the same character registers offense(s) such as lining up assignments with empty lines and comments in between registers offense(s) such as lining up different kinds of assignments registers offense(s) being true such as lining up assignments allows it such as aligning with the same character allows it such as lining up assignments with empty lines and comments in between allows it such as aligning comments on non-adjacent lines allows it such as aligning = on lines where there are trailing comments allows it such as aligning tokens with empty line between allows it such as aligning long assignment expressions that include line breaks allows it such as lining up different kinds of assignments allows it false does not trigger on only one space before comment regsiters offense when AllowForAlignment is true ignores trailing whitespace registers an offense and corrects double extra spacing in variable assignment registers an offense and corrects alignment with token not preceded by space ignores whitespace at the beginning of the line registers an offense and corrects extra spacing before a unary plus in an argument list accepts space between key and value in a hash with hash rockets registers an offense and corrects extra spacing in class inheritance accepts aligned values of an implicit hash literal ignores whitespace inside a string registers an offense and corrects extra space before a float with extra spacing for alignment purposes such as aligning tokens with empty line between allows it such as lining up assignments with empty lines and comments in between allows it such as aligning comments on non-adjacent lines allows it such as aligning long assignment expressions that include line breaks allows it such as lining up different kinds of assignments allows it such as lining up assignments allows it such as aligning = on lines where there are trailing comments allows it such as aligning with the same character allows it when spaces are present in a single-line hash literal registers an offense and corrects hashes with symbol keys registers an offense and corrects hashes with hash rockets when ForceEqualSignAlignment is true does not register alignment errors on outdented lines registers an offense and corrects consecutive assignments that are not aligned does not register an offense when optarg equals is not aligned with assignment equals sign registers an offense and corrects consecutive aref assignments which are not aligned does not register an offense if assignments are separated by blanks aligns the first assignment with the following assignment does not register offenses for multiple complex nested assignments does not register an offense if assignments are aligned register offenses and correct consecutive operator assignments which are not aligned register offenses and correct consecutive attribute assignments which are not aligned register offenses and correct complex nested assignments RuboCop::Cop::Lint::OutOfRangeRegexpRef does not register an offence Regexp containing non literal registers an offense when out of range references are used for mix of numbered and named captures registers an offense when out of range references are used for named captures registers an offense when the regexp is matched with `match` ignores calls to `match?` does not register offense to a regexp with valid references for named captures registers an offense when out of range references are used for numbered captures registers an offense when out of range references are used inside a when clause only registers an offense when the regexp is matched as a literal registers an offense when the regexp is matched with `===` does not register an offense when in range references are used inside a when clause does not register offense to a regexp with valid references for numbered captures registers an offense when references are used before any Regexp handles `match` with no arguments uses the maximum number of captures for when clauses with multiple conditions handles `match` with no receiver only registers an offense for when clauses when the regexp is matched as a literal registers an offense when the regexp appears on the right hand side of `=~` registers an offense when out of range references are used for non captures does not register offense to a regexp with valid references for a mix named and numbered captures ignores regexp when clause conditions that contain interpolations matching with gsub does not register an offense when in range references are used registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal matching with scan registers an offense when out of range references are used does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal matching with gsub! only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used does not register an offense when in range references are used matching with rindex does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with start_with? does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with match registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with partition does not register an offense when in range references are used registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal matching with sub! only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used registers an offense when out of range references are used matching with `grep` does not register an offense when in range references are used registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal matching with rpartition registers an offense when out of range references are used does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal matching with slice! does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with index does not register an offense when in range references are used registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal matching with sub registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with slice only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used does not register an offense when in range references are used matching with `[]` only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used registers an offense when out of range references are used matching with end_with? registers an offense when out of range references are used does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal RuboCop::Cop::Metrics::BlockNesting accepts `Max` levels of nesting accepts if/elsif `Max + 2` levels of `if` nesting registers an offense when CountBlocks is true nested inline block registers an offense nested multiline block registers an offense `Max + 1` levels of `if` nesting registers an offense Multiple nested `ifs` at same level registers 2 offenses nested modifier `while` registers an offense nested `case` registers an offense nested modifier `until` registers an offense nested `until` registers an offense when CountBlocks is false accepts nested multiline blocks accepts nested inline blocks nested `rescue` registers an offense nested `while` registers an offense nested `for` registers an offense RuboCop::Cop::Lint::ElseLayout accepts proper else handles empty braces handles ternary ops can handle elsifs accepts single-expr else regardless of layout handles modifier forms registers an offense for expr on same line as else RuboCop::Cop::Layout::SpaceInsideParens when EnforcedStyle is no_space accepts parentheses in block parameter list accepts parentheses with comment and line break registers an offense for spaces inside parens accepts parentheses with no spaces accepts parentheses with line break when EnforcedStyle is space accepts parentheses with spaces accepts parentheses with line break accepts parentheses with comment and line break registers an offense in block parameter list with no spaces registers an offense for no spaces inside parens RuboCop::Cop::Lint::RegexpAsCondition does not register an offense for a regexp literal outside conditions does not register an offense for a regexp literal with `=~` operator registers an offense and corrects for a regexp literal in `if` condition RuboCop::Cop::Style::RedundantBegin reports an offense for defs with redundant begin block auto-corrects when there are trailing comments reports an offense for def with redundant begin block doesn't modify spacing when auto-correcting accepts a def with required begin block reports an offense for single line def with redundant begin block accepts a defs with required begin block accepts a def with a begin block after a statement < Ruby 2.5 accepts a do-end block with a begin-end >= ruby 2.5 accepts a block with a begin block after a statement accepts super with block registers an offense for a do-end block with redundant begin-end accepts a {} block with a begin-end accepts a stabby lambda with a begin-end RuboCop::Cop::VariableForce::VariableTable #declare_variable adds variable to current scope with its name as key returns the added variable #push_scope returns pushed scope object #current_scope_level decreases by popping scope increases by pushing scope #find_variable with an empty scope stack returns nil #pop_scope returns popped scope object #find_variable when current scope is not block when a variable with the target name does not exist in current scope and does not exist in all outer scopes returns nil but exists in the direct outer scope returns nil when a variable with the target name exists in current scope and does not exist in outer scope returns the current scope variable and also exists in outer scope returns the current scope variable when current scope is block when a variable with the target name does not exist in current scope and does not exist in all outer scopes returns nil but exists in the direct outer scope returns the direct outer scope variable but exists in a indirect outer scope when the direct outer scope is block returns the indirect outer scope variable when the direct outer scope is not block returns nil when a variable with the target name exists in current scope and also exists in outer scope returns the current scope variable and does not exist in outer scope returns the current scope variable #accessible_variables when the current scope has some variables returns all the variables when the direct outer scope has some variables and the current scope is block returns the current and direct outer scope variables and the current scope is not block returns only the current scope variables when there are no variables returns empty array RuboCop::Cop::Style::BeginBlock reports an offense for a BEGIN block RuboCop::Cop::Style::EvenOdd converts (x(y) % 2) != 1 to #even? converts x % 2 != 0 to #odd? converts (x % 2) == 0 to #even? accepts x % 3 == 0 converts (x._(y) % 2) != 1 to even? accepts x % 3 != 0 converts (x._(y)) % 2 != 1 to even? converts (x % 2) == 1 to #odd? converts x._(y) % 2 != 1 to even? converts x % 2 == 0 to #even? converts x % 2 != 1 to #even? converts complex examples converts 1 % 2 != 1 to even? converts (y % 2) != 1 to #even? accepts x % 2 == 2 converts x % 2 == 1 to #odd? converts (x % 2) != 0 to #odd? converts (x.y % 2) != 1 to #even? RuboCop::Cop::Style::RescueStandardError explicit accepts rescue modifier when rescuing in a begin block accepts rescuing StandardError with other errors accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing a single error other than StandardErrorassigned to a variable accepts rescuing StandardError by itself accepts rescuing StandardError by itself, assigned to a variable accepts rescuing a single error other than StandardError when calling rescue without an error class registers an offense when the error is assigned to a variable registers an offense when rescuing in a method definition accepts rescuing StandardError by itself, assigned to a variable accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing StandardError with other errors accepts rescueing a single error other than StandardError, assigned to a variable accepts rescueing a single error other than StandardError accepts rescuing StandardError by itself when rescue is called without an error class registers an offense when the error is assigned to a variable registers an offense implicit accepts rescue modifier when rescuing in a method definition accepts rescuing no error class accepts rescuing a single error other than StandardError accepts rescuing a single error other than StandardError, assigned to a variable accepts rescuing StandardError with other errors accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing no error class, assigned to a variable when rescuing StandardError by itself registers an offense when the error is assigned to a variable registers an offense when rescuing in a begin block accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing a single error class other than StandardError accepts rescuing a single error class other than StandardError, assigned to a variable accpets rescuing no error class accepts rescuing no error class, assigned to a variable accepts rescuing ::StandardError with other errors accepts rescuing StandardError with other errors when rescuing StandardError by itself registers an offense when the error is assigned to a variable registers an offense with ::StandardError registers an offense with ::StandardError registers an offense RuboCop::Cop::Gemspec::DuplicatedAssignment registers an offense when `name=` method call is not block value registers an offense when using `<<` twice registers an offense when using `version=` twice registers an offense when using `name=` twice registers an offense when using `name=` twice with `cbase` registers an offense when using `spec.add_dependency` twice RuboCop::Cop::Style::Proc accepts the Proc.new call without block accepts the ::Proc.new call without block registers an offense for a Proc.new call registers an offense for ::Proc.new RuboCop::Cop::Style::SafeNavigation allows method call that is used in a spaceship comparison safe guarded by an object check allows an object check before a nil check on a short chain allows an object check before a negated predicate allows for empty if blocks with comments allows an object check before a nil check on a long chain allows an object check before a method call that is used in a regex comparison allows a method chain that is used in a comparison safe guarded by an object check allows calls on nil allows an object check before a method call that is used in a negated regex comparison allows an object check before a blank check allows method call that is used in a negated regex comparison safe guarded by an object check allows method call that is used in a regex comparison safe guarded by an object check allows a method call as a parameter when the parameter is safe guarded with an object check allows an object check before hash access allows an object check before a method chain longer than 2 methods allows an object check before a long chain with a block allows calls to methods not safeguarded by respond_to allows a method call safeguarded when using `unless nil?` allows method call that is used in a comparison safe guarded by an object check allows chained method calls during assignment safe guardedby an object check allows an object check before a method chain that is used in a comparison allows object checks in the condition of an elsif statement and a method call on that object in the body allows a method call safeguarded with a negative check for the object when using `if` allows an object check before a method call that is used in a spaceship comparison allows an object check before a method call that is used in a comparison allows method calls that do not get called using . safe guarded by an object check allows calls using safe navigation allows chained method calls during arithmetic operations safe guarded by an object check allows a method call safeguarded with a negative check for the object when using `unless` allows an object check before a negated predicate method chain behaves like all variable types if expression registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of a check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with params inside of a check for the object only moves comments that fall within the expression registers an offense for a single method call inside of a check for the object registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call inside of an unless negative check for the object does not lose comments within if expression registers an offense for a single method call with params and a block inside of a non-nil check for the object ternary expression allows ternary expression modifier if registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check object check before method call allows a non object check followed by a method call with a block allows a nil object check followed by a method call with a block allows a non object check followed by a method call allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with params allows a nil object check followed by a method call allows a non object check followed by a method call with params ConvertCodeThatCanStartToReturnNil true registers an offense for a non-nil object check followed by a method call registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call registers an offense for a non-nil object check followed by a method call with params corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with params and a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params and a block allows a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call allows a non-nil object check followed by a method call method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call behaves like all variable types modifier if registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check object check before method call allows a non object check followed by a method call with params allows a non object check followed by a method call with a block allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call allows a nil object check followed by a method call with params allows a non object check followed by a method call ConvertCodeThatCanStartToReturnNil true registers an offense for a non-nil object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call with params registers an offense for a non-nil object check followed by a method call with params and a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with params and a block allows a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params allows a non-nil object check followed by a method call with params allows a non-nil object check followed by a method call registers an offense for an object check followed by a method calls that nil responds to allows a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call corrects an object check followed by a chained method call with params if expression registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call inside of an unless nil check for the object only moves comments that fall within the expression registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params inside of a non-nil check for the object does not lose comments within if expression registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with params and a block inside of a check for the object allows a single method call inside of a check for the object with an else ternary expression allows ternary expression behaves like all variable types modifier if registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check object check before method call allows a nil object check followed by a method call allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call with a block allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call with params allows a nil object check followed by a method call with params allows a non object check followed by a method call allows a non object check followed by a method call with a block ConvertCodeThatCanStartToReturnNil true registers an offense for an object check followed by a method call registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call with params registers an offense for a non-nil object check followed by a method call with params corrects an object check followed by a method call and another check registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with params and a block registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls with blocks allows an object check followed by chained method calls ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call with params allows a non-nil object check followed by a method call registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params and a block method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a symbol proc if expression registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with a block inside of a non-nil check for the object does not lose comments within if expression registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with params inside of a check for the object only moves comments that fall within the expression registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call inside of a check for the object ternary expression allows ternary expression respond_to? allows method calls safeguarded by a respond_to check allows method calls safeguarded by a respond_to check on adifferent variable but the same method allows method calls safeguarded by a respond_to check on adifferent variable and method allows enumerable accessor method calls safeguarded by a respond_to check allows method calls safeguarded by a respond_to check to a different method behaves like all variable types modifier if registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with a block safeguarded with a nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check object check before method call allows a nil object check followed by a method call with params allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call allows a non object check followed by a method call with params and a block allows a non object check followed by a method call with a block allows a nil object check followed by a method call ConvertCodeThatCanStartToReturnNil true registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call with a block corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for a non-nil object check followed by a method call registers an offense for a check for the object followed by a method call in the condition for an if expression method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false allows a non-nil object check followed by a method call with params and a block allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call corrects an object check followed by a chained method call with params if expression registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object only moves comments that fall within the expression registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with params inside of a check for the object does not lose comments within if expression registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with a block inside of an unless negative check for the object ternary expression allows ternary expression behaves like all variable types if expression registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless nil check for the object only moves comments that fall within the expression registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call inside of a non-nil check for the object does not lose comments within if expression registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call with params inside of a non-nil check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with a block inside of a non-nil check for the object ternary expression allows ternary expression object check before method call allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with params allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params allows a non object check followed by a method call allows a nil object check followed by a method call allows a non object check followed by a method call with a block ConvertCodeThatCanStartToReturnNil true corrects an object check followed by a method call and another check registers an offense for an object check followed by a method call with params registers an offense for a non-nil object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params and a block registers an offense for a non-nil object check followed by a method call with params and a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls with blocks allows an object check followed by chained method calls ConvertCodeThatCanStartToReturnNil false registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with params and a block allows a non-nil object check followed by a method call with params and a block allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call with a block allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call method chaining corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call modifier if registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like all variable types modifier if registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check object check before method call allows a nil object check followed by a method call with a block allows a nil object check followed by a method call allows a nil object check followed by a method call with params allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call with params and a block allows a non object check followed by a method call with params allows a non object check followed by a method call allows a non object check followed by a method call with a block ConvertCodeThatCanStartToReturnNil true registers an offense for an object check followed by a method call corrects an object check followed by a method call and another check registers an offense for an object check followed by a method call with params registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with a block allows a non-nil object check followed by a method call allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block method chaining corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call if expression registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object does not lose comments within if expression registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with params inside of a check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with params inside of a non-nil check for the object only moves comments that fall within the expression registers an offense for a single method call with params and a block inside of a non-nil check for the object ternary expression allows ternary expression RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor constructor does not have disjunctive assignment accepts constructor has disjunctive assignment LHS is lvar accepts LHS is ivar registers an offense and corrects constructor calls any method before disjunctive assignment accepts constructor calls super before disjunctive assignment accepts constructor calls super after assignment registers an offense and corrects empty constructor accepts RuboCop::Cop::Style::MixinUsage does not register an offense when using inside nested module include registers an offense when using outside class (used above) registers an offense when using `include` in method definition outside class or module does not register an offense when using `include` in method definition inside module registers an offense when using outside class (used below) does not register an offense when using `include` in method definition inside class does not register an offense when using outside class does not register an offense when using inside block registers an offense when using only `include` statement does not register an offense when using inside block and `if` condition is after `include` doesn't register an offense when `include` call is a method argument does not register an offense when using inside class Multiple definition classes in one does not register an offense when using inside class Nested module registers an offense when using outside class prepend does not register an offense when using inside class registers an offense when using outside class extend registers an offense when using outside class does not register an offense when using inside class RuboCop::Cop::Style::InverseMethods registers an offense for not (foo =~ bar) registers an offense for !(foo < bar) registers an offense for comparing snake case constants on the left registers an offense for !(foo == bar) registers an offense for !foo.blank? registers an offense for calling !.none? with a symbol proc registers an offense for calling !.any? inside parens registers an offense for not (foo != bar) registers an offense for calling !.none? with a block registers an offense for not (foo == bar) allows an inverse method with a block when double negation is used allows an inverse method in a block with next registers an offense for !foo.include? registers an offense for !(foo != bar) allows comparing camel case constants on the right allows a method call without a not registers an offense for !foo.none? registers an offense for not (foo > bar) registers an offense for !(foo !~ bar) registers an offense for comparing snake case constants on the right registers an offense for !foo.odd? registers an offense for not (foo !~ bar) registers an offense for !(foo =~ bar) allows an inverse method when double negation is used registers an offense for !foo.present? registers an offense for !foo.even? registers an offense for !(foo > bar) registers an offense for !foo.any? registers an offense for !foo.exclude? allows comparing camel case constants on the left registers an offense for not (foo < bar) behaves like all variable types registers an offense for calling not FOO.none? registers an offense for calling !FOO.none? behaves like all variable types registers an offense for calling not @@foo.none? registers an offense for calling !@@foo.none? behaves like all variable types registers an offense for calling !foo["bar"].none? registers an offense for calling not foo["bar"].none? behaves like all variable types registers an offense for calling !FOO::BAR.none? registers an offense for calling not FOO::BAR.none? behaves like all variable types registers an offense for calling !foo.bar.none? registers an offense for calling not foo.bar.none? behaves like all variable types registers an offense for calling not @foo.none? registers an offense for calling !@foo.none? behaves like all variable types registers an offense for calling not $foo.none? registers an offense for calling !$foo.none? behaves like all variable types registers an offense for calling not foo.none? registers an offense for calling !foo.none? inverse blocks corrects an inverted method call when using `BasicObject#!` registers an offense for an inverted equality block corrects an inverted method call when using `BasicObject#!` registers a single offense for nested inverse method calls registers an offense for an inverted equality block corrects an inverted method call when using `BasicObject# !` corrects an inverted method call registers an offense for foo.reject { |e| !e } corrects an inverted method call corrects an inverted method call registers a single offense for nested inverse method calls corrects an inverted do end method call corrects a complex inverted method call corrects a complex inverted method call registers an offense for an inverted equality block registers a single offense for nested inverse method calls corrects a complex inverted method call corrects an inverted do end method call corrects a complex inverted method call registers an offense for a multiline method call where the last method is inverted registers an offense for a multiline method call where the last method is inverted registers an offense for an inverted equality block registers an offense for a multiline method call where the last method is inverted registers an offense for foo.select! { |e| !e } registers an offense for foo.select { |e| !e } registers an offense for a multiline inverted equality block registers an offense for a multiline inverted equality block registers an offense for a multiline inverted equality block corrects an inverted do end method call registers an offense for a multiline inverted equality block registers an offense for a multiline method call where the last method is inverted corrects an inverted do end method call corrects an inverted method call when using `BasicObject#!` registers an offense for foo.reject! { |e| !e } corrects an inverted method call when using `BasicObject# !` corrects an inverted method call when using `BasicObject# !` corrects an inverted method call corrects an inverted method call when using `BasicObject#!` registers a single offense for nested inverse method calls corrects an inverted method call when using `BasicObject# !` RuboCop::Cop::Style::RandomWithOffset registers an offense when using ::Random.rand(int).pred registers an offense when using rand(int).succ registers an offense when using offset - ::Random.rand(int) registers an offense when using offset + rand(int) registers an offense when using rand(int) - offset registers an offense when using ::Random.rand registers an offense when using offset + Random.rand(int) registers an offense when using rand(irange).succ registers an offense when using rand(irange) - offset registers an offense when using offset - rand(int) registers an offense when using rand(int) + offset registers an offense when using offset - rand(irange) does not register an offense when using range with triple dots registers an offense when using Random.rand registers an offense when using ::Kernel.rand registers an offense when using Kernel.rand registers an offense when using rand(erange) - offset does not register an offense when using range with double dots registers an offense when using rand(irange) + offset registers an offense when using rand(erange) + offset registers an offense when using Random.rand(int).succ registers an offense when using rand(erange).succ registers an offense when using rand(int).next registers an offense when using rand(int).pred registers an offense when using offset - rand(erange) RuboCop::Cop::Style::StringMethods registers an offense when using safe navigation operator registers an offense RuboCop::Cop::Layout::LeadingEmptyLines allows blank lines without any comments or code registers an offense and corrects a new line before a class registers an offense and corrects a new line before code accepts not having a blank line before code accepts not having a blank line before a class registers an offense and corrects a new line before a comment registers an offense and corrects multiple new lines before a class accepts not having a blank line before a comment allows an empty input auto-correct in collaboration does not invoke conflicts with other cops RuboCop::Cop::Layout::SpaceBeforeSemicolon does not register an offense for no space before semicolons registers an offense and corrects space before semicolon registers an offense and corrects more than one space before a semicolon inside block braces when EnforcedStyle for SpaceInsideBlockBraces is no_space registers an offense and corrects a space between an opening brace and a semicolon behaves like common behavior accepts no space between an opening brace and a semicolon when EnforcedStyle for SpaceInsideBlockBraces is space accepts a space between an opening brace and a semicolon behaves like common behavior accepts no space between an opening brace and a semicolon RuboCop::Cop::Layout::SpaceBeforeBlockBraces when EnforcedStyle is no_space registers an offense and corrects braces surrounded by spaces accepts left brace without outer space registers an offense and corrects correct + opposite style with `EnforcedStyle` of `Style/BlockDelimiters` accepts left brace without outer space with space before empty braces not allowed registers an offense and corrects empty braces accepts empty braces without outer space with invalid value for EnforcedStyleForEmptyBraces fails with an error with space before empty braces allowed registers an offense and corrects empty braces accepts empty braces with outer space when EnforcedStyle is space accepts braces surrounded by spaces registers an offense and corrects multiline block where the left brace has no outer space registers an offense and corrects left brace without outer space registers an offense and corrects opposite + correct style RuboCop::Cop::Layout::EmptyLinesAroundBlockBody when EnforcedStyle is no_empty_lines for { } block registers an offense for block body starting with a blank passed to a multi-line method call is not fooled by single line blocks accepts block body starting with a line with spaces registers an offense for block body ending with a blank registers an offense for block body starting with a blank when EnforcedStyle is empty_lines for do end block ignores block with an empty body registers an offense for block body not starting or ending with a blank is not fooled by single line blocks when EnforcedStyle is empty_lines for { } block is not fooled by single line blocks registers an offense for block body not starting or ending with a blank ignores block with an empty body when EnforcedStyle is no_empty_lines for do end block registers an offense for block body starting with a blank passed to a multi-line method call registers an offense for block body ending with a blank is not fooled by single line blocks registers an offense for block body starting with a blank accepts block body starting with a line with spaces RuboCop::Cop::Generator #snake_case converts "Lint" to snake_case converts "RSpec" to snake_case converts "FooBar" to snake_case #write_source generates a helpful source file with the name filled in refuses to overwrite existing files #todo provides a checklist for implementing the cop #inject_config when it is the middle in alphabetical order inserts the cop when it is the last in alphabetical order inserts the cop with version provided uses the provided version when it is the first in alphabetical order inserts the cop compliance with rubocop generates a cop file that has no offense (PENDING: Temporarily skipped with xit) generates a spec file that has no offense (PENDING: Temporarily skipped with xit) #write_spec generates a helpful starting spec file with the class filled in refuses to overwrite existing files .new does not accept an unqualified cop RuboCop::Formatter::WorstOffendersFormatter #finished when there are many offenses sorts by offense count first and then by cop name RuboCop::Formatter::ClangStyleFormatter #report_file displays text containing the offending source line when the offense is not corrected prints message as-is when the offending source spans multiple lines displays the first line with ellipses when the offense is automatically corrected prints [Corrected] along with message when the source line is blank does not display offending source line RuboCop::Cop::Style::RedundantReturn reports an offense for defs with only a return reports an offense for def ending with return does not blow up on empty method body reports an offense for defs ending with return does not blow up on empty if body auto-corrects by removing redundant returns accepts return in a non-final position reports an offense for def with only a return when multi-value returns are not allowed reports an offense for defs ending with return reports an offense for def with only a return reports an offense for defs with only a return reports an offense for def ending with return auto-corrects by making an implicit hash explicit auto-corrects removes return when using an explicit hash when case nodes are empty accepts empty when nodes when multi-value returns are allowed accepts def ending with return accepts def with only a return accepts defs ending with return accepts defs with only a return when rescue and return blocks present does register an offense and auto-corrects when inside function or rescue block when return is inside begin-end body registers an offense and auto-corrects when return has no arguments behaves like common behavior registers an offense for return() and autocorrects replacing return() with nil behaves like common behavior registers an offense for return and autocorrects replacing return with nil when return is inside an if-branch registers an offense and auto-corrects when return is inside a when-branch registers an offense and auto-corrects RuboCop::Cop::Lint::UnusedBlockArgument inspection when a block takes single argument and the argument is unused registers an offense and suggests omitting that and the method call is `define_method` registers an offense when an optional keyword argument is unused when the method call is `define_method` registers an offense when AllowUnusedKeywordArguments set does not care when the method call is not `define_method` registers an offense when AllowUnusedKeywordArguments set does not care when an underscore-prefixed block argument is not used accepts when a lambda block takes arguments and all the arguments are unused registers offenses and suggests using a proc and an argument is unused registers an offense when a block have a block local variable and the variable is unused registers an offense when a variable is not used does not care when a method argument is not used does not care in a method calling `binding` without arguments accepts all arguments inside a method definition registers offenses when a block takes multiple arguments and one argument is assigned to another, whilst other's value is not used registers an offense and arguments are swap-assigned accepts and all arguments are used accepts and all the arguments are unused registers offenses and suggests omitting them and unused arguments span multiple lines registers offenses and suggests omitting them and an argument with default value is unused registers an offense and preserves default value and an argument is unused registers an offense and a splat argument is unused registers an offense and preserves splat with an empty block when configured to ignore empty blocks does not register an offense when not configured to ignore empty blocks registers an offense in a method calling `binding` with arguments when a method argument is unused registers an offense when IgnoreEmptyBlocks config parameter is set accepts an empty block with multiple unused parameters accepts an empty block with a single unused parameter registers an offense for a non-empty block with multiple unused args registers an offense for a non-empty block with an unused parameter RuboCop::Cop::Layout::FirstArrayElementLineBreak ignores elements listed on a single line ignores properly formatted implicit arrays send implicit arrays detects the offense autocorrects the offense masgn implicit arrays detects the offense autocorrects the offense array nested in a method call autocorrects the offense registers ans offense elements listed on the first line registers an offense autocorrects the offense word arrays autocorrects the offense detects the offense RuboCop::Cop::Naming::MethodParameterName registers offense when parameter ends in number on class method can register multiple offenses in one method definition does not register offense for valid default parameters does not register for method without parameters does not register offense for valid keyword parameters does not register offense for valid parameter names on self.method does not register offense for valid parameter names registers offense for offensive keyword parameters registers offense when parameter contains uppercase characters does not register offense for empty kwrestarg registers offense when parameter is less than minimum length does not register offense for empty restarg registers offense when parameter ends in number registers offense for offensive default parameter with AllowNamesEndingInNumbers accept parameters that end in numbers when using argument forwarding does not register an offense with ForbiddenNames registers offense for parameter listed as forbidden accepts parameter that uses a forbidden name's letters with AllowedNames accepts specified block param names accepts param names prefixed with underscore accepts underscore param names registers unlisted offensive names RuboCop::Cop::VariableForce::Scope #name when the scope is instance method definition returns the method name when the scope is singleton method definition returns the method name #include? with ancestor node the scope does not include is expected to equal false with node of the scope itself is expected to equal false with child node the scope does not include is expected to equal false with descendant node the scope does not include is expected to equal false with child node the scope includes is expected to equal true #body_node when the scope is singleton class returns the body node when the scope is class returns the body node when the scope is instance method returns the body node when the scope is module returns the body node when the scope is singleton method returns the body node when the scope is top level returns the body node when the scope is block returns the body node .new when lvasgn node is passed accepts that as top level scope when begin node is passed accepts that as top level scope #each_node inner scope boundary handling when there's a method invocation with block yields only the block node and the child send node when there's a singleton method definition yields only the defs node and the method host node outer scope boundary handling when the scope is block yields the argument and the body nodes when the scope is singleton class yields the body nodes when the scope is module yields the body nodes when the scope is instance method yields the argument and the body nodes when the scope is top level yields the body nodes when the scope is class yields the body nodes when the scope is singleton method yields the argument and the body nodes RuboCop::Cop::Util #to_supported_styles when EnforcedStyleInsidePipes is expected to eq "SupportedStylesInsidePipes" when EnforcedStyle is expected to eq "SupportedStyles" #line_range returns line range of the expression RuboCop::Cop::Metrics::BlockLength rejects a block with more than 5 lines does not count commented lines by default accepts a block with multiline receiver and less than 3 lines of body does not count blank lines reports the correct beginning and end lines properly counts nested blocks rejects brace blocks too accepts empty blocks accepts a block with less than 3 lines when defining a class does not register an offense when CountComments is enabled also counts commented lines when `CountAsOne` is not empty folds array into one line when ExcludedMethods is enabled behaves like ignoring an offense on an excluded method still rejects other methods with long blocks accepts the foo method with a long block when a method is ignored, but receiver is a module does not report an offense behaves like ignoring an offense on an excluded method accepts the foo method with a long block still rejects other methods with long blocks when receiver contains whitespaces ignores whitespaces when defining a module does not register an offense RuboCop::Cop::Style::ParallelAssignment corrects when the expression uses a modifier if statement inside a method corrects when the right variable is a symbol array registers an offense when the right side has multiple hashes registers an offense when the right side has mulitple arrays corrects when the expression is missing spaces allows expanding an assigned var registers an offense when the right side has constants corrects when using single indentation corrects when the expression uses a modifier until statement registers an offense when assignments must be reordered to preserve meaning corrects when using constants registers an offense with indices of different variables registers an offense when the right side has methods with/without blocks corrects when the expression uses a modifier unless statement corrects parallel assignment in unless statements corrects when the expression uses a modifier while statement registers an offense with indices and attributes when assignments must be reordered to preserve meaning corrects parallel assignment in while statements registers an offense with indices corrects parallel assignment in if statements corrects when the expression uses a modifier rescue statement registers an offense with attributes when assignments must be reordered to preserve meaning allows more left variables than right variables corrects when the expression uses a modifier rescue statement as the only thing inside of a method corrects when the expression uses a modifier rescue statement inside of a method corrects when the number of left hand variables matches the number of right hand variables corrects when assignments must be reordered to avoid changing meaning corrects when assigning to method returns corrects when the right variable is a word array corrects parallel assignment in rescue statements within begin ... rescue registers an offense when the right side has mixed expressions registers an offense when right hand side has maps with blocks corrects parallel assignment inside rescue statements within method definitions allows more right variables than left variables corrects when using nested indentation registers an offense when assigning to namespaced constants registers an offense when left hand side ends with an implicit variable corrects when the expression uses a modifier if statement corrects parallel assignment in until statements corrects when the right variable is an array corrects when assigning from multiple methods with blocks registers an offense when assigning to same variables in same order registers an offense when right hand side has namespaced constants behaves like allowed allows assignment of: begin_token, end_token = CONSTANT behaves like allowed allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] behaves like allowed allows assignment of: a, *b = [1, 2, 3] behaves like allowed allows assignment of: array = [1, 2, 3]; a, = array; behaves like allowed allows assignment of: a, b = foo() behaves like allowed allows assignment of: a, = 1, 2, 3 behaves like allowed allows assignment of: *a, b = [1, 2, 3] behaves like allowed allows assignment of: a, b = (a + b), (a - b) behaves like allowed allows assignment of: a, = *foo behaves like allowed allows assignment of: foo = [1, 2, 3]; a, b, c = foo; behaves like allowed allows assignment of: a, = 1 behaves like allowed allows assignment of: self.a, self.b = b, a behaves like allowed allows assignment of: a = *'foo' behaves like allowed allows assignment of: self.a, self.b = self.b, self.a behaves like allowed allows assignment of: a, b = foo.map { |e| e.id } behaves like allowed allows assignment of: a, = a behaves like allowed allows assignment of: a = a behaves like allowed allows assignment of: a, b = Float::INFINITY behaves like allowed allows assignment of: a, b, c = b, c, a behaves like allowed allows assignment of: a, b = b, a behaves like allowed allows assignment of: a[0], a[1] = a[1], a[0] behaves like allowed allows assignment of: a, b = *foo behaves like allowed allows assignment of: a = 1 behaves like allowed allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 behaves like allowed allows assignment of: a, = *'foo' behaves like allowed allows assignment of: CONSTANT, = 1, 2 behaves like allowed allows assignment of: a, b, c = 1, 2, *node behaves like allowed allows assignment of: a = 1; b = 2; behaves like allowed allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 behaves like allowed allows assignment of: a, b, c = *node, 1, 2 using custom indentation width works with rescue works with nesting works with guard clauses works with standard correction RuboCop::Cop::Style::ArrayCoercion registers an offense and corrects when converting variable into array with check registers an offense and corrects when splatting variable into array does not register an offense when splatting multiple variables into array does not register an offense when splat is not in array does not register an offense when converting variable into other named array variable with check RuboCop::Cop::Cop will warn if custom severity is invalid initially has 0 offenses keeps track of offenses will report registered offenses will set custom severity if present will set default severity with lint cops has right name has right department #safe_autocorrect? when auto-correction of the cop is declared unsafe is expected to equal false when safety is undeclared is expected to equal true when cop is declared unsafe is expected to equal false setting of Offense#corrected attribute when cop does not support autocorrection is not specified (set to nil) when autocorrect is requested is not specified (set to nil) when disable_uncorrectable is enabled is set to true when cop supports autocorrection when autocorrection is not needed is set to false when offense was corrected is set to true when offense was not corrected because of an error is set to false with no submodule has right department has right name when disabled by a comment ignore_disable_comments is false will set offense as disabled ignore_disable_comments is true will not set offense as disabled #autocorrect? when the option is given is expected to equal true when cop does not support autocorrection is expected to equal false when disable_uncorrectable is enabled is expected to equal true when the cop is set to not autocorrect is expected to equal false when the option is not given is expected to equal false with style cops has right name has right department .qualified_cop_name returns the cop name in a different namespace if the provided namespace is incorrect returns the given cop name if it is not found in any namespace returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces returns the given cop name if it already has a namespace raises an error if the cop name is in more than one namespace (PENDING: Temporarily skipped with xit) adds namespace if the cop name is found in exactly one namespace #relevant_file? when the file is an anonymous source is expected to equal true when the file doesn't match the Include configuration is expected to equal false when the file matches the Include configuration is expected to equal true for a cop with a name registers offense with its name Registry #departments is expected to include :Lint has departments is expected to include :Style contains every value only once #with_department has each cop in exactly one type returns 0 for an invalid type has at least one cop per department RuboCop::Cop::Style::OrAssignment when using var = something unless var registers an offense for class variables registers an offense for normal variables registers an offense for global variables does not register an offense if any of the variables are different registers an offense for instance variables when using var = if var; var; else; something; end registers an offense with global variables registers an offense with normal variables registers an offense with instance variables registers an offense with class variables does not register an offense if any of the variables are different when `then` branch body is empty registers an offense when using `elsif` statement does not register an offense when using var = var ? var : something registers an offense with class variables registers an offense with instance variables does not register an offense if any of the variables are different registers an offense with normal variables registers an offense with global variables when using unless var; var = something; end does not register an offense if any of the variables are different registers an offense for global variables registers an offense for instance variables registers an offense for normal variables registers an offense for class variables RuboCop::StringInterpreter .interpret handles hex handles unicode handles octal handles extended unicode behaves like simple escape handles \\b behaves like simple escape handles \\t behaves like simple escape handles \\n behaves like simple escape handles \\f behaves like simple escape handles \\e behaves like simple escape handles \\a behaves like simple escape handles \\v behaves like simple escape handles \\s behaves like simple escape handles \\n behaves like simple escape handles \\r RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier EnforcedStyle is `only_before` registers an offense for missing blank line before public registers an offense for missing blank line before private accepts blank line after module_function accepts missing blank line after protected does not register an offense when `end` immediately after private registers an offense for missing blank line before module_function accepts missing blank line after private registers an offense for missing blank line before protected does not register an offense when `end` immediately after protected registers an offense for blank line after protected registers an offense for blank line after private accepts blank line after public EnforcedStyle is `around` ignores an accessor with the same name as public above a method definition ignores module_function with a right-hand-side condition accepts missing blank line when at the beginning of sclass accepts missing blank line when at the end of specifying `self` ignores private inside a method call ignores comment line before private accepts missing blank line when at the beginning of sclass accepts missing blank line when at the end of block accepts missing blank line when at the beginning of module ignores public with a right-hand-side condition accepts missing blank line when specifying a superclass that breaks the line recognizes blank lines with DOS style line endings requires blank line when next line started with end recognizes blank lines with DOS style line endings ignores an accessor with the same name as module_function above a method definition accepts missing blank line when at the beginning of module ignores an accessor with the same name as protected above a method definition accepts missing blank line when at the beginning of class accepts missing blank line when at the end of specifying `self` accepts missing blank line when specifying `self` that breaks the line ignores public deep inside a method call ignores comment line before protected accepts missing blank line when at the beginning of sclass accepts missing blank line when at the end of specifying `self` recognizes blank lines with DOS style line endings accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line accepts missing blank line when at the beginning of class requires blank line after, but not before, protected when at the beginning of class/module accepts missing blank line when specifying a superclass that breaks the line requires blank line when next line started with end requires blank line after private requires blank line when next line started with end ignores protected deep inside a method call ignores module_function inside a method call accepts missing blank line when specifying `self` that breaks the line requires blank line before module_function requires blank line before private accepts missing blank line when at the beginning of class autocorrects blank line after #{access_modifier} with comment autocorrects blank line after #{access_modifier} with comment ignores private with a right-hand-side condition ignores protected inside a method call accepts missing blank line when at the end of block requires blank line after, but not before, module_function when at the beginning of class/module accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line requires blank line after protected accepts missing blank line when specifying a superclass that breaks the line accepts missing blank line when specifying a superclass that breaks the line requires blank line before public requires blank line after module_function requires blank line after, but not before, private when at the beginning of class/module accepts missing blank line when at the beginning of module accepts missing blank line when at the end of block requires blank line before protected accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line ignores comment line before module_function accepts missing blank line when specifying `self` that breaks the line accepts missing blank line when at the end of block accepts missing blank line when at the beginning of module accepts missing blank line when at the end of specifying a superclass accepts missing blank line when specifying `self` that breaks the line accepts missing blank line when at the end of specifying a superclass requires blank line when next line started with end accepts missing blank line when at the end of specifying a superclass accepts missing blank line when at the end of specifying `self` recognizes blank lines with DOS style line endings accepts missing blank line when at the beginning of sclass accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line ignores an accessor with the same name as private above a method definition autocorrects blank line after #{access_modifier} with comment ignores protected with a right-hand-side condition ignores public inside a method call accepts missing blank line when at the end of specifying a superclass ignores module_function deep inside a method call ignores private deep inside a method call requires blank line after, but not before, public when at the beginning of class/module ignores comment line before public autocorrects blank line after #{access_modifier} with comment requires blank line after public accepts missing blank line when at the beginning of class at the beginning of block for blocks defined with {} accepts missing blank line accepts missing blank line with arguments for blocks defined with do accepts missing blank line requires blank line after, but not before, module_function accepts missing blank line with arguments at the beginning of block for blocks defined with {} accepts missing blank line accepts missing blank line with arguments for blocks defined with do accepts missing blank line with arguments requires blank line after, but not before, public accepts missing blank line at the beginning of block for blocks defined with {} accepts missing blank line accepts missing blank line with arguments for blocks defined with do accepts missing blank line with arguments requires blank line after, but not before, protected accepts missing blank line at the beginning of block for blocks defined with do requires blank line after, but not before, private accepts missing blank line with arguments accepts missing blank line for blocks defined with {} accepts missing blank line with arguments accepts missing blank line RuboCop Project requiring all of `lib` with verbose warnings enabled emits no warnings default configuration file has a nicely formatted description for all cops has a SupportedStyles for all EnforcedStyle and EnforcedStyle is valid sorts configuration keys alphabetically has a period at EOL of description has configuration for all cops requires a nicely formatted `VersionAdded` metadata for all cops does not have nay duplication cop message end with a period or a question mark changelog has either entries, headers, or empty lines has link definitions for all implicit links has newline at end of file entry has a whitespace between the * and the body contributor name has a unique contributor name body ends with a punctuation does not start with a lower case after version 0.14.0 has a link to the contributors at the end link to related issue has a colon and a whitespace at the end has an issue number prefixed with # has a valid URL RuboCop::Cop::Naming::MethodName when configured for snake_case accepts class emitter method in a module accepts operator definitions registers an offense for singleton camelCase method within class registers an offense for mixed snake case and camel case in attr. registers an offense for opposite + correct registers an offense for camel case in singleton method name registers an offense for camel case method names in attr. registers an offense for mixed snake case and camel case in attr. registers an offense for mixed snake case and camel case registers an offense for singleton upper case method without corresponding class accepts snake case in attr. accepts class emitter method in a module, even when it is defined inside another method registers an offense for camel case in instance method name accepts class emitter method in a class, even when it is defined inside another method accepts one line methods registers an offense for camel case methods names in attr. registers an offense for capitalized camel case name in attr. registers an offense for capitalized camel case accepts snake case in names accepts unary operator definitions accepts class emitter method in a class when specifying `IgnoredPatterns` does not register an offense for camel case method name in attr. does not register an offense for snake case method name in attr. does not register an offense for camel case method name matching `IgnoredPatterns` does not register an offense for snake case method name matching `IgnoredPatterns` when configured for camelCase accepts operator definitions registers an offense for camel case methods names in attr. accepts one line methods accepts camel case names in attr. accepts class emitter method in a class, even when it is defined inside another method registers an offense for capitalized camel case registers an offense for mixed snake case and camel case registers an offense for singleton snake_case method within class registers an offense for correct + opposite registers an offense for capitalized camel case name in attr. accepts class emitter method in a module, even when it is defined inside another method registers an offense for singleton upper case method without corresponding class accepts class emitter method in a module registers an offense for snake case in names accepts unary operator definitions registers an offense for snake case name in attr. accepts class emitter method in a class registers an offense for mixed snake case and camel case in attr. registers an offense for mixed snake case and camel case in attr. accepts camel case in instance method name accepts camel case in singleton method name when specifying `IgnoredPatterns` does not register an offense for camel case method name matching `IgnoredPatterns` does not register an offense for camel case method name in attr. does not register an offense for snake case method name matching `IgnoredPatterns` does not register an offense for snake case method name in attr. RuboCop::Cop::Naming::ConstantName registers an offense for camel case in const namewhen using frozen object assignment does not check if rhs is a non-offensive const assignment allows screaming snake case in const name does not check names if rhs is a `Class.new` does not check names if rhs is a `Class.new` with conditional assign registers an offense for camel case in const namewhen using frozen range assignment allows screaming snake case in multiple const assignment does not check names if rhs is a method call with conditional assign does not check names if rhs is a `Struct.new` registers an offense for camel case in const name does not check if rhs is another constant registers offenses for camel case in multiple const assignment registers 1 offense if rhs is offending const assignment allows screaming snake case with POSIX upper case characters registers an offense for snake case in const name checks qualified const names does not check names if rhs is a `Struct.new` with conditional assign does not check names if rhs is a method call registers an offense for non-POSIX upper case in const name does not check names if rhs is a method call with block when a rhs is a conditional expression when conditional branches contain a value other than a constant does not check names when conditional branches contain only string values registers an offense when conditional branches contain only constants does not check names RuboCop::Cop::Layout::FirstHashElementIndentation when the HashAlignment style is separator for => registers an offense and corrects incorrectly indented first pair with => accepts correctly indented first pair registers an offense and corrects incorrectly indented } when hash is method argument and argument are not surrounded by parentheses accepts a correctly indented multi-line hash with braces registers an offense for incorrectly indented multi-line hash with braces accepts single line hash with braces accepts braceless hash and arguments are surrounded by parentheses and EnforcedStyle is special_inside_parentheses accepts normal indentation for hash within hash accepts special indentation for second argument registers an offense and corrects 'consistent' indentation accepts special indentation for first argument registers an offense and corrects 'align_braces' indentation when using safe navigation operator registers an offense and corrects 'consistent' indentation and EnforcedStyle is consistent registers an offense and corrects incorrect indentation accepts normal indentation for second argument accepts normal indentation for first argument when hash is operand registers an offense and corrects incorrectly indented first pair registers an offense and corrects incorrectly indented } accepts correctly indented first pair when EnforcedStyle is align_braces accepts an empty hash accepts a first pair on the same line as the left brace accepts correctly indented first pair accepts single line hash registers an offense and corrects incorrectly indented } accepts several pairs per line when 'special_inside_parentheses' style is used registers an offense and corrects incorrect indentation when 'consistent' style is used registers an offense and correcs incorrect indentation when hash is right hand side in assignment accepts single line hash accepts an empty hash accepts correctly indented first pair accepts several pairs per line registers an offense and corrects incorrectly indented first pair accepts a first pair on the same line as the left brace when indentation width is overridden for this cop accepts correctly indented first pair registers an offense and corrects incorrectly indented first pair when hash is argument to setter registers an offense and corrects incorrectly indented first pair accepts correctly indented first pair when the HashAlignment style is separator for : registers an offense and corrects incorrectly indented } accepts correctly indented first pair registers an offense and corrects incorrectly indented first pair with : RuboCop::Cop::Layout::SpaceBeforeComment accepts a doc comment accepts an EOL comment with a preceding space accepts a comment that begins a line registers an offense and corrects missing space before an EOL comment RuboCop::Cop::Style::ConditionalAssignment allows assignment using different operators in if elsif else allows method calls in if else allows if elsif else with the same assignment only in elsif else allows method calls in conditionals registers an offense for assignment in ternary operation using strings registers an offense for assignment in case when then else allows assignment to the result of a ternary operation allows if else without variable assignment doesn't crash when assignment statement uses chars which have special meaning in a regex allows assignment using different operators in if else registers an offense for assignment in unless else registers an offense for assignment in case with when when else registers an offense for assignment in if then elsif then else allows assignment of different variables in if else allows assignment using different (method) operators in if..else registers an offense in an if else if the assignment is already at the line length limit allows aref assignment with different indices in if..else allows if elsif else with the same assignment only in if elsif counts array assignment when determining multiple assignment autocorrects assignment in if else when the assignment spans multiple lines registers an offense for assignment in if elsif elsif else doesn't crash with empty braces allows assignment of different variables in case when else allows modifier if registers an offense for assignment in if elsif else allows assignment in multiple branches when it is wrapped in a modifier allows if elsif else with the same assignment only in if else allows different assignment types in case with when when else allows modifier if inside of if else behaves like all variable types registers an offense assigning any variable type in if else allows assignment to the return of if else allows assignment to the return of case when registers an offense assigning any variable type in case when registers an offense assigning any variable type in ternary allows assignment to the return of a ternary correction would exceed max line length allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in case when corrects comparison methods in if elsif else corrects comparison methods in unless else with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when configured to check conditions with multiple statements registers an offense for multiple assignment when an earlier assignment is is protected by a modifier allows assignment in multiple branches when it is wrapped in a modifier auto-correct corrects multiple assignment in unless else corrects multiple assignment in if elsif else corrects multiple assignment in if else corrects assignment in an if statement that is nested in unless else corrects multiple assignment in case when corrects multiple assignment in if elsif else with multiple elsifs corrects multiple assignment in case when with multiple whens assignment as the last statement registers an offense in if else with more than variable assignment registers an offense in unless else with more than variable assignment registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment register an offense for multiple assignment in if else registers offense for multiple assignment in if elsif elsif else registers offense for multiple assignments in case when with multiple whens registers offense for multiple assignment in unless else registers offense for multiple assignments in case when with only one when registers an offense in if elsif else with more than variable assignment registers an offense in case when else with more than variable assignment registers an offense for multiple assignment in if elsif else multiple assignment in only one branch registers an offense when multiple assignment is in elsif registers an offense when multiple assignment is in if registers an offense when multiple assignment is in else behaves like allows out of order multiple assignment in if elsif else allows out of order multiple assignment in if elsif else auto-correct preserves comments during correction in case when else preserves comments during correction in if else corrects assignment to unbracketed array in if else corrects =~ in ternary operations assignment from a method corrects if else corrects case when corrects unless else aref assignment corrects if..else with different indices doesn't register an offense self.attribute= assignment corrects if..else with different receivers doesn't register an offense constant assignment corrects if..else with namespaced constant corrects if..else with top-level constant multiple assignment does not register an offense in case when does not register an offense in if else behaves like all assignment types for a local variable lval registers an offense for assignment using -= in ternary for a constant lval registers an offense for assignment using -= in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a global variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a class variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a constant lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a instance variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a global variable lval registers an offense for assignment using -= in ternary for a class variable lval registers an offense for assignment using -= in ternary for a instance variable lval registers an offense for assignment using -= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a instance variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a class variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a constant lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a local variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in case when corrects comparison methods in if elsif else with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else behaves like all variable types registers an offense assigning any variable type in ternary registers an offense assigning any variable type in case when allows assignment to the return of case when registers an offense assigning any variable type in if else allows assignment to the return of a ternary allows assignment to the return of if else behaves like all variable types registers an offense assigning any variable type in ternary allows assignment to the return of case when allows assignment to the return of if else registers an offense assigning any variable type in if else allows assignment to the return of a ternary registers an offense assigning any variable type in case when assignment as the last statement allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignment in if else allows multiple assignment in if elsif elsif else allows variable assignment in case when else with more than variable assignment allows multiple assignments in case when if there are uniq variables in the when branches allows more than variable assignment in if else allows more than variable assignment in if elsif else allows multiple assignments in case when with multiple whens allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignment in if elsif else allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignments in case when with only one when allows variable assignment in unless else with more than variable assignment allows multiple assignment in unless else behaves like allows out of order multiple assignment in if elsif else allows out of order multiple assignment in if elsif else multiple assignment in only one branch registers an offense when multiple assignment is in else allows multiple assignment is in elsif allows multiple assignment is in if behaves like all assignment types for a constant lval registers an offense for assignment using *= in ternary for a class variable lval registers an offense for assignment using *= in ternary for a instance variable lval registers an offense for assignment using *= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a instance variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a constant lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a local variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a class variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a global variable lval registers an offense for assignment using *= in ternary with end alignment to start_of_line for a class variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a instance variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a constant lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a global variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a local variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a local variable lval registers an offense for assignment using *= in ternary behaves like all assignment types with end alignment to start_of_line for a instance variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a class variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a local variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a global variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a constant lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when with end alignment to keyword for a local variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a global variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a constant lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a class variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a instance variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a class variable lval registers an offense for assignment using ||= in ternary for a constant lval registers an offense for assignment using ||= in ternary for a instance variable lval registers an offense for assignment using ||= in ternary for a local variable lval registers an offense for assignment using ||= in ternary for a global variable lval registers an offense for assignment using ||= in ternary behaves like all variable types registers an offense assigning any variable type in ternary registers an offense assigning any variable type in case when allows assignment to the return of a ternary allows assignment to the return of if else registers an offense assigning any variable type in if else allows assignment to the return of case when behaves like all assignment types with end alignment to keyword for a local variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a constant lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a class variable lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a global variable lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a global variable lval registers an offense for assignment using %= in ternary with end alignment to start_of_line for a constant lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a local variable lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a class variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a global variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in ternary for a local variable lval registers an offense for assignment using %= in ternary for a class variable lval registers an offense for assignment using %= in ternary for a constant lval registers an offense for assignment using %= in ternary with nested conditionals eventually autocorrects all branches does not consider branches of nested ifs behaves like all assignment types for a instance variable lval registers an offense for assignment using /= in ternary for a constant lval registers an offense for assignment using /= in ternary for a class variable lval registers an offense for assignment using /= in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a class variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a local variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a global variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a constant lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else with end alignment to keyword for a instance variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a class variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a local variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a constant lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a global variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a local variable lval registers an offense for assignment using /= in ternary for a global variable lval registers an offense for assignment using /= in ternary behaves like all assignment types with end alignment to start_of_line for a class variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a instance variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a global variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a local variable lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a constant lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a global variable lval registers an offense for assignment using = in ternary with end alignment to keyword for a instance variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a constant lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a local variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a global variable lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a class variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a instance variable lval registers an offense for assignment using = in ternary for a constant lval registers an offense for assignment using = in ternary for a class variable lval registers an offense for assignment using = in ternary for a local variable lval registers an offense for assignment using = in ternary behaves like all variable types registers an offense assigning any variable type in case when allows assignment to the return of if else registers an offense assigning any variable type in if else allows assignment to the return of a ternary registers an offense assigning any variable type in ternary allows assignment to the return of case when behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else behaves like all assignment types for a global variable lval registers an offense for assignment using += in ternary with end alignment to keyword for a instance variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a class variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a constant lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a global variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a local variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a class variable lval registers an offense for assignment using += in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a constant lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a global variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a class variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a local variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a local variable lval registers an offense for assignment using += in ternary for a instance variable lval registers an offense for assignment using += in ternary for a constant lval registers an offense for assignment using += in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when behaves like all assignment types for a constant lval registers an offense for assignment using **= in ternary with end alignment to start_of_line for a class variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a constant lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a global variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a local variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a instance variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else with end alignment to keyword for a instance variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a class variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a global variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a local variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a constant lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a global variable lval registers an offense for assignment using **= in ternary for a class variable lval registers an offense for assignment using **= in ternary for a local variable lval registers an offense for assignment using **= in ternary for a instance variable lval registers an offense for assignment using **= in ternary IncludeTernaryExpressions false allows assignment in ternary operation behaves like all assignment types with end alignment to keyword for a constant lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a class variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a instance variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a local variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a global variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a class variable lval registers an offense for assignment using ^= in ternary for a global variable lval registers an offense for assignment using ^= in ternary for a constant lval registers an offense for assignment using ^= in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a global variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a class variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a constant lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a local variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a instance variable lval registers an offense for assignment using ^= in ternary for a local variable lval registers an offense for assignment using ^= in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when with end alignment to start_of_line corrects comparison methods in case when corrects comparison methods in if elsif else corrects comparison methods in unless else behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when for if elsif else if else autocorrects the outer offense later autocorrects the inner offense first behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in case when corrects comparison methods in if elsif else behaves like all assignment types with end alignment to start_of_line for a instance variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a local variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a class variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a global variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a constant lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a class variable lval registers an offense for assignment using >>= in ternary for a constant lval registers an offense for assignment using >>= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a constant lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a local variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a instance variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a class variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a instance variable lval registers an offense for assignment using >>= in ternary for a global variable lval registers an offense for assignment using >>= in ternary for a local variable lval registers an offense for assignment using >>= in ternary behaves like all variable types allows assignment to the return of a ternary registers an offense assigning any variable type in if else allows assignment to the return of case when registers an offense assigning any variable type in ternary allows assignment to the return of if else registers an offense assigning any variable type in case when behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when behaves like else followed by new conditional without else allows if elsif else unless behaves like all assignment types for a class variable lval registers an offense for assignment using <<= in ternary for a local variable lval registers an offense for assignment using <<= in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a constant lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a local variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a global variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a class variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a constant lval registers an offense for assignment using <<= in ternary for a global variable lval registers an offense for assignment using <<= in ternary with end alignment to keyword for a class variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a local variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a constant lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a instance variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a global variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a instance variable lval registers an offense for assignment using <<= in ternary behaves like else followed by new conditional without else allows if elsif else if behaves like all variable types registers an offense assigning any variable type in ternary registers an offense assigning any variable type in if else allows assignment to the return of case when allows assignment to the return of a ternary registers an offense assigning any variable type in case when allows assignment to the return of if else empty branch allows assignment in case when without an else allows if elsif without else allows assignment in unless without an else allows an empty when branch with an else allows assignment in if without an else allows an empty elsif statement allows case with an empty else allows an empty if statement behaves like all assignment types for a constant lval registers an offense for assignment using << in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a class variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a global variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a local variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a constant lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a global variable lval registers an offense for assignment using << in ternary with end alignment to keyword for a local variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a global variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a constant lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a class variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a instance variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a local variable lval registers an offense for assignment using << in ternary for a class variable lval registers an offense for assignment using << in ternary for a instance variable lval registers an offense for assignment using << in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in case when corrects comparison methods in if elsif else behaves like all assignment types for a class variable lval registers an offense for assignment using &&= in ternary for a instance variable lval registers an offense for assignment using &&= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a local variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a constant lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a class variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a instance variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a global variable lval registers an offense for assignment using &&= in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a global variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a local variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a class variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a constant lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a constant lval registers an offense for assignment using &&= in ternary for a local variable lval registers an offense for assignment using &&= in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when EndAlignment configured to start_of_line auto-correct uses proper end alignment in case uses proper end alignment in if uses proper end alignment in unless behaves like all assignment types for a class variable lval registers an offense for assignment using |= in ternary for a constant lval registers an offense for assignment using |= in ternary for a global variable lval registers an offense for assignment using |= in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a instance variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a global variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a class variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a constant lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a instance variable lval registers an offense for assignment using |= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a class variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a constant lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a local variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a instance variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a local variable lval registers an offense for assignment using |= in ternary behaves like all assignment types for a constant lval registers an offense for assignment using &= in ternary with end alignment to keyword for a instance variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a global variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a class variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a constant lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a local variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a instance variable lval registers an offense for assignment using &= in ternary for a global variable lval registers an offense for assignment using &= in ternary with end alignment to start_of_line for a class variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a constant lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a global variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a local variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a instance variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a local variable lval registers an offense for assignment using &= in ternary for a class variable lval registers an offense for assignment using &= in ternary RuboCop::Cop::Lint::ParenthesesAsGroupedExpression accepts method with parens as arg to method without registers an offense and corrects for predicate method call with space before the parenthesis accepts a chain of method calls accepts an operator call with argument in parentheses does not register an offense for expression followed by an operator does not register an offesne when heredoc has a space between the same string as the method name and `(` accepts a method call without arguments accepts a space inside opening paren followed by left paren registers an offense and corrects for method call with space before the parenthesis does not register an offense for a call with multiple arguments does not register an offense for math expression does not register an offense for expression followed by chained expression does not register an offense for math expression with `to_i` accepts a method call with arguments but no parentheses when using safe navigation operator registers an offense and corrects for method call with space before the parenthesis RuboCop::Cop::Style::ZeroLengthPredicate with hashes registers an offense for `hash.size != 0` registers an offense for `0 == hash.size registers an offense for `0 != hash.size` registers an offense for `hash.size == 0` when name of the variable is `size` or `length` accepts equality check accepts comparison accepts inequality check with collection variables registers an offense for `collection.size != 0` registers an offense for `collection.size == 0` registers an offense for `0 == collection.size` registers an offense for `0 != collection.size` when inspecting a StringIO object when initialized without arguments does not register an offense with top-level ::StringIO does not register an offense when initialized with a string does not register an offense does not register an offense with top-level ::StringIO with arrays registers an offense for `0 == array.size` registers an offense for `array.length == 0` registers an offense for `0 < array.length registers an offense for `array.size == 0` registers an offense for `0 != array.size` registers an offense for `array.size < 1` registers an offense for `array.size != 0` registers an offense for `array.length < 1` registers an offense for `0 < array.size` registers an offense for `0 != array.length` registers an offense for `1 > array.size` registers an offense for `1 > array.length` registers an offense for `0 == array.length` registers an offense for `array.length != 0` registers an offense for `array.size > 0` registers an offense for `array.length > 0` when inspecting a Tempfile object does not register an offense with top-level ::Tempfile does not register an offense when inspecting a File::Stat object does not register an offense with ::File does not register an offense with strings registers an offense for `string.size == 0` registers an offense for `0 == string.size` registers an offense for `0 != string.size` registers an offense for `string.size != 0` RuboCop::Cop::Style::NumericPredicate when configured to enforce numeric predicate methods when checking if a number is zero registers an offense registers an offense with a complex expression allows comparing against a global variable when comparing against a method argument variable registers an offense with complex expression registers an offense when checking if a number is positive registers an offense in yoda condition registers an offense with a complex expression registers an offense in yoda condition registers an offense when checking if a number is negative registers an offense in yoda condition registers an offense with a complex expression registers an offense registers an offense in yoda condition with checking if a number is not zero allows comparing against a global variable allows comparing against a variable allows comparing against a complex expression when there are ignored methods in block ignored method allows checking if a number is positive allows checking if a number is negative not ignored method registers an offense for checking if a number is positive registers an offense for checking if a number is negative simple method call `EnforcedStyle` is `comparison` allows checking if a number is zero `EnforcedStyle` is `predicate` allows checking if a number is zero in argument ignored method allows checking if a number is positive allows checking if a number is negative not ignored method registers an offense for checking if a number is positive registers an offense for checking if a number is negative when configured to enforce numeric comparison methods registers an offense for checking if a number is positive registers an offense for checking if a number is zero allows checking if a number is not zero registers an offense for checking if a number is negative RuboCop::Cop::Style::NestedParenthesizedCalls backslash newline in method call registers an offense on a deeply nested argument doesn't register an offense on a call with no arguments, nested in a parenthesized one doesn't register an offense on a method call with no arguments doesn't register an offense on an aref, nested in a parenthesized method call doesn't register an offense on a non-parenthesized call nested in a parenthesized one with a single argument to the nested call registers an offense when using safe navigation operator registers an offense with multiple arguments to the nested call registers an offense on a nested, parenthesized method call doesn't register an offense on a call to a setter method doesn't register an offense on a permitted method doesn't register an offense on a non-parenthesized method call doesn't register an offense RuboCop::Cop::Lint::TopLevelReturnWithArgument Code segment with only top-level return statement Expects multiple offenses from the return with arguments statements Expects no offense from the return without arguments Expects offense from the return with arguments Code segment with method-level return statements Expects offense when method-level & top-level return co-exist Code segment containing semi-colon separated statements Expects no offense from the return with arguments and multi-line code Expects an offense from the return with arguments and multi-line code Code segment with inline if along with top-level return Expects no offense from the return without arguments Expects multiple offense from the return with arguments Code segment with block level returns other than the top-level return Expects no offense from the return without arguments Expects offense from the return with arguments RuboCop::Cop::Style::ConstantVisibility does not register an offense in the top level scope does not register an offense when passing a string to the visibility declaration when defining a constant in a module registers an offense when not using a visibility declaration does not register an offense when using a visibility declaration when defining a constant in a class with a single-statement body registers an offense when not using a visibility declaration with a multi-statement body does not register an offense when using a visibility declaration registers an offense when there is no matching visibility declaration registers an offense when not using a visibility declaration RuboCop::Cop::Style::HashSyntax configured to enforce no mixed keys accepts new syntax in a hash literal accepts the hash rocket syntax when new is possible accepts hash rockets when keys have whitespaces in them accepts hash rockets when keys have special symbols in them registers an offense when keys start with a digit and mix styles accepts old hash rockets style accepts hash rockets in method calls accepts hash rockets when keys have different types registers an offense when keys have whitespaces and mix styles registers an offense when keys have different types and styles accepts an empty hash accepts new hash style registers an offense when keys have special symbols and mix styles auto-corrects mixed key hashes registers an offense for mixed syntax when new is possible accepts new syntax in method calls accepts hash rockets when keys start with a digit configured to enforce hash rockets style accepts hash rockets in method calls accepts hash rockets in a hash literal accepts an empty hash registers an offense for 1.9 style in method calls registers an offense for mixed syntax registers offense for Ruby 1.9 style UseHashRocketsWithSymbolValues has no impact does not register an offense when there is a symbol value configured to enforce ruby19 style configured to use hash rockets when symbol values are found accepts hash in ruby19 style with no symbol values accepts ruby19 syntax when no elements have symbol values accepts both hash rockets and ruby19 syntax in the same code registers an offense when any element has a symbol value in method calls auto-corrects to hash rockets when all elements have symbol value registers an offense for hashes with elements on multiple lines registers an offense when using hash rockets and no elements have a symbol value registers an offense when any element uses a symbol for the value accepts an empty hash accepts ruby19 syntax when no elements have symbol values in method calls with SpaceAroundOperators disabled auto-corrects even if there is no space around => with SpaceAroundOperators enabled registers offense for hash rocket syntax when new is possible accepts new syntax in a hash literal accepts hash rockets when symbol keys end with = registers an offense for hash rockets in method calls accepts new syntax in method calls preserves quotes during autocorrection accepts an empty hash auto-corrects even if it interferes with SpaceAroundOperators accepts hash rockets when symbol characters are not supported accepts hash rockets when keys have different types registers an offense for mixed syntax when new is possible auto-corrects a missing space when hash is used as argument registers an offense when symbol keys have strings in them registers offense when keys start with an uppercase letter if PreferHashRocketsForNonAlnumEndingSymbols is false registers an offense for hash rockets when symbols end with ! registers an offense for hash rockets when symbols end with ? if PreferHashRocketsForNonAlnumEndingSymbols is true accepts hash rockets when symbols end with ! accepts hash rockets when symbols end with ? when using a return value uses `return` registers an offense and corrects when enclosed in parentheses registers an offense and corrects when not enclosed in parentheses configured to enforce ruby 1.9 style with no mixed keys UseHashRocketsWithSymbolValues enabled accepts hash rockets when keys have different types registers an offense for mixed syntax when new is possible accepts new syntax when keys are interpolated string registers an offense when keys have special symbols in them auto-corrects to hash rockets when all elements have symbol value accepts an empty hash registers an offense for hash rockets in method calls registers an offense when any element uses a symbol for the value accepts new syntax in method calls registers an offense when any element has a symbol value in method calls registers offense for hash rocket syntax when new is possible registers an offense when keys have whitespaces in them registers an offense when keys start with a digit accepts new syntax in a hash literal registers an offense when keys have different types and styles UseHashRocketsWithSymbolValues disabled registers an offense when keys have different types and styles registers an offense for hash rockets in method calls registers an offense when keys have special symbols in them accepts new syntax in a hash literal accepts an empty hash accepts new syntax in method calls registers an offense when keys have whitespaces in them accepts hash rockets when keys have different types registers an offense when keys start with a digit registers offense for hash rocket syntax when new is possible registers an offense for mixed syntax when new is possible accepts new syntax when keys are interpolated string RuboCop::Cop::Style::MethodCallWithArgsParentheses when EnforcedStyle is omit_parentheses accepts parens in chaining with safe operators accepts parens in implicit #to_proc accepts parens in chaining with operators register an offense for camel-case methods with arguments accepts parens in default argument value calls accepts parens in blocks with braces accepts parens in method args accepts parens in super method calls as arguments accepts parens in super calls with braced blocks accepts parens in super without args accepts no parens in method call with args accepts parens in calls with args with logical operators accepts parens in literals with unary operators as first argument register an offense for parens in method call without args register an offense in multi-line inheritance accepts parens in chained method calls accepts no parens in method call without args register an offense for parens in do-end blocks accepts parens in argument calls with braced blocks register an offense for %r regex literal as arguments accepts parens in args splat accepts special lambda call syntax auto-corrects single-line calls accepts parens in default keyword argument value calls accepts parens in slash regexp literal as argument auto-corrects multi-line calls with trailing whitespace accepts parens in nested method args accepts parens in calls with hash as arg accepts parens in ternary condition calls register an offense for superclass call with parens register an offense in assignments accepts parens in calls with logical operators accepts parens in single-line inheritance accepts parens in range literals auto-corrects complex multi-line calls register an offense for hashes in keyword values register an offense for parens in the last chain accepts parens in splat calls accepts parens in args with ternary conditions register an offense for yield call with parens accepts parens in block passing calls register an offense in complex conditionals accepts parens in camel case method without args register an offense for multi-line method calls allowing parens in multi-line calls accepts parens for multi-line calls allowing parenthesis in chaining accepts parens in the last call if any previous calls with parentheses register offense for single-line chaining without previous parens accepts no parens in the last call if previous calls with parens register offense for multi-line chaining without previous parens allowing parens in camel-case methods accepts parens for camel-case method names when inspecting macro methods with IncludedMacros for a macro not on the included list allows in a class body finds offense for a macro in both IncludedMacros and IgnoredMethods allows in a module body finds offense when EnforcedStyle is require_parentheses (default) accepts no parens for setter methods auto-corrects parenthesized args for local methods by removing space accepts no parens in method call without args register an offense for superclass call without parens accepts parens in method call with args register no offense for superclass call without args register no offense for superclass call with parens register an offense for non-receiver method call without parens ignores method listed in IgnoredMethods auto-corrects fully parenthesized args by removing space auto-corrects calls where the argument node is a number register no offense for yield without args auto-corrects call with multiple args by adding braces accepts parens in method call with do-end blocks register an offense for yield without parens auto-corrects partially parenthesized args by adding needed braces register an offense for method call without parens auto-corrects calls where arg is method call auto-corrects calls where the argument node is a constant auto-corrects calls where multiple args are method calls accepts no parens for unary operators register an offense for methods starting with capital without parens auto-corrects calls with multiple args by adding needed braces accepts no parens for operators when using safe navigation operator register an offense for method call without parens IgnoredPatterns ignored methods listed in IgnoredPatterns when inspecting macro methods in a module body does not register an offense in a class body does not register an offense RuboCop::Cop::Naming::RescuedExceptionsVariableName with the `PreferredName` setup does not register an offense when using `_exception` does not register an offense when using `exception` registers an offense when using `_e` registers offenses when using `foo` and `bar` in multiple rescues registers an offense when using `e` with default config with implicit rescue without `Exception` variable does not register an offense with `Exception` variable does not register an offense when using `e` does not register an offense when using `_e` registers an offense when using `_exc` registers an offense when using `exc` with explicit rescue with method as `Exception` registers an offense with unexpected variable name does not register an offense with expected variable name does not register an offense without variable name with splat operator as `Exception` list does not register an offense with expected variable name registers an offense with unexpected variable name does not register an offense without variable name with lower letters class name does not register an offense without `Exception` variable does not register an offense with `Exception` variable does not register an offense when using `_e` does not register an offense when using _e followed by e does not register an offense when using `e` registers an offense when using `_exc` registers an offense when using `exc` registers offenses when using `foo` and `bar` in multiple rescues with variable being referenced renames the variable references when auto-correcting RuboCop::Cop::Naming::MemoizedInstanceVariableName EnforcedStyleForLeadingUnderscores: required registers an offense when names match but missing a leading _ does not register an offense with a leading `_` for both names registers an offense when it has leading `_` but names do not match with default EnforcedStyleForLeadingUnderscores => disallowed memoized variable after other code does not match method name registers an offense for a bang method registers an offense for a predicate method registers an offense memoized variable does not match method name registers an offense memoized variable does not match method name during assignment registers an offense memoized variable does not match method name for block registers an offense memoized variable matches method name does not register an offense with a leading `_` for both names does not register an offense does not registers an offense when method has leading `_` non-memoized variable does not match method name does not register an offense memoized variable matches method name during assignment does not register an offense memoized variable matches method name for block does not register an offense memoized variable matches predicate method name does not register an offense memoized variable matches bang method name does not register an offense code follows memoized variable assignment does not register an offense memoized variable after other code does not register an offense instance variables in initialize methods does not register an offense memoized variable does not match class method name registers an offense EnforcedStyleForLeadingUnderscores: optional memoized variable matches method name does not register an offense with a leading `_` for both names does not register an offense with a leading `_` for method name does not register an offense with a leading underscore does not register an offense without a leading underscore RuboCop::Cop::Style::TrailingBodyOnClass accepts class inheritance auto-corrects with comment after body registers offense with multi-line class accepts regular class registers an offense when body trails after class definition when class is not on first line of processed_source auto-correct offense RuboCop::Cop::Layout::FirstMethodParameterLineBreak registers an offense and corrects params on first line of singleton method accepts single-line methods accepts methods without params registers an offense and corrects params with default values accepts params listed on a single line accepts params without parens registers an offense and corrects params listed on the first line RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective registers an offense for enabled cop within source code registers an offense for disabled cop within source code RuboCop::Cop::Lint::RedundantStringCoercion accepts interpolation without #to_s accepts #to_s with arguments in an interpolation registers an offense and corrects an implicit receiver registers an offense and corrects `to_s` in interpolation does not explode on empty interpolation registers an offense and corrects `to_s` in an interpolation with several expressions RuboCop::Cop::Style::SpecialGlobalVars when style is use_perl_names registers an offense for $PID registers an offense for $LOADED_FEATURES registers an offense for $PROCESS_ID registers an offense for $LOAD_PATH registers an offense for $PROGRAM_NAME auto-corrects $INPUT_RECORD_SEPARATOR to $/ auto-corrects #{$LOAD_PATH} to #$: does not register an offense for backrefs like $1 when style is use_english_names auto-corrects #{$!} to #{$ERROR_INFO} auto-corrects #$: to #{$LOAD_PATH} registers an offense for $" registers an offense for $: generates correct auto-config when Perl variable names are used registers an offense for $0 registers an offense for $$ auto-corrects $/ to $INPUT_RECORD_SEPARATOR generates correct auto-config when mixed styles are used does not register an offense for backrefs like $1 is clear about variables from the English library vs those not RuboCop::Formatter::DisabledConfigFormatter when exclude_limit option is passed respects the file exclusion list limit when any offenses are detected displays YAML configuration disabling all cops with offenses when there's .rubocop.yml merges in excludes from .rubocop.yml when no files are inspected creates a .rubocop_todo.yml even in such case with auto-correct supported cop adds a comment about --auto-correct option when exclude_limit option is omitted disables the cop with 15 offending files RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string registers an offense and corrects when there are no colons but one comma accepts likely false positive $, accepts tokens without colons or commas registers an offense and corrects when one symbol has a colon but there are no commas registers an offense and corrects when symbols contain colons and are comma separated accepts likely false positive $, registers an offense and corrects when one symbol has a colon but there are no commas registers an offense and corrects when there are no colons but one comma accepts tokens without colons or commas registers an offense and corrects when symbols contain colons and are comma separated with binary encoded source registers an offense and corrects when tokens contain quotes accepts if tokens contain no quotes RuboCop::Cop::Lint::UselessSetterCall is not confused by operators ending with = handles exception assignments without exploding when a lvar contains an object passed as argument by multiple-assignment at the end of the method accepts the setter call on the lvar when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method registers an offense with method ending with setter call on argument accepts when a lvar contains an object passed as argument at the end of the method accepts the setter call on the lvar when a lvar contains a local object instantiated with literal registers an offense for the setter call on the lvar when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method accepts the setter call on the lvar when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method registers an offense with singleton method ending with setter call on local object registers an offense when a lvar declared as an argument is no longer the passed object at the end of the method registers an offense for the setter call on the lvar with method ending with setter call on ivar accepts with method ending with setter call on local object registers an offense when a lvar contains a non-local object returned by a method accepts with method ending with ivar assignment accepts with method ending with square bracket setter on local object registers an offense RuboCop::Cop::Style::SlicingWithRange <= Ruby 2.5 reports no offense for array slicing with -1 >= Ruby 2.6 reports no offense for excluding end reports an offense for slicing to ..-1 reports an offense for slicing from expression to ..-1 reports no offense for other methods reports no offense for array with range inside >= Ruby 2.7 reports no offense for startless RuboCop::Cop::Style::InlineComment does not register an offense for a standalone comment does not register an offense for special rubocop inline comments registers an offense for a trailing inline comment RuboCop::Cop::Layout::InitialIndentation accepts empty file registers an offense and corrects indented assignment disregarding comment accepts unindented method definition accepts unindented comment + assignment registers an offense for indented method definition for a file with byte order mark registers an offense and corrects indented method call after comment registers an offense and corrects indented method call accepts unindented method call RuboCop::Cop::Lint::AmbiguousOperator with `+` unary operator in the first argument with parentheses around the operator does not register an offense without parentheses without whitespaces on the right of the operator when a method with no arguments is used in advance registers an offense and corrects without whitespaces on the right of the operator registers an offense and corrects with a whitespace on the right of the operator does not register an offense with a splat operator in the first argument without parentheses with a whitespace on the right of the operator does not register an offense without whitespaces on the right of the operator registers an offense and corrects with parentheses around the splatted argument does not register an offense with a block ampersand in the first argument without parentheses with a whitespace on the right of the operator does not register an offense without whitespaces on the right of the operator registers an offense and corrects with parentheses around the block argument does not register an offense with a keyword splat operator in the first argument with parentheses around the keyword splat operator does not register an offense without parentheses without whitespaces on the right of the operator registers an offense and corrects with a whitespace on the right of the operator does not register an offense with `-` unary operator in the first argument with parentheses around the operator does not register an offense without parentheses without whitespaces on the right of the operator registers an offense and corrects with a whitespace on the right of the operator does not register an offense RuboCop::Cop::InternalAffairs::OffenseLocationKeyword does not register an offense when the `loc` is on a child node does not register an offense when the `loc` is on a different node when `node.loc.selector` is passed registers an offense if message argument is passed registers an offense RuboCop::Cop::Style::PreferredHashMethods with enforced `verbose` style accepts value? with no args registers an offense for value? with one arg registers an offense for key? with one arg accepts key? with no args with enforced `short` style registers an offense for has_key? with one arg accepts has_key? with no args accepts has_value? with no args registers an offense for has_value? with one arg when using safe navigation operator registers an offense for has_value? with one arg RuboCop::Cop::Style::CommandLiteral when EnforcedStyle is set to backticks a multi-line ` string without backticks is accepted a multi-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction a single-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction a single-line ` string without backticks is accepted a single-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a multi-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a single-line %x string without backticks registers an offense and corrects to backticks a multi-line %x string without backticks registers an offense and corrects to backticks when PercentLiteralDelimiters is configured with curly braces respects the configuration when auto-correcting when EnforcedStyle is set to mixed a single-line ` string without backticks is accepted a single-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction a single-line %x string without backticks registers an offense and corrects to backticks a single-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a multi-line ` string with backticks registers an offense without auto-correction a multi-line %x string without backticks is accepted a multi-line ` string without backticks registers an offense and corrects to %x a multi-line %x string with backticks is accepted %x commands with other delimiters than parentheses registers an offense when PercentLiteralDelimiters is configured and a default exists ignores the default when auto-correcting when EnforcedStyle is set to percent_x a multi-line ` string without backticks registers an offense and corrects to %x a single-line %x string with backticks is accepted a single-line ` string without backticks registers an offense and corrects to %x a multi-line %x string without backticks is accepted a single-line ` string with backticks registers an offense without auto-correction a multi-line %x string with backticks is accepted a multi-line ` string with backticks registers an offense without auto-correction a single-line %x string without backticks is accepted when PercentLiteralDelimiters only has a default respects the configuration when auto-correcting heredoc commands is ignored RuboCop::Cop::Style::SingleArgumentDig dig over literal when using dig with splat operator does not register an offense with multiple arguments does not register an offense with single argument registers an offense and corrects unsuitable use of dig when without a receiver does not register an offense dig over a variable as caller when using dig with splat operator does not register an offense with multiple arguments does not register an offense with single argument registers an offense and corrects unsuitable use of dig RuboCop::Cop::Layout::BlockAlignment does not raise an error for nested block in a method call accepts end aligned with a variable registers an offense for mismatched block end with an op-asgn (+=, -=) accepts end aligned with a mass assignment accepts end aligned with a method call with arguments accepts end aligned with a constant registers an offense for mismatched block end with an instance variable registers an offense for mismatched block end with a global variable registers an offense for mismatched block end with a method call registers an offense for mismatched block end with a class variable accepts end aligned with a global variable accepts a block end that does not begin its line accepts end aligned with a class variable registers an offense for mismatched block end with an or-asgn (||=) accepts end aligned with an and-asgn (&&=) accepts end aligned with an instance variable accepts end aligned with an op-asgn (+=, -=) accepts end aligned with an or-asgn (||=) registers an offense for mismatched block end with a mass assignment accepts end aligned with a call chain left hand side registers an offense for mismatched block end with an and-asgn (&&=) registers an offense for mismatched end with a method call with arguments registers an offense for mismatched end not aligned with the block that is an argument registers an offense for mismatched block end with a constant accepts end aligned with a method call registers an offense for mismatched block end with a variable accepts end aligned with the block when the block is a method argument on an arithmetically negated method call aligns end with the - operator registers an offense and corrects when the block is terminated by } mentions } (not end) in the message on a bit-flipped method call aligns end with the ~ operator registers an offense and corrects misaligned end brace when the block is defined on the next line accepts end aligned with the block expression registers an offenses for mismatched end alignment when the method part is a call chain that spans several lines accepts two kinds of end alignment accepts end indented as the start of the block accepts pretty alignment style registers offenses for misaligned ends when configured to align with start_of_line errors when do aligned allows when start_of_line aligned when there is an assignment chain registers an offense for an end aligned with the 2nd variable accepts end aligned with the first variable when variables of a mass assignment spans several lines registers an offense for end aligned with the block accepts end aligned with the variables when the block is a logical operand accepts a correctly aligned block end when configured to align with do allows when do aligned errors when start_of_line aligned when the block has no arguments registers an offense for mismatched block end on a logically negated method call aligns end with the ! operator registers an offense and corrects on a splatted method call registers an offense and corrects misaligned end braces aligns end with the splat operator when the block has arguments registers an offense for mismatched block end when multiple similar-looking blocks have misaligned ends registers an offense for each of them and the block is an operand accepts end aligned with a variable RuboCop::Cop::Style::MultipleComparison registers an offense when `a` is compared twice registers an offense when multiple comparison is not part of a conditional does not register an offense for a == b || b == a registers an offense when `a` is compared three times does not register an offense for comparing multiple literal strings does not register an offense for comparing lvars does not register an offense for Array#include? does not register an offense for comparing an lvar does not register an offense for comparing multiple int literals does not register an offense for comparing lvars when a string is on the lefthand side registers an offense when `a` is compared three times, once on the righthand side registers an offense when `a` is compared three times on the right hand side does not register an offense for a duplicated condition RuboCop::Cop::Style::EmptyLiteral Empty Hash registers an offense for ::Hash.new registers an offense for Hash.new auto-correct changes Hash.new to {} and wraps it in parentheses when it is the only argument to super auto-correct Hash.new to {} as the first parameter to a method does not register an offense for ::Hash.new { block } does not register an offense for Hash.new { block } auto-corrects Hash.new in block auto-correct Hash.new to {} as the only parameter to a method registers an offense for Hash.new() does not register an offense for Hash.new(3) auto-correct changes Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super auto-corrects Hash.new to {} in various contexts does not register an offense for ::Hash.new(3) Empty Array auto-corrects Array.new in block in block does not registers an offense Array.new with block does not register an offense for ::Array.new with block does not register Array.new with block in other block registers an offense for Array.new registers an offense for Array.new() does not register an offense for Array.new(3) registers an offense for ::Array.new Empty String does not register an offense for ::String.new("top") registers an offense for String.new() does not register an offense for String.new("top") registers an offense for String.new registers an offense for ::String.new when double-quoted string literals are preferred registers an offense for ::String.new registers an offense for String.new when frozen string literals is enabled does not register an offense for String.new RuboCop::Cop::Style::ColonMethodCall does not register an offense for constant access does not register an offense for Java static types does not register an offense for Java package namespaces registers an offense for instance method call registers an offense for instance method call with arg does not register an offense for op methods registers an offense for class method call with arg does not register an offense for nested class registers an offense for class method call does not register an offense when for constructor methods RuboCop::Cop::Lint::PercentStringArray detecting quotes or commas in a %w/%W string adds an offense and corrects when tokens contain both types of quotes adds an offense and corrects when one token is quoted but there are no commas adds an offense and corrects when there are no quotes but one comma accepts likely false positive %W(#{a} b) adds an offense and corrects when there are no quotes but one comma accepts tokens without quotes or commas adds an offense and corrects when one token is quoted but there are no commas accepts likely false positive %w(' ") accepts likely false positive %W(' ") accepts likely false positive %W(' " ! = # ,) accepts tokens without quotes or commas accepts likely false positive %w(#{a} b) adds an offense and corrects when tokens contain both types of quotes accepts likely false positive :"#{a}" accepts likely false positive %w(' " ! = # ,) adds an offense and corrects when tokens contain quotes and are comma separated accepts likely false positive :"#{a}" adds an offense and corrects when tokens contain quotes and are comma separated with invalid byte sequence in UTF-8 add an offense and corrects when tokens contain quotes accepts if tokens contain invalid byte sequence only with binary encoded source accepts if tokens contain no quotes adds an offense and corrects when tokens contain quotes RuboCop::TargetRuby when TargetRubyVersion is not set when .ruby-version is not present when bundler lock files are not present uses the default target ruby version and Gemfile.lock exists uses the default Ruby when Ruby is not in Gemfile.lock uses MRI Ruby version when it is present in Gemfile.lock uses MRI Ruby version when it has multiple digits uses the default Ruby when rbx is in Gemfile.lock uses the default Ruby when jruby is in Gemfile.lock and gems.locked exists uses the default Ruby when rbx is in gems.locked uses the default Ruby when Ruby is not in gems.locked uses the default Ruby when jruby is in gems.locked uses MRI Ruby version when it has multiple digits uses MRI Ruby version when it is present in gems.locked when .ruby-version is in a parent directory reads it to determine the target ruby version when .ruby-version is present does not read Gemfile.lock or gems.locked when .ruby-version contains an MRI version reads it to determine the target ruby version when .ruby-version contains a Rbx version uses the default target ruby version when .ruby-version contains a JRuby version uses the default target ruby version when the MRI version contains multiple digits reads it to determine the target ruby version when .ruby-version contains a version prefixed by "ruby-" correctly determines the target ruby version when .ruby-version contains "system" version uses the default target ruby version when .ruby-version is not in a parent directory when Gemfile.lock is in a parent directory does when gems.locked is in a parent directory does when TargetRubyVersion is set uses TargetRubyVersion does not read Gemfile.lock or gems.locked does not read .ruby-version RuboCop::Cop::Style::WhileUntilModifier behaves like condition modifier cop for a multiline 'until' accepts an empty body corrects it when assignment is in body corrects it if result fits in one line accepts it when condition has local variable assignment accepts it if single line would not fit on one line accepts it if body spans more than one line accepts multiline condition in modifier form registers an offense when Layout/LineLength is disabled registers an offense even for a long modifier statement behaves like condition modifier cop for a multiline 'while' accepts it if single line would not fit on one line corrects it if result fits in one line accepts it if body spans more than one line accepts it when condition has local variable assignment corrects it when assignment is in body accepts an empty body when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense RuboCop::Cop::Lint::RescueException does not crash when the namespace of a rescued class is in a local variable does not register an offense for rescue with other classes does not register an offense for rescue with a module prefix registers an offense for rescue with ::Exception registers an offense for rescue with StandardError, Exception does not crash when the splat operator is used in a rescue does not register an offense for rescue with no class does not register an offense for rescue with other class does not register an offense for rescue with no class and => e registers an offense for rescue with Exception => e registers an offense for rescue from Exception RuboCop::Formatter::TapFormatter #file_finished when any offenses are detected prints "not ok" when no offenses are detected prints "ok" #finished when no offenses are detected does not report offenses when any offenses are detected reports all detected offenses for all failed files RuboCop::Cop::Layout::EmptyLineBetweenDefs auto-corrects when there are too many new lines finds offenses in inner classes accepts a def that follows an empty line and then a comment doesn't allow more than the required number of newlines accepts a def that follows code and a comment accepts the first def without leading empty line in a class accepts a nested def treats lines with whitespaces as blank accepts a def that is the first of a module accepts a def that follows a line with code registers an offense for adjacent one-liners by default class methods mixed instance and class methods registers an offense for missing blank line between methods adjacent class methods registers an offense for missing blank line between methods conditional method definitions accepts defs inside a conditional without blank lines in between registers an offense for consecutive defs inside a conditional when multiple lines between defs are allowed registers an offense and corrects when there are too many new lines treats lines with whitespaces as blank when there are only comments between defs registers an offense when a maximum of empty lines is specified finds an offense for two empty lines finds no offense for one empty line finds no offense for no empty line when AllowAdjacentOneLineDefs is enabled accepts adjacent one-liners registers an offense for adjacent defs if some are multi-line RuboCop::Cop::Style::Sample behaves like accepts accepts shuffle(random: Random.new)[2, 3] behaves like offense registers an offense for shuffle(random: Random.new).first behaves like accepts accepts shuffle.slice(-4..-3) behaves like offense registers an offense for shuffle.slice(0) behaves like accepts accepts shuffle.slice(foo..3) behaves like offense registers an offense for shuffle.slice(0..3) behaves like accepts accepts shuffle[foo..bar] behaves like offense registers an offense for shuffle.first behaves like offense registers an offense for shuffle[0...3] behaves like offense registers an offense for shuffle[0..3] behaves like accepts accepts shuffle[foo, bar] behaves like offense registers an offense for shuffle[0] behaves like accepts accepts shuffle.slice(foo, bar) behaves like offense registers an offense for shuffle.last(3) behaves like accepts accepts shuffle.at(foo) behaves like accepts accepts shuffle.slice(foo, 3) behaves like accepts accepts shuffle.slice(foo..bar) behaves like offense registers an offense for shuffle.first(2) behaves like offense registers an offense for shuffle.slice(0, 3) behaves like accepts accepts sample behaves like accepts accepts shuffle.slice(2..-3) behaves like accepts accepts shuffle(random: Random.new) behaves like accepts accepts shuffle.join([5, 6, 7]) behaves like offense registers an offense for shuffle.last behaves like offense registers an offense for shuffle.last(bar) behaves like accepts accepts shuffle[3, 3] behaves like offense registers an offense for shuffle.at(0) behaves like accepts accepts shuffle.slice(2..3) behaves like accepts accepts shuffle.map { |e| e } behaves like accepts accepts shuffle.at(2) behaves like accepts accepts shuffle[2] behaves like accepts accepts shuffle[2..3] behaves like accepts accepts shuffle.slice(foo) behaves like accepts accepts shuffle[-4..-3] behaves like accepts accepts shuffle[foo..3] behaves like offense registers an offense for shuffle.at(-1) behaves like offense registers an offense for shuffle[0, 3] behaves like offense registers an offense for shuffle(random: Random.new).first(2) behaves like offense registers an offense for shuffle[-1] behaves like accepts accepts shuffle.slice(3, 3) behaves like accepts accepts shuffle.slice(2) behaves like offense registers an offense for shuffle.slice(0...3) behaves like offense registers an offense for shuffle(random: foo).last(bar) behaves like offense registers an offense for shuffle.slice(-1) behaves like accepts accepts shuffle[foo, 3] behaves like accepts accepts shuffle[foo] behaves like offense registers an offense for shuffle(random: Random.new)[0..3] behaves like accepts accepts shuffle(random: Random.new)[2] behaves like offense registers an offense for shuffle.first(foo) behaves like accepts accepts shuffle(random: Random.new).find(&:odd?) behaves like accepts accepts shuffle[2..-3] behaves like accepts accepts shuffle RuboCop::Cop::Style::NegatedUnless does not blow up on a negated ternary operator does not blow up for empty unless condition does not blow up for ternary ops does not blow up for empty if condition with “prefix” style registers an offense for prefix does not register an offense for postfix with “both” style accepts an unless where only part of the condition is negated accepts an unless where the condition is doubly negated autocorrects by replacing parenthesized unless not with if accepts an unless/else with negative condition registers an offense for unless with "not" condition registers an offense for unless with exclamation point condition with “postfix” style registers an offense for postfix does not register an offense for prefix RuboCop::TargetFinder #find(..., :all_file_types) returns absolute paths does not find hidden files when a hidden directory path is passed finds files under the specified directory when a directory path is passed finds files under the specified directory when a file with a ruby filename is passed picks all the ruby files when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments includes them when a non-ruby file is passed picks the file when no argument is passed finds files under the current directory when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments includes them when input is passed on stdin includes the file when same paths are passed does not return duplicated file paths when files with a ruby extension are passed picks all the ruby files when local AllCops/Include lists two patterns picks all the ruby files when a subdirectory AllCops/Include only lists one pattern picks all the ruby files when files with ruby interpreters are passed picks all the ruby files when some paths are specified in the configuration Exclude and they are explicitly passed as arguments normally does not exclude them when it's forced to adhere file exclusion configuration excludes them when a pattern is passed finds files which match the pattern #find(..., :only_recognized_file_types) does not find hidden files returns absolute paths when a directory path is passed finds files under the specified directory when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments includes them when a file with a ruby filename is passed picks all the ruby files when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments includes them when a non-ruby file is passed doesn't pick the file when a hidden directory path is passed finds files under the specified directory when files with ruby interpreters are passed picks all the ruby files when a hidden directory path is passed finds files under the specified directory when a pattern is passed finds files which match the pattern when files with a ruby extension are passed picks all the ruby files when local AllCops/Include lists two patterns picks two files when a subdirectory AllCops/Include only lists one pattern picks two files when no argument is passed finds files under the current directory when input is passed on stdin includes the file when some paths are specified in the configuration Exclude and they are explicitly passed as arguments when it's forced to adhere file exclusion configuration excludes them normally does not exclude them when same paths are passed does not return duplicated file paths #target_files_in_dir picks files specified to be included in config does not pick directories does not pick files specified to be excluded in config does not pick files with no extension and no ruby shebang picks files with extension .rb picks ruby executable files with no extension when an exception is raised while reading file and debug mode is disabled outputs nothing and debug mode is enabled outputs error message w/ --fail-fast option works #find_files does not search excluded top level directories works also if a folder is named "," RuboCop::Cop::Layout::BlockEndNewline registers an offense and corrects when `}` of multiline block without processing is not on its own line accepts a one-liner accepts multiline blocks with newlines before the end registers an offense and corrects when multiline block } is not on its own line registers an offense and corrects when multiline block end is not on its own line RuboCop::Cop::Style::RedundantParentheses accepts parentheses around an erange accepts parentheses around the error passed to rescue accepts parentheses when enclosed in parentheses at `until-post` accepts parentheses when they touch the preceding keyword registers an offense for parens around a literal in array and following newline accepts parentheses around operator keywords registers an offense for parens around a literal in array registers an offense for parens around a negative exponent accepts parentheses in yield call with hash accepts parentheses inside an irange registers an offense for parens around a variable after semicolon accepts parentheses inside an erange registers an offense for parens around a literal hash value and following newline registers an offense for parens around a positive exponent registers an offense for parens around method body accepts parentheses when enclosed in parentheses at `while-post` accepts parentheses in super call with hash registers an offense for parens around a literal hash value accepts parentheses around an irange accepts parentheses around a constant passed to when registers an offense for parens around a float exponentiation base registers an offense for parens around a block body accepts parentheses when they touch the following keyword accepts parentheses around a method call with unparenthesized arguments registers an offense for parens around an integer exponentiation base registers an offense for parens around last expressions in method body registers an offense for parens around constant ternary condition registers an offense when there is space around the parentheses registers an offense for parens around last expressions in block body behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a literal behaves like keyword with arguments behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like keyword with return value behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a variable behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a variable behaves like redundant registers an offense for parentheses around a variable when a hash literal is the second argument in a method call registers an offense behaves like plausible accepts parentheses when arguments are unparenthesized when a non-parenthesized call has an arg and a block accepts parens around the arg behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like keyword with return value behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around an unary operation behaves like keyword with return value behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a literal when the first argument in a method call begins with a hash literal accepts parentheses if the argument list is not parenthesized registers an offense if the argument list is parenthesized behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like keyword with arguments behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a constant behaves like redundant registers an offense for parentheses around a method call behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like plausible accepts parentheses when arguments are unparenthesized RuboCop::Cop::Style::ExplicitBlockArgument registers an offense and corrects when block yields several first its arguments correctly corrects when the method call has a trailing comma in its argument list does not register an offense when `yield` is the sole block body does not register an offense when `yield` is not inside block does not register an offense when `yield` arguments is not a prefix of block arguments correctly corrects when method already has an explicit block argument registers an offense and corrects when block just yields its arguments registers an offense and corrects when method contains multiple `yield`s registers an offense and corrects when `yield` inside block has no arguments RuboCop::Cop::Lint::LiteralInInterpolation handles backslach in double quotes when auto-correction accepts interpolation of irange where endpoints are not literals accepts interpolation of erange where endpoints are not literals handles double quotes in single quotes when auto-correction handles backslach in single quotes when auto-correction accepts empty interpolation accepts interpolation of xstr handles nested interpolations when auto-correction behaves like literal interpolation registers an offense for 0xaabb in interpolation and removes interpolation around it removes interpolation around 0xaabb when there is more text registers an offense only for final 0xaabb in interpolation removes interpolation around multiple 0xaabb when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like special keywords accepts strings like __END__ registers an offense and autocorrects interpolation after __END__ behaves like non-special string literal interpolation registers an offense for "foo" and removes the interpolation and quotes around "foo" behaves like literal interpolation removes interpolation around multiple -1 registers an offense only for final -1 in interpolation registers an offense for -1 in interpolation and removes interpolation around it removes interpolation around -1 when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like special keywords accepts strings like __LINE__ registers an offense and autocorrects interpolation after __LINE__ behaves like special keywords registers an offense and autocorrects interpolation after __ENCODING__ accepts strings like __ENCODING__ behaves like literal interpolation registers an offense only for final 1 in interpolation registers an offense for 1 in interpolation and removes interpolation around it removes interpolation around 1 when there is more text removes interpolation around multiple 1 when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple %I[s1 s2] registers an offense only for final %I[s1 s2] in interpolation registers an offense for %I[s1 s2] in interpolation and removes interpolation around it removes interpolation around %I[s1 s2] when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like non-special string literal interpolation registers an offense for 'foo' and removes the interpolation and quotes around 'foo' behaves like literal interpolation removes interpolation around 0o377 when there is more text registers an offense for 0o377 in interpolation and removes interpolation around it registers an offense only for final 0o377 in interpolation removes interpolation around multiple 0o377 when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple nil registers an offense for nil in interpolation and removes interpolation around it removes interpolation around nil when there is more text registers an offense only for final nil in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 1..2 when there is more text registers an offense for 1..2 in interpolation and removes interpolation around it removes interpolation around multiple 1..2 registers an offense only for final 1..2 in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for %w[v1 v2] in interpolation and removes interpolation around it removes interpolation around multiple %w[v1 v2] registers an offense only for final %w[v1 v2] in interpolation removes interpolation around %w[v1 v2] when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like special keywords accepts strings like __FILE__ registers an offense and autocorrects interpolation after __FILE__ in string-like contexts removes interpolation in symbols removes interpolation in backticks removes interpolation in regular expressions behaves like literal interpolation removes interpolation around multiple {"a" => "b"} removes interpolation around {"a" => "b"} when there is more text registers an offense for {"a" => "b"} in interpolation and removes interpolation around it registers an offense only for final {"a" => "b"} in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple :"symbol" registers an offense only for final :"symbol" in interpolation registers an offense for :"symbol" in interpolation and removes interpolation around it removes interpolation around :"symbol" when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %i[ s1 s2 ] when there is more text removes interpolation around multiple %i[ s1 s2 ] registers an offense only for final %i[ s1 s2 ] in interpolation registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final 1_123 in interpolation registers an offense for 1_123 in interpolation and removes interpolation around it removes interpolation around 1_123 when there is more text removes interpolation around multiple 1_123 when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple false registers an offense for false in interpolation and removes interpolation around it registers an offense only for final false in interpolation removes interpolation around false when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it removes interpolation around multiple 123_456_789_123_456_789 removes interpolation around 123_456_789_123_456_789 when there is more text registers an offense only for final 123_456_789_123_456_789 in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 2.0 when there is more text registers an offense for 2.0 in interpolation and removes interpolation around it removes interpolation around multiple 2.0 registers an offense only for final 2.0 in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for %i[s1 s2] in interpolation and removes interpolation around it registers an offense only for final %i[s1 s2] in interpolation removes interpolation around multiple %i[s1 s2] removes interpolation around %i[s1 s2] when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final %w[] in interpolation removes interpolation around multiple %w[] removes interpolation around %w[] when there is more text registers an offense for %w[] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for true in interpolation and removes interpolation around it registers an offense only for final true in interpolation removes interpolation around multiple true removes interpolation around true when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for :symbol in interpolation and removes interpolation around it removes interpolation around :symbol when there is more text registers an offense only for final :symbol in interpolation removes interpolation around multiple :symbol when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for 1.2e-3 in interpolation and removes interpolation around it registers an offense only for final 1.2e-3 in interpolation removes interpolation around multiple 1.2e-3 removes interpolation around 1.2e-3 when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %i[s1 s2] when there is more text removes interpolation around multiple %i[s1 s2] registers an offense for %i[s1 s2] in interpolation and removes interpolation around it registers an offense only for final %i[s1 s2] in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for ["a", "b"] in interpolation and removes interpolation around it removes interpolation around multiple ["a", "b"] registers an offense only for final ["a", "b"] in interpolation removes interpolation around ["a", "b"] when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final %w[v1] in interpolation removes interpolation around %w[v1] when there is more text removes interpolation around multiple %w[v1] registers an offense for %w[v1] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final 1...2 in interpolation removes interpolation around 1...2 when there is more text registers an offense for 1...2 in interpolation and removes interpolation around it removes interpolation around multiple 1...2 when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple [] registers an offense for [] in interpolation and removes interpolation around it registers an offense only for final [] in interpolation removes interpolation around [] when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal RuboCop::Cop::Style::NilComparison configured with comparison preferred registers an offense for nil? configured with predicate preferred registers an offense for == nil registers an offense for === nil RuboCop::Cop::Style::ClassCheck when enforced style is is_a? registers an offense for kind_of? and corrects to is_a? when enforced style is kind_of? registers an offense for is_a? and corrects to kind_of? RuboCop::Cop::Lint::Syntax .offenses_from_processed_source with a parser error returns an offense with --display-cop-names option returns an offense with cop name with a diagnostic error returns an offense with --display-cop-names option returns an offense with cop name with --auto-correct-all --disable-uncorrectable options returns an offense RuboCop::Cop::Style::ExponentialNotation EnforcedStyle is integral registers no offense for a float smaller than 1 registers an offense for decimal mantissa registers no offense for an integral mantissa registers no offense for negative exponent registers no offense for a regular float registers no offense for negative mantissa registers an offense for mantissa divisible by 10 EnforcedStyle is engineering registers no offense for a mantissa equal to 1 registers no offense for a regular float registers no offense for a large mantissa registers no offense for a negative mantissa registers no offense for a negative exponent registers an offense for mantissa smaller than -1000 registers an offense for a mantissa greater than -0.1 registers no offense for a float smaller than 1 registers an offense for exponent equal to -2 registers an offense for mantissa smaller than 0.1 registers an offense for exponent equal to 4 EnforcedStyle is scientific registers an offense for mantissa smaller than 1 registers an offense for mantissa greater than 10 registers an offense for mantissa equal to 10 registers no offense for a negative exponent registers no offense for a mantissa between 1 and 10 registers no offense for a mantissa equal to 1 registers no offense for a regular float registers no offense for a float smaller than 1 registers no offense for a negative mantissa RuboCop::Cop::Layout::MultilineArrayBraceLayout ignores implicit arrays ignores empty arrays ignores single-line arrays when comment present before closing brace corrects closing brace without crashing behaves like multiline literal brace layout heredoc auto-corrects safe heredoc offenses ignores heredocs that could share a last line detects heredoc structures that are safe to add to same_line style opening brace on same line as first element allows closing brace on same line as multi-line element autocorrects closing brace on different line as last element detects closing brace on different line from last element detects closing brace on different line from multiline element allows closing brace on same line from last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element detects closing brace on different line from last element autocorrects closing brace on different line from last element allows closing brace on same line as last multiline element allows closing brace on same line as last element new_line style opening brace on separate line from first element autocorrects closing brace on same line from last element allows closing brace on separate line from last element detects closing brace on same line as last element allows closing brace on separate line from last multiline element opening brace on same line as first element detects closing brace on same line as last element allows closing brace on different line from multi-line element allows closing brace on different line from last element autocorrects closing brace on same line as last element detects closing brace on same line as last multiline element symmetrical style opening brace on same line as first element allows closing brace on same line as last multiline element allows closing brace on same line as last element autocorrects closing brace on different line from last element detects closing brace on different line from last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace opening brace on separate line from first element allows closing brace on separate line from last element detects closing brace on same line as last element allows closing brace on separate line from last multiline element autocorrects closing brace on same line from last element behaves like multiline literal brace layout method argument when arguments to a method and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace but no comment after the last element autocorrects the closing brace behaves like multiline literal brace layout trailing comma same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element RuboCop::Cop::Lint::RequireParentheses accepts condition that is not a call accepts calls to methods that are operators accepts parentheses around expression with boolean operator accepts method calls without parentheses followed by keyword and/or registers an offense for missing parentheses around expression in ternary accepts missing parentheses when method is not a predicate accepts calls to methods that are setters accepts method calls that are all operations accepts missing parentheses around expression with + operator accepts method call with parentheses in ternary registers an offense for missing parentheses around expression with && operator registers an offense for missing parentheses around expression with || operator when using safe navigation operator registers an offense for missing parentheses around expression with && operator RuboCop::Cop::Style::DateTime does not register an offense when using DateTime in another namespace registers an offense when using DateTime for modern date does not register an offense when using ::DateTime for historic date does not register an offense when using Time for current time registers an offense when using ::DateTime for current time registers an offense when using DateTime for current time does not register an offense when using Date for modern date does not register an offense when using DateTime for historic date when configured to not allow #to_datetime registers an offense when configured to allow #to_datetime does not register an offense RuboCop::Cop::Layout::SpaceAfterColon accepts hash rockets registers an offense and corrects a keyword optional argument without a space accepts hashes with a space after colons accepts colons in strings registers an offense and corrects colon without space after it accepts colon in ternary followed by space accepts required keyword arguments accepts colons in symbols accepts if accepts colons denoting required keyword argument RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets does not register offense for any kind of reference brackets when EnforcedStyle is space does not register offense for valid 2-dimensional array behaves like space inside arrays does not register offense for arrays with spaces does not register offense when bottom bracket gets its own line & has trailing method register an offense and corrects when 2 arrays are on one line does not register offense when 2 arrays on one line registers an offense and corrects multiline array on end bracketwith trailing method does not register offense for valid multiline array registers an offense and corrects multiline array on end bracket does not register offense for array when brackets get their own line accepts square brackets called with method call syntax does not register offense for arrays using ref brackets registers an offense and corrects an array missing whitespace when there is more than one array on a line registers an offense and corrects array brackets with no trailing whitespace accepts square brackets as method name does not register offense for indented array when bottom bracket gets its own line & is misaligned registers an offense and corrects array brackets with no leading whitespace accepts space inside array brackets with comment with space inside empty brackets not allowed registers an offense and corrects empty brackets with 1 space inside registers an offense and corrects multiline spaces accepts empty brackets with no space inside registers an offense and corrects empty brackets with multiple spaces inside with space inside empty braces allowed registers an offense and corrects empty brackets with more than one space inside accepts empty brackets with space inside registers an offense and corrects empty brackets with no space inside when EnforcedStyle is no_space registers an offense and corrects multiline array on end bracket registers an offense and corrects an array when two on one line accepts space inside array brackets if with comment accepts square brackets called with method call syntax does not register offense when 2 arrays on one line does not register offense for valid 2-dimensional array registers an offense and corrects array brackets with trailing whitespace does not register offense when bottom bracket gets its own line indented with tabs accepts a multiline array with whitespace before end bracket does not register offense for arrays using ref brackets does not register offense for valid multiline array does not register offense when bottom bracket gets its own line & has trailing method accepts square brackets as method name does not register offense for array when brackets get own line does not register offense for indented array when bottom bracket gets its own line & is misaligned registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started registers an offense and corrects multiline array on end bracketwith trailing method registers an offense and corrects array brackets with leading whitespace registers an offense and corrects 2 arrays on one line does not register offense when contains an array literal as an argument after a heredoc is started does not register offense for arrays with no spaces when EnforcedStyle is compact does not register offense for valid 3-dimensional array accepts multiline array registers an offense and corrects 3-dimensional array with extra spaces registers an offense and corrects 2-dimensional array with extra spaces registers an offense and corrects space between 2 closing brackets does not register offense for valid 2-dimensional array does not register offense for valid 4-dimensional array registers an offense and corrects space between 2 opening brackets behaves like space inside arrays registers an offense and corrects array brackets with no trailing whitespace does not register offense for arrays using ref brackets register an offense and corrects when 2 arrays are on one line does not register offense when bottom bracket gets its own line & has trailing method registers an offense and corrects multiline array on end bracket does not register offense for valid multiline array does not register offense for array when brackets get their own line accepts square brackets as method name registers an offense and corrects an array missing whitespace when there is more than one array on a line accepts square brackets called with method call syntax does not register offense when 2 arrays on one line accepts space inside array brackets with comment does not register offense for indented array when bottom bracket gets its own line & is misaligned registers an offense and corrects array brackets with no leading whitespace registers an offense and corrects multiline array on end bracketwith trailing method does not register offense for arrays with spaces multiline array does not collapse any successive brackets does not auto-corrects registers an offense multiline array does not collapse successive left-brackets registers an offense auto-corrects multiline array does not collapse successive right-brackets registers an offense and corrects RuboCop::Formatter::JUnitFormatter #file_finished displays a non-offfense element in parsable text displays an offfense for `classname='test_1` in parsable text displays an offfense for `classname='test_2` in parsable text displays end of parsable text displays start of parsable text RuboCop::Cop::Style::SingleLineMethods does not crash on an method with a capitalized name auto-corrects def with argument and no parentheses auto-corrects def with semicolon after method name auto-corrects defs with parentheses after method name registers an offense for a single-line method accepts a multi-line method auto-corrects def with semicolon before end auto-corrects def with argument in parentheses when AllowIfMethodIsEmpty is disabled registers an offense for an empty method when AllowIfMethodIsEmpty is enabled accepts a single-line empty method RuboCop::Cop::Metrics::ParameterLists accepts a lambda with more than 4 parameters accepts a proc with more than 4 parameters accepts a method def with 4 parameters registers an offense for a method def with 5 parameters When CountKeywordArgs is false does not count keyword arguments does not count keyword arguments without default values When CountKeywordArgs is true counts keyword arguments as well RuboCop::Formatter::AutoGenConfigFormatter #finished calls #report_summary when no offenses are detected does not report offenses when any offenses are detected outputs report summary does not report offenses #report_file_as_mark when no offenses are detected prints "." when different severity offenses are detected prints highest level mark when a refactor convention offense is detected prints "C" when a refactor severity offense is detected prints "R" RuboCop::Cop::Style::StructInheritance accepts plain class registers an offense when extending instance of Struct registers an offense when extending instance of `Struct` when there is a comment before class declaration registers an offense when extending instance of Struct with do ... end accepts extending DelegateClass acceps assignment to ::Struct.new accepts assignment to block form of Struct.new registers an offense when extending instance of ::Struct with do ... end registers an offense when extending instance of ::Struct accepts assignment to Struct.new RuboCop::Cop::Style::GlobalStdStream does not register an offense when using non std stream const registers an offense and corrects when using std stream as const does not register an offense when assigning other const to std stream gvar does not register an offense when assigning std stream const to std stream gvar RuboCop::Cop::Style::RedundantFetchBlock with SafeForConstants: false does not register an offense when using `#fetch` with constant in the block with SafeForConstants: true does not register an offense when using `#fetch` with String in the block and strings are not frozen does not register an offense when using `#fetch` with interpolated Symbol in the block registers an offense and corrects when using `#fetch` with Integer in the block does not register an offense when using `#fetch` with an argument in the block registers an offense and corrects when using `#fetch` with empty block does not register an offense when using `#fetch` with argument fallback registers an offense and corrects when using `#fetch` with Rational in the block registers an offense and corrects when using `#fetch` with Symbol in the block does not register an offense when using `#fetch` with `Rails.cache` registers an offense and corrects when using `#fetch` with String in the block and strings are frozen registers an offense and corrects when using `#fetch` with constant in the block registers an offense and corrects when using `#fetch` with Float in the block registers an offense and corrects when using `#fetch` with Complex in the block RuboCop::Cop::Layout::AssignmentIndentation ignores comparison operators registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line allows a properly indented rhs with fullwidth characters allows assignments that do not start on a newline registers an offense for incorrectly indented rhs when multiple assignment registers an offense for multi-lhs allows a properly indented rhs registers an offense for incorrectly indented rhs when indentation width is overridden for this cop only auto-corrects indentation allows a properly indented rhs RuboCop::Cop::Lint::RaiseException registers an offense and corrects for `raise` with `::Exception` does not register an offense when raising Exception with explicit namespace registers an offense and corrects for `raise` with `Exception` and message registers an offense and corrects for `raise` with `::Exception` and message registers an offense and corrects for `raise` with `Exception` registers an offense and corrects for `raise` with `Exception.new(args*)` registers an offense and corrects for `fail` with `Exception` registers an offense and corrects for `fail` with `Exception` and message does not register an offense for `raise` without arguments registers an offense and corrects for `raise` with `::Exception.new` does not register an offense for `fail` without arguments registers an offense and corrects for `fail` with `Exception.new` and message registers an offense and corrects for `raise` with `Exception.new` and message when under namespace registers an offense and corrects when Exception with cbase specified does not register an offense when Exception without cbase specified RuboCop::Cop::Style::DoubleNegation when `EnforcedStyle: forbidden` registers an offense for `!!` when return location registers an offense for `!!` does not register an offense for `!!` when not a return location does not register an offense for `!!` when using `return` keyword does not register an offense for `not not` does not register an offense for ! when `EnforcedStyle: allowed_in_returns` does not register an offense for `!!` when using `return` keyword does not register an offense for `!!` when not a return location does not register an offense for `not not` registers an offense for `!!` does not register an offense for `!!` when return location does not register an offense for ! RuboCop::Cop::Style::GuardClause does not report an offense if raise "error" is inside elsif registers an error if non-control-flow branch has multiple lines does not report an offense if next is inside if..elsif..else..end registers an error with break in the else branch doesn't register an error if control flow expr has multiple lines registers an error with next in the else branch registers an offense when using `and return` in `then` branch doesn't register an error if condition has multiple lines doesn't report an offense if condition has multiple lines does not report an offense if return is inside elsif doesn't register an error if condition has multiple lines accepts a method with empty parentheses as its body does not report an offense if break is inside elsif registers an offense when using `|| raise` in `then` branch registers an error with return in the else branch accepts a method which body is if / unless with else doesn't register an error if control flow expr has multiple lines registers an error with raise "error" in the if branch registers an error with return in the if branch registers an error if non-control-flow branch has multiple lines doesn't register an error if control flow expr has multiple lines registers an error with next in the if branch registers an offense when using `|| raise` in `else` branch registers an error with break in the if branch does not report an offense if body is if..elsif..end registers an error if non-control-flow branch has multiple lines doesn't register an error if control flow expr has multiple lines accepts a method whose body is a modifier if / unless does not report an offense if return is inside if..elsif..else..end registers an offense when using `and return` in `else` branch does not report an offense if break is inside if..elsif..else..end does not report an offense if raise "error" is inside if..elsif..else..end doesn't register an error if condition has multiple lines registers an error if non-control-flow branch has multiple lines registers an error with raise "error" in the else branch doesn't register an error if condition has multiple lines does not register an offense when assigning the result of a guard condition with `else` does not report an offense if next is inside elsif accepts a method which body does not end with if / unless with Metrics/MaxLineLength enabled registers an offense with non-modifier example code if too long for single line behaves like reports offense reports an offense if method body ends with if / unless without else reports an offense if method body is if / unless without else MinBodyLength: 4 accepts a method whose body has 3 lines with Metrics/MaxLineLength disabled registers an offense with modifier example code regardless of length method in module registers an offense for singleton methods registers an offense for instance method behaves like reports offense reports an offense if method body ends with if / unless without else reports an offense if method body is if / unless without else Invalid MinBodyLength fails with an error MinBodyLength: 1 reports an offense for if whose body has 1 line RuboCop::Cop::Style::StringLiteralsInInterpolation when configured with a bad value fails configured with double quotes preferred registers an offense for single quotes within embedded expression in a heredoc string registers an offense for single quotes within embedded expression configured with single quotes preferred can handle a built-in constant parsed as string accepts double quotes on a broken static string registers an offense for double quotes within embedded expression in a heredoc string accepts double quotes on a static string can handle character literals registers an offense for double quotes within embedded expression accepts double quotes on static strings within a method RuboCop::Cop::Style::StringLiterals configured with double quotes preferred accepts single quotes in interpolation accepts single quotes at the start of regexp literals accepts single quotes in string with escaped non-' character accepts double quotes flags single quotes with plain # (not #@var or #{interpolation} accepts single quotes when they are needed accepts escaped single quote in string with escaped non-' character registers offense for opposite + correct accepts ' in a %w can handle a built-in constant parsed as string accepts % quotes accepts heredocs registers offense for single quotes when double quotes would be equivalent accepts %q and %Q quotes registers offense for escaped single quote in single quotes does not accept multiple escaped single quotes in single quotes when configured with a bad value fails when ConsistentQuotesInMultiline is true and EnforcedStyle is single_quotes registers an offense for unneeded double quotes in continuation registers an offense for strings with line breaks in them accepts continued strings using all single quotes accepts for double quotes with an escaped special character doesn't choke on heredocs with inconsistent indentation doesn't register offense for double quotes with embedded single doesn't register offense for double quotes with interpolation registers an offense for mixed quote styles in a continued string accepts for double quotes with an escaped normal character and EnforcedStyle is double_quotes doesn't register offense for single quotes with embedded double registers an offense for unneeded single quotes in continuation registers an offense for mixed quote styles in a continued string accepts continued strings using all double quotes configured with single quotes preferred accepts \\\n in a string accepts " in a %w accepts double quotes when interpolating & quotes in multiple lines accepts % quotes accepts double quotes when interpolating a global variable registers an offense for words with non-ascii chars accepts double quotes at the start of regexp literals registers an offense for "\"" detects unneeded double quotes within concatenated string can handle character literals accepts double quotes when new line is used accepts double quotes when unicode control sequence is used does not register an offense for words with non-ascii chars and other control sequences accepts double quotes in interpolation accepts single quotes accepts double quotes when interpolating a class variable can handle a built-in constant parsed as string accepts single quotes in interpolation accepts %q and %Q quotes accepts double quotes when interpolating an instance variable registers offense for double quotes when single quotes suffice accepts double quotes with some other special symbols accepts double quotes when control characters are used accepts heredocs accepts double quotes when single quotes are used registers offense for correct + opposite RuboCop::Cop::Layout::EmptyLineAfterMagicComment registers an offense when multiple magic comments without empty line accepts code that separates the comment from the code with a newline registers an offense for documentation immediately following comment accepts an empty source file accepts a source file with only a magic comment registers an offense for code that immediately follows comment RuboCop::Cop::Bundler::GemComment when investigating Gemfiles and the file is empty does not register any offenses and the gem is commented does not register any offenses when the "OnlyFor" option is set when the version specifiers are checked when a gem is uncommented and has multiple version specifiers registers an offense when a gem is uncommented and has a version specifier registers an offense when a gem is uncommented and has no extra options does not register an offense when a gem is commented does not register an offense when a gem is uncommented and has a version specifier along with unrelated options registers an offense when a gem is uncommented and has options but no version specifiers does not register an offense and some other options are checked when a gem is uncommented and only unchecked options does not register an offense when a gem is uncommented and has a version specifier but no other options does not register an offense when a gem is uncommented and has one of the checked options registers an offense and the file contains source and group does not register any offenses and a gem has no comment registers an offense and the gem is permitted does not register any offenses when investigating Ruby files does not register any offenses RuboCop::Cop::Layout::FirstArrayElementIndentation when array is method argument and argument are not surrounded by parentheses registers an offense and corrects incorrectly indented multi-line array with brackets accepts single line array with brackets accepts a correctly indented multi-line array with brackets accepts bracketless array and arguments are surrounded by parentheses and EnforcedStyle is consistent accepts normal indentation for second argument registers an offense and corrects incorrect indentation accepts normal indentation for first argument and EnforcedStyle is special_inside_parentheses registers an offense and corrects 'consistent' indentation accepts normal indentation for array within array registers an offense and corrects 'align_brackets' indentation accepts special indentation for second argument accepts special indentation for first argument when using safe navigation operator registers an offense and corrects 'consistent' indentation when array is right hand side in assignment accepts multi-assignments with no brackets accepts correctly indented first element registers an offense and corrects incorrectly indented first element accepts an empty array accepts a first element on the same line as the left bracket accepts several elements per line accepts multi-assignments with brackets accepts single line array when array is argument to setter accepts correctly indented first element registers an offense and corrects incorrectly indented first element when EnforcedStyle is align_brackets accepts a first element on the same line as the left bracket accepts an empty array accepts single line array accepts correctly indented first element registers an offense and corrects incorrectly indented ] accepts multi-assignments with brackets accepts several elements per line accepts multi-assignments with no brackets when indentation width is overridden for this cop registers an offense and corrects indentation that does not match IndentationWidth accepts correctly indented first element when 'consistent' style is used registers an offense and corrects incorrectly indented 1st element registers an offense and corrects incorrect indentation when 'special_inside_parentheses' style is used registers an offense and corrects incorrect indentation when array is operand accepts correctly indented first element registers an offense and corrects incorrectly indented first element registers an offense and corrects incorrectly indented ] when indentation width is overridden for this cop registers an offense and corrects incorrectly indented 1st element accepts correctly indented first element isolated environment is not affected by a config file above the work directory RuboCop::Cop::Lint::CircularArgumentReference circular argument references in ordinal arguments when the method contains a circular argument reference registers an offense when the method does not contain a circular argument reference does not register an offense when the seemingly-circular default value is a method call does not register an offense circular argument references in keyword arguments when the keyword argument is not circular, but calls a method of its own class with a self specification does not register an offense when the keyword argument is not circular, and calls a method does not register an offense when there is one circular argument reference registers an offense when the keyword argument is not circular does not register an offense when the keyword argument is not circular, but calls a method of some other object with the same name does not register an offense when there are multiple offensive keyword arguments registers an offense RuboCop::Cop::Style::SelfAssignment registers an offense for non-shorthand assignment - and @@x registers an offense for non-shorthand assignment * and @x registers an offense for non-shorthand assignment - and x registers an offense for non-shorthand assignment & and x registers an offense for non-shorthand assignment && and x registers an offense for non-shorthand assignment || and @x registers an offense for non-shorthand assignment | and @@x registers an offense for non-shorthand assignment | and @x registers an offense for non-shorthand assignment / and @@x registers an offense for non-shorthand assignment ** and @x registers an offense for non-shorthand assignment * and @@x registers an offense for non-shorthand assignment & and @@x registers an offense for non-shorthand assignment & and @x registers an offense for non-shorthand assignment ** and @@x registers an offense for non-shorthand assignment ** and x registers an offense for non-shorthand assignment || and @@x registers an offense for non-shorthand assignment - and @x registers an offense for non-shorthand assignment | and x registers an offense for non-shorthand assignment / and x registers an offense for non-shorthand assignment + and @@x registers an offense for non-shorthand assignment && and @x registers an offense for non-shorthand assignment / and @x registers an offense for non-shorthand assignment * and x registers an offense for non-shorthand assignment && and @@x registers an offense for non-shorthand assignment || and x registers an offense for non-shorthand assignment + and @x registers an offense for non-shorthand assignment + and x RuboCop::Cop::Layout::ClassStructure with protected methods declared before private is expected to eq class MyClass def public_method end private def first_private...ar before `private_methods`. end def second_protected_method end end simple example is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" with a complete ordered example does not create offense with attribute macros before after validations is expected to eq class Person include AnotherModule extend SomeModule CustomError = Cla...rotected_method end private def some_private_method end end #autocorrect when there is a comment in the macro method autocorrects the offenses RuboCop::Cop::Layout::SpaceInLambdaLiteral when configured to enforce spaces registers an offense and corrects no space in both lambdas when nested does not register an offense for no space between -> and { does not register an offense for multi-line lambdas registers an offense and corrects no space in the outer nested lambda registers an offense and corrects no space between -> and ( does not register an offense for a space between -> and ( registers an offense and corrects no space in the inner nested lambda when configured to enforce no space does not register an offense for no space between -> and ( does not register an offense for multi-line lambdas registers an offense and corrects a space between -> and ( registers an offense and corrects a space in the inner nested lambda registers an offense and corrects a space in the outer nested lambda register offenses and correct spaces in both lambdas when nested registers an offense and corrects spaces between -> and ( does not register an offense for a space between -> and { RuboCop::Cop::Layout::SpaceAroundMethodCallOperator does not register an offense when no method call operator dot operator autocorrects offense when space around multiple method call operator registers an offense when space before last method call operator registers an offense when spaces after `Proc#call` shorthand call registers an offense when space after last method call operator registers an offense when spaces after method call does not register an offense when no space around any `.` operators autocorrects offense when space after method call autocorrects offense when spaces before method call registers an offense when spaces around method call registers an offense when spaces before method call autocorrects offense when space after first method call operator does not register an offense when no space around method call registers an offense when space before method call registers an offense when space after first method call operator autocorrects offense when spaces after `Proc#call` shorthand call registers an offense when space around intermediate method call operator autocorrects offense when space around intermediate method call operator autocorrects offense when space before last method call operator autocorrects offense when space before first method call operator autocorrects offense when space after last method call operator registers an offense when space around multiple method call operator registers an offense when space before first method call operator registers an offense when space after method call autocorrects offense when spaces around method call autocorrects offense when space before method call autocorrects offense when spaces after method call when there is a space between `.` operator and a comment does not register an offense when there is not a space before `.` registers an offense when there is a space before `.` when multi line method call autocorrects offense when space before method call autocorrects offense when space before method call in suffix chaining registers an offense when space before method call in suffix chaining registers an offense when space before method call does not register an offense when no space after the `.` safe navigation operator registers an offense when space before first method call operator registers an offense when spaces after method call autocorrects offense when space before first method call operator autocorrects offense when space after method call registers an offense when space before last method call operator registers an offense when space around intermediate method call operator registers an offense when space before method call registers an offense when space after method call autocorrects offense when space after last method call operator registers an offense when space around multiple method call operator autocorrects offense when spaces before method call registers an offense when spaces around method call autocorrects offense when spaces after method call registers an offense when spaces before method call autocorrects offense when space around intermediate method call operator does not register an offense when no space around method call registers an offense when space after last method call operator registers an offense when space after first method call operator autocorrects offense when space before method call does not register an offense when no space around any `.` operators autocorrects offense when spaces around method call autocorrects offense when space around multiple method call operator autocorrects offense when space before last method call operator autocorrects offense when space after first method call operator when multi line method call autocorrects offense when space before method call in suffix chaining registers an offense when space before method call in suffix chaining autocorrects offense when space before method call registers an offense when space before method call does not register an offense when no space after the `&.` :: operator autocorrects offense when space after method call does not register an offense if no space with conditionals autocorrects offense when multiple spaces with assignment does not register an offense when no space around any `.` operators autocorrects offense when space after first operator with assignment does not register an offense if no space before `::` operator with assignment does not register an offense if no space before `::` operator with inheritance does not register an offense when no space around method call registers an offense when space after last method call operator registers an offense when spaces after method call autocorrects offense when space around multiple method call operator autocorrects offense when space after last method call operator autocorrects offense when space around intermediate method call operator registers an offense when space after first operator with assignment registers an offense when space around multiple method call operator autocorrects offense when spaces after method call registers an offense when space after method call registers an offense when space around intermediate method call operator registers an offense when multiple spaces with assignment when multi line method call registers an offense when space before method call autocorrects offense when space before method call does not register an offense when no space after the `::` RuboCop::Cop::Lint::DuplicateCaseCondition registers an offense for repeated case conditionals accepts non-redundant case expressions with an else expression registers an offense for repeated logical operator when expressions accepts trivial case expressions registers an offense for subsequent repeated case conditionals registers multiple offenses for repeated multi-value condtionals accepts non-redundant case expressions accepts similar but not equivalent && expressions registers multiple offenses for multiple repeated case conditionals RuboCop::Cop::Style::RedundantRegexpEscape with a single-line %r() regexp with escaped delimiters outside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with a single-line %r<> regexp with escaped delimiters inside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense without escapes does not register an offense with a single-line `//` regexp with an escaped 'O' inside a character class does not register an offense with an escaped 'Z' inside a character class does not register an offense with an escaped character class and following escaped char does not register an offense with an escaped 'x41' outside a character class does not register an offense with an escaped 'T' inside a character class does not register an offense with a POSIX character class then allowed escape inside a character class does not register an offense with an escaped 'h' outside a character class does not register an offense with an escaped '#' outside a character class does not register an offense with an escaped 'F' inside a character class does not register an offense with an escaped 'I' inside a character class does not register an offense with an escaped 'f' inside a character class does not register an offense without escapes does not register an offense with an escaped 'J' inside a character class does not register an offense with an escaped 'G' outside a character class does not register an offense with an escaped 'x41' inside a character class does not register an offense with an escaped 'q' inside a character class does not register an offense with an escaped 'n101' inside a character class does not register an offense with an escaped 'w' outside a character class does not register an offense with an escaped 'h' inside a character class does not register an offense with an interpolation followed by redundant escapes registers offenses and corrects with an escaped ']' outside a character class does not register an offense with an escaped 'a' outside a character class does not register an offense with an escaped 'B' outside a character class does not register an offense with an escaped 'S' inside a character class does not register an offense with an escaped ')' inside a character class registers an offense and corrects with an escaped 'J' outside a character class does not register an offense with an escaped 'd' inside a character class does not register an offense with an escaped 'O' outside a character class does not register an offense with an escaped '|' outside a character class does not register an offense with an escaped 'z' outside a character class does not register an offense with an escaped 'P{alpha}' inside a character class does not register an offense with an escaped '{' inside a character class registers an offense and corrects with an escaped 'y' inside a character class does not register an offense with an escaped 'e' outside a character class does not register an offense with an escaped 'm' inside a character class does not register an offense with an escaped 'Y' inside a character class does not register an offense with a nested character class containing redundant escape registers an offense and corrects with an escaped 'I' outside a character class does not register an offense with an escaped 'R' outside a character class does not register an offense with an escaped 'p{alpha}' outside a character class does not register an offense with an escaped '\' inside a character class does not register an offense with an escaped 'T' outside a character class does not register an offense with an escaped 'o' outside a character class does not register an offense with an escaped 'u{0041}' outside a character class does not register an offense with an escaped 'A' inside a character class does not register an offense with an escaped 'e' inside a character class does not register an offense with an escaped '(' outside a character class does not register an offense with an escaped 'G' inside a character class does not register an offense with an escaped 'v' inside a character class does not register an offense with an escaped 't' outside a character class does not register an offense with an escaped 'C-c' inside a character class does not register an offense with a character class and following escaped char does not register an offense with an escaped '|' inside a character class registers an offense and corrects with an escaped 'H' outside a character class does not register an offense with escaped slashes does not register an offense with an escaped '\' outside a character class does not register an offense with an escaped '-' outside a character class registers an offense and corrects with an escaped 'n101' outside a character class does not register an offense with an escaped '(' inside a character class registers an offense and corrects with an escaped 'l' inside a character class does not register an offense with an escaped 's' outside a character class does not register an offense with multiple escaped metachars inside a character class registers offenses and corrects with an escaped 'g' inside a character class does not register an offense with an escaped '}' inside a character class registers an offense and corrects with an escaped interpolation outside a character class does not register an offense with an escaped 'F' outside a character class does not register an offense with an escaped ' ' outside a character class does not register an offense with an escaped 'v' outside a character class does not register an offense with an escaped 'r' inside a character class does not register an offense with an escaped 'U' inside a character class does not register an offense with an escaped 'd' outside a character class does not register an offense with an escaped 'Z' outside a character class does not register an offense with an escaped '.' inside a character class registers an offense and corrects with an escaped 'l' outside a character class does not register an offense with an escaped 'i' outside a character class does not register an offense with an escaped '$' inside a character class registers an offense and corrects with an escaped '#' inside a character class does not register an offense with an escaped . inside a character class beginning with : registers an offense and corrects with a POSIX character class then disallowed escape inside a character class registers an offense and corrects with a nested character class then allowed escape does not register an offense with an escaped 'u{0041}' inside a character class does not register an offense with an escaped 'u0041' inside a character class does not register an offense with an escaped 'p{alpha}' inside a character class does not register an offense with an escaped 'D' outside a character class does not register an offense with an escaped 'K' inside a character class does not register an offense with an escaped 'cc' inside a character class does not register an offense with an escaped 'Q' inside a character class does not register an offense with an escaped 'j' inside a character class does not register an offense with an escaped '*' inside a character class registers an offense and corrects with an escaped 'M-a' inside a character class does not register an offense with an escaped ' ' inside a character class does not register an offense with an escaped 'C-c' outside a character class does not register an offense with an escaped '[' inside a character class does not register an offense with an escaped 'L' outside a character class does not register an offense with an escaped 'W' inside a character class does not register an offense with an escaped 'Q' outside a character class does not register an offense with an escaped '-' inside a character class does not register an offense with an escaped 'U' outside a character class does not register an offense with an escaped 'o' inside a character class does not register an offense with an escaped '*' outside a character class does not register an offense with an escaped '$' outside a character class does not register an offense with an escaped 'f' outside a character class does not register an offense with an escaped 'y' outside a character class does not register an offense with an escaped ')' outside a character class does not register an offense with an escaped 'K' outside a character class does not register an offense with an escaped 'u0041' outside a character class does not register an offense with an escaped '?' inside a character class registers an offense and corrects with an escaped 'E' inside a character class does not register an offense with an escaped 'P{alpha}' outside a character class does not register an offense with an escaped 'j' outside a character class does not register an offense with an escaped 'A' outside a character class does not register an offense with an escaped '+' inside a character class registers an offense and corrects with an escaped 'R' inside a character class does not register an offense with an escaped 'w' inside a character class does not register an offense with an escaped 'a' inside a character class does not register an offense with an escaped 'r' outside a character class does not register an offense with an escaped '^' outside a character class does not register an offense with an uppercase metacharacter inside a character class does not register an offense with an escaped '}' outside a character class does not register an offense with an escaped 'k' inside a character class does not register an offense with an escaped 'q' outside a character class does not register an offense with an escaped '^' inside a character class does not register an offense with an escaped 'b' inside a character class does not register an offense with an escaped 'L' inside a character class does not register an offense with an escaped 'm' outside a character class does not register an offense with an interpolated unnecessary-escape regexp registers an offense and corrects with an escaped 'H' inside a character class does not register an offense with an escaped 'M-a' outside a character class does not register an offense with an escaped 'k' outside a character class does not register an offense with an escaped 'S' outside a character class does not register an offense with an escaped '.' outside a character class does not register an offense with an escaped 'X' inside a character class does not register an offense with a backreference does not register an offense with an escaped 'W' outside a character class does not register an offense with regexp options and a redundant escape registers offenses and corrects with an escaped 'N' inside a character class does not register an offense with an escaped 'Y' outside a character class does not register an offense with an escaped 'B' inside a character class does not register an offense with an escaped 'V' outside a character class does not register an offense with an escaped 'N' outside a character class does not register an offense with an escaped 's' inside a character class does not register an offense with an escape inside an interpolated string does not register an offense with an escaped '+' outside a character class does not register an offense with an escaped '?' outside a character class does not register an offense with an escaped 'b' outside a character class does not register an offense with an escaped '[' outside a character class does not register an offense with an escaped interpolation inside a character class does not register an offense with an escaped 'E' outside a character class does not register an offense with a free-spaced mode regex with redundant escape preceded by an escaped comment registers offenses and corrects with a commented redundant escape on a single line does not register an offense with a commented [ and ] does not register an offense with a commented redundant escape does not register an offense with an uppercase metacharacter outside a character class does not register an offense with an escaped 'D' inside a character class does not register an offense with an escaped 't' inside a character class does not register an offense with an escaped 'z' inside a character class does not register an offense with an escaped 'cc' outside a character class does not register an offense with an escaped ']' inside a character class does not register an offense with an escaped 'V' inside a character class does not register an offense with an escaped 'X' outside a character class does not register an offense with an escaped 'i' inside a character class does not register an offense with an escaped 'g' outside a character class does not register an offense with an escaped '{' outside a character class does not register an offense with a single-line %r__ regexp with escaped delimiters outside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with a single-line %r!! regexp with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with a multi-line %r// regexp without escapes does not register an offense with escaped slashes does not register an offense with a single-line %r{} regexp with redundantly-escaped slashes registers an offense and corrects without escapes does not register an offense with an escaped { or } inside a character class does not register an offense with an escaped { or } outside a character class does not register an offense with a single-line %r^^ regexp with escaped delimiters inside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense without escapes does not register an offense with a multi-line %r{} regexp with redundantly-escaped slashes registers an offense and corrects with a redundant escape after a line with comment registers an offense and corrects without escapes does not register an offense with a single-line %r// regexp without escapes does not register an offense with escaped slashes does not register an offense with a single-line %r~~ regexp with escaped delimiters and regexp options does not register an offense with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with escaped delimiters outside a character-class does not register an offense with a single-line %r@@ regexp without escapes does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters inside a character-class does not register an offense RuboCop::Cop::Style::WhenThen accepts ; separating statements in the body of when registers an offense for when x; when inspecting a case statement with an empty branch does not register an offense RuboCop::Cop::Layout::EmptyComment registers an offense and corrects using an empty comment next to code does not register an offense when using comment text with leading and trailing blank lines register offenses and correct multiple aligned empty comments next to code registers an offense and corrects an empty comment without space next to code registers an offense and corrects using multiline empty comments does not register an offense when using comment text register offenses and correct multiple empty comments next to code registers an offense and corrects using single line empty comment disallow margin comment registers an offense and corrects using margin comment disallow border comment registers an offense and corrects using single line empty comment registers an offense and corrects using border comment allow margin comment (default) does not register an offense when using margin comment allow border comment (default) does not register an offense when using border comment RuboCop::Cop::Style::Encoding registers no offense when encoding is in the wrong place registers an offense for vim-style encoding comments registers an offense when encoding present and UTF-8 registers no offense when no encoding present registers an offense when encoding present on 2nd line after shebang registers no offense when encoding present but not UTF-8 registers an offense for encoding inserted by magic_encoding gem RuboCop::Cop::Lint::SuppressedException with AllowComments set to true registers an offense for empty rescue on single line with a comment after it does not register an offense for empty rescue with comment when empty rescue for `defs` registers an offense for empty rescue without comment does not register an offense for empty rescue with comment when empty rescue for `def` does not register an offense for empty rescue with comment registers an offense for empty rescue without comment Ruby 2.5 or higher when empty rescue for `do` block does not register an offense for empty rescue with comment registers an offense for empty rescue without comment with AllowComments set to false registers an offense for empty rescue block does not register an offense for rescue with body Ruby 2.5 or higher when empty rescue for `do` block registers an offense for empty rescue without comment registers an offense for empty rescue with comment when empty rescue for defs registers an offense for empty rescue with comment registers an offense for empty rescue without comment when empty rescue for `def` registers an offense for empty rescue with comment registers an offense for empty rescue without comment RuboCop::Cop::Lint::BooleanSymbol does not register an offense when using `true` registers an offense when using `:true` does not register an offense when using regular symbol registers an offense when using `:false` does not register an offense when using `false` when using the new hash syntax registers an offense when using `true:` registers an offense when using `key: :false` registers an offense when using `false:` RuboCop::Cop::Style::HashTransformValues flags _.map {...}.to_h when transform_values could be used does not flag each_with_object when no transformation occurs does not flag value transformation when receiver is array literal does not flag each_with_object when receiver is array literal does not flag each_with_object when both key & value are transformed does not flag each_with_object when its argument is not modified does not flag value transformation in the absence of to_h correctly autocorrects _.map{...}.to_h with block does not flag Hash[_.map{...}] when both key & value are transformed flags _.map {...}.to_h when transform_values could be used when line break before `to_h` does not flag each_with_object when value transformation uses key does not flag _.map{...}.to_h when both key & value are transformed flags Hash[_.map{...}] when transform_values could be used with multiline block flags each_with_object when transform_values could be used with inline block flags each_with_object when transform_values could be used with safe navigation operator flags each_with_object when transform_values could be used RuboCop::Cop::Layout::MultilineMethodCallBraceLayout ignores calls without arguments ignores single-line calls ignores calls with an empty brace ignores implicit calls ignores calls with a multiline empty brace behaves like multiline literal brace layout same_line style opening brace on separate line from first element detects closing brace on different line from last element allows closing brace on same line as last multiline element autocorrects closing brace on different line from last element allows closing brace on same line as last element opening brace on same line as first element detects closing brace on different line from multiline element allows closing brace on same line from last element allows closing brace on same line as multi-line element detects closing brace on different line from last element autocorrects closing brace on different line as last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace symmetrical style opening brace on same line as first element allows closing brace on same line as last element autocorrects closing brace on different line from last element allows closing brace on same line as last multiline element detects closing brace on different line from last element with a chained call on the closing brace and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace but no comment after the last element autocorrects the closing brace opening brace on separate line from first element allows closing brace on separate line from last element allows closing brace on separate line from last multiline element detects closing brace on same line as last element autocorrects closing brace on same line from last element new_line style opening brace on separate line from first element detects closing brace on same line as last element allows closing brace on separate line from last element allows closing brace on separate line from last multiline element autocorrects closing brace on same line from last element opening brace on same line as first element autocorrects closing brace on same line as last element detects closing brace on same line as last element allows closing brace on different line from multi-line element allows closing brace on different line from last element detects closing brace on same line as last multiline element heredoc ignores heredocs that could share a last line detects heredoc structures that are safe to add to auto-corrects safe heredoc offenses when comment present before closing brace corrects closing brace without crashing behaves like multiline literal brace layout trailing comma symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element when EnforcedStyle is new_line ignores single-line calls with multi-line receiver ignores single-line calls with multi-line receiver with leading dot still ignores single-line calls RuboCop::Cop::Style::AndOr when style is always also warns on non short-circuit (or) registers an offense for "and" autocorrects "or" with an assignment on the right autocorrects "or" inside def auto-corrects "or" with || in method calls (3) warns on short-circuit (and) auto-corrects "or" with || in method calls (4) also warns on non short-circuit (and) (unless) auto-corrects "and" with && in method calls (3) auto-corrects "or" with || and doesn't add extra parentheses auto-corrects "and" with && in method calls (4) auto-corrects "or" with || and adds parentheses to expr autocorrects "and" inside def autocorrects "and" with an Enumerable accessor on either side auto-corrects "and" with && in method calls (2) also warns on non short-circuit (and) also warns on while (or) also warns on until (or) registers an offense for "or" auto-corrects "or" with || in method calls (2) auto-corrects "or" with || in method calls also warns on until (and) warns on short-circuit (or) auto-corrects "and" with && and doesn't add extra parentheses auto-corrects "and" with && in method calls also warns on non short-circuit (or) (unless) autocorrects "or" with an assignment on the left also warns on while (and) auto-corrects "and" with && and adds parentheses to expr with !variable on left doesn't crash and burn with `not` expression on right autocorrects "and" with && and adds parens with predicate method with arg without space on right autocorrects "and" with && and adds parens autocorrects "or" with || and adds parens within a nested begin node with one child only autocorrects "and" with && and adds parens with a file which contains __FILE__ autocorrects "or" with || with `not` expression on left autocorrects "and" with && and adds parens with !obj.method arg on left autocorrects "and" with && and adds parens with two predicate methods with args without spaces on right autocorrects "and" with && and adds parens autocorrects "or" with || and adds parens with obj.method = arg on left autocorrects "and" with && and adds parens with one predicate method without space on right and another method autocorrects "and" with && and adds parens autocorrects "or" with || and adds parens with obj.method= arg on left autocorrects "and" with && and adds parens with !obj.method arg on right autocorrects "and" with && and adds parens within a nested begin node autocorrects "and" with && and adds parens when left hand side is a comparison method autocorrects "and" with && and adds parens when style is conditionals registers an offense for "and" in if condition accepts || inside of conditional accepts && outside of conditional registers an offense for "and" in while condition accepts "and" in while body registers an offense for "or" in post-while condition accepts && inside of conditional registers an offense for "or" in if condition accepts "and" in if body accepts || outside of conditional registers an offense for "and" in until condition accepts "or" in while body accepts "or" in until body registers an offense for "and" in post-while condition registers an offense for "or" in while condition accepts "and" outside of conditional accepts "and" in post-while body accepts "or" in post-until body accepts "or" in if body registers an offense for "and" in post-until condition registers an offense for "or" in post-until condition accepts "or" outside of conditional accepts "and" in until body accepts "and" in post-until body registers an offense for "or" in until condition accepts "or" in post-while body RuboCop::Cop::Style::MethodDefParentheses require_parentheses auto-adds required parens to argument lists on multiple lines auto-adds required parens for a defs reports an offense for def with parameters but no parens accepts def with no args and no parens reports an offense for correct + opposite reports an offense for class def with parameters but no parens require_no_parentheses behaves like no parentheses accepts a def with parameters but no parens reports an offense for def with no args and parens reports an offense for def with parameters with parens accepts def with no args and no parens reports an offense for opposite + correct auto-removes the parens for defs reports an offense for class def with parameters with parens accepts a class def with parameters with parens require_no_parentheses_except_multiline when args are all on a single line behaves like no parentheses reports an offense for def with no args and parens accepts def with no args and no parens reports an offense for class def with parameters with parens reports an offense for opposite + correct accepts a class def with parameters with parens accepts a def with parameters but no parens auto-removes the parens for defs reports an offense for def with parameters with parens when args span multiple lines auto-adds required parens to argument lists on multiple lines reports an offense for correct + opposite RuboCop::Cop::Style::RedundantInterpolation registers an offense for "#{$+}" registers an offense for "%|#{1 + 1}|" registers an offense for "#$+" registers an offense for "#{1 + 1}" registers an offense for ["#{@var}"] registers an offense for "#$var" registers an offense for "#{var}" registers an offense for "#$1" registers an offense for "#@var" registers an offense for "#{1 + 1; 2 + 2}" registers an offense for "#{$var}" accepts strings implicitly concatenated with an earlier string registers an offense for "#{@@var}" registers an offense for "%Q(#{1 + 1})" registers an offense for "#@@var" accepts strings implicitly concatenated with a later string accepts strings with characters before the interpolation accepts strings that are part of a %W() registers an offense for "#{$1}" accepts strings with characters after the interpolation registers an offense for "#{@var}" RuboCop::Cop::Style::CollectionMethods registers an offense for find_all with block registers an offense for detect with block accepts detect with more than 1 param accepts collect without a block accepts find_all without a block accepts member? without a block accepts detect without a block accepts inject with more than 1 param registers an offense for member? with block registers an offense for inject with block accepts inject without a block registers an offense for inject with proc param registers an offense for collect with block registers an offense for collect with proc param accepts find_all with more than 1 param accepts collect with more than 1 param registers an offense for detect with proc param registers an offense for find_all with proc param registers an offense for member? with proc param accepts member? with more than 1 param RuboCop::Cop::Layout::RescueEnsureAlignment accepts correctly aligned rescue in assigned begin-end block accepts the modifier form accepts correctly aligned rescue accepts correctly aligned ensure accepts end being misaligned accepts rescue and ensure on the same line allows inline expression before ensure registers an offense rescue registers an offense rescue with begin registers an offense as RHS of assignment accepts multi-line, aligned registers offense for incorrect alignment accepts multi-line, indented rescue with defs registers an offense rescue with def registers an offense allows inline access modifier with private_class_method modifier ensure with def registers an offense correct alignment rescue with defs correct alignment registers an offense rescue with def correct alignment registers an offense ensure with defs registers an offense correct alignment with public_class_method modifier ensure with def registers an offense correct alignment rescue with def correct alignment registers an offense ensure with defs registers an offense correct alignment rescue with defs registers an offense correct alignment with private modifier rescue with defs correct alignment registers an offense ensure with defs registers an offense correct alignment ensure with def correct alignment registers an offense rescue with def correct alignment registers an offense rescue with module registers an offense when rescue used with module ensure with class registers an offense excluded file processes excluded files with issue >= Ruby 2.5 accepts aligned rescue in do-end block assigned to instance variable accepts aligned rescue in do-end block on multi-assignment accepts aligned rescue in do-end block on and-assignment accepts aligned rescue in assigned do-end block starting on newline accepts aligned rescue do-end block assigned to local variable accepts aligned rescue in do-end block assigned to class accepts aligned rescue in do-end block assigned to class variable accepts aligned rescue in do-end block accepts aligned rescue in do-end block on operation assignment accepts aligned rescue in do-end block on or-assignment accepts aligned rescue in do-end block assigned to global variable accepts aligned rescue in do-end block in a method rescue in do-end block on multi-assignment registers an offense rescue in do-end block on or-assignment registers an offense rescue in do-end block on and-assignment registers an offense rescue in do-end block assigned to instance variable registers an offense rescue in do-end block assigned to class variable registers an offense rescue in do-end block assigned to local variable registers an offense rescue in assigned do-end block starting on newline registers an offense rescue in do-end block assigned to class registers an offense rescue in do-end block assigned to global variable registers an offense rescue with do-end block registers an offense rescue in do-end block on operation assignment registers an offense ensure with module registers an offense when ensure used with module ensure with begin registers an offense when ensure used with begin ensure with defs registers an offense ensure with def registers an offense rescue with class registers an offense when rescue used with class RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands does not register an offense when using binary operator with different operands registers an offense when binary operator has identical nodes does not register an offense when using arithmetic operator with numerics RuboCop::Cop::Style::IdenticalConditionalBranches on case without else doesn't register an offense on if..else with identical trailing lines registers an offense with empty brace does not raise any error on case with empty when doesn't register an offense on case with identical bodies registers an offense on if..elsif with no else doesn't register an offense on case with identical trailing lines registers an offense on case with identical leading lines registers an offense on if..else with identical leading lines registers an offense when one of the case branches is empty does not register an offense on if..else with identical bodies registers an offense on if..else with slightly different trailing lines doesn't register an offense RuboCop::Cop::Layout::SpaceAfterComma array index commas without space behaves like ends with an item does auto-correction registers an offense behaves like trailing comma accepts the last comma method call arg commas without space behaves like ends with an item does auto-correction registers an offense inside hash braces when EnforcedStyle for SpaceInsideBlockBraces is no_space accepts no space between a comma and a closing brace behaves like common behavior accepts a space between a comma and a closing brace when EnforcedStyle for SpaceInsideBlockBraces is space registers an offense for no space between a comma and a closing brace behaves like common behavior accepts a space between a comma and a closing brace block argument commas without space behaves like ends with an item does auto-correction registers an offense behaves like trailing comma accepts the last comma RuboCop::Cop::Lint::AmbiguousRegexpLiteral with a regexp literal in the first argument without parentheses registers an offense and corrects when multiple arguments registers an offense and corrects when single argument registers an offense and corrects when using block argument registers an offense and corrects when nesting with parentheses accepts RuboCop::Cop::Lint::ImplicitStringConcatenation when the string literals contain newlines registers an offense does not register an offense for a single string on adjacent string literals on the same line registers an offense when in a method call's argument list notes that the strings could be separated by a comma instead on a string with interpolations does register an offense on a single string literal does not register an offense on adjacent string literals on different lines does not register an offense when inside an array notes that the strings could be separated by a comma instead RuboCop::Cop::Lint::DuplicateMethods doesn't register an offense for alias for gvar in module registers an offense for duplicate attr_reader in class registers an offense for duplicate attr_reader in dynamic class accepts for non-duplicate alias_method in dynamic module accepts for non-duplicate alias_method in class doesn't register an offense for non-duplicate alias in class_eval block understands class << self registers an offense for duplicate alias in class registers an offense for duplicate alias_method in dynamic class understands nested modules registers an offense for duplicate private self methods in dynamic module accepts for attr_writer and getter in class_eval block understands class << self accepts for non-duplicate alias_method in dynamic class doesn't register an offense for non-duplicate method in dynamic class registers an offense for a duplicate instance method in separate class_eval block blocks registers an offense for duplicate methods at top level registers an offense for duplicate private methods in class_eval block registers offenses for duplicate attr_accessor in dynamic module doesn't register offense for non-duplicate class methods in module recognizes difference between instance and class methods in dynamic module registers offenses for duplicate attr_accessor in module doesn't register an offense for alias for gvar in dynamic class registers offenses for duplicate assignable attr in class registers an offense for duplicate alias_method in class_eval block registers an offense for duplicate method in dynamic module registers an offense when class << exp is used (PENDING: No reason given) registers an offense for duplicate private self methods in dynamic class registers 2 offenses for pair of duplicate methods in class registers offenses for duplicate assignable attr in module registers 2 offenses for pair of duplicate methods in module registers an offense for duplicate protected methods in class registers 2 offenses for pair of duplicate methods in dynamic module registers offense for a duplicate instance method in separate files doesn't register an offense for non-duplicate method in dynamic module doesn't register an offense for different private methods in dynamic module registers an offense for duplicate attr_writer in class_eval block registers an offense for duplicate attr in dynamic module accepts for attr_writer and getter in class understands nested modules registers an offense for duplicate attr_reader in dynamic module registers 2 offenses for pair of duplicate methods in dynamic class registers offense for a duplicate instance method in separate files recognizes difference between instance and class methods in module doesn't register an offense for non-duplicate method in module registers an offense for duplicate attr in dynamic class registers an offense for duplicate attr in module registers an offense for a duplicate instance method in separate module blocks accepts for attr_reader and setter in dynamic class registers offenses for duplicate attr_accessor in dynamic class doesn't register offense for non-duplicate class methods in dynamic module registers offenses for duplicate attr_accessor in class_eval block registers an offense for duplicate attr_reader in class_eval block doesn't register offense for non-duplicate class methods in class registers 2 offenses for pair of duplicate methods in class_eval block ignores Class.new blocks which are assigned to local variables registers an offense for duplicate attr in class_eval block registers an offense for duplicate attr in class accepts for non-duplicate alias_method in class_eval block accepts for attr_reader and setter in class registers an offense for a duplicate instance method in separate dynamic class blocks registers an offense for a duplicate class method in separate class_eval block blocks doesn't register an offense for alias for gvar in class registers offenses for duplicate assignable attr in dynamic class handles class_eval with implicit receiver registers an offense for duplicate alias in dynamic module registers an offense for a duplicate class method in separate class blocks registers an offense for duplicate class methods in dynamic module registers an offense for duplicate private methods in dynamic class registers an offense for duplicate method in module registers an offense for duplicate attr_writer in module registers an offense for duplicate attr_writer in dynamic module understands nested modules registers offenses for duplicate assignable attr in dynamic module understands class << A registers an offense when class << exp is used (PENDING: No reason given) registers an offense when class << exp is used (PENDING: No reason given) accepts for attr_writer and getter in module understands class << self doesn't register an offense for non-duplicate alias in dynamic class doesn't register an offense for alias for gvar in class_eval block registers an offense for duplicate private methods in class registers an offense for duplicate attr_writer in dynamic class registers an offense for duplicate private self methods in class doesn't register an offense for non-duplicate alias in class registers an offense for duplicate method in dynamic class registers an offense for duplicate method in class accepts for non-duplicate alias_method in module recognizes difference between instance and class methods in class accepts for attr_reader and setter in dynamic module doesn't register an offense for non-duplicate alias in dynamic module registers an offense for duplicate private methods in module registers an offense for duplicate alias in module doesn't register an offense for non-duplicate method in class_eval block doesn't register an offense for different private methods in class registers an offense for duplicate alias_method in module registers an offense for duplicate protected methods in class_eval block doesn't register an offense for alias for gvar in dynamic module registers offenses for duplicate attr_accessor in class registers an offense for duplicate class methods with named receiver in class registers an offense for a duplicate instance method in separate class blocks doesn't register an offense for non-duplicate alias in module registers an offense for duplicate class methods in class_eval block registers offense for a duplicate instance method in separate files registers an offense for duplicate alias in dynamic class registers an offense when class << exp is used (PENDING: No reason given) registers an offense for duplicate alias_method in dynamic module registers an offense for duplicate class methods with named receiver in module doesn't register an offense for non-duplicate method in class understands nested modules registers an offense for duplicate alias_method in class registers an offense for duplicate class methods with `self` and named receiver in class recognizes difference between instance and class methods in dynamic class registers an offense for duplicate class methods with `self` and named receiver in module registers an offense for duplicate class methods in class registers an offense for duplicate class methods in module registers an offense for a duplicate class method in separate dynamic class blocks registers an offense for duplicate private methods in dynamic module registers an offense for a duplicate class method in separate module blocks registers an offense for duplicate private self methods in module registers offenses for duplicate assignable attr in class_eval block doesn't register offense for non-duplicate class methods in dynamic class doesn't register an offense for different private methods in class_eval block registers an offense for a duplicate class method in separate dynamic module blocks recognizes difference between instance and class methods in class_eval block registers an offense for duplicate method in class_eval block accepts for attr_writer and getter in dynamic class accepts for attr_reader and setter in class_eval block understands class << self registers an offense when class << exp is used (PENDING: No reason given) registers offense for a duplicate instance method in separate files ignores method definitions in RSpec `describe` blocks registers an offense for duplicate attr_writer in class accepts for attr_reader and setter in module doesn't register offense for non-duplicate class methods in class_eval block doesn't register an offense for different private methods in dynamic class registers an offense for duplicate alias in class_eval block registers an offense for duplicate class methods with `<<` and named receiver in module registers an offense for duplicate private self methods in class_eval block registers an offense for duplicate class methods in dynamic class registers an offense for duplicate class methods with `<<` and named receiver in class understands class << self registers an offense for a duplicate instance method in separate dynamic module blocks registers an offense for duplicate protected methods in module registers offense for a duplicate instance method in separate files registers an offense for duplicate protected methods in dynamic class registers an offense for duplicate protected methods in dynamic module accepts for attr_writer and getter in dynamic module registers an offense for duplicate attr_reader in module understands nested modules doesn't register an offense for different private methods in module when path is in the project root adds a message with relative path when path is not in the project root adds a message with absolute path RuboCop::Runner #run if there are no offenses in inspected files returns true if -s/--stdin is used with an offense returns false sends the offense to a formatter if a cop crashes does not call ResultCache#save if there is an offense in an inspected file sends the offense to a formatter returns false #run when interrupted with SIGINT returns false #run with cops autocorrecting each-other if there is an offense in an inspected file aborts because of an infinite loop RuboCop::Cop::Force #run_hook invokes a hook in all cops .force_name returns the class name without namespace RuboCop::Cop::Bundler::OrderedGems When a gem declaration takes several lines registers an offense When a gem that starts with a capital letter is not sorted registers an offense when a gem is referenced from a variable ignores the line resets the sorting to a new block When gems have an inline comment, and not sorted registers an offense When gem groups is separated by multiline comment with TreatCommentsAsGroupSeparators: true accepts with TreatCommentsAsGroupSeparators: false registers an offense When a gem is sorted but not so when disregarding _- by default registers an offense when ConsiderPunctuation is true does not register an offense When each individual group of line is sorted does not register any offenses When the gemfile is empty does not register any offenses When gems are alphabetically sorted does not register any offenses When each individual group of line is not sorted registers some offenses When gems are asciibetically sorted irrespective of _ does not register an offense When gems are not alphabetically sorted registers an offense When a gem that starts with a capital letter is sorted does not register an offense When there are duplicated gems in group registers an offense RuboCop::Cop::Layout::SpaceInsideStringInterpolation when EnforcedStyle is no_space does not touch spaces inside the interpolated expression accepts empty interpolation for "space" style formatted string interpolations registers offenses and autocorrects for well-formatted string interpolations accepts excess literal spacing when interpolation starts or ends with a line break does not register an offense ignores comments and whitespace when looking for line breaks for ill-formatted string interpolations finds interpolations in string-like contexts registers offenses and autocorrects when EnforcedStyle is space accepts empty interpolation for "no_space" style formatted string interpolations registers offenses and autocorrects for ill-formatted string interpolations registers offenses and autocorrects for well-formatted string interpolations does not register an offense for excess literal spacing RuboCop::Formatter::EmacsStyleFormatter #file_finished displays parsable text when the offense is marked as todo prints [Todo] along with message when the offense is automatically corrected prints [Corrected] along with message when the offense message contains a newline strips newlines out of the error message #finished does not report summary RuboCop::Cop::Layout::SpaceAroundOperators accepts [] without space accepts an operator at the beginning of a line registers an offense and corrects exclamation point negation accepts ranges accepts the result of the ExtraSpacing Cop accepts rational accepts exponent operator without spaces accepts an operator called with method syntax accepts splat operator accepts operator symbols accepts ::Kernel::raise accepts an assignment by `for` statement accepts an operator at the end of a line accepts operators with spaces accepts an assignment followed by newline accepts operator surrounded by tabs accepts scope operator accepts some operators that are exceptions & don't need spaces accepts an assignment with spaces accepts exclamation point definition accepts unary operators without space registers an offenses for exponent operator with spaces accepts def of operator accepts the construct class <= Ruby 2.5 ensure/rescue/else in Block Argument accepts a correctly aligned else registers an offense for misaligned else with unless registers an offense for misaligned else accepts an empty unless accepts a correctly aligned else in an otherwise empty unless with def/defs accepts an empty defs body accepts an empty def body when modifier and def are on the same line registers an offense for else not aligned with private accepts a correctly aligned body with def/rescue/else/ensure/end registers an offense for misaligned else accepts a correctly aligned else with case accepts case without else registers an offense for misaligned else accepts correctly aligned case/when/else accepts else aligned with when but not with case >= Ruby 2.7 with case match accepts case match without else registers an offense for misaligned else accepts correctly aligned empty else accepts correctly aligned case/when/else with if statement registers an offense for misaligned else registers an offense for misaligned elsif accepts a correctly aligned if/elsif/else/end accepts a one line if statement accepts an if/else branches with rescue clauses accepts indentation after else when if is on new line after assignment for a file with byte order mark accepts a correctly aligned if/elsif/else/end with assignment when alignment style is keyword by choice and end is aligned with keyword accepts a while in assignment accepts an if/else in assignment accepts an if/else in assignment on next line accepts an if in assignment accepts an until in assignment and end is aligned with variable registers an offense for an if when alignment style is variable and end is aligned with keyword registers offenses for an if with setter registers an offense for an if registers an offense for an if with element assignment and end is aligned with variable accepts an if with end aligned with element assignment accepts an if/else with chaining with a block after the end accepts an if/else with chaining after the end accepts an if/else accepts an if-else with end aligned with setter accepts an if-elsif-else with end aligned with setter with begin/rescue/else/ensure/end registers an offense for misaligned else accepts a correctly aligned else RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout ignores implicit defs ignores defs without params ignores single-line defs symmetrical style opening brace on same line as first element autocorrects closing brace on different line from last element allows closing brace on same line as last element allows closing brace on same line as last multiline element detects closing brace on different line from last element opening brace on separate line from first element allows closing brace on separate line from last multiline element detects closing brace on same line as last element allows closing brace on separate line from last element autocorrects closing brace on same line from last element same_line style opening brace on separate line from first element autocorrects closing brace on different line from last element allows closing brace on same line as last multiline element allows closing brace on same line as last element detects closing brace on different line from last element opening brace on same line as first element allows closing brace on same line as multi-line element detects closing brace on different line from last element detects closing brace on different line from multiline element allows closing brace on same line from last element autocorrects closing brace on different line as last element heredoc detects heredoc structures that are safe to add to auto-corrects safe heredoc offenses ignores heredocs that could share a last line new_line style opening brace on separate line from first element detects closing brace on same line as last element autocorrects closing brace on same line from last element allows closing brace on separate line from last element allows closing brace on separate line from last multiline element opening brace on same line as first element allows closing brace on different line from last element allows closing brace on different line from multi-line element detects closing brace on same line as last element detects closing brace on same line as last multiline element autocorrects closing brace on same line as last element RuboCop::ConfigStore .for always uses config specified in command line when no config specified in command line searches for config path if not available in cache gets config path and config from cache if available when --force-default-config option is specified uses default config without searching for config path RuboCop::Cop::Style::EmptyCaseCondition given a case statement with an empty case with a single when branch and an else behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with when branches using then behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when used as an argument of a method without comment behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects with a single when branch and no else behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when used as an argument of a method with comment behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when using `return` in `when` clause and assigning the return value of `case` does not register an offense with first when branch including comma-delimited alternatives behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when using `return ... if` in `when` clause and assigning the return value of `case` does not register an offense with multiple when branches and no else behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with multiple when branches and an else behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when using `return` in `else` clause and assigning the return value of `case` does not register an offense with multiple when branches and an `else` with code comments behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case when using `return ... if` in `else` clause and assigning the return value of `case` does not register an offense with a when branch including comma-delimited alternatives behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects RuboCop::Cop::Offense has a few required attributes overrides #to_s is frozen does not blow up if a message contains % redefines == to compare offenses based on their contents when unknown severity is passed raises error offenses that span part of a line highlights the first line offenses that span multiple lines highlights the first line #location is frozen #cop_name is frozen #severity_level when severity is :fatal is 5 when severity is :refactor is 1 #severity is frozen #message is frozen #<=> when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} returns 1 when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} returns 1 when receiver has {:cop=>"B"} and other has {:cop=>"A"} returns 1 when receiver has {:line=>6} and other has {:line=>5} returns 1 when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} returns 1 when receiver has {} and other has {} returns 0 when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} returns 1 RuboCop::Cop::Metrics::PerceivedComplexity when method is in list of ignored methods does not register an offense when defining a class method does not register an offense when defining an instance method does not register an offense when using `define_method` when Max is 2 counts stupid nested if and else blocks when Max is 1 registers an offense for && registers an offense for an unless modifier registers an offense for a `define_method` registers an offense for a while block counts known iterating block accepts a method with no decision points registers an offense for a ternary operator registers an offense for an until block registers an offense for a case/when block without an expression after case counts else in a case with no argument accepts an empty `define_method` registers an offense for || registers an offense for a rescue block accepts an empty method registers an offense for an if modifier accepts complex code outside of methods counts only a single method registers an offense for and registers an offense for a case/when block registers an offense for a for block registers an offense for elsif and else blocks registers an offense for or does not count unknown block calls deals with nested if blocks containing && and || RuboCop::Cop::Layout::AccessModifierIndentation when EnforcedStyle is set to outdent accepts private with argument indented to method depth in a module accepts private def indented to method depth in a module accepts private indented to the containing class indent level registers offense and corrects private indented to method depth in a class registers an offense and corrects module_function indented to method depth in a module registers an offense and corrects private indented to method depth in singleton class accepts module fn def indented to method depth in a module accepts private with argument indented to method depth in class defined with Class.new accepts private def indented to method depth in module defined with Module.new accepts private def indented to method depth in a class accepts private with argument indented to method depth in a class accepts private with argument indented to method depth in module defined with Module.new accepts private def indented to method depth in singleton class registers an offense and corrects private indented to method depth in a module registers an offense and corrects private indented to method depth in class defined with Class.new accepts private with argument indented to method depth in singleton class accepts module fn with argument indented to method depth in a module accepts protected indented to the containing class indent level registers an offense and corrects private indented to method depth in module defined with Module.new accepts private def indented to method depth in class defined with Class.new registers an offense and corrects misaligned access modifiers in nested classes when EnforcedStyle is set to indent accepts properly indented private registers an offense and corrects misaligned private registers an offense and corrects misaligned access modifiers in nested classes registers an offense and corrects misaligned private in module defined with Module.new accepts properly indented private in module defined with Module.new registers an offense and corrects misaligned private in class defined with Class.new registers an offense and corrects misaligned private in module registers an offense and corrects misaligned private in a singleton class registers an offense and corrects opposite + correct alignment accepts an empty class accepts methods with a body registers an offense and corrects misaligned module_function in module accepts indented access modifiers with arguments in nested classes registers an offense and corrects correct + opposite alignment accepts properly indented protected registers an offense and corrects misaligned protected registers an offense and corrects access modifiers in arbitrary blocks (PENDING: Failing in Debian - needs investigation) when indentation width is overridden for this cop only accepts properly indented private when 4 spaces per indent level are used accepts properly indented private RuboCop::Cop::Style::MultilineIfThen does not get confused by a then in a when does not get confused by empty elsif branch does not get confused by a nested postfix unless registers an offense for then in multiline if registers an offense for then in multiline unless does not raise an error for an implicit match if accepts table style if/then/elsif/ends registers an offense for then in multiline elsif does not get confused by a postfix unless does not raise an error for an implicit match unless does not get confused by a commented-out then RuboCop::Cop::Style::EndBlock reports an offense and corrects END block does not report offenses for other blocks RuboCop::Cop::Style::RedundantFileExtensionInRequire does not register an offense when requiring filename without an extension registers an offense and corrects when requiring filename ending with `.rb` does not register an offense when requiring variable as a filename does not register an offense when requiring filename ending with `.so` RuboCop::Cop::Style::PercentQLiterals when EnforcedStyle is lower_case_q with interpolation accepts %Q accepts %q accepts single quotes accepts double quotes without interpolation accepts double quotes accepts single quotes accepts %q registers offense for %Q with special characters accepts %q accepts %Q when EnforcedStyle is upper_case_q with interpolation accepts %Q accepts single quotes accepts %q accepts double quotes without interpolation accepts %Q accepts double quotes registers offense for %q accepts single quotes with special characters accepts %Q accepts %q RuboCop::Cop::Style::ModuleFunction when enforced style is `extend_self` accepts module_function with an argument registers an offense for `module_function` without an argument when enforced style is `forbidden` registers an offense for `module_function` without an argument accepts `extend self` in a class registers an offense for `extend self` in a module with private methods in a module in a module with declarative private when enforced style is `module_function` accepts `extend self` in a class accepts for `extend self` in a module with declarative private accepts for `extend self` in a module with private methods registers an offense for `extend self` in a module RuboCop::Cop::Style::TrivialAccessors accepts reader nested within a module accepts writer nested within an instance_eval call registers an offense on instance reader accepts writer with different ivar name accepts writer nested within a module registers an offense on reader with `private` accepts splats accepts blocks registers an offense on writer without braces registers an offense on DSL-style trivial writer registers an offense on class reader registers an offense on one-liner writer registers an offense on class writer accepts writer in a module registers an offense on reader with braces accepts reader with different ivar name accepts expressions within reader accepts non-trivial reader accepts non-trivial writer accepts writer using top level registers an offense on one-liner reader registers an offense on instance writer accepts reader using top level accepts an initialize method looking like a writer accepts expressions within writer flags a reader inside a class, inside an instance_eval call accepts reader nested within an instance_eval calll disallow predicates does not accept predicate-like reader allow predicates accepts predicate-like reader with DSL allowed accepts DSL-style writer with allowed methods accepts allowed writer accepts allowed reader with AllowPredicates: false accepts allowed predicate exact name match disabled registers an offense when names mismatch in reader registers an offense when names mismatch in writer ignore class methods accepts class writer accepts class reader RuboCop::Cop::InternalAffairs::RedundantLocationArgument when location argument is not passed does not register an offense when location argument is passed when location argument does not equal to :expression does not register an offense when location argument is :expression removes default `location` surrounded by other keywords removes default `location` when preceded by another keyword registers an offense when there is a message argument registers an offense RuboCop::Cop::Layout::FirstMethodArgumentLineBreak ignores arguments listed on a single line ignores methods without arguments ignores arguments without parens registers an offense and corrects hash arg spanning multiple lines registers an offense and corrects hash arg without a line break before the first pair ignores kwargs listed on a single line when the arguments are used in `super` args listed on the first line registers an offense and corrects using `super` registers an offense and corrects registers an offense and corrects using safe navigation operator RuboCop::Cop::Style::PerlBackrefs auto-corrects #$1 to #{Regexp.last_match(1)} registers an offense for $1 registers an offense for $9 RuboCop::Cop::Style::EvalWithLocation registers an offense when using `#eval` with `binding` only registers an offense when using `#class_eval` with an incorrect lineno registers an offense when using `#instance_eval` without any arguments registers an offense when using `#eval` without lineno accepts `eval` with a code that is a variable accepts `eval` with a string, a filename and `__LINE__` on a new line registers an offense when using `#eval` with a string on a new line registers an offense when using `#eval` with a heredoc and an incorrect line number registers an offense when using `#module_eval` without any arguments accepts `eval` with a string, a filename and `__LINE__` registers an offense when using `#eval` without any arguments accepts `eval` with a heredoc, a filename and `__LINE__ + 1` registers an offense when using `#eval` with an incorrect line number registers an offense when using `#class_eval` without any arguments RuboCop::Cop::Layout::HeredocIndentation quoted by " does not register an offense when not indented but with whitespace, with `-` registers an offense for first line minus-level indented, with `-` registers an offense for too deep indented registers an offense for minus level indented displays message to use `<<~` instead of `<<` registers an offense for not indented, without `~` accepts for indented, with `~` accepts for an empty line registers an offense for too deep indented with empty line registers an offense for not indented, with `~` accepts for indented, but with `-` accepts for include empty lines registers an offense for not indented registers an offense for not indented enough with empty line displays message to use `<<~` instead of `<<-` registers an offense for too deep indented with whitespace line accepts for indented, but without `~` accepts for not indented but with whitespace registers an offense for not indented enough with whitespace line when Layout/LineLength is configured accepts for long heredoc quoted by ` registers an offense for first line minus-level indented, with `-` accepts for include empty lines does not register an offense when not indented but with whitespace, with `-` registers an offense for minus level indented displays message to use `<<~` instead of `<<-` registers an offense for not indented enough with empty line registers an offense for not indented, with `~` registers an offense for too deep indented with empty line registers an offense for not indented enough with whitespace line registers an offense for too deep indented accepts for indented, but with `-` accepts for not indented but with whitespace registers an offense for not indented accepts for indented, with `~` registers an offense for too deep indented with whitespace line registers an offense for not indented, without `~` accepts for an empty line accepts for indented, but without `~` displays message to use `<<~` instead of `<<` when Layout/LineLength is configured accepts for long heredoc quoted by ' registers an offense for not indented enough with empty line displays message to use `<<~` instead of `<<` registers an offense for not indented, without `~` accepts for indented, but with `-` accepts for indented, with `~` registers an offense for too deep indented with whitespace line registers an offense for not indented, with `~` registers an offense for not indented registers an offense for not indented enough with whitespace line accepts for an empty line registers an offense for too deep indented does not register an offense when not indented but with whitespace, with `-` accepts for not indented but with whitespace registers an offense for minus level indented accepts for include empty lines accepts for indented, but without `~` registers an offense for first line minus-level indented, with `-` displays message to use `<<~` instead of `<<-` registers an offense for too deep indented with empty line when Layout/LineLength is configured accepts for long heredoc quoted by accepts for indented, but without `~` accepts for indented, with `~` accepts for include empty lines accepts for an empty line registers an offense for minus level indented registers an offense for first line minus-level indented, with `-` registers an offense for not indented enough with empty line does not register an offense when not indented but with whitespace, with `-` registers an offense for too deep indented with whitespace line registers an offense for too deep indented with empty line registers an offense for too deep indented registers an offense for not indented, without `~` displays message to use `<<~` instead of `<<-` accepts for not indented but with whitespace accepts for indented, but with `-` registers an offense for not indented registers an offense for not indented enough with whitespace line registers an offense for not indented, with `~` displays message to use `<<~` instead of `<<` when Layout/LineLength is configured accepts for long heredoc RuboCop::Cop::Style::MultilineWhenThen does not register an offense for hash when statement with then does not register an offense for array when statement with then doesn't register an offense for singleline when statement with then doesn't register an offense when `then` required for a body of `when` is used doesn't register an offense for multiline when statementwith then followed by other lines registers an offense for multiline when statement with then doesn't register an offense for empty when statement without then registers an offense for empty when statement with then autocorrects when the body of `when` branch starts with `then` doesn't register an offense for multiline when statement without then RuboCop::Cop::Lint::RedundantSplatExpansion allows an array using a constructor allows assigning to an expanded range allows assigning to a splat allows splat expansion inside of an array allows expansions of an array that is assigned to a variable in rescue accepts expanding a variable as a method parameter allows assigning to a splat variable registers an offense and corrects an array literal being expanded in a rescue allows expanding a method call on an array literal allows assigning a variable to a splat expansion of a variable assignment to splat expansion registers an offense and corrects an array using a constructor registers and corrects an array using top-level const behaves like splat expansion method parameters registers an offense and converts to an array behaves like splat literal assignment registers an offense and converts to an array behaves like array splat expansion behaves like splat literal assignment registers an offense and removes the splat from array method parameters registers an offense and converts to a list of arguments behaves like splat expansion behaves like splat literal assignment registers an offense and converts to an array method parameters registers an offense and converts to an array behaves like array splat expansion behaves like splat literal assignment registers an offense and removes the splat from array method parameters registers an offense and converts to a list of arguments expanding Array.new call on array literal when the array literal contains more than one element accepts with ::Array.new when the array literal contains exactly one element registers an offense and corrects when the array literal contains exactly one element registers an offense and corrects arrays being expanded with %i variants using splat expansion splat expansion of method parameters registers an offense and corrects an array literal %I registers an offense and corrects an array literal %i splat expansion inside of an array registers an offense and changes %I to a list of symbols registers an offense and corrects %i to a list of symbols behaves like array splat expansion behaves like splat literal assignment registers an offense and removes the splat from array method parameters registers an offense and converts to a list of arguments splat expansion inside of an array registers an offense and corrects the expansion of an array literalinside of an array literal registers an offense and corrects expansion of %W to a list of words registers an offense and corrects expansion of %w to a list of words expanding an array literal in a when condition allows an array that is assigned to a variable registers an offense and corrects an array using [] registers an offense and corrects %I to a list of symbols registers an offense and corrects an array using %w registers an offense and corrects an array using %W registers an offense and corrects %i to a list of symbols allows an array using a constructor behaves like array splat expansion method parameters registers an offense and converts to a list of arguments behaves like splat literal assignment registers an offense and removes the splat from array behaves like splat expansion behaves like splat literal assignment registers an offense and converts to an array method parameters registers an offense and converts to an array behaves like array splat expansion behaves like splat literal assignment registers an offense and removes the splat from array method parameters registers an offense and converts to a list of arguments behaves like splat expansion method parameters registers an offense and converts to an array behaves like splat literal assignment registers an offense and converts to an array RuboCop::Runner how formatter is invoked #started sends all file paths the passed files paths is frozen #file_finished sends an array of detected offenses for the file sends a file path the passed path is frozen #finished when RuboCop finished inspecting all files normally sends all file paths the passed files paths is frozen when RuboCop is interrupted by user sends only processed file paths #file_started sends file specific information hash sends a file path the passed path is frozen invocation order is called in the proper sequence RuboCop::Cop::Style::MixinGrouping when configured with separated style when using `extend` registers an offense for several mixins in one call when using `prepend` registers an offense for several mixins in one call when using a mix of diffent methods registers an offense for some calls having several mixins when using `include` allows include call as an argument to another method registers an offense for several mixins in separate calls registers an offense for several mixins in one call when configured with grouped style when using include allows include with an explicit receiver registers an offense for several mixins in separate calls registers an offense for single mixins in separate calls when using a mix of diffent methods allows all different mixin methods registers an offense with some duplicated mixin methods when using `prepend` registers an offense for single mixins in separate calls, interspersed registers an offense when other mixins have receivers registers an offense for single mixins in separate calls when using `extend` registers an offense for single mixins in separate calls RuboCop::Cop::Layout::SpaceBeforeComma handles more than one space before a comma registers an offense and corrects block argument with space before comma registers an offense and corrects array index with space before comma registers an offense and corrects method call arg with space before comma does not register an offense for no spaces before comma RuboCop::ResultCache #save when the default internal encoding is UTF-8 writes non UTF-8 encodable data to file with no exception when the @path is not writable behaves like invalid cache location doesn't raise an exception behaves like invalid cache location doesn't raise an exception .cleanup removes the oldest files in the cache if needed cached result that was saved with no command line option when --format is given is valid and can be loaded when offenses are saved by autocorrect run serializes them with :uncorrected status when no option is given is valid and can be loaded when file contents have changed is invalid when team external_dependency_checksum is the same is valid when file permission have changed is invalid when end of line characters have changed is invalid when a symlink is present in the cache location and symlink attack protection is enabled prevents caching and prints a warning and symlink attack protection is disabled permits caching and prints no warning when team external_dependency_checksum changes is invalid when a cache source is read has utf8 encoding when --only is given is invalid when --display-cop-names is given is invalid the cache path when CacheRootDirectory is set contains the given root when CacheRootDirectory not set and XDG_CACHE_HOME is not set contains $HOME/.cache and XDG_CACHE_HOME is set contains the given path and UID RuboCop::Cop::Style::NumericLiteralPrefix hex literals does not register offense for lowercase prefix registers an offense for uppercase prefix octal literals when config is zero_with_o registers an offense for prefixes `0` and `0O` does not register offense for lowercase prefix when config is zero_only does not register offense for prefix `0` registers an offense for prefix `0O` and `0o` binary literals does not register offense for lowercase prefix registers an offense for uppercase prefix decimal literals does not register offense for no prefix registers an offense for prefixes RuboCop::Cop::Style::MethodCalledOnDoEndBlock with a multi-line do..end block accepts it if there is no chained call registers an offense for a chained call accepts a chained block when using safe navigation operator registers an offense for a chained call with a single-line do..end block accepts a single-line do..end block with a chained block registers an offense for a chained call with a {} block accepts a multi-line block with a chained call accepts a single-line block with a chained call RuboCop::Cop::Style::BisectedAttrAccessor registers an offense and corrects when both accessors are in the same visibility scope registers an offense and corrects when both accessors of the splat exists registers an offense and corrects when both accessors of the name exists and accessor contains multiple names does not register an offense when using `attr_accessor` does not register an offense when only one accessor of the name exists registers an offense and corrects when attr and attr_writer exists registers an offense and corrects when both accessors of the name exists does not register an offense when accessors are withing different visibility scopes registers an offense and corrects when withing eigenclass RuboCop::Cop::Style::MinMax with an array literal containing calls to `#min` and `#max` when the expression stands alone does not register an offense if there are additional elements registers an offense if the receivers match does not register an offense if the receiver is implicit does not register an offense if the receivers do not match when the expression is used in a parallel assignment does not register an offense if the receiver is implicit registers an offense if the receivers match does not register an offense if there are additional elements does not register an offense if the receivers do not match when the expression is used as a return value does not register an offense if there are additional elements registers an offense if the receivers match does not register an offense if the receivers do not match does not register an offense if the receiver is implicit RuboCop::Cop::Layout::EmptyLinesAroundArguments when no extra lines accepts method with argument that trails off block accepts method with no arguments that trails off block accepts method with argument that trails off heredoc accpets one line methods accepts block argument with empty line accepts multiple listed mixed args accepts listed args starting on definition line with multiple arguments ignores empty lines inside of method arguments with one argument ignores empty lines inside of method arguments when extra lines registers and autocorrects offense for empty line before arg registers autocorrects empty line whetn args start on definition line registers and autocorrects offense for empty line between args registers and autocorrects offense when empty line between normal arg & block arg registers and autocorrects offense on correct lines for multi-offense example registers and autocorrects offense for empty line after arg registers and autocorrects offense when args start on definition line registers and autocorrects offenses when multiple empty lines are detected registers and autocorrects offense on correct line for single offense example when using safe navigation operator registers and autocorrects offense for empty line before arg RuboCop::PathUtil #absolute? returns a truthy value for a path beginning with slash returns a falsey value for a path beginning with a directory name #match_path? does not match file in a subdirectory matches dir/** for hidden file does not match dir/** for file in hidden dir does not match invalid UTF-8 paths matches regexps matches glob expressions matches strings to the full path #relative_path supports custom base paths builds paths relative to PWD by default as a stop-gap RuboCop::Cop::Naming::BlockParameterName does not register for brace block without parameters does not register offense for valid parameter names registers offense when param contains uppercase characters registers offense when param ends in number does not register for block without parameters can register multiple offenses in one block registers offense when param is less than minimum length with AllowedNames accepts specified block param names registers unlisted offensive names with ForbiddenNames accepts param that uses a forbidden name's letters registers offense for param listed as forbidden with AllowNamesEndingInNumbers accept params that end in numbers RuboCop::Cop::Style::CaseLikeIf registers an offense and corrects when using `match?` with non regexp in other branches except first does not register an offense when using `match?` without a receiver does not register an offense when using `==` with method call with arguments does not register an offense when not all conditions contain target registers an offense and corrects when using `match?` with regexp registers an offense and corrects when using `||` within conditions registers an offense and corrects when target is a method call does not register an offense when only single `if` registers an offense and corrects when using `==` with literal registers an offense and corrects when using nested conditions with `||` does not register an offense when using `==` with class reference registers an offense and corrects when using `=~` does not register an offense when using `==` with constant containing 1 letter in name does not register an offense when using ternary operator registers an offense and corrects when using `===` does not register an offense when using `unless` does not register an offense when only `if-else` does not register an offense when one of `||` subconditions is not convertible does not register an offense when using `=~` in first branch with non regexp does not register an offense when using modifier `if` registers an offense and corrects when using `include?` with range registers an offense and corrects when using `==` with constant does not register an offense when using `match?` with non regexp does not register an offense when using `match?` in first branch with non regexp does not register an offense when using `equal?` without a receiver registers an offense and corrects when using `is_a?` RuboCop::Cop::Lint::FloatComparison registers an offense when comparing with float method that can return numeric and returns float registers an offense when comparing with float does not register an offense when comparing with float method that can return numeric and returns integer registers an offense when comparing with arightmetic operator on floats does not register an offense when comparing with float using epsilon registers an offense when comparing with method on float receiver registers an offense when comparing with float returning method RuboCop::Cop::Registry exposes cop departments exposes a mapping of cop names to cop classes can filter down to all but one type exposes a list of cop names can be cloned exposes the number of stored cops can filter down to one type #qualified_cop_name returns the provided name if no namespace is found gives back already properly qualified names qualifies names without a namespace raises an error when a cop name is ambiguous emits a warning when namespace is incorrect qualifies names with the correct namespace #contains_cop_matching? returns false for cops not included in the store can find cops matching a given name when dismissing a cop class allows it if done rapidly disallows it if done too late allows re-listing #enabled selects cops which are enabled in the config overrides config if :only includes the cop selects only safe cops if :safe passed when new cops are introduced does not include them overrides config if :only includes the cop when specifying `NewCops: pending` option in .rubocop.yml does not include them when specifying `NewCops: disable` option in .rubocop.yml does not include them when specifying `NewCops: enable` option in .rubocop.yml includes them when specifying `--enable-pending-cops` command-line option includes them when specifying `NewCops: disable` option in .rubocop.yml includes them because command-line option takes precedence over .rubocop.yml when specifying `--disable-pending-cops` command-line option does not include them when specifying `NewCops: enable` option in .rubocop.yml does not include them because command-line option takes precedence over .rubocop.yml #cops exposes a list of cops RuboCop::Cop::Layout::MultilineHashBraceLayout ignores single-line hashes ignores empty hashes ignores implicit hashes behaves like multiline literal brace layout trailing comma symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element behaves like multiline literal brace layout method argument when arguments to a method and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element but no comment after the last element autocorrects the closing brace behaves like multiline literal brace layout heredoc ignores heredocs that could share a last line detects heredoc structures that are safe to add to auto-corrects safe heredoc offenses new_line style opening brace on separate line from first element allows closing brace on separate line from last element detects closing brace on same line as last element autocorrects closing brace on same line from last element allows closing brace on separate line from last multiline element opening brace on same line as first element autocorrects closing brace on same line as last element allows closing brace on different line from last element allows closing brace on different line from multi-line element detects closing brace on same line as last multiline element detects closing brace on same line as last element symmetrical style opening brace on same line as first element allows closing brace on same line as last multiline element detects closing brace on different line from last element allows closing brace on same line as last element autocorrects closing brace on different line from last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element allows closing brace on separate line from last multiline element detects closing brace on same line as last element allows closing brace on separate line from last element autocorrects closing brace on same line from last element same_line style opening brace on same line as first element detects closing brace on different line from multiline element allows closing brace on same line from last element autocorrects closing brace on different line as last element detects closing brace on different line from last element allows closing brace on same line as multi-line element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element allows closing brace on same line as last element detects closing brace on different line from last element autocorrects closing brace on different line from last element allows closing brace on same line as last multiline element RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is native registers an offense for an incorrect EOL when EnforcedStyle is crlf registers an offense for CR+LF highlights the whole offending line does not register offense for no CR at end of file does not register offenses after __END__ accepts an empty file and the default external encoding is US_ASCII does not crash on UTF-8 encoded non-ascii characters can inspect non-UTF-8 encoded source with proper encoding comment and source is a string registers an offense and there are many lines ending with LF registers only one offense can inspect non-UTF-8 encoded source with proper encoding comment when EnforcedStyle is lf registers an offense for CR at end of file highlights the whole offending line does not register offenses after __END__ registers an offense for CR+LF accepts an empty file and source is a string registers an offense and the default external encoding is US_ASCII does not crash on UTF-8 encoded non-ascii characters can inspect non-UTF-8 encoded source with proper encoding comment and there are many lines ending with CR+LF can inspect non-UTF-8 encoded source with proper encoding comment registers only one offense RuboCop::Cop::Style::NonNilCheck when allowing semantic changes registers an offense for `!x.nil?` does not register an offense for `x.nil?` registers an offense for unless x.nil? does not register an offense for `!x` does not blow up when autocorrecting implicit receiver corrects code that would not be modified if IncludeSemanticChanges were false registers an offense for `not x.nil?` autocorrects by changing `x != nil` to `x` does not blow up with ternary operators when not allowing semantic changes does not register an offense for not x.nil? does not register an offense if only expression in predicate does not register an offense for != 0 does not register an offense if last expression in predicate does not report corrected when the code was not modified does not register an offense for !x.nil? does not register an offense if last expression in class predicate does not register an offense if only expression in class predicate does not blow up when autocorrecting implicit receiver registers an offense for != nil RuboCop::Cop::Gemspec::RequiredRubyVersion registers an offense when `required_ruby_version` is not specified target ruby version > 2.5 registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` target ruby version > 2.7 registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` false negatives does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) does not register an offense when `required_ruby_version` is assigned as a variable (string literal) target ruby version > 2.6 does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` RuboCop::Cop::Layout::SpaceAroundBlockParameters when EnforcedStyleInsidePipes is no_space registers an offense and corrects multiple spaces before parameter accepts a block with parameters but no body registers an offense and corrects space after last parameter registers an offense and corrects a lambda for space after the last parameter registers an offense and corrects for space with parens registers an offense and corrects all types of spacing issues for a lambda registers an offense and corrects space before first parameter accepts an empty block accepts line break after closing pipe accepts a lambda with spaces in the right places accepts block parameters with surrounding space that includes line breaks accepts a block parameter without preceding space registers an offense and corrects no space after closing pipe registers an offense and corrects all types of spacing issues registers an offense and corrects a lambda for space before first parameter skips lambda without args accepts a block with spaces in the right places skips lambda without parens trailing comma registers an offense for space after the last comma accepts no space after the last comma when EnforcedStyleInsidePipes is space registers an offense and corrects spacing in lambda args registers an offense and corrects a lambda for no space before first parameter registers an offense and corrects multiple spaces after last parameter registers an offense and corrects extra space before first parameter accepts line break after closing pipe registers an offense and corrects multiple spaces before parameter registers an offense and corrects space with parens at middle accepts a block parameter without preceding space accepts a block with spaces in the right places registers an offense for no space before first parameter accepts a lambda with spaces in the right places accepts a block with parameters but no body registers an offense and corrects no space after last parameter registers an offense and corrects a lambda for no space after last parameter skips lambda without parens registers an offense and corrects no space after closing pipe registers an offense and corrects block arguments inside Hash#each skips lambda without args accepts an empty block registers an offense and corrects missing space before first argument and after last argument registers an offense and corrects a lambda for multiple spacesafter last parameter registers an offense and corrects a lambda for extra spacebefore first parameter trailing comma accepts space after the last comma registers an offense and corrects no space after the last comma RuboCop::Cop::RangeHelp source indicated by #range_with_surrounding_space when side is :left is expected to eq " a(2)" when side is :both is expected to eq " a(2) " when side is :right is expected to eq "a(2) " source indicated by #range_by_whole_lines with end of one line without include_final_newline is expected to eq "puts 'example'" with include_final_newline is expected to eq "puts 'example'\n" when part of a single line is selected with include_final_newline is expected to eq "puts 'example'\n" without include_final_newline is expected to eq "puts 'example'" with parts of four lines with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" without include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" with a whole line except newline selected without include_final_newline is expected to eq "puts 'example'" with include_final_newline is expected to eq "puts 'example'\n" when source doesn't end with a newline without include_final_newline is expected to eq "newline_at_end" with include_final_newline is expected to eq 30 is expected to eq "newline_at_end" with a whole line plus beginning of next line without include_final_newline is expected to eq "puts 'example'\nputs 'another example'" with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n" with parts of two lines with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n" without include_final_newline is expected to eq "puts 'example'\nputs 'another example'" with beginning of one line without include_final_newline is expected to eq "puts 'another example'" with include_final_newline is expected to eq "puts 'another example'\n" source indicated by #range_with_surrounding_comma when side is :left is expected to eq ",Error" when side is :both is expected to eq ",Error," when side is :right is expected to eq "Error," RuboCop::Cop::Lint::ScriptPermission with stdin skips investigation with file permission 0755 accepts with shebang line accepts without shebang line accepts with blank with file permission 0644 registers an offense for script permission if auto-correction is off leaves the file intact RuboCop::Formatter::FuubarStyleFormatter #progressbar_color when a convention offense is detected in a file is yellow when no offenses are detected in a file is still green when a offense is detected in a file and auto-corrected is green when convention and error offenses are detected in a file is red initially is green when an error offense is detected in a file is red and then a convention offense is detected in the next file is still red #with_color when color is enabled outputs coloring sequence code at the beginning and the end when color is disabled outputs nothing RuboCop::Cop::Layout::FirstHashElementLineBreak ignores implicit hashes in method calls without parens ignores implicit hashes in method calls with parens registers an offense and corrects hash nested in a method call registers an offense and corrects elements listed on the first line ignores elements listed on a single line ignores implicit hashes in method calls that are improperly formatted RuboCop::Cop::Style::NestedModifier auto-corrects if + if does not add redundant parentheses in auto-correction adds parentheses to method arguments when needed in auto-correction auto-corrects if + unless auto-corrects unless with a comparison operator + if registers one offense for more than two modifiers auto-corrects unless + unless adds parentheses when needed in auto-correction auto-corrects unless + if until behaves like not correctable does not auto-correct when until is the inner modifier does not auto-correct when until is the outer modifier while behaves like not correctable does not auto-correct when while is the inner modifier does not auto-correct when while is the outer modifier RuboCop::Cop::VariableForce::Variable .new when non variable declaration node is passed raises error #referenced? when the variable has an assignment and the variable is referenced is expected to be truthy and the variable is not yet referenced is expected to be falsey when the variable is not assigned is expected to be falsey and the variable is referenced is expected to be truthy RuboCop::Cop::Style::RedundantPercentQ accepts %q at the beginning of a section of a double quoted string with interpolation accepts %Q at the beginning of a double quoted string with interpolation accepts a heredoc string that contains %q accepts %q at the beginning of a double quoted string with interpolation accepts %Q at the beginning of a section of a double quoted string with interpolation accepts %q containing string interpolation with %Q strings accepts regular expressions starting with %Q accepts a dynamic %Q string with double quotes auto-corrects for strings that are concatenated with backslash accepts a string with single quotes and double quotes registers an offense for dynamic string without quotes accepts a string with double quotes and an escaped normal character registers an offense for static string with only double quotes accepts a string with double quotes and an escaped special character registers an offense for static string without quotes with %q strings registers an offfense for a string containing escaped backslashes auto-corrects for strings that are concatenated with backslash registers an offense for only single quotes registers an offense for no quotes accepts regular expressions starting with %q accepts a string with escaped non-backslash characters registers an offense for only double quotes accepts a string with escaped backslash and non-backslash characters accepts a string with single quotes and double quotes RuboCop::Cop::Style::EmptyMethod when configured with expanded style with a non-empty instance method definition allows multi line method allows multi line method with a comment allows single line method with a non-empty class method definition allows multi line method with comment allows multi line method allows single line method when method is nested in class scope registers an offense for single line method with an empty class method definition registers an offense for single line method allows multi line method with a blank line allows empty multi line method with an empty instance method definition registers an offense for single line method allows multi line method allows multi line method with blank line when configured with compact style with an empty class method definition registers an offense for method with blank line registers an offense for empty method with arguments allows single line method registers an offense for empty method with a non-empty instance method definition allows single line method allows multi line method allows multi line method with comment with an empty instance method definition registers an offense for method with closing paren on following line registers an offense for method with blank line registers an offense for empty method registers an offense for method with arguments without parens allows single line method registers an offense for method with arguments with a non-empty class method definition allows multi line method with comment allows multi line method allows single line method RuboCop::Cop::Style::Lambda with default `line_count_dependent` style with a single line lambda method call with arguments registers an offense without arguments registers an offense with a multiline lambda literal as an argument registers an offense with a multiline lambda literal with arguments registers an offense without arguments registers an offense with a multiline braces lambda literal as a keyword argument registers an offense with a multiline do-end lambda as a parenthesized kwarg registers an offense unusual lack of spacing without spacing after arguments registers an offense without any spacing registers an offense without spacing before arguments registers an offense with a multiline lambda literal with no arguments and bad spacing registers an offense without parentheses registers an offense with no parentheses and bad spacing registers an offense with no arguments and no spacing registers an offense with no parentheses and many args registers an offense with empty arguments registers an offense when calling a lambda method without a block does not register an offense with a single line lambda literal does not register an offense with a multiline do-end lambda literal as a keyword argument registers an offense with a multiline lambda method call does not register an offense >= Ruby 2.7 when using numbered parameter with a single line lambda literal does not register an offense with a multiline lambda method call does not register an offense with a single line lambda method call registers an offense with enforced `lambda` style with a multiline lambda literal with arguments registers an offense without arguments registers an offense with a single line lambda literal without argument parens and spaces registers an offense without arguments registers an offense with arguments registers an offense when using safe navigation operator does not break with enforced `literal` style with a single line lambda method call with arguments registers an offense without arguments registers an offense with a multiline lambda method call with arguments registers an offense without arguments registers an offense RuboCop::Cop::Style::Next does not blow up on empty body for block handles nested autocorrections allows empty blocks does not crash with an empty body branch allows super nodes does not crash with empty brackets doesn't reindent heredoc bodies when autocorrecting keeps comments when autocorrecting allows loops with conditions at the end with ternary op does not blow up on empty body while block handles `then` when autocorrecting does not blow up on empty body until block behaves like iterators registers an offense for unless inside of select! allows loops with unless being the entire body with else registers an offense for unless inside of loop registers an offense for unless inside of nested iterators registers an offense for unless inside of for registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition registers an offense for unless inside of downto registers an offense for unless inside of reject! registers an offense for unless inside of reject registers an offense for unless inside of each reports an offense for unless whose body has 3 lines allows loops with unless with else, nested in another condition allows loops with unless with else at the end registers an offense for unless inside of nested iterators allows loops with conditional break auto-corrects a misaligned end registers an offense for unless inside of map registers an offense for unless inside of collect registers an offense for unless inside of select registers an offense for unless inside of times registers an offense for unless inside of each_with_object allows loops with conditional return EnforcedStyle: skip_modifier_ifs allows modifier unless EnforcedStyle: always registers an offense for modifier unless MinBodyLength: 3 accepts if whose body has 1 line Invalid MinBodyLength fails with an error behaves like iterators registers an offense for if inside of map auto-corrects a misaligned end allows loops with conditional return allows loops with conditional break registers an offense for if inside of for allows loops with if with else at the end allows loops with if with else, nested in another condition registers an offense for if inside of select! allows loops with if being the entire body with else registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition registers an offense for if inside of times registers an offense for if inside of reject registers an offense for if inside of downto registers an offense for if inside of each registers an offense for if inside of nested iterators registers an offense for if inside of collect registers an offense for if inside of select registers an offense for if inside of loop registers an offense for if inside of reject! reports an offense for if whose body has 3 lines registers an offense for if inside of nested iterators registers an offense for if inside of each_with_object EnforcedStyle: skip_modifier_ifs allows modifier if EnforcedStyle: always registers an offense for modifier if RuboCop::Cop::Style::BlockComments auto-corrects a block comment into a regular comment (without trailingnewline) auto-corrects a block comment into a regular comment accepts regular comments registers an offense for block comments auto-corrects an empty block comment by removing it RuboCop::Cop::Style::OneLineConditional does not break when one of the branches contains `next` keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator does not parenthesize expressions when they do not contain method calls with unparenthesized arguments parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator allows one line unless/then/end parenthesizes the expression if it is preceded by an operator allows one line if/then/end does not break when one of the branches contains a retry keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator does not break when one of the branches contains a self keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator does not parenthesize expressions when they contain unparenthesized operator method calls parenthesizes the expression if it is preceded by an operator does not break when one of the branches contains a break keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator behaves like changed precedence adds parentheses around `a ? b : c` behaves like changed precedence adds parentheses around `yield a` behaves like changed precedence adds parentheses around `not a` one line if/then/else/end allows empty else registers an offense behaves like changed precedence adds parentheses around `a or b` behaves like changed precedence adds parentheses around `puts 1` behaves like changed precedence adds parentheses around `a = b` behaves like changed precedence adds parentheses around `a and b` behaves like changed precedence adds parentheses around `super b` one line unless/then/else/end allows empty else registers an offense behaves like changed precedence adds parentheses around `defined? :A` one line if/then/else/end when `then` branch has no body registers an offense RuboCop::Cop::Style::FormatString when enforced style is percent registers an offense for format with 3 arguments registers an offense for format registers an offense for format with a hash argument accepts sprintf with 1 argument registers an offense for sprintf with 3 arguments registers an offense for sprintf accepts String#% accepts sprintf without arguments accepts format without arguments registers an offense for sprintf with a hash argument accepts format with 1 argument when enforced style is format registers an offense for sprintf with 2 arguments does not register an offense for ambiguous cases does not auto-correct String#% with variable argument and assignment registers an offense for variable argument but does not auto-correct registers an offense for something followed by a hash registers an offense for something followed by an array registers an offense for a string followed by something does not register an offense for numbers registers an offense for sprintf works if the first operand contains embedded expressions when enforced style is sprintf registers an offense for format with 2 arguments registers an offense for variable argument and assignment but does not auto-correct does not register an offense for numbers registers an offense for something followed by an array works if the first operand contains embedded expressions does not register an offense for ambiguous cases registers an offense for a string followed by something registers an offense for String#% with a hash argument registers an offense for variable argument but does not auto-correct registers an offense for format RuboCop::Cop::Style::SymbolLiteral accepts string syntax when symbol start with a digit accepts string syntax when symbols have special chars in them registers an offense for word-line symbols using string syntax accepts string syntax when symbols have whitespaces in them RuboCop::Cop::Lint::SendWithMixinArgument registers an offense when using `__send__` method registers an offense when using `send` with `prepend` registers an offense when using `public_send` method registers an offense when using `send` with `extend` registers an offense when using `send` with `include` does not register an offense when not using a mixin method does not register an offense when using `include` does not register an offense when using `extend` does not register an offense when using `prepend` when specifying a mixin method as a string registers an offense when using `send` with `prepend` registers an offense when using `send` with `extend` registers an offense when using `send` with `include` when using namespace for module registers an offense when using `send` with `include` RuboCop::Cop::Lint::UselessElseWithoutRescue with `else` with `rescue` accepts with `else` without `rescue` registers an offense RuboCop::Cop::Style::DefWithParentheses accepts empty parentheses in one liners accepts def with arg and parens reports an offense for class def with empty parens reports an offense for def with empty parens RuboCop::Formatter::QuietFormatter #report_summary when 2 offenses are corrected handles pluralization correctly when a file inspected and no offenses detected handles pluralization correctly when no files inspected handles pluralization correctly when 2 offenses detected handles pluralization correctly when a offense detected handles pluralization correctly when an offense is corrected prints about correction #report_file when the offense is not corrected prints message as-is the file is outside of the current working directory prints as absolute path the file is under the current working directory prints as relative path when the offense is automatically corrected prints [Corrected] along with message RuboCop::Cop::Lint::HeredocMethodCallPosition incorrect cases chained case without args detects chained case with parens detects with trailing comma in method call detects chained case no parens detects chained case with multiple line args detects simple incorrect case with paren detects simple incorrect case detects correct cases accepts chained correct case ignores if no call accepts simple correct case RuboCop::Cop::Lint::NextWithoutAccumulator behaves like reduce/inject given a reduce block accepts next with a value registers an offense for a bare next accepts next within a nested block given an unrelated block accepts a bare next accepts next with a value behaves like reduce/inject given a inject block registers an offense for a bare next accepts next with a value accepts next within a nested block RuboCop::Cop::Lint::UnreachableCode accepts `exit` is not in `elsif` branch registers an offense for `exit` in `begin` registers an offense for `redo` in all `if` and `elsif` branches accepts `break` is in `if`, and without `else` registers an offense for `return` in all `if` and `elsif` branches accepts `break` as the final expression registers an offense for `throw` in all `case` branches accepts `raise` is in `if` branch only registers an offense for `redo` in all `case` branches accepts `exit` is in `else` branch only accepts `fail` is in `case` branch without else accepts `raise` is in `else` branch only registers an offense for `redo` in all `if` branches registers an offense for `return` in all `if` branches accepts `break` is in `if` branch only accepts `retry` is in `if` branch only accepts `next` is in `else` branch only accepts `abort` is in `case` branch without else accepts `throw` is in `if` branch only accepts `break` is not in `elsif` branch registers an offense for `exit!` in all `if` and `elsif` branches registers an offense for `abort` in `begin` accepts code with conditional `retry` registers an offense for `raise` in all `case` branches registers an offense for `fail` in all `if` branches accepts `exit` is in `if` branch only registers an offense for `raise` in all `if` brancheswith other expressions accepts code with conditional `break` accepts `return` is in `else` branch only registers an offense for `break` in all `if` branches accepts code with conditional `throw` registers an offense for `retry` in all `if` branches registers an offense for `fail` in all `case` branches accepts `return` as the final expression accepts `throw` is in `case` branch without else registers an offense for `break` in all `if` and `elsif` branches registers an offense for `return` in `begin` accepts `abort` is in `if`, and without `else` registers an offense for `exit` in all `if` brancheswith other expressions registers an offense for `retry` in all `if` and `elsif` branches accepts `retry` as the final expression registers an offense for `retry` before other statements accepts `retry` is in `else` branch only registers an offense for `exit!` in all `if` branches registers an offense for `exit!` in all `if` brancheswith other expressions accepts `retry` is in all `if` branchsi registers an offense for `exit` before other statements registers an offense for `return` before other statements registers an offense for `return` in all `case` branches accepts `retry` is in `if`, and without `else` accepts `abort` is in `if` branch only registers an offense for `raise` before other statements accepts `next` is not in `elsif` branch registers an offense for `exit` in all `if` and `elsif` branches accepts `break` is in `else` branch only accepts `fail` is in `else` branch only accepts `redo` is in `if`, and without `else` accepts `throw` is in all `if` branchsi registers an offense for `retry` in all `case` branches registers an offense for `raise` in all `if` branches accepts `redo` is in all `if` branchsi registers an offense for `fail` in all `if` and `elsif` branches accepts `abort` is not in `elsif` branch registers an offense for `raise` in `begin` registers an offense for `exit!` before other statements accepts `raise` is in `if`, and without `else` accepts `exit!` is in `else` branch only accepts `next` as the final expression registers an offense for `exit!` in `begin` accepts `raise` is in `case` branch without else accepts `next` is in `case` branch without else accepts `exit!` is not in `elsif` branch accepts `redo` is in `else` branch only registers an offense for `retry` in `begin` accepts `return` is in all `if` branchsi accepts `exit!` is in `if`, and without `else` registers an offense for `redo` in all `if` brancheswith other expressions accepts `return` is in `if`, and without `else` accepts `abort` as the final expression accepts `redo` is in `if` branch only accepts `retry` is in `case` branch without else accepts `redo` is not in `elsif` branch accepts `throw` is in `else` branch only registers an offense for `next` in all `if` brancheswith other expressions accepts `next` is in `if` branch only accepts code with conditional `raise` registers an offense for `break` in all `case` branches accepts `exit` as the final expression accepts `retry` is not in `elsif` branch registers an offense for `abort` in all `if` and `elsif` branches accepts `redo` is in `case` branch without else registers an offense for `throw` in all `if` branches registers an offense for `return` in all `if` brancheswith other expressions registers an offense for `break` before other statements accepts `exit` is in all `if` branchsi accepts `fail` is not in `elsif` branch registers an offense for `next` in `begin` registers an offense for `fail` before other statements accepts `return` is in `if` branch only registers an offense for `throw` in all `if` and `elsif` branches accepts code with conditional `exit!` registers an offense for `throw` before other statements registers an offense for `fail` in `begin` registers an offense for `next` before other statements accepts `abort` is in all `if` branchsi accepts code with conditional `redo` registers an offense for `abort` in all `if` branches registers an offense for `redo` in `begin` registers an offense for `exit` in all `case` branches accepts `redo` as the final expression accepts `next` is in all `if` branchsi accepts `exit!` is in `if` branch only registers an offense for `break` in all `if` brancheswith other expressions registers an offense for `throw` in all `if` brancheswith other expressions registers an offense for `next` in all `if` and `elsif` branches accepts `exit` is in `if`, and without `else` accepts `fail` is in all `if` branchsi accepts `throw` as the final expression accepts `raise` as the final expression registers an offense for `retry` in all `if` brancheswith other expressions accepts `abort` is in `else` branch only registers an offense for `redo` before other statements registers an offense for `fail` in all `if` brancheswith other expressions accepts code with conditional `exit` accepts `break` is in `case` branch without else accepts `break` is in all `if` branchsi accepts `exit!` is in `case` branch without else accepts `exit!` is in all `if` branchsi accepts `return` is not in `elsif` branch accepts `raise` is not in `elsif` branch accepts `raise` is in all `if` branchsi accepts `fail` is in `if` branch only registers an offense for `next` in all `if` branches registers an offense for `raise` in all `if` and `elsif` branches registers an offense for `break` in `begin` accepts code with conditional `next` registers an offense for `exit!` in all `case` branches accepts `next` is in `if`, and without `else` accepts `fail` as the final expression accepts `fail` is in `if`, and without `else` registers an offense for `abort` in all `case` branches accepts `throw` is not in `elsif` branch accepts code with conditional `fail` accepts `exit!` as the final expression registers an offense for `throw` in `begin` registers an offense for `abort` before other statements registers an offense for `next` in all `case` branches accepts code with conditional `return` registers an offense for `exit` in all `if` branches accepts `throw` is in `if`, and without `else` registers an offense for `abort` in all `if` brancheswith other expressions accepts code with conditional `abort` accepts `exit` is in `case` branch without else accepts `return` is in `case` branch without else RuboCop::Cop::Style::WordArray when EnforcedStyle is percent detects when the cop must be disabled to avoid offenses registers an offense for arrays of double quoted strings does not register an offense for array with empty strings does not register offense for array with allowed number of strings doesn't fail in wacky ways when multiple cop instances are used does not register an offense for an array with comments in it registers an offense for arrays of single quoted strings registers an offense in a non-ambiguous block context does not register an offense in an ambiguous block context auto-corrects an array of words and character constants keeps the line breaks in place after auto-correct uses %W when autocorrecting strings with embedded newlines and tabs auto-corrects an array with one element auto-corrects an array of words using partial newlines does not register an offense for array of non-words registers an offense for arrays with character constants auto-corrects an array of words in multiple lines auto-corrects an array of words registers an offense for an array with comments outside of it detects right value of MinSize to use for --auto-gen-config registers an offense for arrays of strings containing hyphens does not register an offense for array starting with %w registers an offense for strings with newline and tab escapes does not register an offense for array containing non-string does not register an offense on non-word strings when the default external encoding is US-ASCII registers an offense for arrays of unicode word characters when the default external encoding is UTF-8 registers an offense for arrays of unicode word characters when EnforcedStyle is array registers an offense for a %w() array does not register an offense for arrays of single quoted strings does not register an offense for arrays of double quoted strings does not register an offense for arrays of strings with hyphens doesn't fail with `encoding: binary autocorrects a %W() array which uses escapes autocorrects a %W() array which uses string with hyphen autocorrects a %W() array which uses string interpolation autocorrects a %w() array which uses string with hyphen doesn't fail on strings which are not valid UTF-8 autocorrects a %w() array which uses single quotes with a WordRegex configuration which accepts almost anything uses %W when autocorrecting strings with non-printable chars uses %w for strings which only appear to have an escape with a treacherous WordRegex configuration doesn't break when words contain whitespace doesn't break when words contain delimiters when PreferredDelimiters is specified autocorrects an array with delimiters with a custom WordRegex configuration registers an offense for arrays of email addresses with non-default MinSize does not autocorrects arrays of one symbol if MinSize > 1 when the WordRegex configuration is not a Regexp still parses the code without raising an error RuboCop::Cop::Lint::SelfAssignment registers an offense when using global var self-assignment does not register an offense when using class var assignment registers an offense when using class var self-assignment does not register an offense when using multiple var assignment through splat registers an offense when using multiple var self-assignment through array does not register an offense when using multiple var assignment does not register an offense when using shorthand-and var assignment does not register an offense when using global var assignment does not register an offense when using constant var assignment for constant from another scope registers an offense when using shorthand-or var self-assignment registers an offense when using shorthand-and var self-assignment registers an offense when using constant var self-assignment registers an offense when using multiple var self-assignment registers an offense when using instance var self-assignment does not register an offense when using local var assignment does not register an offense when using instance var assignment does not register an offense when using constant var or-assignment for constant from another scope does not register an offense when using multiple var assignment through method call registers an offense when using local var self-assignment does not register an offense when using shorthand-or var assignment RuboCop::Cop::Style::StringConcatenation correctly handles strings with special characters registers an offense and corrects for string concatenation registers an offense and corrects for string concatenation as part of other expression does not register an offense when using `+` with all non string arguments RuboCop::Cop::Corrector #rewrite allows insertion before a source range allows replacement of a range allows removal of characters from range beginning allows insertion after a source range allows removal of characters preceding range allows insertion before and after a source range allows removal of a range accepts a node instead of a range raises a useful error if not given a node or a range allows removal of characters fron range ending when range is from incorrect source raises exception from insert_before raises exception from insert_after raises exception from remove_trailing raises exception from remove raises exception from remove_leading raises exception from replace raises exception from remove_preceding RuboCop::Cop::Lint::RedundantWithObject an object is used as a block argument registers an offense and corrects when using ary.each_with_object([]) do-end block registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` registers an offense and corrects when using ary.each_with_object do-end block without parentheses registers an offense and corrects when using `ary.each_with_object { |v| v }` when missing argument to `each_with_object` does not register an offense when block has 1 argument does not register an offense when block has 2 arguments RuboCop::Cop::Style::MultilineTernaryOperator registers offense and corrects when the if branch and the else branch are on a separate line from the condition registers an offense and corrects when the false branch is on a separate line accepts a single line ternary operator expression registers an offense and corrects when everything is on a separate line RuboCop::Cop::Gemspec::OrderedDependencies When using method call to gem names does not register any offenses when different dependencies are consecutive does not register any offenses When using a local variable in an argument of dependent gem does not register any offenses behaves like ordered dependency when add_dependency when each individual group of line is sorted does not register any offenses when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: false registers an offense with TreatCommentsAsGroupSeparators: true accepts when gems are not alphabetically sorted registers an offense When gems are alphabetically sorted does not register any offenses behaves like ordered dependency when add_runtime_dependency when each individual group of line is sorted does not register any offenses when gems are not alphabetically sorted registers an offense when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: false registers an offense with TreatCommentsAsGroupSeparators: true accepts When gems are alphabetically sorted does not register any offenses behaves like ordered dependency when add_development_dependency when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: true accepts with TreatCommentsAsGroupSeparators: false registers an offense when each individual group of line is sorted does not register any offenses when gems are not alphabetically sorted registers an offense When gems are alphabetically sorted does not register any offenses RuboCop::Cop::Badge can be converted to a string with the Department/CopName format exposes department name compares by value exposes cop name .for parses cop class name .parse parses unqualified badge references parses Department/CopName syntax #qualified? says `Department/CopName` is qualified says `CopName` is not qualified RuboCop::Cop::Style::SymbolProc auto-corrects correctly when args have a trailing comma accepts block when method in body is not called on block arg accepts block with more than 1 expression in body accepts proc with 1 argument accepts block with no arguments accepts lambda with 1 argument accepts ::Proc.new with 1 argument accepts block with splat params registers an offense for a block with parameterless method call on param registers an offense for a block when method in body is unary -/+ accepts block with a block argument autocorrects multiple aliases with symbols as proc accepts ignored method accepts empty block body auto-corrects correctly when there are no arguments in parentheses does not crash with a bare method call accepts block with more than 1 arguments accepts block with adding a comma after the sole argument accepts Proc.new with 1 argument when the method has arguments registers an offense when `super` has arguments registers an offense when `super` has no arguments registers an offense RuboCop::Cop::Lint::MissingCopEnableDirective when the maximum range size is infinite does not register an offense when the disable cop is re-enabled registers an offense when a cop is disabled and never re-enabled when the maximum range size is finite registers an offense when a cop is disabled and never re-enabled registers an offense when a cop is disabled for too many lines does not register an offense when the disable cop is re-enabled within the limit RuboCop::RemoteConfig .file downloads the file if the file does not exist does not download the file if cache lifetime has not been reached downloads the file if cache lifetime has been reached when the remote URL responds with 500 raises error when the remote URL responds with redirect follows the redirect and downloads the file when the remote URL responds with not modified reuses the existing cached file when the network is inaccessible reuses the existing cached file RuboCop::Cop::Style::SingleLineBlockParams finds incorrectly named parameters with leading underscores allows an unused parameter to have a leading underscore ignores do..end blocks finds wrong argument names in calls with different syntax does not report when destructuring is used does not report if no block arguments are present allows calls with proper argument names ignores :reduce symbols RuboCop::Cop::Layout::IndentationConsistency with while/until registers an offense and corrects bad indentation in an until body registers an offense and corrects bad indentation in begin/end/while accepts an empty while registers an offense and corrects bad indentation in a while body with case accepts indented when/else plus indented body accepts correctly indented case/when/else registers an offense and corrects bad indentation in a case/when body accepts case/when/else with then beginning a line accepts case/when/else laid out as a table registers an offense and corrects bad indentation in a case/else body with block accepts an empty block body registers an offense and corrects bad indentation in a {} body does not auto-correct an offense within another offense accepts a correctly indented block body registers an offense and correct bad indentation in a do/end body with top-level code accepts an empty expression string interpolation with module accepts an empty module body registers an offense and corrects bad indentation of private methods registers an offense and corrects bad indentation in a module body even when there are no public methods registers an offense and corrects bad indentation of private methods with unless accepts an empty unless registers an offense and corrects bad indentation in an unless body with if statement accepts an if/else in assignment on next line with end aligned with if accepts if/elsif/else/end with fullwidth characters accepts a one line if statement registers an offense and corrects bad indentation in an else body accepts an empty if accepts an if/else in assignment with end aligned with variable and chaining with a block after the end accepts an if/else in assignment with end aligned with variable accepts if/elsif/else/end laid out as a table accepts a correctly aligned if/elsif/else/end registers an offense and corrects bad indentation in an if body accepts an if/else in assignment with end aligned with variable and chaining after the end registers an offense and corrects bad indentation in an elsif body accepts if/then/else/end laid out as another table accepts an if in assignment with end aligned with variable accepts an if in assignment with end aligned with if accepts an if/else branches with rescue clauses accepts an if/else in assignment with end aligned with if with for registers an offense and corrects bad indentation in a for body accepts an empty for with def/defs accepts an empty def body registers an offense and corrects bad indentation in a defs body registers an offense and corrects bad indentation in a def body accepts an empty defs body with class with normal style configured accepts an empty class body accepts indented public, protected, and private registers an offense and corrects bad indentation in a class body registers an offense and corrects bad indentation in def but not for outdented public, protected, and private with indented_internal_methods style configured accepts different indentation in different visibility sections RuboCop::Cop::Lint::InterpolationCheck registers an offense and corrects when including interpolation and double quoted string in single quoted string does not register an offense for properly interpolation strings registers an offense and corrects for interpolation in single quoted string does not register an offense for interpolation in nested strings does not register an offense for an escaped interpolation does not register an offense for interpolation in a regexp does not crash for \xff does not register an offense for escaped crab claws in dstr RuboCop::Cop::Lint::DuplicateHashKey behaves like duplicated non literal key does not register an offense for duplicated `[some_method_call]` hash keys behaves like duplicated literal key registers an offense for duplicated `[1, 2, 3]` hash keys behaves like duplicated literal key registers an offense for duplicated `(false or true)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `{ :sym => some_method_call }` hash keys behaves like duplicated non literal key does not register an offense for duplicated `{ some_method_call => :sym }` hash keys behaves like duplicated literal key registers an offense for duplicated `false` hash keys target ruby version >= 2.6 behaves like duplicated literal key registers an offense for duplicated `(42..)` hash keys behaves like duplicated literal key registers an offense for duplicated `nil` hash keys behaves like duplicated non literal key does not register an offense for duplicated `some_method_call(x, y)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x && false)` hash keys when there are two duplicated keys in a hash registers two offenses behaves like duplicated literal key registers an offense for duplicated `'str'` hash keys behaves like duplicated literal key registers an offense for duplicated `{ a: 1, b: 2 }` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x == false)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `some_method_call` hash keys behaves like duplicated literal key registers an offense for duplicated `(false && true)` hash keys behaves like duplicated literal key registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys behaves like duplicated literal key registers an offense for duplicated `%r{abx}ixo` hash keys behaves like duplicated literal key registers an offense for duplicated `/./` hash keys behaves like duplicated literal key registers an offense for duplicated `(1)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x or false)` hash keys behaves like duplicated literal key registers an offense for duplicated `1` hash keys When there is no duplicated key in the hash does not register an offense behaves like duplicated non literal key does not register an offense for duplicated `"#{some_method_call}"` hash keys behaves like duplicated literal key registers an offense for duplicated `1.0` hash keys behaves like duplicated literal key registers an offense for duplicated `!true` hash keys behaves like duplicated literal key registers an offense for duplicated `"#{2}"` hash keys when there is a duplicated key in the hash literal registers an offense behaves like duplicated non literal key does not register an offense for duplicated `/.#{some_method_call}/` hash keys When a key is duplicated three times in a hash literal registers two offenses behaves like duplicated literal key registers an offense for duplicated `(false <=> true)` hash keys RuboCop::Cop::Layout::EmptyLines registers an offense for consecutive empty lines does not register an offense for heredocs with empty lines inside handles comments works when there are no tokens does not register an offense for empty lines in a string RuboCop::CLI --only-recognized-file-types when not explicitly included does not include the file given on the command line but option is not given includes the file given on the command line when explicitly included includes the file given on the command line -V exits cleanly -E/--extra-details shows extra details --stdin detects CR at end of line causes source code to be read from stdin requires a file path does not accept more than one file path prints corrected code to stdout if --auto-correct-all is used --version exits cleanly --force-exclusion with already excluded by default excludes files excluded by default even if they are explicitly passed as arguments when explicitly excluded excludes files specified in the configuration Exclude even if they are explicitly passed as arguments --list-target-files when there are no files prints nothing with -L prints nothing with --list-target-files when there are some files when there are no includes or excludes prints known ruby files when there is an include and exclude prints the included files and not the excluded ones --except when one cop is given without namespace disables the given cop when several cops are given disables the given cops including RedundantCopDisableDirective disables the given cops including Lint/RedundantCopDisableDirective disables the given cops including Lint when a cop name is not specified displays how to use `--except` option when one cop plus one namespace are given runs all cops except the given when one name is given displays correction candidate if an incorrect cop name is given exits with error if an empty string is given exits with error if Syntax is given exits with error if the cop name is incorrect exits with error if Lint/Syntax is given -D/--display-cop-names shows cop names DisplayCopNames: false in .rubocop.yml shows cop names without --display-cop-names does not show cop names --no-display-cop-names does not show cop names --parallel in combination with --force-default-config does not parse local configuration in combination with --ignore-parent-exclusion does ignore the exclusion in the parent directory configuration combined with AllCops:UseCache:false fails with an error message on Unix-like systems does not print a message if --debug is not specified prints a message if --debug is specified -o/--out option redirects output to the specified file is applied to the previously specified formatter --only when a cop name is not specified displays how to use `--only` option when a namespace is given runs all enabled cops in that namespace when one cop is given runs just one cop enables the given cop exits with error if an incorrect cop name is passed displays correction candidate if an incorrect cop name is given exits with error if cop name RedundantCopDisableDirective is passed only checks syntax if Lint/Syntax is given only checks syntax if Syntax is given accepts cop names from plugins exits with error if an empty string is given exits with error if cop name Lint/RedundantCopDisableDirective is passed without using namespace runs just one cop when specifying a pending cop when Style department is enabled when specifying `NewCops: pending` in .rubocop.yml displays a pending cop warning when specifying `NewCops: disable` in .rubocop.yml does not display a pending cop warning when `VersionAdded` is not specified accepts cop names from plugins with a pending cop warning when using `--disable-pending-cops` command-line option does not display a pending cop warning when `VersionAdded` is specified accepts cop names from plugins with a pending cop warning when using `--enable-pending-cops` command-line option does not display a pending cop warning when specifying `NewCops: enable` in .rubocop.yml does not display a pending cop warning when Style department is disabled does not show pending cop warning when several cops are given runs the given cops and --lint runs the given cops plus all enabled lint cops when three namespaces are given runs all enabled cops in those namespaces --show-cops with one of the cops misspelled skips the unknown cop with one cop given prints the current configuration prints that cop and nothing else with two cops given prints the current configuration with no args prints all departments prints all available cops and their description prints all cops in their right department listing prints the current configuration with --force-default-config prioritizes default config --fail-level option fails when option is equal to the severity level succeeds when option is greater than the severity level fails when option is less than the severity level with --auto-correct-all succeeds when option is refactor and all offenses are autocorrected fails when option is autocorrect and all offenses are autocorrected succeeds when option is not given and all offenses are autocorrected fails when option is A and all offenses are autocorrected with --display-only-fail-level-offenses doesn't output offense message when less than the fail-level outputs offense message when fail-level is less than the severity outputs offense message when fail-level is equal to the severity with disabled line doesn't consider a unprinted offense to be a redundant disable still checks unprinted offense if they're a redundant disable --lint runs only lint cops -f/--format can be used multiple times builtin formatters when json format is specified and offenses come from the cache and a message has binary encoding outputs JSON code without crashing when simple format is specified outputs with simple format when emacs format is specified outputs with emacs format when html format is specified and offenses come from the cache and a message has binary encoding outputs HTML code without crashing when unknown format name is specified aborts with error message when clang format is specified outputs with clang format custom formatter when unknown class name is specified aborts with error message when a class name is specified uses the class as a formatter -d/--debug shows cop names shows config files -S/--display-style-guide shows style guide and reference entries shows style guide entry shows reference entry with --auto-correct-all and disabled offense succeeds when there is only a disabled offense option is invalid suggests to use the --help flag RuboCop::Cop::Layout::ClosingParenthesisIndentation accepts begin nodes that are not grouped expressions for method definitions with line break before 1st parameter accepts a correctly aligned ) registers an offense for misaligned ) with no line break before 1st parameter accepts empty () registers an offense for misaligned ) accepts a correctly aligned ) for grouped expressions with no line break before 1st operand accepts a correctly aligned ) registers an offense for misaligned ) accepts ) that does not begin its line with line break before 1st operand accepts a correctly aligned ) registers an offense for misaligned ) for method assignments with indented parameters with line break before 1st parameter accepts a correctly aligned ) registers an offense for misaligned ) with no line break before 1st parameter can handle hash arguments that are not broken over lines can handle individual arguments that are broken over lines accepts a correctly aligned ) can handle inner method calls can handle indentation up against the left edge accepts a correctly indented ) registers an offense for misaligned ) without arguments can handle indentation up against the method accepts a correctly aligned ) against ( can handle indentation up against the left edge registers an offense for misaligned ) accepts empty () for method chains registers an offense and corrects method chains can handle multiple chains with differing breaks when using safe navigation operator registers an offense and corrects misaligned ) for method calls with line break before 1st parameter registers an offense for misaligned ) accepts a correctly aligned ) without arguments accepts empty () can handle indentation up against the left edge accepts a correctly aligned ) against ( with no line break before 1st parameter accepts a correctly indented ) inside a block accepts a correctly indented ) registers an offense for misaligned ) registers an offense and corrects misindented ) when ) is aligned with the params accepts a correctly aligned ) with first multiline arg on new line accepts ) on the same level as ( with second arg on new line accepts ) on the same level as ( with args on same line RuboCop::Cop::Style::AccessModifierDeclarations when `inline` is configured offends when private is not inlined and has a comment does not offend when private is inlined with a symbol offends when public is not inlined and has a comment accepts when #{access_modifier} is a hash literal value accepts when #{access_modifier} is a hash literal value offends when private is not inlined offends when protected is not inlined does not offend when public is inlined with a symbol does not offend when public is inlined with a method offends when public is not inlined does not offend when protected is inlined with a symbol does not offend when protected is inlined with a method accepts when #{access_modifier} is a hash literal value offends when protected is not inlined and has a comment does not offend when private is inlined with a method do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol when `group` is configured offends when public is inlined with a method offends when protected is inlined with a method does not offend when public is not inlined does not offend when protected is not inlined and has a comment does not offend when public is not inlined and has a comment offends when private is inlined with a method accepts when #{access_modifier} is a hash literal value accepts when #{access_modifier} is a hash literal value accepts when #{access_modifier} is a hash literal value does not offend when protected is not inlined does not offend when private is not inlined does not offend when private is not inlined and has a comment allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol RuboCop::Cop::Style::Documentation accepts namespace module which defines constants registers an offense for non-namespace does not consider comment followed by empty line to be class documentation accepts non-empty class with documentation registers an offense if the comment line contains code accepts non-empty module with documentation registers an offense for non-empty class registers offense for non-empty class with frozen string comment accepts empty class without documentation registers an offense for compact-style nested module registers an offense for empty module without documentation registers an offense for non-empty class with encoding comment accepts namespace class which defines constants accepts namespace module without documentation accepts non-empty class with annotation comment followed by other comment accepts non-empty class with comment that ends with an annotation accepts namespace class without documentation registers an offense for compact-style nested class registers an offense for non-empty class with directive comment registers an offense for non-empty class with annotation comment does not raise an error for an implicit match conditional with # :nodoc: registers an offense for nested class without documentation accepts compact-style nested module without documentation accepts compact-style nested class without documentation accepts non-namespace class without documentation accepts non-namespace module without documentation registers an offense for nested module without documentation on a subclass accepts non-namespace subclass without documentation registers an offense for nested subclass without documentation with `all` modifier accepts nested subclass without documentation with `all` modifier accepts nested class without documentation with `all` modifier accepts nested module without documentation without documentation with non-empty class with constants visibility declaration content does not register an offense with non-empty module with constants visibility declaration content does not register an offense sparse and trailing comments ignores comments after module node end ignores sparse comments inside module node ignores sparse comments inside class node ignores comments after class node end RuboCop::Formatter::HTMLFormatter outputs the cached result in HTML outputs the result in HTML RuboCop::Cop::Lint::FormatParameterMismatch accepts an extra argument for dynamic width registers an offense when calling Kernel.sprintf and the fields do not match registers an offense when there are more arguments than expected correctly parses different sprintf formats registers an offense if extra argument for dynamic width not given registers offense with sprintf does not register an offense when using named parameters with escaped `%` identifies correctly digits for spacing in format does not register an offense for sprintf with splat argument accepts an extra arg for dynamic width with other preceding flags does not register an offense when using named parameters does not register an offense when single argument is not an array does not register an offense for format with splat argument does not register offense for `String#%` when arguments, fields match does not register an offense argument is the result of a message send constants do not register offenses does not register an offense when arguments and fields match registers an offense when calling Kernel.format and the fields do not match registers an offense when there are less arguments than expected finds faults even when the string looks like a HEREDOC correctly ignores double percent does not register an offense when single argument is a hash registers an offense for String#% ignores percent right next to format string when argument itself contains format characters and formats in format string and argument are not equal ignores argument formatting when splat argument is present does not register an offense when args count is less than expected when args count is more than expected registers an offense for `#%` registers an offense for `#format` registers an offense for `#sprintf` behaves like variables does not register an offense for % called on a variable does not register an offense for format called on a variable does not register an offense for format called on a variable when passed an empty array does not register an offense behaves like variables does not register an offense for format called on a variable does not register an offense for % called on a variable does not register an offense for format called on a variable behaves like variables does not register an offense for format called on a variable does not register an offense for format called on a variable does not register an offense for % called on a variable on format with %{} interpolations and 1 argument does not register an offense and multiple arguments registers an offense when using (digit)$ flag does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments does not register an offense on format with %<> interpolations and 1 argument does not register an offense and multiple arguments registers an offense behaves like variables does not register an offense for format called on a variable does not register an offense for format called on a variable does not register an offense for % called on a variable when multiple arguments are called for and a single variable argument is passed does not register an offense and a single send node is passed does not register an offense behaves like variables does not register an offense for format called on a variable does not register an offense for % called on a variable does not register an offense for format called on a variable with wildcard does not register an offense for width does not register an offense for multiple wildcards does not register an offense for precision does not register an offense for width and precision when format is invalid registers an offense when format is not a string literal does not register an offense RuboCop::Cop::Naming::ClassAndModuleCamelCase accepts CamelCase names registers an offense for underscore in class and module name allows module_parent method is not fooled by qualified names custom allowed names does not register offense for multiple allowed names RuboCop::Cop::Lint::ShadowedArgument method argument shadowing when a single argument is shadowed registers an offense when argument was used in shorthand assignment does not register an offense and the argument is not used accepts when reassigning to splat variable does not register an offense when binding is used registers an offense when IgnoreImplicitReferences config option is set to true accepts and shadowed within a block registers an offense without specifying where the reassignment took place and was used before shadowing accepts and the block is nested within a block registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the argument was not shadowed outside the block accepts and the block occurs after the reassignment registers an offense and the block is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and shadowed within a conditional registers an offense without specifying where the reassignment took place and the conditional occurs after the reassignment registers an offense and the conditional is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the conditional is nested within a lambda registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the argument was not shadowed outside the conditional accepts and was used before shadowing accepts when a splat argument is shadowed registers an offense when zsuper is used registers an offense when argument was shadowed by zsuper registers an offense when IgnoreImplicitReferences config option is set to true accepts when argument was shadowed by zsuper does not register an offense when multiple arguments are shadowed and one of them shadowed within a lambda while another is shadowed outside registers an offense block argument shadowing when multiple arguments are shadowed and one of them shadowed within a lambda while another is shadowed outside registers an offense when a single argument is shadowed registers an offense and the argument is not used accepts and shadowed within a block registers an offense without specifying where the reassignment took place and the block is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and was used before shadowing accepts and the block occurs after the reassignment registers an offense and the argument was not shadowed outside the block accepts and the block is nested within a block registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts when zsuper is used accepts and shadowed within a conditional registers an offense without specifying where the reassignment took place and the conditional occurs after the reassignment registers an offense and the conditional is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the conditional is nested within a lambda registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the argument was not shadowed outside the conditional accepts and was used before shadowing accepts when binding is used registers an offense when IgnoreImplicitReferences config option is set to true accepts when a block local variable is assigned but no argument is shadowed accepts RuboCop::Cop::Layout::ConditionPosition registers an offense and corrects for condition on the next line accepts condition on the same line registers an offense and corrects for elsif condition on the next line registers an offense and corrects for condition on the next line accepts condition on the same line accepts condition on the same line accepts condition on a different line for modifiers registers an offense and corrects for condition on the next line handles ternary ops accepts condition on a different line for modifiers accepts condition on the same line accepts condition on a different line for modifiers registers an offense and corrects for condition on the next line accepts condition on a different line for modifiers RuboCop::Cop::Style::StringHashKeys does not register an offense when string key is used in Open3.pipeline registers an offense when using strings as keys mixed with other keys does not register an offense when string key is used in Open3.capture3 does not register an offense when string key is used in gsub! autocorrects strings as keys into symbols with the correct syntax registers an offense when using strings as keys does not register an offense when not using strings as keys does not register an offense when string key is used in gsub does not register an offense when string key is used in IO.popen RuboCop::Cop::Lint::LiteralAsCondition accepts literal :"#{a}" in non-toplevel and/or registers an offense for `not 2.0` registers an offense for literal :sym in a when of a case without anything after case keyword registers an offense for literal {} in if registers an offense for literal 2.0 in ! registers an offense for literal [1] in && registers an offense for `not :"#{a}"` accepts literal :sym if it's not an and/or operand registers an offense for `!2.0` registers an offense for literal {} in a when of a case without anything after case keyword registers an offense for literal [1] in complex cond registers an offense for literal 2.0 in complex cond registers an offense for literal :sym in while registers an offense for literal :sym in && registers an offense for literal :sym in complex cond registers an offense for literal 1 in until registers an offense for literal :"#{a}" in ! registers an offense for literal [1] in ! registers an offense for literal 1 in case registers an offense for literal :"#{a}" in && registers an offense for literal 1 in complex ! registers an offense for literal {} in && accepts array literal in case, if it has non-literal elements registers an offense for literal 2.0 in a when of a case without anything after case keyword registers an offense for literal 1 in complex cond registers an offense for `not {}` registers an offense for literal 2.0 in post-loop until accepts literal {} in a when of a case with something after case keyword registers an offense for literal :sym in case registers an offense for literal 2.0 in until registers an offense for literal 1 in while registers an offense for literal [1] in post-loop while registers an offense for literal :sym in post-loop until registers an offense for `not 1` registers an offense for literal [1] in while registers an offense for literal 1 in post-loop until accepts literal 1 if it's not an and/or operand accepts literal 2.0 in a when of a case with something after case keyword accepts `true` literal in `while` registers an offense for literal {} in case registers an offense for literal 2.0 in complex ! registers an offense for literal :sym in ! accepts literal :sym in a when of a case with something after case keyword registers an offense for literal :"#{a}" in complex ! registers an offense for literal 2.0 in if registers an offense for `!{}` registers an offense for literal [1] in if registers an offense for literal 2.0 in case accepts literal 2.0 in non-toplevel and/or accepts literal [1] in non-toplevel and/or registers an offense for literal [1] in a when of a case without anything after case keyword registers an offense for literal 1 in if registers an offense for literal :sym in post-loop while accepts literal 1 in a when of a case with something after case keyword registers an offense for literal 1 in a when of a case without anything after case keyword registers an offense for `!:sym` registers an offense for `![1]` registers an offense for literal [1] in case registers an offense for literal {} in post-loop until registers an offense for literal :"#{a}" in a when of a case without anything after case keyword accepts literal {} in non-toplevel and/or registers an offense for literal :sym in until registers an offense for literal :"#{a}" in until registers an offense for literal 2.0 in post-loop while registers an offense for literal [1] in post-loop until accepts literal :"#{a}" if it's not an and/or operand registers an offense for literal :"#{a}" in post-loop until registers an offense for literal 1 in post-loop while registers an offense for case with a primitive array condition registers an offense for literal :"#{a}" in while registers an offense for literal :"#{a}" in complex cond registers an offense for literal [1] in complex ! registers an offense for literal {} in post-loop while accepts `true` literal in post-loop `while` registers an offense for literal 2.0 in && registers an offense for `!1` registers an offense for literal [1] in until registers an offense for literal {} in complex cond accepts `false` literal in `until` accepts dstr literal in case registers an offense for literal 2.0 in while accepts literal [1] in a when of a case with something after case keyword registers an offense for literal :"#{a}" in if registers an offense for literal 1 in ! accepts literal [1] if it's not an and/or operand accepts literal 2.0 if it's not an and/or operand accepts literal {} if it's not an and/or operand registers an offense for literal :sym in if registers an offense for literal :"#{a}" in case registers an offense for `not [1]` registers an offense for `!:"#{a}"` registers an offense for literal {} in while registers an offense for literal :sym in complex ! accepts `false` literal in post-loop `until` accepts literal :"#{a}" in a when of a case with something after case keyword registers an offense for literal {} in until registers an offense for literal :"#{a}" in post-loop while accepts literal 1 in non-toplevel and/or registers an offense for literal 1 in && accepts literal :sym in non-toplevel and/or registers an offense for `not :sym` accepts array literal in case, if it has nested non-literal element registers an offense for literal {} in ! registers an offense for literal {} in complex ! RuboCop::Cop::Style::AccessorGrouping when EnforcedStyle is grouped registers an offense and corrects when using separated accessors within eigenclass registers an offense and corrects when using separated accessors registers an offense and corrects when using separated accessors with different access modifiers does not register an offense when using grouped accessors registers offense and corrects if atleast two separate accessors without comments does not register offense for accessors with comments when EnforcedStyle is separated registers an offense and corrects when using grouped accessors with different access modifiers does not register an offense when using separated accessors registers an offense and corrects when using grouped accessors registers an offense and corrects when using grouped accessors within eigenclass does not register an offense for grouped accessors with comments RuboCop::Cop::InternalAffairs::NodeTypePredicate does not register an offense for a predicate node type check comparison node type check registers an offense and auto-corrects RuboCop::Cop::Style::DoubleCopDisableDirective does not register an offense for cops with single cop directive registers an offense for duplicate todo directives registers an offense for duplicate disable directives RuboCop::Cop::Layout::ClosingHeredocIndentation accepts correctly indented closing heredoc when heredoc contents with blank line accepts correctly indented closing heredoc when heredoc contents is after closing heredoc does not register an offense for a << heredoc registers an offense for bad indentation of a closing heredoc accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` registers an offense for incorrectly indented empty heredocs does not register an offense for correctly indented empty heredocs accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty accepts correctly indented closing heredoc when heredoc contents is before closing heredoc accepts correctly indented closing heredoc accepts correctly indented closing heredoc when aligned at the beginning of method definition RuboCop::Cop::Style::ReturnNil when enforced style is `return_nil` registers an offense for return does not register an offense for returning others when enforced style is `return` does not register an offense for returning others does not register an offense for return nil from iterators registers an offense for return nil RuboCop::Cop::Bundler::DuplicatedGem when investigating Ruby files does not register any offenses when investigating Gemfiles and a duplicated gem is in a git/path/group/platforms block registers an offense and the file is empty does not register any offenses and no duplicate gems are present does not register any offenses and a gem is duplicated in default group registers an offense RuboCop::Cop::Layout::MultilineMethodCallIndentation when EnforcedStyle is indented_relative_to_receiver accepts any indentation of parameters to #[] doesn't fail on unary operators accepts no extra indentation of third line accepts indented methods in ordinary statement registers an offense and corrects proc call without a selector registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array registers an offense and corrects extra indentation of 3rd line in typical RSpec code accepts indentation relative to first receiver accepts indented methods inside and outside a block accepts indented methods in for body accepts correctly indented methods in operation doesn't crash on unaligned multiline lambdas accepts alignment inside a grouped expression registers an offense and corrects 3 spaces indentation of second line accepts indentation of consecutive lines in typical RSpec code accepts indented methods in LHS of []= assignment registers an offense and corrects one space indentation of 2nd line accepts an expression where the first method spans multiple lines registers an offense and corrects extra indentation of 3rd line registers an offense and corrects no indentation of second line for possible semantic alignment accepts indented methods when EnforcedStyle is indented registers an offense and corrects extra indentation of 3rd line in typical RSpec code accepts even indentation of consecutive lines in typical RSpec code accepts indented methods inside and outside a block accepts indented methods in while body registers an offense and corrects aligned operators in assignment registers an offense and corrects no indentation of second line accepts special indentation of return if condition accepts any indentation of method parameters accepts indented methods in if body accepts indented methods in LHS of []= assignment doesn't fail on unary operators doesn't crash on unaligned multiline lambdas registers an offense and corrects correct + unrecognized style accepts indentation relative to first receiver accepts indentation of assignment registers an offense and corrects one space indentation of 2nd line accepts double indentation of while condition accepts alignment inside a grouped expression registers an offense and corrects 1 space indentation of 3rd line accepts an expression where the first method spans multiple lines registers an offense and corrects wrong indentation of for expression accepts indented methods in for body accepts correctly indented methods in operation registers an offense for a 2 space indentation of until condition registers an offense and corrects aligned methods in if condition accepts indented methods in unless body registers an offense for a 2 space indentation of while condition registers an offense and corrects proc call without a selector accepts indented methods in if condition registers an offense for a 2 space indentation of if condition accepts normal indentation of method parameters accepts any indentation of parameters to #[] registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array accepts double indentation of if condition accepts special indentation of return unless condition registers an offense for a 2 space indentation of unless condition accepts no extra indentation of third line accepts indented methods in until body accepts special indentation of for expression accepts double indentation of until condition accepts indented methods in ordinary statement registers an offense and corrects extra indentation of third line accepts normal indentation inside grouped expression registers an offense and corrects 3 spaces indentation of 2nd line accepts double indentation of unless condition when indentation width is overridden for this cop accepts indentation of unless condition which is offset by a single normal indentation step accepts indented methods in if body registers an offense for a 4 space indentation of unless condition registers an offense for a 4 space indentation of if condition registers an offense for a 4 space indentation of while condition accepts correctly indented methods in operation accepts indented methods accepts indented methods in until body accepts indented methods in if condition accepts indentation of while condition which is offset by a single normal indentation step accepts indented methods in while body accepts indented methods in unless body accepts indentation of assignment accepts indentation of until condition which is offset by a single normal indentation step registers an offense for a 4 space indentation of until condition accepts indentation of if condition which is offset by a single normal indentation step for possible semantic alignment accepts indented methods when EnforcedStyle is aligned accepts aligned method in return accepts any indentation of parameters to #[] accepts aligned methods in if condition registers an offense and corrects one space indentation of 3rd line registers an offense and corrects misaligned methods in unless condition registers an offense and corrects extra indentation of 3rd line in typical RSpec code doesn't crash on unaligned multiline lambdas accepts aligned methods in assignment accepts aligned methods in a begin..end block does not check binary operations when string wrapped with backslash accepts correctly aligned methods in operands registers an offense and corrects 3 spaces indentation of 2nd line accepts indentation relative to first receiver accepts indented methods in LHS of []= assignment accepts indented and aligned methods in binary operation registers an offense and corrects misaligned methods in if condition accepts correctly aligned methods in assignment registers an offense and corrects unaligned methods in assignment accepts aligned method in assignment + block + assignment accepts indented methods in ordinary statement registers an offense and corrects misaligned methods in while condition accepts an expression where the first method spans multiple lines registers an offense and corrects misaligned methods in until condition accepts no extra indentation of third line registers an offense and corrects misaligned methods in local variable assignment registers an offense and corrects proc call without a selector registers an offense and corrects no indentation of second line accepts alignment inside a grouped expression accepts indented methods inside and outside a block accepts indented methods in for body accepts aligned methods in constant assignment registers an offense and corrects extra indentation of third line accepts aligned methods in operator assignment registers an offense and corrects one space indentation of 2nd line accepts aligned methods in if + assignment does not check binary operations when string wrapped with + accepts indented method when there is nothing to align with accepts even indentation of consecutive lines in typical RSpec code doesn't fail on unary operators registers an offense and corrects the emacs ruby-mode 1.1 indentation of an expression in an array registers an offense and corrects misaligned method in []= call for semantic alignment accepts aligned method even when an aref is in the chain accepts method being aligned with method accepts method being aligned with method in assignment accepts methods being aligned with method that is an argument accepts methods being aligned with method that is an argument in assignment accepts 3 aligned methods registers an offense and corrects unaligned methods accepts aligned method even when an aref is first in the chain accepts aligned method with blocks in operation assignment registers an offense and corrects unaligned method in block body doesn't fail on a chain of aref calls target_ruby_version >= 2.5 accepts key access to hash >= Ruby 2.7 accepts methods being aligned with method that is an argumentwhen using numbered parameter RuboCop::Cop::Metrics::AbcSize when Max is 1.3 reports size and max as <1, 1, 4> 4.24/1.3 when Max is 100.321 reports size and max as <100, 100, 400> 424.3/100.3 when Max is 2.3 accepts a total score of 2.24 when Max is 1000.3 reports size and max as <1000, 1000, 4000> 4243/1000 when Max is 0 registers an offense for an assignment of an element registers an offense for a `define_method` registers an offense for complex content including A, B, and C scores accepts an empty `define_method` registers an offense for an if modifier treats safe navigation method calls like regular method calls + a condition registers an offense for an assignment of a local variable accepts an empty method when method is in list of ignored methods does not register an offense when using `define_method` does not register an offense when defining a class method does not register an offense when defining an instance method when Max is 2 accepts two assignments when Max is 10.3 reports size and max as <10, 10, 40> 42.43/10.3 RuboCop::Cop::Metrics::Utils::AbcSizeCalculator #calculate with a yield is expected to eq "<0, 1, 0>" same but with 7 arguments is expected to eq "<9, 3, 0>" with .foo = is expected to eq "<1, 2, 0>" multiple assignment is expected to eq "<3, 1, 0>" with []= is expected to eq "<2, 1, 0>" with a known iterating block is expected to eq "<2, 4, 2>" same with extra condition is expected to eq "<2, 9, 5>" elsif vs else if else if is expected to eq "<0, 5, 4>" elsif is expected to eq "<0, 5, 3>" with a block is expected to eq "<2, 3, 0>" method with arguments is expected to eq "<4, 0, 0>" with &.foo is expected to eq "<0, 4, 2>" with repeated lvar receivers is expected to eq "<3, 5, 3>" with a for is expected to eq "<2, 1, 1>" with &&= is expected to eq "<2, 0, 1>" with ||= is expected to eq "<2, 0, 1>" with unused assignments is expected to eq "<2, 1, 0>" multiple calls with return is expected to eq "<0, 3, 0>" if and arithmetic operations is expected to eq "<2, 8, 4>" assignment with ternary operator is expected to eq "<2, 6, 2>" RuboCop::Cop::Style::GlobalVars does not register an offense for built-in variable $-v does not register an offense for built-in variable $$ does not register an offense for built-in variable $ERROR_POSITION does not register an offense for built-in variable $PREMATCH does not register an offense for built-in variable $ORS does not register an offense for built-in variable $-l does not register an offense for built-in variable $-a does not register an offense for built-in variable $LAST_PAREN_MATCH does not register an offense for built-in variable $" does not register an offense for built-in variable $ERROR_INFO does not register an offense for built-in variable $& does not register an offense for built-in variable $RS does not register an offense for built-in variable $stdin does not register an offense for built-in variable $DEFAULT_INPUT does not register an offense for built-in variable $< does not register an offense for built-in variable $@ does not register an offense for built-in variable $\ does not register an offense for built-in variable $IGNORECASE does not register an offense for built-in variable $' does not register an offense for built-in variable $LAST_READ_LINE does not register an offense for built-in variable $FIELD_SEPARATOR does not register an offense for built-in variable $FILENAME does not register an offense for built-in variable $> does not register an offense for built-in variable $= allows user permitted variables does not register an offense for built-in variable $-p does not register an offense for built-in variable $JRUBY_VERSION does not register an offense for built-in variable $OFS does not register an offense for built-in variable $. does not register an offense for built-in variable $CHILD_STATUS does not register an offense for built-in variable $~ does not register an offense for built-in variable $: does not register an offense for built-in variable $JRUBY_REVISION does not register an offense for built-in variable $+ does not register an offense for built-in variable $DEFAULT_OUTPUT does not register an offense for built-in variable $stdout does not register an offense for built-in variable $LOADED_FEATURES does not register an offense for built-in variable $! does not register an offense for built-in variable $ENV_JAVA does not register an offense for built-in variable $VERBOSE does not register an offense for built-in variable $-0 does not register an offense for built-in variable $0 registers an offense for $custom does not register an offense for built-in variable $/ does not register an offense for built-in variable $-d does not register an offense for built-in variable $? does not register an offense for built-in variable $ARGV does not register an offense for built-in variable $` does not register an offense for built-in variable $MATCH does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR does not register an offense for built-in variable $-i does not register an offense for built-in variable $LOAD_PATH does not register an offense for built-in variable $PID does not register an offense for built-in variable $-F does not register an offense for built-in variable $-I does not register an offense for built-in variable $PROGRAM_NAME does not register an offense for built-in variable $DEBUG does not register an offense for built-in variable $INPUT_LINE_NUMBER does not register an offense for built-in variable $* does not register an offense for built-in variable $FS does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR does not register an offense for built-in variable $NR does not register an offense for built-in variable $, does not register an offense for built-in variable $SAFE does not register an offense for built-in variable $POSTMATCH does not register an offense for backrefs like $1 does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR does not register an offense for built-in variable $_ does not register an offense for built-in variable $-w does not register an offense for built-in variable $PROCESS_ID does not register an offense for built-in variable $LAST_MATCH_INFO does not register an offense for built-in variable $stderr does not register an offense for built-in variable $CLASSPATH does not register an offense for built-in variable $; RuboCop::Cop::Style::MutableConstant Strict: true freezes a heredoc allows calls to freeze behaves like immutable objects allows OTHER_CONST to be assigned to a constant allows OTHER_CONST to be ||= to a constant behaves like immutable objects allows :sym to be ||= to a constant allows :sym to be assigned to a constant behaves like mutable objects when assigning with = registers an offense for Something.new assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for Something.new assigned to a constant and corrects by adding .freeze behaves like immutable objects allows Namespace::OTHER_CONST to be assigned to a constant allows Namespace::OTHER_CONST to be ||= to a constant behaves like mutable objects when assigning with = registers an offense for 'str' assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for 'str' assigned to a constant and corrects by adding .freeze methods and operators that produce frozen objects accepts assigning to an environment variable with a fallback accepts comparison operators accepts operating on a constant and an interger accepts operating on multiple floats accepts checking fixed size accepts operating on a constant and a float accepts operating on multiple integers behaves like immutable objects allows Struct.new to be ||= to a constant allows Struct.new to be assigned to a constant behaves like immutable objects allows Struct.new(:a, :b) to be ||= to a constant allows Struct.new(:a, :b) to be assigned to a constant behaves like immutable objects allows ::Namespace::OTHER_CONST to be assigned to a constant allows ::Namespace::OTHER_CONST to be ||= to a constant behaves like mutable objects when assigning with ||= registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze operators that produce unfrozen objects registers an offense when operating on multiple strings registers an offense when operating on a constant and a string splat expansion expansion of a range registers an offense and corrects to use to_a.freeze with parentheses registers an offense and corrects to use to_a.freeze behaves like immutable objects allows ::Struct.new to be ||= to a constant allows ::Struct.new to be assigned to a constant behaves like immutable objects allows 1.5 to be ||= to a constant allows 1.5 to be assigned to a constant behaves like immutable objects allows Struct.new(:node) do def assignment? true end end to be ||= to a constant allows Struct.new(:node) do def assignment? true end end to be assigned to a constant behaves like immutable objects allows 1 to be ||= to a constant allows 1 to be assigned to a constant behaves like mutable objects when assigning with = registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning with multiple operator calls registers an offense and corrects with parens and freeze when the frozen string literal comment is true behaves like immutable objects allows "#{a}" to be ||= to a constant allows "#{a}" to be assigned to a constant when the frozen string literal comment is false behaves like mutable objects when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze behaves like immutable objects allows ::ENV['foo'] to be assigned to a constant allows ::ENV['foo'] to be ||= to a constant behaves like mutable objects when assigning with ||= registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when assigning an array without brackets adds brackets when auto-correcting does not add brackets to %w() arrays behaves like immutable objects allows ENV['foo'] to be ||= to a constant allows ENV['foo'] to be assigned to a constant behaves like mutable objects when assigning with = registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when the frozen string literal comment is missing behaves like mutable objects when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with an operator behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like immutable objects allows ::OTHER_CONST to be assigned to a constant allows ::OTHER_CONST to be ||= to a constant Strict: false allows method call assignments behaves like immutable objects allows :sym to be assigned to a constant allows :sym to be ||= to a constant behaves like immutable objects allows ENV['foo'] to be assigned to a constant allows ENV['foo'] to be ||= to a constant behaves like immutable objects allows FOO + BAR to be ||= to a constant allows FOO + BAR to be assigned to a constant when assigning a range (erange) without parenthesis does not add parenthesis to range enclosed in parentheses adds parenthesis when auto-correcting when assigning an array without brackets adds brackets when auto-correcting does not add brackets to %w() arrays behaves like mutable objects when assigning with = registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze behaves like mutable objects when assigning with ||= registers an offense for 'str' assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for 'str' assigned to a constant and corrects by adding .freeze behaves like immutable objects allows 1 to be ||= to a constant allows 1 to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze behaves like immutable objects allows 1.5 to be ||= to a constant allows 1.5 to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze behaves like immutable objects allows ::ENV['foo'] to be ||= to a constant allows ::ENV['foo'] to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when assigning a range (irange) without parenthesis does not add parenthesis to range enclosed in parentheses adds parenthesis when auto-correcting behaves like immutable objects allows FOO - BAR to be ||= to a constant allows FOO - BAR to be assigned to a constant splat expansion expansion of a range registers an offense and corrects to use to_a.freeze with parentheses registers an offense and corrects to use to_a.freeze behaves like immutable objects allows 'foo' + 'bar' to be assigned to a constant allows 'foo' + 'bar' to be ||= to a constant when the constant is a frozen string literal when the frozen string literal comment is missing behaves like mutable objects when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when the frozen string literal comment is true behaves like immutable objects allows "#{a}" to be ||= to a constant allows "#{a}" to be assigned to a constant when the frozen string literal comment is false behaves like mutable objects when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze RuboCop::Cop::Lint::EachWithObjectArgument accepts a variable argument accepts two arguments registers an offense for bignum argument accepts a string argument registers an offense for float argument registers an offense for fixnum argument when using safe navigation operator registers an offense for fixnum argument RuboCop::Cop::Team when incompatible cops are correcting together auto corrects without SyntaxError #debug? when the option argument of .new is omitted is expected to be falsey when { debug: true } is passed to .new is expected to be truthy #forces returns force instances when multiple cops joined a same force returns only one force instance when a cop joined a force returns the force when no cops joined force returns nothing #autocorrect? when { auto_correct: true } is passed to .new is expected to be truthy when the option argument of .new is omitted is expected to be falsey #inspect_file returns offenses when autocorrection is enabled still returns offenses does autocorrection when Parser reports non-fatal warning for the file returns Parser warning offenses returns offenses from cops when a cop has no interest in the file returns all offenses except the ones of the cop when Cop#on_* raises an error records Team#errors when a correction raises an error records Team#errors when done twice allows cops to get ready .new accepts cops directly classes calls mobilize when passed classes #external_dependency_checksum does not error with no cops when cop with different checksum joins has a different checksum for the whole team when a cop joins returns string when multiple cops join returns string #cops returns cop instances when only some cop classes are passed to .new returns only instances of the classes when some classes are disabled with config does not return instances of the classes RuboCop::Cop::EnforceSuperclass registers an offense for models that subclass ::ActiveRecord::Base registers an offense for Class.new definition registers an offense for model defined using top-level registers an offense for top-level constant ::Class.new definition registers an offense for single-line definitions registers an offense for models that subclass ActiveRecord::Base when MyModel subclasses ApplicationRecord behaves like no offense registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do end MyModel = ::Class.new(::ApplicationRecord) ` behaves like no offense registers no offenses for `class MyModel < ApplicationRecord; end` behaves like no offense registers no offenses for `class MyModel < ::ApplicationRecord; end` behaves like no offense registers no offenses for `MyModel = Class.new(ApplicationRecord) do end MyModel = Class.new(ApplicationRecord) ` when ApplicationRecord subclasses ActiveRecord::Base behaves like no offense registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` behaves like no offense registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) ` behaves like no offense registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` behaves like no offense registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) ` RuboCop::Cop::Style::RedundantSort registers an offense when slice(0) is called on sort does not register an offense when sort_by is used without first registers an offense when [0] is called on sort registers an offense when last is called on sort with comparator registers an offense when first is called with sort registers an offense when last is called on sort_by registers an offense when [-1] is called on sort does not register an offense when sort_by is not given a block registers an offense when first is called on sort_by registers an offense when last is called with sort does not register an offense when first is used before sort does not register an offense when first is used without sort_by registers an offense when [](-1) is called on sort_by does not register an offense for sort!.first registers an offense when slice(0) is called on sort_by registers an offense when last is called on sort_by no block does not register an offense when first has an argument registers an offense when at(-1) is called with sort registers an offense when first is called on sort_by no block registers an offense when [-1] is called on sort_by registers an offense when at(0) is called on sort_by registers an offense when [](0) is called on sort registers an offense when slice(-1) is called on sort_by registers an offense when [0] is called on sort_by does not register an offense for sort_by!(&:something).last >= Ruby 2.7 when using numbered parameter registers an offense and corrects when last is called on sort with comparator registers an offense and corrects when at(0) is called on sort_by registers an offense and corrects when first is called on sort_by when not taking first or last element does not register an offense when at(-2) is called on sort_by does not register an offense when [1] is called on sort RuboCop::ConfigObsoletion #validate when the configuration includes any obsolete cop name prints a warning message when the configuration includes any obsolete parameters prints a warning message RuboCop::Cop::Style::NestedTernaryOperator registers an offense and corrects for a nested ternary operator expression registers an offense and corrects for a nested ternary operator expression with block accepts a non-nested ternary operator within an if RuboCop::Cop::Layout::SpaceInsideRangeLiteral accepts no space inside ... literal accepts no space inside .. literal accepts complex range literal with space in it registers an offense for space inside ... literal registers an offense for space inside .. literal registers an offense in multiline range literal with space in it accepts multiline range literal with no space in it RuboCop::Cop::Lint::Debugger does not report an offense for a debugger method does not report an offense for a non-pry binding reports an offense for a web console binding call reports an offense for a remote_pry binding with an argument call does not report an offense for a byebug method does not report an offense for a remote_pry in comments reports an offense for a debugger with ::Kernel call does not report an offense for a remote_pry method does not report an offense for a console method reports an offense for a debugger with Kernel call does not report an offense for a debugger in comments does not report an offense for a console in comments does not report an offense for a pry_remote in comments does not report an offense for a save_and_open_page in comments does not report an offense for a remote_byebug in comments does not report an offense for a pry in comments reports an offense for a remote_byebug call reports an offense for a remote_pry binding call reports an offense for a binding.pry with Kernel call reports an offense for a pry_remote binding call reports an offense for a Pry.rescue call does not report an offense for save_and_open_page with Kernel does not report an offense for a irb in comments does not report an offense for a save_and_open_screenshot in comments reports an offense for a pry_remote binding with an argument call does not report an offense for a irb method reports an offense for a byebug call does not report an offense for a save_screenshot method reports an offense for a pry binding with an argument call reports an offense for a binding.irb with Kernel call reports an offense for a debugger call does not report an offense for a save_screenshot in comments reports an offense for a byebug with an argument call does not report an offense for a save_and_open_page method reports an offense for a irb binding call does not report an offense for a pry method does not report an offense for a remote_byebug method reports an offense for a pry binding call does not report an offense for a save_and_open_screenshot method reports an offense for a debugger with an argument call does not report an offense for a pry_remote method does not report an offense for a byebug in comments with capybara debug method call reports an offense for save_and_open_page reports an offense for save_screenshot reports an offense for save_and_open_screenshot with an argument reports an offense for save_and_open_page reports an offense for save_screenshot reports an offense for save_and_open_screenshot RuboCop::Cop::Style::LambdaCall when style is set to call registers an offense for x.() registers an offense for correct + opposite when style is set to braces accepts a call without receiver registers an offense for x.call() registers an offense for opposite + correct auto-corrects x.call asdf, x123 to x.(asdf, x123) auto-corrects x.call to x.() RuboCop::Cop::Style::SignalException when enforced style is `raise` registers an offense for `fail` with `Kernel` as explicit receiver registers an offense for fail in begin section accepts `fail` with explicit receiver registers an offense for fail in rescue section accepts `fail` if a custom `fail` singleton method is defined accepts `fail` if a custom `fail` instance method is defined registers an offense for fail in def body when enforced style is `semantic` accepts `raise` and `fail` with explicit receiver registers an offense for `raise` and `fail` with `Kernel` as explicit receiver accepts raise in def with multiple rescues registers an offense for raise not in a begin/rescue/end accepts raise in rescue section registers an offense for fail in def rescue section registers only offense for one raise that should be fail accepts raise in def rescue section registers an offense for fail in rescue section registers an offense for raise in def body registers one offense for each raise registers an offense for raise in begin section is not confused by nested begin/rescue registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver registers an offense for fail in second rescue when enforced style is `fail` registers an offense for raise in begin section accepts `raise` with explicit receiver registers an offense for `raise` with `Kernel` as explicit receiver registers an offense for raise in rescue section registers an offense for raise in def body RuboCop::Cop::Style::InfiniteLoop registers an offense for a while loop with [1] as condition accepts modifier while true if loop {} would change semantics registers an offense for modifier until false if loop {} would not change semantics accepts Kernel#loop registers an offense for while true if loop {} would work because it is an instance variable being assigned registers an offense for a while loop with {} as condition registers an offense for until false if loop {} would work because the assigned variable is not used afterwards registers an offense for a while loop with 2.0 as condition registers an offense for until false if loop {} would work because of previous assignment in a while loop accepts while true if loop {} would change semantics registers an offense for a while loop with 1 as condition registers an offense for a until loop with false as condition registers an offense for a until loop with nil as condition registers an offense for while true or until false if loop {} would work because of an earlier assignment behaves like auto-corrector auto-corrects the usage of until with do auto-corrects begin-end-until with one statement auto-corrects single line modifier until with and auto-corrects begin-end-until with two statements auto-corrects the usage of until without do auto-corrects single line modifier until with non-default indentation width auto-corrects multi-line modifier until and indents correctly behaves like auto-corrector auto-corrects single line modifier while with and auto-corrects single line modifier while auto-corrects the usage of while with do auto-corrects the usage of while without do auto-corrects begin-end-while with one statement auto-corrects begin-end-while with two statements with non-default indentation width auto-corrects multi-line modifier while and indents correctly RuboCop::Cop::Style::MissingElse EmptyElse enabled and set to warn on empty given a case statement with an else-clause containing only the literal nil doesn't register an offense with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given an unless-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense UnlessElse disabled given an if-statement with an else-clause containing only the literal nil doesn't register an offense with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense given a case statement with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given an unless-statement with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense UnlessElse enabled given an unless-statement with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with no else-clause doesn't register an offense given a case statement with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense with a completely empty else-clause doesn't register an offense given an if-statement with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense configured to warn only on empty case given a case statement with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense given an if-statement with no else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given an unless-statement with no else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense configured to warn only on empty if given an unless-statement with no else-clause registers an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given an if-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense given a case statement with no else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense EmptyElse enabled and set to warn on nil given an unless-statement with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense given a case statement with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense RuboCop::Cop::Naming::AsciiIdentifiers when AsciiConstants is true registers an offense for a variable name with mixed chars registers an offense for a constant name with non-ascii chars does not get confused by an empty file registers an offense for a variable name with non-ascii chars accepts identifiers with only ascii chars does not get confused by a byte order mark when AsciiConstants is false registers an offense for a variable name with mixed chars registers an offense for a variable name with non-ascii chars does not get confused by a byte order mark does not get confused by an empty file accepts constants with only ascii chars accepts identifiers with only ascii chars RuboCop::Cop::Security::YAMLLoad does not register an offense for YAML.load under a different namespace registers an offense and corrects load with a literal string registers an offense and corrects a fully qualified ::YAML.load does not register an offense for YAML.dump RuboCop::Formatter::TextUtil pluralize will pluralize fractions will change 0 to no when configured will not change 0 to no will pluralize negative quantities less than -1 will pluralize quantities greater than 1 will pluralize -1 will not pluralize 1 RuboCop::Cop::Style::YodaCondition enforce yoda accepts string literal on right of case equality check accepts accessor and variable on right in boolean expression accepts global variable on right registers an offense for string literal on right accepts string literal on left accepts method call on receiver on right accepts arrays of numbers on both sides accepts assignment accepts class variable on right accepts number on left of <=> accepts instance variable on right accepts safe navigation on right registers an offense for number on right of comparison registers an offense for boolean literal on right accepts numbers on both sides accepts variable on right after assignment registers an offense for number on right accepts subtraction on right of comparison accepts negation registers an offense for nil on right with EnforcedStyle: require_for_equality_operators_only accepts number on right of comparison registers an offense for negated equality check accepts mixed order in comparisons accepts nil on right of comparison registers an offense for equality check within an if or ternary statement registers an offense for number on right of <= in ternary condition registers an offense number on right in if condition registers an offense number on right of comparison in if condition registers an offense for number on right of >= in ternary condition registers an offense for nil on right in ternary condition registers an offense for number on right in modifier if enforce not yoda registers an offense number on left of comparison registers an offense number on left accepts global variable on left accepts __FILE__ on left in program name check accepts __FILE__ on left in negated program name check accepts string literal on right accepts subtraction expression on left of comparison accepts accessor and variable on left in boolean expression accepts array of numbers on both sides accepts string literal on left of case equality check registers an offense for nil on left accepts assignment accepts interpolated regex on left registers an offense for boolean literal on left accepts interpolated string on left accepts negation accepts class variable on left registers an offense for string literal on left accepts number on both sides accepts safe navigation on left accepts instance variable on left accepts variable on left after assign accepts number on left of <=> accepts method call on receiver on left within an if or ternary statement registers an offense for number on left of >= in ternary condition registers an offense for number on left of <= in ternary condition registers an offense for nil on left in ternary condition registers an offense for number on left in modifier if registers an offense for number on left of comparison in if condition registers an offense for number on left in if condition with EnforcedStyle: forbid_for_equality_operators_only accepts mixed order in comparisons registers an offense for negated equality check registers an offense for equality check accepts number on left of comparison accepts nil on left of comparison RuboCop::Cop::Style::IfWithSemicolon can handle modifier conditionals accepts without `else` branch registers an offense and corrects for one line if/;/end RuboCop::Cop::Layout::EndAlignment registers an offense for mismatched puts 1; unless test end accepts matching until ... end registers an offense for mismatched case a when b end accepts matching if ... end registers an offense for mismatched module Test end can handle ternary if accepts matching while ... end auto-corrects mismatched unless test end can handle modifier if registers an offense for mismatched puts 1; case a when b end auto-corrects mismatched module Test end auto-corrects mismatched while test end registers an offense for mismatched unless test end registers an offense for mismatched until test end registers an offense for mismatched puts 1; if test end registers an offense for mismatched puts 1; class Test end accepts matching puts 1; class ... end auto-corrects mismatched puts 1; case a when b end accepts matching unless ... end auto-corrects mismatched puts 1; unless test end auto-corrects mismatched puts 1; until test end accepts matching puts 1; case ... end accepts matching puts 1; while ... end auto-corrects mismatched puts 1; class Test end auto-corrects mismatched case a when b end accepts matching module ... end registers an offense for mismatched if test end accepts matching puts 1; until ... end auto-corrects mismatched until test end accepts matching puts 1; unless ... end auto-corrects mismatched puts 1; class Test end registers an offense for mismatched module Test end registers an offense for mismatched puts 1; while test end accepts matching class ... end accepts matching class ... end auto-corrects mismatched puts 1; if test end registers an offense for mismatched while test end accepts matching case ... end auto-corrects mismatched module Test end auto-corrects mismatched if test end auto-corrects mismatched puts 1; while test end accepts matching puts 1; if ... end registers an offense for mismatched puts 1; until test end accepts matching puts 1; module ... end registers an offense for mismatched puts 1; class Test end when end is preceded by something else than whitespace does not register an offense case as argument when EnforcedStyleAlignWith is keyword accepts matching test case ... end registers an offense for mismatched test case a when b end auto-corrects mismatched test case a when b end when EnforcedStyleAlignWith is start_of_line accepts matching test case a when b ... end auto-corrects mismatched test case a when b end registers an offense for mismatched test case a when b end when EnforcedStyleAlignWith is variable auto-corrects mismatched test case a when b end registers an offense for mismatched test case a when b end accepts matching test case ... end correct + opposite registers an offense and corrects when EnforcedStyleAlignWith is variable accepts matching puts 1; while ... end registers an offense for mismatched module Test end auto-corrects mismatched puts 1; until test end accepts matching if ... end registers an offense for mismatched puts 1; case a when b end auto-corrects mismatched puts 1; if test end registers an offense for mismatched case a when b end accepts matching module ... end accepts matching class ... end auto-corrects mismatched unless test end accepts matching while ... end registers an offense for mismatched until test end auto-corrects mismatched puts 1; class Test end accepts matching case ... end registers an offense for mismatched puts 1; class Test end accepts matching puts 1; until ... end auto-corrects mismatched module Test end accepts matching until ... end accepts matching puts 1; unless ... end registers an offense for mismatched puts 1; module Test end registers an offense for mismatched class Test end accepts matching unless ... end auto-corrects mismatched case a when b end registers an offense for mismatched puts 1; while test end auto-corrects mismatched until test end auto-corrects mismatched puts 1; case a when b end accepts matching puts 1; class ... end auto-corrects mismatched puts 1; unless test end accepts matching puts 1; if ... end auto-corrects mismatched puts 1; module Test end accepts matching puts 1; case ... end registers an offense for mismatched while test end auto-corrects mismatched puts 1; while test end accepts matching puts 1; module ... end registers an offense for mismatched puts 1; until test end registers an offense for mismatched puts 1; if test end auto-corrects mismatched while test end auto-corrects mismatched class Test end registers an offense for mismatched if test end auto-corrects mismatched if test end registers an offense for mismatched puts 1; unless test end registers an offense for mismatched unless test end regarding assignment when EnforcedStyleAlignWith is keyword accepts matching var = until ... end registers an offense for mismatched var = while test end auto-corrects mismatched var = until test end registers an offense for mismatched var = until test end auto-corrects mismatched var = if test end auto-corrects mismatched var << until test end accepts matching var = case ... end registers an offense for mismatched var << until test end registers an offense for mismatched var = if test end accepts matching var = if ... end accepts matching var = while ... end registers an offense for mismatched var = unless test end auto-corrects mismatched var = unless test end accepts matching var[0] = case ... end accepts matching var = unless ... end auto-corrects mismatched var = while test end when EnforcedStyleAlignWith is variable auto-corrects mismatched var = case a when b end registers an offense for mismatched h[k] << if test end registers an offense for mismatched var = # comment while test end registers an offense for mismatched var = if test end auto-corrects mismatched @@var << if test end accepts matching @@var = if ... end accepts matching var = until ... end registers an offense for mismatched var << case a when b end registers an offense for mismatched var ||= if test end registers an offense for mismatched var << until test end auto-corrects mismatched var << unless test end auto-corrects mismatched var[x] = while test end registers an offense for mismatched var << if test end auto-corrects mismatched @var << if test end accepts matching var ||= if ... end registers an offense for mismatched var &&= if test end auto-corrects mismatched var << case a when b end accepts matching h[k] = if ... end auto-corrects mismatched @@var = if test end registers an offense for mismatched var = until test do_something end auto-corrects mismatched $var << if test end registers an offense for mismatched var = while test end registers an offense for mismatched h.k = if test end accepts matching var = if ... end registers an offense for mismatched var = unless test end registers an offense for mismatched $var = if test end accepts matching $var = if ... end auto-corrects mismatched var = until test end accepts matching var = case ... end auto-corrects mismatched var = # comment while test end auto-corrects mismatched var = unless test end registers an offense for mismatched var = case a when b end accepts matching var = if ... end auto-corrects mismatched var = while test end auto-corrects mismatched a, b = if test end accepts matching var << if ... end auto-corrects mismatched h.k = if test end auto-corrects mismatched var << until test end auto-corrects mismatched var = until test end.j auto-corrects mismatched $var = if test end registers an offense for mismatched var = until test end.j auto-corrects mismatched CNST = if test end registers an offense for mismatched @var << if test end auto-corrects mismatched var = until test do_something end accepts matching CNST = if ... end registers an offense for mismatched var[x] = while test end auto-corrects mismatched var ||= if test end accepts matching var = until ... end registers an offense for mismatched var << unless test end auto-corrects mismatched var = if test end auto-corrects mismatched var = if test end accepts matching var &&= if ... end auto-corrects mismatched h[k] = if test end auto-corrects mismatched CNST << if test end auto-corrects mismatched var << if test end registers an offense for mismatched a, b = if test end registers an offense for mismatched CNST << if test end accepts matching h.k = if ... end auto-corrects mismatched var &&= if test end registers an offense for mismatched CNST = if test end accepts matching var = until ... end auto-corrects mismatched @var = if test end registers an offense for mismatched @@var << if test end registers an offense for mismatched h[k] = if test end registers an offense for mismatched @var = if test end accepts matching var = unless ... end accepts matching a, b = if ... end accepts matching @var = if ... end accepts matching var += if ... end registers an offense for mismatched var = until test end registers an offense for mismatched var = unless test end auto-corrects mismatched var = unless test end registers an offense for mismatched var = if test end registers an offense for mismatched @@var = if test end auto-corrects mismatched h[k] << if test end registers an offense for mismatched var += if test end accepts matching var = while ... end auto-corrects mismatched var += if test end registers an offense for mismatched $var << if test end when EnforcedStyleAlignWith is start_of_line registers an offense for mismatched puts 1; class Test end accepts matching puts 1; if ... end auto-corrects mismatched unless test end accepts matching var = until ... end auto-corrects mismatched var = if test end accepts matching var << while ... end registers an offense for mismatched var << unless test end accepts matching puts 1; class ... end accepts matching var = unless ... end registers an offense for mismatched puts(if test end) auto-corrects mismatched puts 1; unless test end registers an offense for mismatched if test end registers an offense for mismatched var << while test end auto-corrects mismatched var = unless test end accepts matching puts 1; unless ... end accepts matching puts 1; while ... end auto-corrects mismatched var = until test end registers an offense for mismatched until test end auto-corrects mismatched module Test end registers an offense for mismatched var = if test end auto-corrects mismatched var << if test end registers an offense for mismatched puts 1; unless test end registers an offense for mismatched var = while test end registers an offense for mismatched var = until test end auto-corrects mismatched while test end auto-corrects mismatched puts(if test end) auto-corrects mismatched var = case a when b end registers an offense for mismatched var << if test end accepts matching var = if ... end auto-corrects mismatched if test end accepts matching var = if ... end registers an offense for mismatched var = if test end auto-corrects mismatched var << while test end auto-corrects mismatched puts 1; class Test end accepts matching puts 1; until ... end auto-corrects mismatched puts 1; module Test end registers an offense for mismatched unless test end auto-corrects mismatched var << unless test end auto-corrects mismatched puts 1; case a when b end auto-corrects mismatched var = while test end registers an offense for mismatched while test end auto-corrects mismatched puts 1; while test end registers an offense for mismatched module Test end accepts matching puts 1; module ... end auto-corrects mismatched class Test end registers an offense for mismatched class Test end registers an offense for mismatched var = unless test end accepts matching var = while ... end registers an offense for mismatched puts 1; module Test end auto-corrects mismatched var << case a when b end registers an offense for mismatched var << until test end accepts matching var = case ... end auto-corrects mismatched case a when b end auto-corrects mismatched puts 1; until test end registers an offense for mismatched var << case a when b end auto-corrects mismatched until test end registers an offense for mismatched puts 1; case a when b end accepts matching puts 1; case ... end registers an offense for mismatched puts 1; while test end auto-corrects mismatched puts 1; if test end auto-corrects mismatched var = if test end registers an offense for mismatched puts 1; until test end registers an offense for mismatched puts 1; if test end registers an offense for mismatched case a when b end auto-corrects mismatched var << until test end registers an offense for mismatched var = case a when b end RuboCop::Cop::Lint::ShadowedException single rescue accepts an empty rescue accepts rescuing a custom exception and a standard exception accepts rescuing a single exception that has an else registers an offense rescuing Exception with any other error or exception accepts splat arguments passed to rescue accepts rescuing a single exception accepts rescuing a single custom exception registers an offense for the same exception multiple times accepts rescuing multiple custom exceptions accepts rescuing a single exception that is assigned to a variable rescue a exception without causing constant name deprecation warning accepts rescuing a multiple exceptions that are not ancestors that have an else accepts rescue containing multiple same error code exceptions accepts rescuing a single exception that has an ensure registers an offense rescuing exceptions that are ancestors of each other when there are multiple levels of exceptions in the same rescue registers an offense for more than two exceptions registers an offense for two exceptions multiple rescues accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions accepts many (>= 7) rescue groups accepts rescuing exceptions in order of level accepts rescuing a known exception after an unknown exceptions registers an offense rescuing Exception before an unknown exceptions registers an offense when a higher level exception is rescued before a lower level exception accepts rescuing custom exceptions in multiple rescue groups ignores expressions of non-const registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group registers an offense rescuing out of order exceptions when there is an ensure accepts rescuing a known exception between unknown exceptions accepts rescuing exceptions in order of level with multiple exceptions in a group registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue accepts rescuing a known exception before an unknown exceptions splat arguments registers an offense for splat arguments rescued after rescuing a known exception registers an offense for splat arguments rescued after rescuing Exception accepts splat arguments passed to multiple rescues exceptions from different ancestry chains accepts rescuing exceptions in another order accepts rescuing exceptions in one order last rescue does not specify exception class highlights range ending at rescue keyword modifier rescue accepts rescue in its modifier form RuboCop::Cop::Layout::LeadingCommentSpace does not register an offense for # followed by no text does not register an offense for #! on first line does not register an offense for only #s accepts =begin/=end comments registers an offense and corrects comment without leading space does not register an offense for more than one space accepts sprockets directives accepts rdoc syntax registers an offense and corrects #! after the first line does not register an offense for more than one # Doxygen style when config option is disabled registers an offense and corrects using Doxygen style when config option is enabled does not register offense when using Doxygen style file named config.ru does not register an offense for #\ on first line registers an offense and corrects for #\ after the first line file not named config.ru registers an offense and corrects #\ after the first line registers an offense and corrects #\ on first line Gemfile Ruby comment when config option is enabled file not named Gemfile registers an offense when using ruby config as comment file named Gemfile does not register an offense when using ruby config as comment when config option is disabled registers an offense when using ruby config as comment RuboCop::Cop::Style::Alias when EnforcedStyle is prefer_alias_method does not register an offense for alias_method does not register an offense for alias in an instance_eval block does not register an offense for alias with gvars registers an offense for alias with bareword args registers an offense for alias with symbol args when EnforcedStyle is prefer_alias registers an offense for alias_method in a class block does not register an offense for alias_method with non-literal constant argument registers an offense for alias_method at the top level registers an offense for alias with symbol args does not register an offense for alias_method in self.method def does not register an offense for alias_method with explicit receiver registers an offense for alias_method in a module block does not register an offense for alias_method with non-literal method call argument does not register an offense for alias_method in a method def does not register an offense for alias in an instance_eval block does not register an offense for alias_method in a block does not register an offense for alias with bareword args RuboCop::Cop::Security::MarshalLoad does not register an offense Marshal methods under another namespace allows using dangerous Marshal methods for deep cloning registers an offense for using Marshal.load registers an offense for using Marshal.restore does not register an offense for Marshal.dump RuboCop::Cop::Style::NumericLiterals autocorrects negative floating-point numbers handles numeric literal with exponent registers an offense for an integer with misplaced underscore autocorrects numeric literal with exponent (large E) and dot autocorrects numeric literal with exponent and dot accepts a short integer without underscore accepts long numbers with underscore ignores non-decimal literals autocorrects numbers with spaces between leading minus and numbers autocorrects negative numbers registers an offense for a long undelimited integer accepts integers with less than three places at the end does not count a leading minus sign as a digit accepts short numbers without underscore registers an offense for a float with a long undelimited integer part strict registers an offense for an integer with misplaced underscore RuboCop::Cop::Style::TrailingMethodEndStatement does not register on single line no op register offense with trailing end on method with comment auto-corrects all trailing ends for larger example register offense with trailing end on 3 line method register offense with trailing end on method with block register offense with trailing end on 2 line method register offense with trailing end inside class does not register on single line method RuboCop::Cop::Style::PercentLiteralDelimiters `%i` symbol array does not register an offense for non-preferred delimiters enclosing escaped delimiters does not register an offense for preferred delimiters registers an offense for other delimiters `%w` string array does not register an offense for preferred delimiters with a pairing delimiters does not register an offense for preferred delimiters with only a closing delimiter does not register an offense for preferred delimiters with not a pairing delimiter does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters does not register an offense for preferred delimiters `%Q` interpolated string does not register an offense for preferred delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters `%s` symbol registers an offense for other delimiters does not register an offense for preferred delimiters `%r` interpolated regular expression registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for preferred delimiters does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for a regular expression with option registers an offense for other delimiters `%W` interpolated string array does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for preferred delimiters `%q` string does not register an offense for preferred delimiters registers an offense for other delimiters does not register an offense for other delimiters when containing preferred delimiter characters `%I` interpolated symbol array does not register an offense for preferred delimiters registers an offense for other delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation `%` interpolated string registers an offense for other delimiters when containing preferred delimiter characters in interpolation registers an offense when the source contains invalid characters registers an offense for a string with no content does not register an offense for preferred delimiters does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters `%x` interpolated system call does not register an offense for preferred delimiters registers an offense for other delimiters does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters when containing preferred delimiter characters in interpolation `default` override allows all preferred delimiters to be set with one key allows individual preferred delimiters to override `default` invalid cop config raises an error when invalid configuration is specified auto-correct preserves irregular indentation when correcting a multiline array preserves line breaks when fixing a multiline array fixes a string array in a scope preserves indentation when correcting a multiline array behaves like escape characters corrects % with \t in it corrects % with \n in it behaves like escape characters corrects %x with \n in it corrects %x with \t in it behaves like escape characters corrects %i with \t in it corrects %i with \n in it behaves like escape characters corrects %Q with \n in it corrects %Q with \t in it behaves like escape characters corrects %s with \n in it corrects %s with \t in it behaves like escape characters corrects %W with \t in it corrects %W with \n in it behaves like escape characters corrects %w with \t in it corrects %w with \n in it behaves like escape characters corrects %q with \n in it corrects %q with \t in it behaves like escape characters corrects %r with \t in it corrects %r with \n in it RuboCop::Cop::Style::StderrPuts registers no offense when using `$stderr.puts` with no arguments registers an offense when using `::STDERR.puts('hello')` registers an offense when using `$stderr.puts('hello')` registers no offense when using `STDERR.puts` with no arguments registers an offense when using `STDERR.puts('hello')` RuboCop::Cop::Style::MethodCallWithoutArgsParentheses registers an offense for parens in method call without args registers an offense for `obj.method += func()` accepts special lambda call syntax accepts parens in method call with args ignores method listed in IgnoredMethods accepts parentheses for methods starting with an upcase letter registers an offense for `obj.method ||= func()` registers an offense for `obj.method &&= func()` auto-corrects calls that could be empty literals accepts parens after not method call as argument registers an empty parens offense for multiple assignment registers an offense with empty parens accepts without parens assignment to a variable with the same name accepts parens in local variable assignment accepts parens in complex assignment accepts parens in parallel assignment accepts parens in shorthand assignment RuboCop::Cop::Naming::AccessorMethodName registers an offense for method set_something with one arg registers an offense for method get_... with no args accepts singleton method set_something with no args accepts method set_something with no args accepts singleton method get_something with args accepts method set_something with two args accepts method get_something with args registers an offense for singleton method set_... with one args registers an offense for singleton method get_... with no args accepts singleton method set_something with two args RuboCop::Cop::Style::FrozenStringLiteralComment never registers an offense for a disabled frozen string literal below a shebang comment registers an offense for a disabled frozen string literal below an encoding comment accepts not having a frozen string literal comment on the top line registers an offense for a frozen string literal comment below a shebang comment accepts a source with no tokens accepts an empty source registers an offense for a disabled frozen string literal comment below shebang above an encoding comments registers an offense for a frozen string literal comment below shebang above an encoding comments registers an offense for a frozen string literal comment below an encoding comment accepts a frozen string literal comment under ruby code registers an offense for a disabled frozen string literal comment on the top line accepts not having not having a frozen string literal comment under a shebang registers an offense for a frozen string literal comment below shebang and encoding comments allows not having a frozen string literal comment under an encoding comment allows not having a frozen string literal comment under a shebang and an encoding comment registers an offense for a frozen string literal comment on the top line registers an offense for a disabled frozen string literal comment below shebang and encoding comments registers an offense for having a frozen string literal comment after other comments always_true registers an offense for a disabled frozen string literal comment below shebang above an encoding comments registers an offense for a disabled frozen string literal below a shebang comment registers an offense for arbitrary tokens below shebang above an encoding comments accepts a frozen string literal comment after other comments accepts a frozen string literal below an encoding comment registers an offense for a disabled frozen string literal comment after other comments registers an offense for arbitrary tokens under shebang with no other code accepts a frozen string literal comment under shebang with no other code accepts a frozen string literal on the top line accepts a frozen string literal comment below an encoding comment and extra space registers an offense for arbitrary tokens below a shebang comment registers an offense for a disabled frozen string literal comment below an encoding comment and extra space registers an offense for a disabled frozen string literal registers an offense for a disabled frozen string literal on the top line registers an offense for having a frozen string literal comment under ruby code registers an offense for not having a frozen string literal comment on the top line registers an offense for a disabled frozen string literal above an empty line registers an offense for arbitrary tokens below an encoding comment and extra space registers an offense for a disabled frozen string literal below an encoding comment registers an offense for a disabled frozen string literal comment under shebang with no other code registers an offense for a disabled frozen string literal comment below shebang and encoding comments registers an offense for not having a frozen string literal comment under a shebang and an encoding comment registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space registers an offense for not having a frozen string literal comment under an encoding comment registers an offense for not having a frozen string literal comment under an encoding comment and extra space registers an offense for an extra first empty line accepts an empty source accepts a frozen string literal comment below shebang above an encoding comments registers an offense for arbitrary tokens below shebang and encoding comments accepts an emacs style combined magic comment registers an offense for not having a frozen string literal comment under shebang with no other code registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space accepts a source with no tokens registers an offense for arbitrary tokens below an encoding comment registers an offense for arbitrary tokens registers an offense for arbitrary tokens above an empty line registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space accepts a frozen string literal comment below shebang and encoding comments accepts a frozen string literal comment below shebang, an encoding comment, and extra space accepts a frozen string literal below a shebang comment always registers an offense for an extra first empty line accepts a frozen string literal comment below shebang and encoding comments registers an offense for not having a frozen string literal comment on the top line accepts a frozen string literal comment after other comments accepts an emacs style combined magic comment registers an offense for not having a frozen string literal comment under an encoding comment registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline registers an offense with an empty line between magic comments and the code accepts a source with no tokens accepts a frozen string literal comment below newline-separated magic comments accepts a disabled frozen string literal below an encoding comment registers an offense for not having a frozen string literal comment under a shebang and an encoding comment accepts a frozen string literal below a shebang comment accepts a disabled frozen string literal comment below shebang and encoding comments accepts a frozen string literal on the top line accepts an empty source accepts a disabled frozen string literal below a shebang comment registers an offense for having a frozen string literal comment under ruby code registers an offense for arbitrary tokens accepts a frozen string literal comment below shebang above an encoding comments accepts a frozen string literal below an encoding comment accepts a disabled frozen string literal comment below shebang above an encoding comments registers an offense for not having a frozen string literal comment when there is only a shebang registers an offense for not having a frozen string literal comment under a shebang accepts a disabled frozen string literal on the top line RuboCop::Cop::Style::RedundantFreeze allows .freeze on method call behaves like immutable objects registers an offense for frozen (1 + 2) behaves like mutable objects allows [1, 2, 3] with freeze behaves like mutable objects allows 'str' with freeze behaves like mutable objects allows /./ with freeze behaves like immutable objects registers an offense for frozen ENV['foo'] behaves like mutable objects allows { a: 1, b: 2 } with freeze behaves like immutable objects registers an offense for frozen ('a' > 'b') behaves like mutable objects allows ('a' + 'b') with freeze behaves like immutable objects registers an offense for frozen (2 > 1) behaves like mutable objects allows (a + b) with freeze behaves like immutable objects registers an offense for frozen (a > b) behaves like immutable objects registers an offense for frozen 'foo'.count behaves like immutable objects registers an offense for frozen 1 behaves like immutable objects registers an offense for frozen ::ENV['foo'] behaves like mutable objects allows "top#{1 + 2}" with freeze behaves like immutable objects registers an offense for frozen :"" behaves like immutable objects registers an offense for frozen [1, 2, 3].size behaves like mutable objects allows (1..5) with freeze when the receiver is a frozen string literal when the frozen string literal comment is missing behaves like mutable objects allows "#{a}" with freeze when the frozen string literal comment is false behaves like mutable objects allows "#{a}" with freeze when the frozen string literal comment is true behaves like immutable objects registers an offense for frozen "#{a}" behaves like mutable objects allows (1...5) with freeze behaves like immutable objects registers an offense for frozen 1.5 behaves like immutable objects registers an offense for frozen :sym behaves like mutable objects allows ('a' * 20) with freeze RuboCop::Cop::Style::FloatDivision EnforcedStyle is single_coerce does not register offense for left coerce only does not register offense for right coerce only registers offense for both coerce registers offense for left coerce with calculations EnforcedStyle is fdiv does not register offense on usage of fdiv registers offense for right coerce registers offense for both coerce registers offense for left coerce registers offense for left coerce with calculations EnforcedStyle is left_coerce registers offense for right coerce does not register offense for left coerce registers offense for right coerce with calculations registers offense for both coerce EnforcedStyle is right_coerce registers offense for both coerce registers offense for left coerce with calculations does not register offense for right coerce registers offense for left coerce RuboCop::Cop::Style::TrailingBodyOnModule auto-corrects with comment after body registers an offense when body trails after module definition registers offense when module definition uses semicolon registers offense with multi-line module accepts regular module auto-corrects when there are multiple semicolons when module is not on first line of processed_source auto-corrects offense RuboCop::Cop::Lint::DuplicateRescueException registers an offense when duplicate exception splat exists registers an offense when multiple duplicate exceptions exist registers an offense when duplicate exception exists registers an offense when duplicate exception exists within rescues with empty `rescue` branch does not register an offense when there are no duplicate exceptions registers an offense when duplicate exception exists within rescues with `else` branch RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters accepts other percent literals accepts execute-string literals for W type and ["{", "}"] delimiters accepts spaces between entries registers an offense for spaces after first delimiter accepts literals with escaped spaces registers an offense for literals with escaped and other spaces registers an offense for unnecessary spaces accepts multi-line literals accepts multi-line literals within a method accepts literals without additional spaces registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces for I type and ["!", "!"] delimiters accepts newlines and additional following alignment spaces accepts multi-line literals registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts spaces between entries accepts literals without additional spaces registers an offense for literals with escaped and other spaces registers an offense for unnecessary spaces accepts multi-line literals within a method accepts literals with escaped spaces for x type and ["[", "]"] delimiters registers an offense for unnecessary spaces accepts literals with escaped spaces registers an offense for spaces after first delimiter accepts spaces between entries accepts multi-line literals within a method accepts multi-line literals accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts literals without additional spaces registers an offense for literals with escaped and other spaces for I type and ["(", ")"] delimiters accepts literals with escaped spaces registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces accepts multi-line literals accepts literals without additional spaces registers an offense for spaces after first delimiter accepts spaces between entries registers an offense for literals with escaped and other spaces accepts multi-line literals within a method registers an offense for unnecessary spaces for w type and ["!", "!"] delimiters accepts multi-line literals accepts newlines and additional following alignment spaces accepts spaces between entries accepts literals with escaped spaces registers an offense for spaces after first delimiter accepts multi-line literals within a method accepts literals without additional spaces registers an offense for unnecessary spaces registers an offense for spaces before final delimiter registers an offense for literals with escaped and other spaces for w type and ["{", "}"] delimiters registers an offense for spaces before final delimiter accepts multi-line literals within a method accepts multi-line literals registers an offense for unnecessary spaces accepts literals without additional spaces registers an offense for spaces after first delimiter accepts newlines and additional following alignment spaces accepts spaces between entries accepts literals with escaped spaces registers an offense for literals with escaped and other spaces for I type and ["[", "]"] delimiters accepts literals with escaped spaces accepts newlines and additional following alignment spaces registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts literals without additional spaces accepts multi-line literals within a method accepts spaces between entries registers an offense for literals with escaped and other spaces registers an offense for unnecessary spaces accepts multi-line literals for i type and ["[", "]"] delimiters accepts literals with escaped spaces accepts multi-line literals registers an offense for spaces before final delimiter registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts multi-line literals within a method accepts spaces between entries registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces for W type and ["!", "!"] delimiters accepts multi-line literals accepts newlines and additional following alignment spaces registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts literals with escaped spaces accepts spaces between entries registers an offense for spaces before final delimiter registers an offense for spaces after first delimiter accepts multi-line literals within a method registers an offense for unnecessary spaces for W type and ["[", "]"] delimiters accepts literals without additional spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts literals with escaped spaces accepts multi-line literals within a method registers an offense for unnecessary spaces registers an offense for literals with escaped and other spaces accepts newlines and additional following alignment spaces registers an offense for spaces after first delimiter accepts multi-line literals for w type and ["[", "]"] delimiters registers an offense for unnecessary spaces accepts spaces between entries accepts literals without additional spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces accepts literals with escaped spaces accepts multi-line literals registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces registers an offense for spaces before final delimiter for i type and ["{", "}"] delimiters accepts literals with escaped spaces registers an offense for unnecessary spaces accepts literals without additional spaces accepts spaces between entries accepts multi-line literals registers an offense for literals with escaped and other spaces registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces accepts multi-line literals within a method for x type and ["(", ")"] delimiters accepts newlines and additional following alignment spaces accepts literals with escaped spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts literals without additional spaces accepts multi-line literals within a method registers an offense for spaces after first delimiter registers an offense for unnecessary spaces accepts multi-line literals registers an offense for literals with escaped and other spaces for i type and ["(", ")"] delimiters accepts literals without additional spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces accepts literals with escaped spaces registers an offense for spaces after first delimiter accepts multi-line literals registers an offense for unnecessary spaces registers an offense for literals with escaped and other spaces registers an offense for spaces before final delimiter accepts spaces between entries for W type and ["(", ")"] delimiters registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces accepts spaces between entries accepts multi-line literals registers an offense for literals with escaped and other spaces accepts literals without additional spaces for x type and ["{", "}"] delimiters accepts multi-line literals registers an offense for spaces before final delimiter accepts literals with escaped spaces registers an offense for unnecessary spaces accepts literals without additional spaces registers an offense for literals with escaped and other spaces accepts multi-line literals within a method registers an offense for spaces after first delimiter accepts spaces between entries accepts newlines and additional following alignment spaces for i type and ["!", "!"] delimiters accepts multi-line literals within a method accepts multi-line literals registers an offense for unnecessary spaces registers an offense for spaces after first delimiter accepts spaces between entries accepts literals with escaped spaces accepts newlines and additional following alignment spaces accepts literals without additional spaces registers an offense for literals with escaped and other spaces registers an offense for spaces before final delimiter for I type and ["{", "}"] delimiters registers an offense for spaces after first delimiter registers an offense for unnecessary spaces accepts multi-line literals accepts newlines and additional following alignment spaces accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for spaces before final delimiter registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts spaces between entries for w type and ["(", ")"] delimiters registers an offense for spaces after first delimiter registers an offense for unnecessary spaces registers an offense for literals with escaped and other spaces accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts multi-line literals within a method accepts literals without additional spaces accepts spaces between entries accepts multi-line literals accepts literals with escaped spaces for x type and ["!", "!"] delimiters accepts literals without additional spaces accepts multi-line literals accepts spaces between entries registers an offense for unnecessary spaces registers an offense for spaces before final delimiter registers an offense for spaces after first delimiter accepts literals with escaped spaces accepts newlines and additional following alignment spaces registers an offense for literals with escaped and other spaces accepts multi-line literals within a method RuboCop::Cop::Style::BlockDelimiters BracesRequiredMethods BracesRequiredMethods methods allows braces registers an offense with do other methods auto-corrects { and } to do and end allows braces braces for chaining style registers an offense for multi-line chained do-end blocks disallows {} with no chain inside of Hash[] allows do/end inside Hash[] accepts a multi-line block with do-end accepts a multi-line block that needs braces to be valid ruby allows when :[] is chained accepts a single line block with braces registers an offense for a single line block with do-end accepts a multi-line functional block with {} if it is an ignored method allows chaining to } inside of Hash[] with safe navigation registers an offense for multi-line chained do-end blocks when there are braces around a multi-line block allows when the block is being chained with attribute assignment allows when the block is being chained registers an offense in the simple case registers an offense when combined with attribute assignment Semantic style accepts a multi-line block with braces if the return value is assigned accepts a single line block with {} if used in a logical or accepts a single line block with {} if used in an erange auto-corrects do-end to {} if it is a functional block accepts a single line block with {} if used in an irange accepts a single line block with {} if used in an if statement auto-corrects do-end to {} with appropriate spacing allows {} if it is a known procedural method auto-corrects do-end to {} if it is a functional block and does not change the meaning accepts a multi-line block with do-end if it is the return value of its scope registers an offense for a multi-line block with do-end if the return value is assigned registers an offense for a multi-line block with do-end if the return value is attribute-assigned accepts a single line block with {} if used in a logical and accepts a single line block with {} if used in an array allows {} if it is a known functional method accepts a multi-line block with braces when chained registers an offense for a multi-line block with do-end if the return value is passed to a method accepts a multi-line block with braces when passed to a known functional method accepts a multi-line block with braces when passed to a method accepts a multi-line functional block with do-end if it is a known procedural method registers an offense for a multi-line block with braces if the return value is not used accepts a multi-line functional block with do-end if it is an ignored method accepts a multi-line block with braces if it is the return value of its scope with a procedural multi-line block auto-corrects { and } to do and end with appropriate spacing auto-corrects { and } to do and end with a procedural one-line block with AllowBracesOnProceduralOneLiners false or unset registers an offense for a single line procedural block accepts a single line block with do-end if it is procedural with AllowBracesOnProceduralOneLiners true accepts a single line procedural block with braces accepts a single line procedural do-end block always braces does not auto-correct do-end if {} would change the meaning registers an offense for multi-lined do-end blocks when combined with attribute assignment accepts a multi-line block that needs braces to be valid ruby registers an offense for multi-line chained do-end blocks accepts a multi-line functional block with do-end if it is an ignored method registers an offense for a single line block with do-end registers an offence for a multi-line block with do-end accepts a single line block with braces when there are braces around a multi-line block allows in the simple case allows when combined with attribute assignment allows when the block is being chained line count-based style does not auto-correct do-end if {} would change the meaning does not auto-correct {} if do-end would change the meaning accepts a multi-line block that needs braces to be valid ruby auto-corrects do and end for single line blocks to { and } accepts a multi-line block with do-end registers an offense for a single line block with do-end accepts a single line block with braces when there are braces around a multi-line block accepts braces if do-end would change the meaning can handle special method names such as []= and done? registers an offense for braces if do-end would not change the meaning does not auto-correct {} if do-end would introduce a syntax error registers an offense when combined with attribute assignment accepts a multi-line functional block with {} if it is an ignored method auto-corrects { and } to do and end registers an offense in the simple case auto-corrects adjacent curly braces correctly RuboCop::Cop::Lint::EmptyExpression when used in a condition registers an offense inside `elsif` registers an offense in the condition of a ternary operator registers an offense inside `when` registers an offense inside `case` registers an offense inside `if` registers an offense in the return value of a ternary operator when used as a return value registers an offense in the return value of a condition registers an offense in the return value of a case statement registers an offense in the return value of a method when used as an assignment registers an offense for the assigned value when used as a standalone expression registers an offense with nested empty expressions registers an offense RuboCop::Cop::InternalAffairs::MethodNameEqual registers an offense when using `#method == :do_something` does not register an offense when using `#method?` registers an offense when using `#method == other_node.do_something` RuboCop::Cop::Layout::EmptyLinesAroundBeginBody accepts begin block without empty line registers an offense for begin body ending in method accepts begin block without empty line in a method registers many offenses with complex begin-end registers an offense for begin body starting with a blank registers an offense for begin body ending with a blank registers an offense for ensure body ending registers an offense for begin body starting with rescue registers an offense for rescue body ending registers an offense for else body ending registers an offense for begin body starting in method RuboCop::CLI --auto-gen-config includes --auto-gen-only-exclude in the command comment when given does not generate configuration for the Syntax cop does not include offense counts when --no-offense-counts is used does not include a timestamp when --no-auto-gen-timestamp is used can generate a todo list can generate Exclude properties with a given limit overwrites an existing todo file generates a todo list that removes the reports generates Exclude instead of Max when --auto-gen-only-exclude is used can be called when there are no files to inspection honors rubocop:disable comments when inheriting from a URL when there are multiple entries can generate a todo list when there is a single entry can generate a todo list when working in a subdirectory can generate a todo list when different styles appear in different files disables cop if --exclude-limit is exceeded generates Exclude list if --exclude-limit is not exceeded when .rubocop.yml inherits only from .rubocop_todo.yml bases other cops' configuration on the code base's current maximum line length when .rubocop.yml doesn't inherit bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from another file and .rubocop_todo.yml bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from another file bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from two other files bases other cops' configuration on the code base's current maximum line length when .rubocop.yml does not exist bases other cops' configuration on the code base's current maximum line length when --config is used can generate a todo list console output displays report summary but no offenses when .rubocop.yml inherits only from .rubocop_todo.yml in an array bases other cops' configuration on the code base's current maximum line length when working with a cop who do not support auto-correction can generate a todo list with Layout/LineLength:Max overridden when .rubocop.yml has Layout/LineLength:Max more than code base max bases other cops' configuration on the overridden LineLength:Max when .rubocop.yml has Layout/LineLength disabled skips the cop from both phases of the run when .rubocop.yml has Layout/LineLength:Max less than code base max bases other cops' configuration on the overridden LineLength:Max when .rubocop.yml is empty bases other cops' configuration on the code base's current maximum line length RuboCop::Cop::VariableForce #process_node when processing a regexp with a line break at the start of capture parenthesis does not raise an error when processing lvar node when the variable is not yet declared does not raise error when processing an empty regex does not raise an error RuboCop::Cop::Lint::MultipleComparison registers an offense for x <= y > z registers an offense for x >= y < z registers an offense for x < y >= z registers an offense for x >= y <= z registers an offense for x <= y <= z registers an offense for x > y <= z registers an offense for x <= y < z registers an offense for x > y < z registers an offense for x <= y >= z registers an offense for x >= y > z registers an offense for x < y > z registers an offense for x > y >= z registers an offense for x >= y >= z registers an offense for x < y <= z registers an offense for x > y > z accepts to use one compare operator registers an offense for x < y < z RuboCop::Cop::Style::Dir when using `#dirname` and `#realpath` registers an offense registers an offense with ::File when using `#expand_path` and `#dirname` registers an offense with ::File registers an offense RuboCop::Cop::Lint::EmptyInterpolation registers an offense and corrects #{ } in interpolation finds interpolations in string-like contexts accepts non-empty interpolation registers an offense and corrects #{} in interpolation RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault when EnforcedStyle is space registers an offense and corrects default value assignment without space registers an offense and corrects missing space for arguments with unary operators accepts default value assignment with spaces and unary + operator registers an offense and corrects assigning empty string without space registers an offense and corrects assignment of empty list without space accepts default value assignment with space when EnforcedStyle is no_space registers an offense and corrects assignment of empty string with space accepts default value assignment without space registers an offense and corrects assignment of empty list with space registers an offense and corrects default value assignment with space RuboCop::Cop::Style::IfUnlessModifier doesn't break if-end when used as RHS of instance var assignment doesn't break if-end when used as RHS of local var assignment accepts if-end followed by a chained call using `&.` doesn't break if-end when used as RHS of class var assignment adds parens in autocorrect when if-end used with `||` operator adds parens in autocorrect when if-end used with `&&` operator accepts if-end when used as LHS of binary arithmetic accepts if/elsif doesn't break if-end when used as RHS of constant assignment accepts code with EOL comment since user might want to keep it accepts if-else-end accepts if-end followed by a chained call using `.` doesn't break if-end when used as RHS of binary arithmetic behaves like condition modifier cop for a multiline 'unless' corrects it if result fits in one line accepts an empty body accepts it when condition has local variable assignment corrects it when assignment is in body accepts it if body spans more than one line accepts it if single line would not fit on one line when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense when if-end condition is a value in a hash when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form with implicit match conditional when a multiline if fits on one line registers an offense when a multiline if doesn't fit on one line accepts short multiline if near an else etc registers an offense modifier if that does not fit on one line when Layout/LineLength is disabled in configuration accepts when Layout/LineLength is enabled corrects it to normal form IgnoreCopDirectives and the long line is allowed because IgnoreCopDirectives is true accepts and the long line is too long because IgnoreCopDirectives is false registers an offense and the long line is allowed because AllowURI is true accepts and the long line is too long because AllowURI is false registers an offense when Layout/LineLength is disabled with enable/disable comments accepts when Layout/LineLength is disabled with an EOL comment accepts multiline unless that fits on one line registers an offense multiline if that fits on one line registers an offense and has two statements separated by semicolon accepts when if-end condition is assigned to a variable with variable being on the previous line when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form with variable being on the same line when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form if-end with conditional as body accepts multiline if that fits on one line with comment on first line registers an offense and preserves comment when if-end condition has some code after the end keyword when it is short enough to fit on a single line corrects it to the single-line form when it is not short enough to fit on a single line accepts it in the multiline form multiline if that fits on one line with comment near end accepts if-end is argument to a non-parenthesized method call adds parentheses so as not to change meaning if-end is argument to a parenthesized method call adds parentheses because otherwise it would cause SyntaxError when if-end condition has a first line comment when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form with a named regexp capture on the LHS does not register an offense modifier if that does not fit on one line, but is not the only statement on the line accepts unless-end with conditional as body accepts behaves like condition modifier cop for a multiline 'if' accepts it if body spans more than one line corrects it if result fits in one line accepts it when condition has local variable assignment accepts it if single line would not fit on one line corrects it when assignment is in body accepts an empty body when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense when if-end condition is an element of an array when short enough to fit on a single line corrects it to the single-line form when not short enough to fit on a single line accepts it in the multiline form with tabs used for indentation with Layout/IndentationStyle: IndentationWidth config behaves like with tabs indentation it fits on one line registers an offense it doesn't fit on one line doesn't register an offense with Layout/IndentationWidth: Width config behaves like with tabs indentation it doesn't fit on one line doesn't register an offense it fits on one line registers an offense when Layout/LineLength is disabled registers an offense even for a long modifier statement RuboCop::Cop::Lint::UnusedMethodArgument inspection when an underscore-prefixed method argument is unused accepts when an optional keyword argument is unused registers an offense but does not suggest underscore-prefix and AllowUnusedKeywordArguments set does not care when a block argument is unused does not care when a singleton method argument is unused registers an offense when a splat argument is unused registers an offense and preserves the splat when a variable is unused does not care when a trailing block argument is unused registers an offense and removes the unused block arg in a method calling `super` without arguments when a method argument is not used explicitly accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them in a method calling `binding` without arguments accepts all arguments inside another method definition registers offenses when an argument with a default value is unused registers an offense and preserves the default value when a required keyword argument is unused registers an offense but does not suggest underscore-prefix in a method calling `super` with arguments when a method argument is unused registers an offense when a method takes multiple arguments and an argument is unused registers an offense and adds underscore-prefix and arguments are swap-assigned accepts and there is some whitespace around the unused argument registers an offense and preserves whitespace and one argument is assigned to another, whilst other's value is not used registers an offense and all the arguments are unused registers offenses and suggests the use of `*` and auto-corrects to add underscore-prefix to all arguments when a method argument is used accepts in a method calling `binding` with arguments when a method argument is unused registers an offense when IgnoreNotImplementedMethods config parameter is set accepts a method with a single unused parameter & fails with message accepts an empty singleton method with a single unused parameter &raise NotImplementedError registers an offense for a non-empty method with multiple unused parameters registers an offense for a non-empty method with a single unused parameter accepts a method with a single unused parameter & raises NotImplementedError accepts a method with a single unused parameter & fails without message accepts an empty method with multiple unused parameters accepts a method with a single unused parameter & raises ::NotImplementedError when IgnoreEmptyMethods config parameter is set accepts an empty method with a single unused parameter registers an offense for a non-empty method with a single unused parameter accepts an empty method with multiple unused parameters accepts an empty singleton method with a single unused parameter registers an offense for a non-empty method with multiple unused parameters RuboCop::Cop::Naming::PredicateName without method definition macros registers an offense when using `define_method` does not register any offenses when using an internal affair macro accepts method name when corrected name is invalid identifier with method definition macros registers an offense when using `define_method` registers an offense when using an internal affair macro accepts method name when corrected name is invalid identifier with permitted predicate names accepts method name which is in permitted list without restricted prefixes accepts method name that starts with unknown prefix registers an offense when method name starts with "is" registers an offense when method name starts with "has" accepts method name when corrected name is invalid identifier with restricted prefixes accepts method name that starts with unknown prefix accepts method name that is an assignment registers an offense when method name starts with "is" registers an offense when method name starts with "has" accepts method name when corrected name is invalid identifier RuboCop::Formatter::ProgressFormatter #report_file_as_mark when a refactor severity offense is detected prints "R" when no offenses are detected prints "." when a refactor convention offense is detected prints "C" when different severity offenses are detected prints highest level mark #finished calls #report_summary when any offenses are detected reports all detected offenses for all failed files when no offenses are detected does not report offenses #file_finished when any offenses are detected calls #report_as_with_mark when no offenses are detected calls #report_as_with_mark RuboCop::Cop::Style::TrailingCommaInBlockArgs when `->` has multiple arguments does not registers an offense curly brace block format does not register an offense for default arguments does not register an offense for keyword arguments does not register an offense when a trailing comma is required registers an offense when a trailing comma is not needed ignores commas in default argument strings does not register an offense when no arguments are present preserves semicolons in block/local variables does not register an offense when more than one argument is present with no trailing comma do/end block format does not register an offense when more than one argument is present with no trailing comma ignores commas in default argument strings does not register an offense for keyword arguments registers an offense when a trailing comma is not needed does not register an offense when no arguments are present preserves semicolons in block/local variables does not register an offense when a trailing comma is required does not register an offense for an empty block does not register an offense for default arguments when `lambda` has multiple arguments does not register an offense when more than one argument is present with no trailing comma registers an offense and corrects when a trailing comma isn't needed RuboCop::Cop::Layout::LineLength highlights excessive characters accepts the first line if it is a shebang line accepts a line that's 80 characters wide registers an offense for a line that's 81 characters wide registers an offense for long line before __END__ but not after when IgnoreCopDirectives is enabled and the Rubocop directive is excessively long accepts the line and the Rubocop directive causes an excessive line length accepts the line and has explanatory text does not register an offense and the source is too long registers an offense for the line highlights only the non-directive part and the source contains non-directive # as comment registers an offense for the line highlights only the non-directive part and the source contains non-directive #s as non-comment highlights only the non-directive part registers an offense for the line when line is indented with tabs accepts a short line registers an offense for a long line when AllowURI option is enabled and all the excessive characters are part of a URL accepts the line and the URL is wrapped in single quotes accepts the line and the URL is wrapped in double quotes accepts the line and the URL fits within the max allowed characters registers an offense for the line and the excessive characters include part of a URL and another word registers an offense for the line and the excessive characters include a complete URL registers an offense for the line and the URL does not have a http(s) scheme rejects the line and the scheme has been configured does not register an offense and an error other than URI::InvalidURIError is raised while validating a URI-ish string does not crash when AllowURI option is disabled and all the excessive characters are part of a URL registers an offense for the line autocorrection comments when over limit with semicolon adds offense and does not autocorrect hash when over limit because of a comment adds an offense and does not autocorrect when nested hashes on same line adds an offense only to outer and autocorrects it when hash in method call adds an offense only to outer and autocorrects it when under limit does not add any offenses when over limit rocket symbol adds an offense and autocorrects it when over limit rocket adds an offense and autocorrects it when over limit and already on multiple lines long key adds an offense and does not autocorrect when over limit and keys already on multiple lines adds an offense and does not autocorrect when over limit adds an offense and autocorrects it method call when nested method calls allows outer to get broken up first adds offense and does not autocorrect when call with hash on same line adds an offense only to outer and autocorrects it when two method calls adds an offense only to outer and autocorrects it when over limit adds an offense and autocorrects it when under limit does not add any offenses when two together does not add any offenses array when two arrays on two lines allows outer to get broken first adds an offense only to inner and does not autocorrect it when already on two lines does not add any offenses when under limit does not add any offenses when has inside array adds an offense only to outer and autocorrects it when over limit adds an offense and autocorrects it long blocks braces adds an offense and does correct it do/end adds an offense and does correct it let block adds an offense and does correct it lambda syntax when argument is enclosed in parentheses registers an offense and corrects when argument is not enclosed in parentheses registers an offense and corrects no spaces adds an offense and does correct it semicolon when over limit and many semicolons adds offense and autocorrects it by breaking the semicolonbefore the hash when under limit does not add any offenses semicolons inside string literal adds offense and autocorrects elsewhere when over limit and semicolon at end of line adds offense and autocorrects it by breaking the first semicolonbefore the hash when over limit and one semicolon at the end adds offense and does not autocorrectbefore the hash semicolon inside string literal adds offense and autocorrects elsewhere when over limit and many spaces around semicolon adds offense and autocorrects it by breaking the semicolonbefore the hash when over limit and many semicolons at the end adds offense and does not autocorrectbefore the hash when over limit adds offense and autocorrects it by breaking the semicolonbefore the hash HEREDOC when over limit with semicolon adds offense and does not autocorrect no breakable collections adds an offense and does not autocorrect it when IgnoreCopDirectives is disabled and the source is acceptable length with a trailing RuboCop directive highlights the excess directive registers an offense for the line with an inline comment highlights the excess comment and the source is too long and has a trailing cop directive highlights the excess source and cop directive when AllowHeredoc option is enabled accepts long lines in heredocs when the source has no AST does not crash and only certain heredoc delimiters are permitted rejects long lines in heredocs with not permitted delimiters when IgnoredPatterns option is set accepts long lines matching a pattern but not other long lines affecting by IndentationWidth from Layout\Tab with AllowURI option accepts a line that's including URI with text accepts a line that's including URI accepts a line that's including URI and exceeds by 1 char accepts a line that's including URI in quotes with text behaves like with tabs indentation highlights excessive characters registers an offense for a line that's including 2 tab with size 2 and 28 other characters accepts a line that's including 1 tab with size 2 and 28 other characters without AllowURI option behaves like with tabs indentation highlights excessive characters accepts a line that's including 1 tab with size 2 and 28 other characters registers an offense for a line that's including 2 tab with size 2 and 28 other characters RuboCop::Cop::Style::Attr registers an offense attr accepts attr when it does not take arguments accepts attr when it has a receiver registers offense for attr within class_eval does not register offense for custom `attr` method registers offense for attr within module_eval auto-corrects attr, false to attr_reader attr with multiple names to attr_reader attr to attr_reader attr :name, true to attr_accessor :name RuboCop::Cop::VariableForce::Assignment .new when an argument declaration node is passed raises error when an assignment node is passed does not raise error when any other type node is passed raises error #name returns the variable name #operator when it is normal assignment returns = when it is ||= operator assignment returns ||= when it is multiple assignment returns = when it is &&= operator assignment returns &&= when it is += operator assignment returns += #meta_assignment_node when it is multiple assignment returns masgn node when it is ||= operator assignment returns or_asgn node when it is += operator assignment returns op_asgn node when it is &&= operator assignment returns and_asgn node RuboCop::Cop::Style::RedundantAssignment does not register an offense when ensure block present reports an offense for def ending with assignment and returning accepts empty method body accepts empty if body accepts empty when nodes when rescue blocks present does register an offense and auto-corrects when inside function or rescue block when inside an if-branch registers an offense and auto-corrects when inside a when-branch registers an offense and auto-corrects when inside begin-end body registers an offense and auto-corrects RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords accepts empty method definition with complex method definition - registers many offenses registers an offense for rescue section ending for method definition a blank accepts empty lines around begin body registers an offense for rescue section ending with a blank accepts empty begin accepts no empty line registers an offense for rescue section starting with a blank with complex begin-end - registers many offenses registers an offense for above rescue keyword with a blank RuboCop::Cop::Lint::DeprecatedClassMethods prefer `block_given?` over `iterator?` does not register an offense for offensive method `iterator?`on other receivers registers an offense and corrects iterator? does not register an offense for block_given? prefer `File.exist?` over `File.exists?` registers an offense and corrects ::File.exists? registers an offense and corrects File.exists? does not register an offense for File.exist? prefer `Dir.exist?` over `Dir.exists?` does not register an offense for offensive method `exists?`on other receivers registers an offense and corrects Dir.exists? registers an offense and corrects ::Dir.exists? does not register an offense for Dir.exist? RuboCop::Cop::Style::ConditionalAssignment IncludeTernaryExpressions false allows assigning any variable type to ternary SingleLineConditionsOnly true corrects assignment to a namespaced constant allows a method call in the subject of a ternary operator registers an offense for assignment using a method that ends with an equal sign registers an offense for assignment to an if then else registers an offense for assignment to case when then else corrects assignment when without `else` branch registers an offense for assignment using []= behaves like multiline all variable types allow assigning any variable type to a multiline unless else assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all variable types allow assigning any variable type to a multiline if else assigning any variable type to a multiline if elsif else assigning any variable type to a multiline unless else assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all variable types allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense for assigning any variable type to case when does not crash for rescue assignment behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else behaves like all assignment types registers an offense any assignment to case when allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to if else registers an offense any assignment to case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to if else allows any assignment to if without else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary allows any assignment to if without else behaves like all variable types registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsewith multiple assignment does not crash for rescue assignment allows assignment to if without else registers an offense assigning any variable type to unless else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else behaves like multiline all variable types allow assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to a multiline if else assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to unless else behaves like all variable types registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else does not crash for rescue assignment registers an offense assigning any variable type to if elsewith multiple assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to ternary allows assignment to if without else registers an offense assigning any variable type to unless else behaves like all variable types registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else allows assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense any assignment to if else behaves like all assignment types registers an offense any assignment to if else allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary behaves like all variable types registers an offense assigning any variable type to if elsewith multiple assignment does not crash for rescue assignment registers an offense assigning any variable type to if else registers an offense assigning any variable type to ternary registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsif else allows assignment to if without else registers an offense assigning any variable type to unless else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to if else behaves like multiline all variable types allow assigning any variable type to a multiline if elsif else assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all variable types allow assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to ternary behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to unless else allows any assignment to if without else registers an offense for any assignment to ternary behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense any assignment to if else behaves like multiline all variable types allow assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else assigning any variable type to a multiline unless else assigning any variable type to a multiline if else assigning any variable type to a multiline case when behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all variable types allow assigning any variable type to a multiline unless else assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to if else registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to unless else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to if else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else behaves like all variable types does not crash for rescue assignment registers an offense assigning any variable type to if else allows assignment to if without else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to unless else behaves like all assignment types allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to if else behaves like all variable types registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to unless else does not crash for rescue assignment allows assignment to if without else registers an offense assigning any variable type to ternary for loop ignores pseudo assignments in a for loop behaves like all assignment types registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to ternary behaves like single line condition auto-correct corrects assignment to an if else condition corrects assignment to an if elsif else condition corrects assignment to a case when else with multiple whens corrects assignment to a ternary operator corrects assignment to a case when else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to an unless else condition SingleLineConditionsOnly false corrects assignment to a case when else condition corrects assignment to a multiline if else condition corrects assignment to an unless else condition corrects assignment to a multiline if elsif else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to a case when else with multiple whens behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like all variable types does not crash for rescue assignment registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to ternary allows assignment to if without else behaves like multiline all variable types offense assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense any assignment to if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all variable types allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else does not crash for rescue assignment registers an offense assigning any variable type to unless else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsewith multiple assignment behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like all variable types registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsewith multiple assignment allows assignment to if without else registers an offense assigning any variable type to ternary does not crash for rescue assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense any assignment to if else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to if else behaves like all assignment types allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when behaves like all assignment types allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to case when behaves like multiline all variable types offense assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline unless else assigning any variable type to a multiline case when assigning any variable type to a multiline if else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to if else allows any assignment to if without else behaves like multiline all variable types offense assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to a multiline if elsif else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch behaves like all variable types allows assignment to if without else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to unless else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else does not crash for rescue assignment behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types allows any assignment to if without else registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense any assignment to if else allows any assignment to if without else behaves like all variable types registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if else allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to if elsif else behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense any assignment to if else behaves like all variable types registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to if else registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to ternary allows assignment to if without else behaves like all variable types registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to unless else allows assignment to if without else does not crash for rescue assignment registers an offense assigning any variable type to if else registers an offense assigning any variable type to ternary registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsif else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like multiline all variable types offense assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to a multiline if else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like all assignment types registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary behaves like multiline all variable types offense assigning any variable type to a multiline if elsif else assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if else behaves like multiline all variable types offense assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to case when allows any assignment to if without else behaves like single line condition auto-correct corrects assignment to an if else condition corrects assignment to a case when else condition corrects assignment to a case when else with multiple whens corrects assignment to a ternary operator corrects assignment to an unless else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to an if elsif else condition behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to unless else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch RuboCop::Formatter::Colorizable #green invokes #colorize(string, green #black invokes #colorize(string, black #white invokes #colorize(string, white #blue invokes #colorize(string, blue #yellow invokes #colorize(string, yellow #colorize when the global Rainbow.enabled is true and the formatter's output is not a tty does nothing and the formatter's output is a tty colorizes the passed string and output is not a tty, but --color option was provided colorizes the passed string when the global Rainbow.enabled is false and the formatter's output is not a tty does nothing and the formatter's output is a tty does nothing #cyan invokes #colorize(string, cyan #magenta invokes #colorize(string, magenta #red invokes #colorize(string, red RuboCop::Cop::Lint::MixedRegexpCaptureTypes registers an offense when both of named and numbered captures are used does not register offense to a regexp with numbered capture only does not register offense to a regexp with named capture and non-capturing group does not register offense when using a Regexp cannot be processed by regexp_parser gem does not register offense to a regexp with named capture only when containing a non-regexp literal does not register an offence when containing a method does not register an offence when containing a constant does not register an offence when containing a lvar does not register an offence when containing a cvar does not register an offence when containing a gvar does not register an offence when containing a ivar RuboCop::Cop::Layout::EmptyLinesAroundModuleBody when EnforcedStyle is empty_lines_special when first child is NOT a method 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 when module has a namespace 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 source with constants registers and autocorrects the offenses source with blank lines registers and autocorrects the offenses source without blank lines registers and autocorrects the offenses source without blank lines registers an offense for module not ending with a blank line source with comment before method definition registers an offense for module beginning with a blank line source with blank lines registers an offense for module beginning with a blank line module with empty body with empty line does NOT register offenses without empty line does NOT register offenses when namespace has multiple children requires empty lines for namespace module with only constants registers and autocorrects the offenses module with constant and child module registers and autocorrects the offenses when first child is method requires blank line at the beginning and ending of module body source without blank lines registers an offense for module not beginning and ending with a blank line when module has a namespace requires no empty lines for namespace but requires blank line at the beginning and ending of module body source without blank lines registers and autocorrects the offenses source with blank lines autocorrects the offenses when EnforcedStyle is no_empty_lines registers an offense for module body starting with a blank registers an offense for module body ending with a blank autocorrects beginning and end when EnforcedStyle is empty_lines_except_namespace when has multiple child modules registers offenses for namespace body starting and ending without a blank requires empty lines for namespace when only child is class requires no empty lines for namespace registers offense for namespace body starting with a blank registers offense for namespace body ending with a blank when only child is module registers offenses for namespaced module body not ending with a blank registers offenses for namespaced module body not starting with a blank requires no empty lines for namespace registers offense for namespace body ending with a blank autocorrects beginning and end registers offense for namespace body starting with a blank when EnforcedStyle is empty_lines accepts modules with an empty body autocorrects beginning and end registers an offense for module body not starting or ending with a blank registers an offense for module body not ending with a blank RuboCop::Cop::Style::IpAddresses does not register an offense on an empty string IPv4 does not register an offense for an invalid address does not register an offense for an address inside larger text registers an offense for a valid address with allowed addresses does not register an offense for a allowed addresses does not register an offense if the case differs IPv6 registers an offense for a valid address registers an offense for the loopback address registers an offense for a shortened address does not register an offense for an invalid address registers an offense for a very short address registers an offense for an address with 0s collapsed the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) does not register an offense when it is removed from the allowed addresses registers an offense RuboCop::Cop::Layout::MultilineAssignmentLayout same_line style ignores arrays registers an offense for masgn with multi-line lhs registers an offense when the rhs is a different line in setters allows multi-line assignments on the same line registers an offense when the rhs is a different line registers an offense when the rhs is a different line in []= when supported types is block allows multi-line block defines on separate lines allows when multi-line assignments using block definition is on the same line allows multi-line assignments when using shovel operator registers an offense when multi-line assignments using block definition on separate lines configured supported types allows supported types to be configured new_line style registers an offense for masgn with multi-line lhs allows multi-line assignments on separate lines registers an offense when the rhs is on the same line ignores arrays registers an offense when the rhs is on the same line in setters registers an offense when the rhs is on the same line in []= configured supported types allows supported types to be configured when supported types is block allows multi-line assignments when using block definition on separate lines allows multi-line block defines on separate lines registers an offense when multi-line assignments using block definition is on the same line allows multi-line assignments when using shovel operator RuboCop::Cop::Layout::DefEndAlignment when EnforcedStyleAlignWith is def registers an offense for mismatched def test end auto-corrects mismatched foo def test end auto-corrects mismatched def test end accepts matching foo def ... end accepts matching defs ... end accepts matching def ... end registers an offense for mismatched def Test.test end registers an offense for mismatched foo def test end auto-corrects mismatched def Test.test end correct + opposite registers an offense when EnforcedStyleAlignWith is start_of_line registers an offense for mismatched def Test.test end auto-corrects mismatched foo def test end accepts matching def ... end auto-corrects mismatched def test end accepts matching def ... end registers an offense for mismatched def test end auto-corrects mismatched def Test.test end accepts matching foo def ... end accepts matching defs ... end registers an offense for mismatched foo def test end accepts matching foo bar def ... end correct + opposite registers an offense RuboCop::Cop::Naming::BinaryOperatorParameterName does not register an offense for << works properly even if the argument not surrounded with braces registers an offense for `#eql?` when argument is not named other does not register an offense for arg named other does not register an offense for arg named _other registers an offense for `#equal?` when argument is not named other registers an offense for `#+` when argument is not named other does not register an offense for [] does not register an offense for === does not register an offense for non binary operators does not register an offense for []= RuboCop::Cop::Style::UnpackFirst registers offense when using `#unpack` with `#first` when using `#unpack` with square brackets when using `#unpack` with `#slice` when using `#unpack` with dot and square brackets when using `#unpack` with `#at` does not register offense when using `#unpack1` when using `#unpack` accessing second element RuboCop::Cop::Style::OptionalArguments allows methods with only optional arguments allows methods without arguments allows methods with multiple optional arguments at the end allows methods with only required arguments allows methods with only one optional argument registers an offense when an optional argument is followed by a required argument allows methods with only one required argument registers an offense for each optional argument when multiple optional arguments are followed by a required argument named params with default values allows optional arguments before an optional named argument required params allows optional arguments to come before a mix of required and optional named argument registers an offense for optional arguments that come before required arguments where there are name arguments allows optional arguments before required named arguments RuboCop::Cop::Style::Strip registers an offense for str.rstrip.lstrip registers an offense for str.lstrip.rstrip RuboCop::Cop::Style::NegatedIf does not blow up on a negated ternary operator does not blow up for empty unless condition does not blow up for empty if condition does not blow up for ternary ops with “postfix” style does not register an offense for prefix registers an offense for postfix with “both” style registers an offense for if with exclamation point condition accepts an if/else with negative condition autocorrects by replacing parenthesized if not with unless accepts an if where only part of the condition is negated is not confused by negated elsif accepts an if where the condition is doubly negated registers an offense for if with "not" condition with “prefix” style does not register an offense for postfix registers an offense for prefix RuboCop::Cop::Style::CommentAnnotation accepts a comment that is obviously a code example accepts upper case keyword with colon, space and note accepts a keyword that is somewhere in a sentence accepts upper case keyword alone accepts a keyword that is just the beginning of a sentence with configured keyword registers an offense for a missing colon after the word capitalized keyword registers an offense and upcases missing colon registers an offense and adds colon lower case keyword registers an offense and upcases missing space after colon registers an offense and adds space upper case keyword with colon by no note registers an offense without auto-correction offenses in consecutive inline comments registers each of them when a keyword is not in the configuration accepts the word without colon RuboCop::Cop::Naming::HeredocDelimiterCase when enforced style is uppercase with a squiggly heredoc does not register an offense with an uppercase delimiter registers an offense with a lowercase delimiter registers an offense with a camel case delimiter with an interpolated heredoc does not register an offense with an uppercase delimiter registers an offense with a lowercase delimiter registers an offense with a camel case delimiter with a non-interpolated heredoc when using non-word delimiters does not register an offense when using single quoted delimiters does not register an offense with an uppercase delimiter registers an offense with a camel case delimiter registers an offense with a lowercase delimiter when using double quoted delimiters registers an offense with a lowercase delimiter registers an offense with a camel case delimiter does not register an offense with an uppercase delimiter when using back tick delimiters registers an offense with a lowercase delimiter does not register an offense with an uppercase delimiter registers an offense with a camel case delimiter when enforced style is lowercase with a non-interpolated heredoc does not register an offense with a lowercase delimiter registers an offense with an uppercase delimiter registers an offense with a camel case delimiter with an interpolated heredoc does not register an offense with a lowercase delimiter registers an offense with a camel case delimiter registers an offense with an uppercase delimiter with a squiggly heredoc does not register an offense with a lowercase delimiter registers an offense with a camel case delimiter registers an offense with an uppercase delimiter RuboCop::Cop::Style::ColonMethodDefinition accepts a class method defined using . using the class name registers an offense for a class method defined using :: using self registers an offense for a class method defined using :: RuboCop::Cop::Style::MissingRespondToMissing allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method allows method_missing and respond_to_missing? implemented as class methods allows method_missing and respond_to_missing? when defined with inline access modifier registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method registers an offense when method_missing is implemented as a class methods allows method_missing and respond_to_missing? implemented as instance methods registers an offense when respond_to_missing? is not implemented RuboCop::Cop::Style::ParenthesesAroundCondition does not blow up when the condition is a ternary op does not blow up for empty if condition allows parens if the condition node is a modifier if op allows parens if the condition node is a modifier while op is not confused by parentheses in subexpression allows parens if the condition node is a modifier rescue op does not blow up for empty unless condition allows parens if the condition node is a modifier unless op accepts parentheses if there is no space between the keyword and (. registers an offense for parentheses around condition allows parens if the condition node is a modifier until op is not confused by leading parentheses in subexpression accepts parentheses around condition in a ternary parentheses in multiline conditions are not allowed registers an offense for parentheses around multiline condition safe assignment is allowed accepts variable assignment in condition surrounded with parentheses accepts setter in condition surrounded with parentheses accepts element assignment in condition surrounded with parentheses parentheses in multiline conditions are allowed registers an offense for parentheses in single line condition accepts parentheses around multiline condition safe assignment is not allowed does not accept variable assignment in condition surrounded with parentheses does not accept element assignment in condition surrounded with parentheses RuboCop::Cop::Layout::SpaceInsideBlockBraces register offenses and correct both braces without inner space accepts left brace without outer space registers an offense and corrects left brace without inner space accepts braces surrounded by spaces registers an offense and corrects right brace without inner space with invalid value for EnforcedStyleForEmptyBraces fails with an error with space inside empty braces not allowed accepts multiline braces with content accepts empty braces with line break inside accepts empty braces with comment and line break inside registers an offense and corrects empty braces with space inside accepts braces that are not empty accepts braces with something inside accepts empty braces with no space inside with space inside empty braces allowed accepts empty braces with space inside registers an offense and corrects empty braces with no space inside configured with no_space accepts braces without spaces inside registers an offense and corrects left brace with inner space registers an offense and corrects right brace with inner space accepts left brace without outer space with passed in parameters and space before block parameters allowed accepts new lambda syntax registers an offense and corrects left brace without inner space accepts left brace with inner space and space before block parameters not allowed accepts new lambda syntax accepts when braces are aligned in multiline block registers an offense when braces are not aligned in multiline block registers an offense and corrects left brace with inner space with passed in parameters accepts new lambda syntax for multi-line blocks registers an offense and corrects left brace without inner space accepts left brace with inner space and space before block parameters not allowed accepts left brace without inner space accepts new lambda syntax registers an offense and corrects left brace with inner space for single-line blocks accepts left brace with inner space registers an offense and corrects left brace without inner space and BlockDelimiters cop enabled registers an offense and corrects for single-line blocks registers an offense and corrects multi-line blocks RuboCop::Cop::Metrics::ClassLength accepts a class with less than 5 lines accepts empty classes accepts a class with 5 lines does not count blank lines rejects a class with more than 5 lines reports the correct beginning and end lines when inspecting a class defined with Class.new registers an offense when `CountAsOne` is not empty folds array into one line when CountComments is enabled also counts commented lines when a class has inner classes does not count lines of inner classes rejects a class with 6 lines that belong to the class directly when inspecting a class defined with ::Class.new registers an offense RuboCop::Cop::Style::FormatStringToken ignores placeholder arguments ignores `%r` regexp ignores time format (when used as argument to strftime) ignores time format and unrelated `format` method using ignores time format when it is stored in a variable handles dstrs works inside hashes supports flags and modifiers ignores http links ignores xstr ignores time format (when used as argument to strptime) ignores regexp ignores percent escapes handles __FILE__ behaves like enforced styles for format string tokens when enforced style is annotated configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for template style when enforced style is template registers offenses for annotated style supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for template style supports dynamic string with interpolation when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" when enforced style is annotated registers offenses for template style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is template sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style supports dynamic string with interpolation when enforced style is annotated registers offenses for template style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is annotated registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" when enforced style is template registers offenses for annotated style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for template style configures the enforced style to template after inspecting "%{a}" when enforced style is template registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is annotated configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for template style when enforced style is template registers offenses for annotated style supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" when enforced style is unannotated gives a helpful error message behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is template registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation when enforced style is annotated configures the enforced style to template after inspecting "%{a}" registers offenses for template style supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for template style when enforced style is annotated gives a helpful error message behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for template style supports dynamic string with interpolation when enforced style is template registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation behaves like enforced styles for format string tokens when enforced style is template configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for template style sets the enforced style to annotated after inspecting "%s" when enforced style is template gives a helpful error message behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is annotated registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" when enforced style is template supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is annotated registers offenses for template style sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" when enforced style is template sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is template sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" when enforced style is annotated supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for template style behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" when enforced style is annotated configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for template style sets the enforced style to annotated after inspecting "%s" RuboCop::Cop::Security::Eval registers an offense for eval as function accepts eval with no arguments registers an offense for eval as command accepts eval as method registers an offense for eval with string that has an interpolation accepts eval with a multiline string registers an offense `Binding#eval` accepts eval with a string that interpolates a literal accepts eval as variable accepts eval on a literal string with an explicit binding, filename, and line number accepts eval on a literal string registers an offense for eval as command registers an offense for eval as function RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral accepts non array percent literals for I type and ["!", "!"] delimiters registers an offense for unnecessary spaces accepts literals without additional spaces accepts multi-line literals registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts literals with escaped spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces for W type and ["!", "!"] delimiters registers an offense for unnecessary spaces registers an offense for multiple spaces between items accepts multi-line literals accepts multi-line literals within a method accepts literals with escaped and additional spaces accepts literals with escaped spaces accepts literals without additional spaces accepts newlines and additional following alignment spaces for i type and ["{", "}"] delimiters accepts literals with escaped spaces registers an offense for unnecessary spaces accepts multi-line literals within a method registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces accepts literals with escaped and additional spaces accepts multi-line literals accepts literals without additional spaces for I type and ["(", ")"] delimiters accepts newlines and additional following alignment spaces accepts literals with escaped spaces accepts literals with escaped and additional spaces registers an offense for multiple spaces between items registers an offense for unnecessary spaces accepts multi-line literals accepts literals without additional spaces accepts multi-line literals within a method for i type and ["!", "!"] delimiters accepts multi-line literals within a method registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals accepts literals without additional spaces accepts literals with escaped spaces registers an offense for unnecessary spaces for w type and ["{", "}"] delimiters accepts literals without additional spaces registers an offense for unnecessary spaces accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts multi-line literals accepts newlines and additional following alignment spaces for w type and ["[", "]"] delimiters accepts literals without additional spaces accepts multi-line literals within a method registers an offense for unnecessary spaces accepts literals with escaped and additional spaces registers an offense for multiple spaces between items accepts multi-line literals accepts literals with escaped spaces accepts newlines and additional following alignment spaces for I type and ["{", "}"] delimiters registers an offense for unnecessary spaces accepts multi-line literals within a method accepts literals with escaped and additional spaces accepts literals without additional spaces registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces accepts multi-line literals accepts literals with escaped spaces for w type and ["(", ")"] delimiters accepts multi-line literals within a method accepts newlines and additional following alignment spaces accepts literals without additional spaces accepts literals with escaped and additional spaces accepts multi-line literals registers an offense for multiple spaces between items accepts literals with escaped spaces registers an offense for unnecessary spaces for w type and ["!", "!"] delimiters registers an offense for unnecessary spaces accepts multi-line literals within a method accepts multi-line literals accepts literals with escaped spaces accepts literals without additional spaces accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces for W type and ["[", "]"] delimiters accepts literals with escaped spaces accepts multi-line literals registers an offense for unnecessary spaces accepts multi-line literals within a method accepts literals with escaped and additional spaces registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces accepts literals without additional spaces for W type and ["(", ")"] delimiters registers an offense for unnecessary spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts literals without additional spaces accepts multi-line literals accepts literals with escaped spaces for i type and ["[", "]"] delimiters accepts multi-line literals accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals within a method registers an offense for unnecessary spaces accepts literals without additional spaces accepts literals with escaped spaces registers an offense for multiple spaces between items for i type and ["(", ")"] delimiters accepts multi-line literals registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts literals with escaped spaces accepts literals without additional spaces registers an offense for unnecessary spaces accepts multi-line literals within a method for W type and ["{", "}"] delimiters accepts literals without additional spaces accepts multi-line literals accepts newlines and additional following alignment spaces registers an offense for unnecessary spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts multi-line literals within a method accepts literals with escaped spaces for I type and ["[", "]"] delimiters registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces accepts literals without additional spaces accepts multi-line literals within a method accepts multi-line literals accepts literals with escaped spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces RuboCop::Cop::Metrics::MethodLength does not count commented lines by default is not fooled by one-liner methods, syntax #2 accepts empty methods properly counts lines when method ends with block is not fooled by one-liner methods, syntax #1 accepts a method with multiline arguments and less than 5 lines of body does not count blank lines accepts a method with less than 5 lines when method is an instance method registers an offense when `CountAsOne` is not empty folds array into one line when method is defined on a singleton class registers an offense when method is a class method registers an offense when method is defined in `ExcludedMethods` still rejects other methods with more than 5 lines accepts the foo method with more than 5 lines when method is defined with `define_method` registers an offense when CountComments is enabled also counts commented lines RuboCop::Cop::Style::AsciiComments registers an offense for a comment with non-ascii chars registers an offense for comments with mixed chars accepts comments with only ascii chars when certain non-ascii chars are allowed accepts comment with allowed non-ascii chars registers an offense for comments with non-allowed non-ascii chars RuboCop::CLI registers an offense for Parser warnings registers an offense for a syntax error can process a file with an invalid UTF-8 byte sequence finds a file with no .rb extension but has a shebang line does not register any offenses for an empty file checks a given file with faults and returns 1 rubocop:disable comment can disable selected cops in a code section can disable all cops in a code section can disable all cops on a single line can disable selected cops on a single line Specify `--init` option to `rubocop` command when .rubocop.yml already exists fails with an error message when .rubocop.yml does not exist generate a .rubocop.yml file when not necessary causes an offense to be reported and RedundantCopDisableDirective is individually excluded does not report RedundantCopDisableDirective offenses and RedundantCopDisableDirective is disabled through department does not report RedundantCopDisableDirective offenses and RedundantCopDisableDirective is individually disabled does not report RedundantCopDisableDirective offenses and there are no other offenses exits with error code without using namespace can disable selected cops on a single line but prints a warning when --auto-correct-all is given does not trigger RedundantCopDisableDirective due to lines moving around unknown cop in configuration file is given prints the error and exists with code 2 configuration from file can exclude a vendor directory with an erroneous config file displays style guide URLs if DisplayStyleGuide is true prints an error for an unrecognized cop name in .rubocop.yml prints an error message for an unrecognized EnforcedStyle can disable parser-derived offenses with warning severity does not consider Include parameters in subdirectories prints a warning for an unrecognized configuration parameter uses the DefaultFormatter if another formatter is not specified works when a cop that others depend on is disabled works when a configuration file passed by -c specifies Exclude with regexp matches included/excluded files correctly when . argument is given can exclude a typical vendor directory excludes the vendor directory by default cannot disable Syntax offenses ignores excluded files shows an error if the input file cannot be found prefers a config file in ancestor directory to another in home can be configured to override a parameter that is a hash in a special case can exclude a vendor directory indirectly can use an alternative max line length from a config file allows the default configuration file as the -c argument can be configured with project config to disable a certain error works when a configuration file passed by -c specifies Exclude with strings can be configured with option to disable a certain error only reads configuration in explicitly included hidden directories can have different config files in different directories can be configured to merge a parameter that is a hash displays cop names if DisplayCopNames is false works when a configuration file specifies Severity for Metrics/ParameterLists and Layout works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength fails when a configuration file has invalid YAML syntax finds included files can exclude directories relative to .rubocop.yml fails when a configuration file specifies an invalid Severity does not read files in excluded list without using namespace can be configured with option to disable a certain error when obsolete MultiSpaceAllowedForOperators param is used displays a warning when configured for indented_internal_methods style indentation accepts indented_internal_methods style indentation registers offense for normal indentation in class registers offense for normal indentation in module when configuration is taken from $HOME/.rubocop.yml handles relative excludes correctly when run from project root when a value in a hash is overridden with nil acts as if the key/value pair was removed when a file inherits from a higher level inherits relative excludes correctly when --force-default-config option is specified when no config file specified ignores config file when config file specified with -c ignores config file when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter fails with an error message when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter fails with an error message style guide only usage via the cli option --only-guide-cops runs cops for rules that link to a style guide overrides configuration of AllCops/StyleGuideCopsOnly skips cops that have no link to a style guide via the config AllCops/DisabledByDefault when it is true runs only the cop configured in .rubocop.yml when it is false runs all cops that are enabled in default configuration AllCops/StyleGuideCopsOnly when it is true skips cops that have no link to a style guide when it is false runs cops for rules regardless of any link to the style guide obsolete cops when configuration for TrailingComma is given fails with an error message when given a file/directory that is not under the current dir and the directory is relative checks a Rakefile but Style/FileName does not report and the Rakefile path is absolute checks a Rakefile but Style/FileName does not report and the directory is absolute checks a Rakefile but Style/FileName does not report and the Rakefile path is relative checks a Rakefile but Style/FileName does not report configuration of `require` unknown library is specified exits with 2 when interrupted returns 130 when errors are raised while processing files due to bugs displays an error message to stderr when lines end with CR+LF reports an offense cops can exclude files based on config ignores excluded files when checking a correct file returns 0 when super is used with a block still returns 0 configuration of target Ruby versions when configured with an unsupported ruby fails with an error message when configured with an unknown version fails with an error message RuboCop::Cop::Metrics::Utils::CodeLengthCalculator #calculate raises when unknown foldable type is passed when method does not count blank lines folds hashes if asked folds arrays if asked counts comments if asked calculates method length folds heredocs if asked when class folds hashes if asked counts comments if asked calculates class length folds heredocs if asked does not count blank lines does not count lines of inner classes folds arrays if asked RuboCop::Cop::Lint::ToJSON registers an offense and corrects using `#to_json` without arguments does not register an offense when using `#to_json` with arguments RuboCop::Cop::Lint::AmbiguousBlockAssociation behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense without parentheses rspec expect {}.to change {} registers an offense without receiver registers an offense with receiver registers an offense when using safe navigation operator registers an offense with assignment registers an offense as a hash key registers an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense RuboCop::Cop::Layout::ParameterAlignment aligned with first parameter registers an offense and corrects parameters with double indent accepts a method definition without parameters registers an offense and corrects parameters with single indent accepts proper indentation doesn't get confused by splat accepts parameter lists on a single line accepts the first parameter being on a new row registers an offense and corrects alignment in simple case defining self.method registers an offense and corrects parameters with single indent accepts proper indentation aligned with fixed indentation accepts proper indentation registers an offense and corrects parameters with double indent accepts a method definition without parameters accepts parameter lists on a single line accepts the first parameter being on a new row doesn't get confused by splat registers an offense and corrects parameters aligned to first param defining self.method accepts proper indentation registers an offense and corrects parameters aligned to first param RuboCop::Formatter::OffenseCountFormatter #file_finished when any offenses are detected increments the count for the cop in offense_counts when no offenses are detected does not add to offense_counts #finished when there are many offenses sorts by offense count first and then by cop name when output tty is true has a progresbar #report_summary when an offense is detected shows the cop and the offense count RuboCop::Cop::Style::RedundantException reports an offense for a raise with ::RuntimeError.new accepts rescue w/ non redundant error reports an offense for a fail with ::RuntimeError.new accepts rescue w/ non redundant error reports an offense for a raise with ::RuntimeError and () reports an offense for a fail with ::RuntimeError.new accepts a fail with RuntimeError if it does not have 2 args reports an offense for a fail with ::RuntimeError and () accepts a fail with ::RuntimeError if it does not have 2 args reports an offense for a fail with RuntimeError.new accepts a raise with ::RuntimeError if it does not have 2 args reports an offense for a raise with RuntimeError and () reports an offense for a fail with RuntimeError.new reports an offense for a raise with ::RuntimeError.new accepts a raise with RuntimeError if it does not have 2 args accepts rescue w/ non redundant error reports an offense for a raise with ::RuntimeError reports an offense for a fail with RuntimeError and () reports an offense for a raise with RuntimeError reports an offense for a raise with RuntimeError.new reports an offense for a raise with RuntimeError.new accepts rescue w/ non redundant error reports an offense for a fail with RuntimeError reports an offense for a fail with ::RuntimeError RuboCop::Cop::Layout::EmptyLinesAroundMethodBody is not fooled by single line methods accepts method body starting with a line with spaces registers an offense for method body starting with a blank registers an offense for class method body ending with a blank registers an offense for class method body starting with a blank registers an offense for method body ending with a blank RuboCop::Cop::Style::TernaryParentheses configured for parentheses on complex and there are parens accepts condition including a range with a complex condition accepts boolean expression using keywords accepts boolean expression registers an offense when calling method on a receiver with method call condition registers an offense for defined check registers an offense when calling method with a parameter registers an offense when calling method on a receiver without accessor in method call parameters registers an offense for array include? without parens registers an offense for array include? with parens with accessor in method call parameters registers an offense for array include? without parens registers an offense for array include? with multiple parameters with parens registers an offense for array include? with multiple parameters without parens with an assignment condition accepts equality check accepts safe assignment as part of multiple assignment accepts accepts safe multiple assignment accepts safe assignment behaves like safe assignment disabled registers an offense for parens around assignment registers an offense for parens around inner assignment registers an offense for parens around outer assignment with a simple condition registers an offense for query method in condition registers an offense for yield in condition registers an offense with preceding boolean keyword expression registers an offense for accessor in condition registers an offense for save navigation when configured to enforce parentheses inclusion with a complex condition registers an offense for boolean expression registers an offense when calling method on a receiver registers an offense for boolean expression containing parens registers an offense for negated condition registers an offense for boolean expression using keyword registers an offense for equality check registers an offense for arithmetic condition with a simple condition registers an offense for yield in condition registers an offense for accessor in condition registers an offense for query method in condition with an assignment condition registers an offense for triple assignment accepts safe assignment in condition registers an offense for double assignment with equality check in condition registers an offense for double assignment when `RedundantParenthesis` would cause an infinite loop when `EnforcedStyle: require_parentheses_when_complex` accepts when `EnforcedStyle: require_parentheses` accepts when configured to enforce parentheses omission accepts condition including a range with a complex condition registers an offense for equality check registers an offense for query method on object registers an offense for negated condition registers an offense for boolean expression registers an offense for arithmetic expression registers an offense for boolean expression using keyword accepts parens around inner boolean expression with an unparenthesized method call condition registers an offense for defined check registers an offense when calling method with a parameter when calling method on a constant receiver registers an offense when calling method with multiple arguments registers an offense when calling method on a literal receiver registers an offense when calling method on a receiver registers an offense with an assignment condition accepts safe assignment accepts double safe assignment registers an offense for equality check accepts safe assignment as part of multiple assignment behaves like safe assignment disabled registers an offense for parens around outer assignment registers an offense for parens around inner assignment registers an offense for parens around assignment with no space between the parentheses and question mark registers an offense with a simple condition registers an offense for query method in condition registers an offense for yield in condition accepts multi-line boolean expression starting on following line registers an offense for accessor in condition registers an offense for multi-line boolean expression configured for parentheses on complex and there are no parens with complex condition registers an offense for subtraction expression registers an offense for boolean expression with inner parens registers an offense for comparison with method call on receiver registers an offense for comparison with multiplication registers an offense for arithmetic and equality check registers an offense comparison with exponentiation registers an offense for comparison registers an offense for addition expression registers an offense for compound boolean expression registers an offense for boolean expression with an assignment condition registers an offense for equality check accepts safe assignment RuboCop::RakeTask running tasks uses the default formatter from .rubocop.yml if no formatter option is given runs with default options allows nested arrays inside formatters, options, and requires exits when result is not 0 and fail_on_error is true runs with specified options if a block is given will not error when result is not 0 and fail_on_error is false auto_correct runs with with the options that were passed to its parent task runs with --auto-correct-all defining tasks creates a rubocop task and a rubocop auto_correct task creates a named task and a named auto_correct task RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks when many arguments are on multiple lines, two on same line registers an offense and corrects when bracket hash assignment on multiple lines does not add any offenses when two arguments are on next line does not add any offenses when one argument on same line does not add any offenses when many arguments including hash are on multiple lines, three on same line registers an offense and corrects when many arguments are on multiple lines, three on same line registers an offense and corrects when bracket hash assignment key on multiple lines does not add any offenses when argument starts on same line but ends on different line registers an offense and corrects when second argument starts on same line as end of first registers an offense and corrects RuboCop::Cop::Style::ClassVars registers an offense for class variable set in class registers an offense for class variable declaration registers an offense for class variable set on class receiver does not register an offense for class variable usage RuboCop::Cop::AlignmentCorrector #correct with single-line here docs does not indent body and end marker within string literals does not insert whitespace simple indentation with a negative column delta outdents with a positive column delta indents with large column deltas with plain heredoc (<<) behaves like heredoc indenter does not change indentation of here doc bodies and end markers with heredoc in backticks (<<``) behaves like heredoc indenter does not change indentation of here doc bodies and end markers RuboCop::Cop::Layout::MultilineArrayLineBreaks when on same line, separate line from brackets does not add any offenses when on same line does not add any offenses when nested arrays registers an offense and corrects when two elements on same line registers an offense and corrects RuboCop::Cop::Lint::RedundantCopEnableDirective registers correct offense when combined with necessary enable registers multiple offenses and corrects the same comment registers offense and corrects redundant enabling of same cop registers an offense and corrects when the first cop is unnecessarily enabled registers offense and corrects unnecessary enable when middle cop is unnecessarily enabled registers an offense and corrects when there is extra white space registers an offense and corrects all switch registers offense and corrects unnecessary enable all when at least one cop was disabled does not register offense when last cop is unnecessarily enabled registers an offense and corrects registers an offense and corrects when there is no space between the cops and the comma RuboCop::Cop::Lint::SafeNavigationWithEmpty in a conditional does not register an offense on `.empty?` registers an offense and corrects on `&.empty?` outside a conditional registers no offense RuboCop::Cop::Naming::VariableName when configured for snake_case registers an offense for camel case when invoking method args registers an offense for camel case in instance variable name registers an offense for camel case in class variable name registers an offense for correct + opposite registers an offense for default method arguments accepts assignment with indexing of self accepts screaming snake case constants registers an offense for block arguments accepts one symbol size local variables accepts local variables marked as unused accepts screaming snake case globals registers an offense for camel case local variables marked as unused registers an offense for keyword rest arguments registers an offense for camel case in local variable name accepts assigning to camel case constant registers an offense for method arguments registers an offense for rest arguments registers an offense for keyword arguments when configured for camelCase accepts one symbol size local variables accepts camel case in class variable name accepts camel case local variables marked as unused accepts assigning to camel case constant accepts camel case in local variable name accepts local variables marked as unused registers an offense for snake case in local variable name accepts assignment with indexing of self accepts screaming snake case constants registers an offense for opposite + correct registers an offense for camel case when invoking method args registers an offense for snake case in method parameter registers an offense for rest arguments accepts camel case in instance variable name registers an offense for keyword rest arguments accepts screaming snake case globals registers an offense for default method arguments registers an offense for block arguments registers an offense for keyword arguments RuboCop::Cop::Style::Copyright does not register an offense when the notice is present does not register an offense when the notice is in a block comment does not register an offense when the notice is not the first comment when the copyright notice is missing fails to autocorrect when the AutocorrectNotice does not match the Notice pattern fails to autocorrect if no AutocorrectNotice is given adds an offense when the copyright notice comes after any code adds an offense when the source code file is empty adds an offense when the copyright notice is missing and the source code file starts with a shebang adds an offense when the copyright notice is missing and the source code file starts with an encoding comment adds an offense when the copyright notice is missing and the source code file starts with shebang and an encoding comment adds an offense RuboCop::Cop::Layout::CaseIndentation with EnforcedStyle: case with IndentOneStep: true accepts a when clause that's 2 spaces deeper than case registers an offense and corrects a when clause that is equally indented with case when indentation width is overridden for this cop only respects cop-specific IndentationWidth regarding assignment where the right hand side is a case accepts a correctly indented assignment registers an offense and corrects an assignment indented some other way with everything on a single line does not register an offense with IndentOneStep: false accepts correctly indented whens in complex combinations doesn't get confused by strings with case in them registers an offense and corrects a when clause that is indented deeper than case doesn't get confused by symbols named case or when accepts a when clause that's equally indented with case with everything on a single line does not register an offense regarding assignment where the right hand side is a case registers an offense and corrects assignment indented as end registers an offense and corrects correct + opposite style registers an offense and corrects assignment indented some other way accepts a correctly indented assignment when case is preceded by something else than whitespace registers an offense and does not correct with EnforcedStyle: end with IndentOneStep: true regarding assignment where the right hand side is a case accepts a correctly indented assignment registers an offense and corrects an assignment indented as case registers an offense and corrects an assignment indented some other way with everything on a single line does not register an offense with IndentOneStep: false regarding assignment where the right hand side is a case accepts a correctly indented assignment registers an offense and corrects an assignment indented some other way with everything on a single line does not register an offense RuboCop::Cop::Lint::AssignmentInCondition accepts = in a block that is called in a condition registers an offense for collection element assignment in condition registers an offense for gvar assignment in condition registers an offense for assignment after == in condition registers an offense for clvar assignment in condition registers an offense for lvar assignment in while condition registers an offense for assignment after ||= in condition registers an offense for lvar assignment in until condition accepts ||= in condition registers an offense for constant assignment in condition registers an offense for assignment methods accepts = in a block followed by method call registers an offense for ivar assignment in condition registers an offense for lvar assignment in condition does not blow up for empty if condition accepts == in condition does not blow up for empty unless condition safe assignment is not allowed does not accept []= in condition surrounded with braces does not accept = in condition surrounded with braces safe assignment is allowed accepts = in condition surrounded with braces accepts []= in condition surrounded with braces RuboCop::Cop::Bundler::InsecureProtocolSource registers an offense when using `source :gemcutter` registers an offense when using `source :rubygems` registers an offense when using `source :rubyforge` RuboCop::Cop::Layout::MultilineOperationIndentation when EnforcedStyle is indented registers an offense and corrects an unindented multiline operation that is the left operand in another operation accepts double indentation of while condition registers an offense and corrects aligned operators in assignment registers an offense and corrects correct + unrecognized style accepts indentation of assignment accepts double indentation of until condition does not check method calls registers an offense and corrects aligned code on LHS of equality operator accepts indentation of return unless condition accepts normal indentation of method parameters accepts indented operands inside and outside a block registers an offense and corrects one space indentation of second line accepts two spaces indentation in assignment of array element registers an offense for a 2 space indentation of if condition accepts alignment inside a grouped expression accepts double indentation of if condition registers an offense for a 2 space indentation of while condition registers an offense and corrects no indentation of second line accepts unary operations accepts any indentation of method parameters accepts indented operands in for body accepts indentation of return if condition registers an offense and corrects extra indentation of third line accepts normal indentation inside grouped expression accepts indented operands in unless body accepts indentation of next unless condition accepts indented operands in if condition accepts the indentation of a broken string accepts two spaces indentation in assignment of local variable registers an offense for a 2 space indentation of unless condition registers an offense and corrects aligned operands in if conditions accepts indented operands in while body registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array accepts indentation of next if condition accepts indented operands in if body accepts double indentation of unless condition accepts indented operands in an array accepts two spaces indentation of second line accepts indented operands in ordinary statement registers an offense and corrects three space indentation of second line registers an offense and corrects wrong indentation of for expression accepts any indentation of parameters to #[] accepts an expression where the first operand spans multiple lines accepts special indentation of for expression registers an offense for a 2 space indentation of until condition accepts indented operands in until body accepts no extra indentation of third line when indentation width is overridden for this cop accepts indented operands in if body accepts indented operands in until body accepts indentation of unless condition which is offset by a single normal indentation step accepts indentation of until condition which is offset by a single normal indentation step accepts indentation of while condition which is offset by a single normal indentation step accepts indentation of if condition which is offset by a single normal indentation step registers an offense for a 4 space indentation of unless condition registers an offense and corrects accepts indented operands in while body accepts indented operands in unless body registers an offense for a 4 space indentation of until condition accepts indented operands in if condition registers an offense for a 4 space indentation of while condition registers an offense for a 4 space indentation of if condition when EnforcedStyle is aligned accepts unary operations accepts indented operands inside block + assignment registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array registers an offense for misaligned operands in until condition accepts indented operands in ordinary statement registers an offense for misaligned operands in if condition registers an offense for misaligned operands in unless condition accepts indented operands in an array accepts two spaces indentation in assignment of array element accepts indented code on LHS of equality operator accepts alignment inside a grouped expression registers an offense and corrects no indentation of second line registers an offense and corrects extra indentation of third line accepts aligned operands in assignment registers an offense and corrects three space indentation of second line accepts indented operands in for body accepts aligned or:ed operands in assignment registers an offense and corrects indented second part of string accepts indented operands inside and outside a block registers an offense and corrects indented operand in second argument registers an offense and corrects misaligned operands in unless condition registers an offense and corrects unaligned operands in op-assignment registers an offense and corrects misaligned string operand when plus is used accepts no extra indentation of third line registers an offense for misaligned operands in while condition accepts indented operands with ternary operators accepts any indentation of parameters to #[] accepts two spaces indentation of second line accepts aligned operands in if condition registers an offense and corrects indented operands in if condition registers an offense and corrects an unindented multiline operation that is the left operand in another operation does not check method calls registers an offense and corrects one space indentation of second line accepts two spaces indentation in assignment of local variable accepts an expression where the first operand spans multiple lines registers an offense and corrects misaligned string operand when the first operand has backslash continuation RuboCop::Cop::Layout::EmptyLineAfterGuardClause registers an offense and corrects `next` guard clause not followed by empty line accepts a guard clause followed by end accpets a guard clause when the next line is `rescue`-`else` registers an offense and corrects a guard clause is before `begin` accpets a guard clause when the next line is `ensure` registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument accepts a guard clause when the next line is `else` accpets a guard clause when the next line is `elsif` registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc registers an offense and corrects a method starting with end_ accepta a guard clause that is after multiline heredoc accepts modifier if registers an offense and corrects when using `or return` before guard condition registers an offense and corrects when using `and return` before guard condition accepta a guard clause after a single line heredoc registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation registers an offense and corrects a guard clause not followed by empty line accepts a guard clause when the next line is `rescue` registers an offense and corrects a guard clause that is a ternary operator accepts a guard clause followed by empty line when guard clause including heredoc registers an offense and corrects only the last guard clause accepts multiple guard clauses accepts a guard clause inside oneliner block accpets a guard clause that is after a multiline heredoc nested argument call accepts using guard clause is after `raise` accepts a modifier if when the next line is `end` accpets a guard clause that is after a multiline heredoc with chained calls registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation RuboCop::Cop::InternalAffairs::UselessMessageAssertion registers an offense for described_class::MSG in let does not register an offense for an assertion about the message registers an offense for specs that assert using the MSG RuboCop::Cop::Style::MultilineBlockChain accepts a chain of blocks spanning one line accepts a chain of calls followed by a multi-line block accepts a multi-line block chained with calls on one line with multi-line block chaining registers an offense for a slightly more complicated case registers an offense for a chain where the second block is single-line registers two offenses for a chain of three blocks registers an offense for a simple case accepts a chain where the first block is single-line RuboCop::Cop::Style::TrailingCommaInHashLiteral with multi-line list of values when EnforcedStyleForMultiline is comma accepts trailing comma after a heredoc accepts trailing comma registers an offense for no trailing comma accepts a multiline hash with a single pair and trailing comma registers an offense for trailing comma in a comment when closing bracket is on same line as last value accepts literal with no trailing comma when EnforcedStyleForMultiline is no_comma accepts comma inside a heredoc parameters at the end registers an offense for trailing comma in literal accepts literal with no trailing comma accepts comma in comment after last value item when EnforcedStyleForMultiline is consistent_comma accepts trailing comma after a heredoc accepts trailing comma registers an offense for no trailing comma accepts a multiline hash with a single pair and trailing comma accepts a multiline hash with pairs on a single line andtrailing comma when closing bracket is on same line as last value registers an offense for literal with no trailing comma with single line list of values when EnforcedStyleForMultiline is consistent_comma accepts empty literal accepts single element literal without trailing comma accepts literal without trailing comma registers an offense for trailing comma in a literal when EnforcedStyleForMultiline is comma accepts literal without trailing comma accepts empty literal accepts single element literal without trailing comma registers an offense for trailing comma in a literal when EnforcedStyleForMultiline is no_comma accepts literal without trailing comma registers an offense for trailing comma in a literal accepts empty literal accepts single element literal without trailing comma RuboCop::Cop::Style::OptionHash registers an offense when there are no arguments does not register an offense when passing options hash to super does not register an offense when code exists before call to super does not register an offense does not register an offense when call to super is in a nested block permitted list ignores if the method is permitted when the last argument is an options hash named something else does not register an offense when the argument name is in the list of suspicious names registers an offense when the last argument is a non-options-hash optional hash does not register an offense RuboCop::Cop::Style::RescueModifier registers an offense for modifier rescue around parallel assignment handles modifier rescue in a method does not register an offense for normal rescue with ensure does not register an offense for nested normal rescue handles more complex expression with modifier rescue handles modifier rescue in normal rescue registers an offense for modifier rescue does not register an offense for normal rescue autocorrect corrects doubled rescue modifiers corrects complex rescue modifier excluded file processes excluded files with issue when a singleton method has implicit begin handles modifier rescue in body of implicit begin accepts normal rescue when an instance method has implicit begin handles modifier rescue in body of implicit begin accepts normal rescue RuboCop::Cop::Style::IfUnlessModifierOfIfUnless provides a good error message conditional with modifier in body accepts `unless` / `else` with modifier registers an offense and corrects nested conditionals accepts conditional with modifier registers an offense and corrects ternary with modifier registers an offense and corrects RuboCop::Cop::Lint::BigDecimalNew registers an offense and corrects using `::BigDecimal.new()` registers an offense and corrects using `BigDecimal.new()` does not register an offense when using `BigDecimal()` RuboCop::Cop::Lint::Loop registers an offense and corrects for begin/end/while accepts loop/break unless registers an offense for begin/end/until accepts loop/break if RuboCop::Cop::Utils::FormatString finds the correct number of fields #valid? returns true when there are only unnumbered formats returns true when there are only named formats returns true when there are only named with escaped `%` formats returns false when there are unnumbered and numbered formats returns true when there are only numbered formats returns false when there are unnumbered and named formats returns false when there are numbered and named formats #named_interpolation? behaves like named format sequence detects named format sequence does not detect escaped named format sequence behaves like named format sequence does not detect escaped named format sequence detects named format sequence behaves like named format sequence detects named format sequence does not detect escaped named format sequence behaves like named format sequence does not detect escaped named format sequence detects named format sequence RuboCop::Cop::Layout::EmptyLinesAroundClassBody when EnforcedStyle is beginning_only ignores empty lines at the beginning of a class registers an offense for an empty line at the end of a class when EnforcedStyle is ending_only registers an offense for an empty line at the end of a class ignores empty lines at the beginning of a class when EnforcedStyle is empty_lines_except_namespace when has multiple child classes requires empty lines for namespace registers offenses for namespace body starting and ending without a blank when only child is module requires no empty lines for namespace registers offense for namespace body ending with a blank registers offense for namespace body starting with a blank when only child is class requires no empty lines for namespace registers offense for namespace body ending with a blank autocorrects beginning and end registers offenses for namespaced class body not ending with a blank registers offenses for namespaced class body not starting with a blank registers offense for namespace body starting with a blank when EnforcedStyle is no_empty_lines registers an offense for singleton class body ending with a blank autocorrects singleton class body containing only a blank registers an offense for class body starting with a blank registers an offense for class body ending with a blank when EnforcedStyle is empty_lines accepts classes with an empty body registers an offense for class body not starting or ending with a blank accepts singleton classes with an empty body does not register offenses does not register offenses when specifying a superclass that breaks the line registers an offense for singleton class body not starting or ending with a blank when EnforcedStyle is empty_lines_special class with only constants registers and autocorrects the offenses when namespace has multiple children requires empty lines for namespace class with empty body without empty line does NOT register offenses with empty line does NOT register offenses class with constant and child class registers and autocorrects the offenses when first child is NOT a method does not require blank line at the beginning of class body but requires blank line before first def definition and requires blank line at the end of class body source with blank lines registers an offense for class beginning with a blank line source without blank lines registers an offense for class not ending with a blank line source with comment before method definition registers an offense for class beginning with a blank line when class has a namespace requires no empty lines for namespace and does not require blank line at the beginning of class body but requires blank line at the end of class body source without blank lines registers and autocorrects the offenses source with constants registers and autocorrects the offenses source with blank lines registers and autocorrects the offenses when first child is method requires blank line at the beginning and ending of class body when class has a namespace requires no empty lines for namespace but requires blank line at the beginning and ending of class body source without blank lines registers and autocorrects the offenses source with blank lines autocorrects the offenses source without blank lines registers an offense for class not beginning and ending with a blank line RuboCop::CLI --disable-uncorrectable does not disable anything for cops that support autocorrect if a one-line disable statement doesn't fit adds before-and-after disable statement if one one-line disable statement fits adds it adds it when the cop supports autocorrect but does not correct the offense but there are more offenses on the line and they don't all fit adds both one-line and before-and-after disable statements and there are two offenses of the same kind on one line adds a single one-line disable statement RuboCop::Cop::Layout::SpaceInsideReferenceBrackets with space inside empty braces allowed registers offense and corrects empty brackets with more than one space inside registers offense and corrects empty brackets with no space inside accepts empty brackets with space inside when EnforcedStyle is space registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket registers and corrects multiple offenses for multiple sets of ref brackets registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket registers an offense and corrects ref brackets with no leading whitespace registers an offense and correct third ref brackets with no trailing whitespace accepts spaces in array brackets registers an offense and corrects third ref brackets with no leading whitespace does not register offense for reference brackets with spaces registers an offense and corrects ref brackets with no trailing whitespace accepts an array as a reference object registers an offense and corrects second ref brackets with no trailing whitespace accepts square brackets called with method call syntax accepts square brackets as method name does not register offense for array literals registers and corrects multiple offenses in one set of ref brackets does not register offense for ref bcts with spaces that assign registers an offense and corrects second ref brackets with no leading whitespace with space inside empty brackets not allowed registers an offense and corrects empty brackets with 1 space inside accepts empty brackets with no space inside registers an offense and corrects empty brackets with multiple spaces inside when EnforcedStyle is no_space does not register offense for array literals registers an offense and corrects third ref brackets with trailing whitespace registers an offense and corrects outer ref brackets does not register offense for reference brackets with no spaces register and correct multiple offenses for multiple sets of ref brackets accepts square brackets as method name registers an offense and corrects second ref brackets with trailing whitespace accepts square brackets called with method call syntax registers an offense and corrects ref brackets with trailing whitespace registers an offense and correcs when a reference bracket with a trailing whitespace is assigned by another reference bracket registers an offense and corrects third ref brackets with leading whitespace accepts an array as a reference object registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace registers multiple offenses and corrects one set of ref brackets registers multiple offenses and corrects multiple sets of ref brackets registers an offense and corrects second ref brackets with leading whitespace registers an offense and corrects ref brackets with leading whitespace accpets extra spacing in array brackets does not register offense for ref bcts with no spaces that assign registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket RuboCop::Options options precedence .rubocop file has lower precedence then options from RUBOCOP_OPTS env variable has lower precedence then command line options .rubocop directory is ignored and command line options are used RUBOCOP_OPTS environment variable has lower precedence then command line options has higher precedence then options from .rubocop file option -s/--stdin fails if no paths are given fails if more than one path is given succeeds with exactly one path --auto-gen-only-exclude fails if given without --auto-gen-config --disable-uncorrectable fails if given alone without --auto-correct/-a accepts together with --auto-correct-all accepts together with --auto-correct --fail-level accepts full severity names accepts the "fake" severities A/autocorrect accepts severity initial letters incompatible cli options rejects using -v with --show-cops rejects using -V with --show-cops mentions all incompatible options when more than two are used rejects using -v with -V --auto-gen-config accepts other options -h/--help exits cleanly lists all builtin formatters shows help text --exclude-limit fails if given last without argument fails if given without --auto-gen-config fails if given alone without argument fails if given first without argument --safe-auto-correct is a deprecated alias --cache fails if unrecognized argument is given fails if no argument is given accepts true as argument accepts false as argument --parallel combined with --fail-fast fails with an error message combined with --cache false fails with an error message combined with --auto-gen-config fails with an error message combined with --auto-correct fails with an error message --display-only-failed fails if given without --format junit works if given with --format junit --require requires the passed path RuboCop::Cop::Style::MultilineIfModifier if guard clause allows a multiline condition registers an offense registers an offense when indented allows a one liner unless guard clause registers an offense when indented allows a multiline condition registers an offense allows a one liner RuboCop::Config #file_to_exclude? when the passed path matches any of patterns to exclude returns true when the passed path does not match any of patterns to exclude returns false #deprecation_check when there is AllCops configuration if there are no Excludes or Includes keys does not yield if there are is an Excludes key yields if there are is an Includes key yields when there is no AllCops configuration does not yield #for_department accepts a Symbol always returns the department's config #allowed_camel_case_file? when the passed path matches allowed camel case patterns to include is expected to equal true when the passed path is a gemspec is expected to equal true when the passed path does not match allowed camel case patterns to include is expected to equal false #possibly_include_hidden? returns true when Include config includes a toplevel dotfile returns true when Include config includes a dotfile in a path returns true when Include config only includes regular paths returns true when Include config includes a regex #make_excludes_absolute when config is in subdirectory generates valid absolute directory when config is in root directory generates valid absolute directory #patterns_to_include when config file has AllCops => Include key returns the Include value #validate when the configuration includes an obsolete EnforcedStyle parameter raises validation error when the configuration includes any unrecognized parameter prints a warning message when the configuration includes multiple but config does not allow raises validation error when the configuration is in the base RuboCop config folder is not validated when the configuration includes multiple valid enforced styles does not raise validation error when the configuration includes an invalid EnforcedStyle raises validation error when the configuration includes multiple invalid enforced styles raises validation error when the configuration includes obsolete parameters and cops raises validation error when the configuration includes an obsolete parameter raises validation error when the configuration includes a valid enforced style does not raise validation error when the configuration includes an invalid enforced style raises validation error when the configuration includes a valid EnforcedStyle does not raise validation error when the configuration includes an empty section raises validation error when the empty section is AllCops raises validation error when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter raises validation error when all cops are both Enabled and Disabled by default raises validation error when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter raises validation error when the configuration includes any unrecognized cop name raises an validation error when the configuration includes multiple valid enforced styles and one invalid style raises validation error when the configuration includes Lint/Syntax cop when the configuration does not match the default raises validation error when the configuration matches the default does not raise validation error conflicting Safe settings when the configuration includes an unsafe cop that is explicitly declared to have a safe auto-correction raises validation error when the configuration includes an unsafe cop without a declaration of its auto-correction does not raise validation error when the configuration includes an obsolete cop raises validation error when the configuration includes any common parameter does not raise validation error #patterns_to_exclude when config file has AllCops => Exclude key returns the Exclude value #file_to_include? when the passed path does not match any of patterns to include returns false when the passed path matches any of patterns to include returns true #for_badge works if department has no config takes into account the department #check when a deprecated configuration is detected prints a warning message for the loaded path whether the cop is enabled when an entire cop department is disabled but an individual cop is enabled still disables the cop when configuration has no mention of a cop enables the cop that is not mentioned when all cops are disabled by default disables the cop that is not mentioned when all cops are explicitly enabled by default enables the cop that is not mentioned when an entire cop department is enabled but an individual cop is disabled still disables the cop when a cop has configuration but no explicit Enabled setting enables the cop by default RuboCop::Cop::Style::ClassAndModuleChildren nested style accepts nested children registers an offense for not nested classes with explicit superclass registers an offense for not nested classes registers an offense for not nested modules accepts :: in parent class on inheritance compact style accepts compact style for classes/modules registers a offense for classes with nested children accepts class/module with single method accepts nesting for classes/modules with more than one child accepts nesting for classes with an explicit superclass registers a offense for modules with nested children RuboCop::Cop::Layout::MultilineBlockLayout registers offenses when there are not too many parameters to fit on one line auto-corrects nested parens correctly considers the extra space required to join the lines together does not register offenses when there is a newline for {} block does not error out when the block is empty registers an offense for missing newline in do/end block w/o params registers an offense and corrects a line-break within arguments registers an offense and corrects a do/end block with a mult-line body registers offenses and corrrects for new lambda literal syntax registers an offense and corrects for missing newline in {} block with params registers an offense and corrects line-break before arguments autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block registers offenses and corrects for lambdas does not register an offense for one-line {} blocks does not register offenses when there is a newline for do/end block does not register an offense for one-line do/end blocks registers an offense and corrects for missing newline in {} block w/o params does not auto-correct a trailing comma when only one argument is present does not register offenses when there are too many parameters to fit on one line registers an offense and corrects line-break within arguments registers an offense and corrects a line break within destructured arguments doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine registers an offense and corrects for missing newline in do/end block with params registers an offense and corrects line-break before arguments with empty block registers an offense and corrects for missing newline before opening parenthesis `(` for block body RuboCop::Cop::Style::AutoResourceCleanup registers an offense for File.open without block does not register an offense for File.open with immediate close does not register an offense for File.open with block-pass does not register an offense for File.open with block RuboCop::Cop::InternalAffairs::RedundantMessageArgument does not register an offense when `#message` with another node is passed does not register an offense when formatted `MSG` is passed when `#message` with offending node is passed when message is the only keyword argument registers an offense when there are others keyword arguments registers an offense when `MSG` is passed registers an offense when `#message` is passed registers an offense RuboCop::Cop::Lint::NonLocalExitFromIterator allows return with value allows return in define_singleton_method allows return in define_method when block is lambda allows when block in middle of nest is followed by method chain registers offenses when lambda is inside of block followed by method chain allows when block is not followed by method chain allows when block is followed by method chain and has multiple arguments registers an offense and has single argument registers an offense and has no argument allows when the return is within a nested method definition allows return in a class method definition allows return in an instance method definition RuboCop::Cop::Lint::UselessAccessModifier behaves like methods defined in an iteration doesn't register an offense for map doesn't register an offense for each behaves like repeated visibility modifiers registers an offense when `public` is repeated behaves like at the end of the body registers an offense for trailing `protected` when using the class_methods method from ActiveSupport::Concern is aware that this creates a new scope behaves like def in new block doesn't register an offense if a method is defined in ::Class.new registers an offense if no method is defined in ::Class.new behaves like nested in a begin..end block doesn't flag an access modifier from surrounding scope still flags repeated `private` behaves like at the end of the body registers an offense for trailing `private` behaves like conditionally defined method doesn't register an offense for unless doesn't register an offense for if when private_class_method is used without arguments registers an offense and corrects behaves like method defined using class_eval doesn't register an offense if a method is defined registers an offense if no method is defined inside a class registers two offenses when a modifier is inside and outside the block and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block behaves like method defined with define_method doesn't register an offense if a block is passed doesn't register an offense if a lambda is passed doesn't register an offense if a -> is passed doesn't register an offense if a proc is passed behaves like method named by access modifier name registers an offense for `public` behaves like def in new block doesn't register an offense if a method is defined in ::Module.new registers an offense if no method is defined in ::Module.new behaves like nested modules doesn't register an offense for nested classs unused modifiers registers an offense with a nested class registers an offense when outside a nested class registers an offense when inside a nested class when passing method as symbol does not register an offense behaves like def in new block doesn't register an offense if a method is defined in Module.new registers an offense if no method is defined in Module.new behaves like method defined with define_method doesn't register an offense if a proc is passed doesn't register an offense if a -> is passed doesn't register an offense if a block is passed doesn't register an offense if a lambda is passed behaves like nested in a begin..end block doesn't flag an access modifier from surrounding scope still flags repeated `private` behaves like non-repeated visibility modifiers registers an offense and corrects even when `public` is not repeated doesn't register an offense when `protected` is not repeated doesn't register an offense when `private` is not repeated behaves like conditionally defined method doesn't register an offense for if doesn't register an offense for unless when private_class_method is used with arguments does not register an offense behaves like def in new block doesn't register an offense if a method is defined in Module.new registers an offense if no method is defined in Module.new behaves like def in new block doesn't register an offense if a method is defined in Struct.new registers an offense if no method is defined in Struct.new behaves like method defined on a singleton class outside a class registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined registers an offense if no method is defined inside a class doesn't register an offense if a method is defined registers an offense even if a non-singleton-class method is defined registers an offense if no method is defined after the modifier doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined behaves like method defined using instance_eval doesn't register an offense if a method is defined registers an offense if no method is defined inside a class registers two offenses when a modifier is inside and outside the and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block when an access modifier has no effect registers an offense and corrects behaves like method defined on a singleton class inside a class doesn't register an offense if the modifier is the same as outside the meta-class doesn't register an offense if a method is defined registers an offense if no method is defined registers an offense even if a non-singleton-class method is defined registers an offense if no method is defined after the modifier outside a class doesn't register an offense if a method is defined registers an offense if no method is defined registers an offense if no method is defined after the modifier when using ActiveSupport behavior when Rails is not eabled reports offenses and corrects behaves like method defined on a singleton class outside a class doesn't register an offense if a method is defined registers an offense if no method is defined after the modifier registers an offense if no method is defined inside a class doesn't register an offense if the modifier is the same as outside the meta-class registers an offense even if a non-singleton-class method is defined registers an offense if no method is defined registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined when there are consecutive access modifiers registers an offense and corrects behaves like method defined with define_method doesn't register an offense if a block is passed doesn't register an offense if a -> is passed doesn't register an offense if a proc is passed doesn't register an offense if a lambda is passed behaves like repeated visibility modifiers registers an offense when `protected` is repeated behaves like at the end of the body registers an offense for trailing `private` behaves like nested in a begin..end block still flags repeated `public` behaves like method defined on a singleton class outside a class registers an offense if no method is defined registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined inside a class doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined after the modifier registers an offense even if a non-singleton-class method is defined doesn't register an offense if a method is defined registers an offense if no method is defined behaves like nested modules doesn't register an offense for nested modules unused modifiers registers an offense when outside a nested module registers an offense when inside a nested module registers an offense with a nested module behaves like methods defined in an iteration doesn't register an offense for map doesn't register an offense for each behaves like nested modules doesn't register an offense for nested classs unused modifiers registers an offense when inside a nested class registers an offense when outside a nested class registers an offense with a nested class when only a constant or local variable is defined after the modifier registers an offense and corrects registers an offense and corrects behaves like conditionally defined method doesn't register an offense for if doesn't register an offense for unless when an access modifier is followed by a class method defined on constant registers an offense and corrects behaves like at the end of the body registers an offense for trailing `public` behaves like method named by access modifier name registers an offense for `public` behaves like unused visibility modifiers registers an offense and corrects when visibility is immediately changed without any intervening defs behaves like nested in a begin..end block still flags repeated `public` behaves like at the top of the body doesn't register an offense for `private` registers an offense and corrects for `public` doesn't register an offense for `protected` behaves like def in new block doesn't register an offense if a method is defined in Struct.new registers an offense if no method is defined in Struct.new when using ActiveSupport's `concerning` method is aware that this creates a new scope still points out redundant uses within the block behaves like nested in a begin..end block still flags repeated `protected` doesn't flag an access modifier from surrounding scope behaves like method named by access modifier name registers an offense for `protected` behaves like at the end of the body registers an offense for trailing `protected` when using inline modifiers does not register an offense behaves like repeated visibility modifiers registers an offense when `public` is repeated when a def is an argument to a method call does not register an offense behaves like method defined with define_method doesn't register an offense if a -> is passed doesn't register an offense if a block is passed doesn't register an offense if a proc is passed doesn't register an offense if a lambda is passed behaves like methods defined in an iteration doesn't register an offense for each doesn't register an offense for map behaves like def in new block doesn't register an offense if a method is defined in ::Struct.new registers an offense if no method is defined in ::Struct.new behaves like method named by access modifier name registers an offense for `private` behaves like def in new block registers an offense if no method is defined in Class.new doesn't register an offense if a method is defined in Class.new when an access modifier has no methods registers an offense and corrects behaves like unused visibility modifiers registers an offense and corrects when visibility is immediately changed without any intervening defs when multiple class definitions in file but only one has offense registers an offense and corrects behaves like repeated visibility modifiers registers an offense when `private` is repeated behaves like at the top of the body doesn't register an offense for `private` registers an offense and corrects for `public` doesn't register an offense for `protected` behaves like nested modules doesn't register an offense for nested modules unused modifiers registers an offense when inside a nested module registers an offense when outside a nested module registers an offense with a nested module behaves like repeated visibility modifiers registers an offense when `private` is repeated behaves like method defined using class_eval doesn't register an offense if a method is defined registers an offense if no method is defined inside a class registers two offenses when a modifier is inside and outside the block and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block when class is empty save modifier registers an offense and corrects behaves like method named by access modifier name registers an offense for `protected` behaves like def in new block registers an offense if no method is defined in Class.new doesn't register an offense if a method is defined in Class.new behaves like method named by access modifier name registers an offense for `private` behaves like conditionally defined method doesn't register an offense for if doesn't register an offense for unless behaves like nested in a begin..end block doesn't flag an access modifier from surrounding scope still flags repeated `protected` behaves like at the end of the body registers an offense for trailing `public` behaves like repeated visibility modifiers registers an offense when `protected` is repeated when an access modifier is followed by attr_* does not register an offense behaves like non-repeated visibility modifiers registers an offense and corrects even when `public` is not repeated doesn't register an offense when `protected` is not repeated doesn't register an offense when `private` is not repeated behaves like method defined using instance_eval registers an offense if no method is defined doesn't register an offense if a method is defined inside a class registers two offenses when a modifier is inside and outside the and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block behaves like def in new block registers an offense if no method is defined in ::Class.new doesn't register an offense if a method is defined in ::Class.new behaves like def in new block registers an offense if no method is defined in ::Struct.new doesn't register an offense if a method is defined in ::Struct.new behaves like methods defined in an iteration doesn't register an offense for map doesn't register an offense for each behaves like def in new block doesn't register an offense if a method is defined in ::Module.new registers an offense if no method is defined in ::Module.new when using a known method-creating method still points out redundant uses within the module is aware that this creates a new method RuboCop::Cop::Lint::IneffectiveAccessModifier when there is `begin` before a method definition does not register an offense when there is an intervening instance method still registers an offense when `protected` is applied to a class method registers an offense when `private` is applied to a class method registers an offense when a `class << self` block is used doesn't register an offense when no access modifier is used doesn't register an offense when `private_class_method` is used when `private_class_method` contains all private method names doesn't register an offense when `private_class_method` does not contain the method registers an offense RuboCop::Cop::Lint::DeprecatedOpenSSLConstant does not register an offense with cipher constant and argument is a variable does not register an offense with cipher constant and send argument is a method does not register an offense with cipher constant and argument is a constant registers an offense when using an digest constant with chained methods and corrects registers an offense with cipher constant and two arguments and corrects registers an offense with AES + blocksize constant and mode argument and corrects registers an offense with cipher constant and one argument and corrects does not register an offense when using ::Digest class methods with an algorithm string and value registers an offense with cipher constant and double quoted string argument and corrects does not register an offense when building digest using an algorithm string does not register an offense when using cipher with a string registers an offense when using ::Digest class methods on an algorithm constant and corrects registers an offense when building an instance using an digest constant and corrects registers an offense with AES + blocksize constant and corrects when used in a block registers an offense when using ::Digest class methods on an algorithm constant and corrects RuboCop::CLI corrects Style/BlockDelimiters offenses when specifingLayout/SpaceInsideBlockBraces together corrects SymbolProc and SpaceBeforeBlockBraces offenses does not hang SpaceAfterPunctuation and SpaceInsideParens handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces does not correct ExtraSpacing in a hash that would be changed back can correct empty line inside special form of nested modules can correct two problems with blocks corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses can correct two empty lines at end of class body corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` corrects Style/Next and Style/SafeNavigation offenses plays nicely with default cops in complex ExtraSpacing scenarios corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses corrects RedundantBegin offenses and fixes indentation etc can be disabled for any cop in configuration corrects only IndentationWidth without crashing corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together can correct indentation and another thing corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged can correct TrailingEmptyLines and TrailingWhitespace offenses corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense does not say [Corrected] if correction was avoided corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses can correct single line methods corrects Style/InverseMethods and Style/Not offenses can correct two problems in the same place can correct HashSyntax when --only is used can correct MethodDefParentheses and other offense corrects Tab and IndentationConsistency offenses can correct IndentHash offenses with separator style corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` honors Exclude settings in individual cops does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets can correct a problems and the problem it creates corrects IndentationWidth and IndentationConsistency offenses can correct SpaceAfterComma and HashSyntax offenses corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` corrects RedundantCopDisableDirective offenses does not correct SpaceAroundOperators in a hash that would be changed back can change block comments and indent them can correct WordArray and SpaceAfterComma offenses corrects InitialIndentation offenses corrects code with indentation problems can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses can correct HashSyntax and SpaceAroundOperators offenses trailing comma cops when the style is `consistent_comma` corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma when the style is `comma` corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma space_inside_bracket cops when array style is compact & reference style is no_space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is no_space & reference style is space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is compact & reference style is space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is space & reference style is no space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when BlockDelimiters has line_count_based style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses when BlockDelimiters has braces_for_chaining style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses when BlockDelimiters has semantic style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses caching with no offenses in the cache doesn't correct offenses with an offense in the cache corrects offenses RuboCop::Cop::Style::MultilineMethodSignature when arguments span multiple lines when correction would not exceed maximum line length registers an offense when defining an class method registers an offense when `end` is on the following line registers an offense when `end` is on the same line when defining an instance method registers an offense when `end` is on the same line registers an offense when `end` is on the following line when correction would exceed maximum line length does not register an offense when arguments span a single line when defining an instance method registers an offense when closing paren is on the following line when method signature is on a single line does not register an offense for unparameterized method does not register an offense for parameterized method when defining an class method when method signature is on a single line does not register an offense for parameterized method does not register an offense for unparameterized method when arguments span a single line registers an offense when closing paren is on the following line RuboCop::Cop::Style::MultilineMemoization EnforcedStyle: keyword with a multiline memoization without a `begin` and `end` block allows with another block on the first line allows with a conditional on the first line allows with another block on the following line allows with a conditional on the following line with a single line memoization allows expression on first line allows expression on the following line with a multiline memoization without a `begin` and `end` block when the expression is wrapped in parentheses registers an offense when expression starts on following line registers an offense with multiline expression registers an offense when expression starts on first line EnforcedStyle: braces with a single line memoization allows expression on first line allows expression on the following line with a multiline memoization without a `begin` and `end` block allows with another block on the first line allows with a conditional on the following line allows with another block on the following line allows with a conditional on the first line with a multiline memoization without braces when the expression is wrapped in `begin` and `end` keywords registers an offense for begin...end block on first line registers an offense for begin...end block on following line RuboCop::Cop::Style::Send with public_send and with a receiver does not register an offense for an invocation without args does not register an offense for an invocation with args and without a receiver does not register an offense for an invocation with args does not register an offense for an invocation without args with __send__ and with a receiver does not register an offense for an invocation with args does not register an offense for an invocation without args and without a receiver does not register an offense for an invocation without args does not register an offense for an invocation with args with send and without a receiver registers an offense for an invocation with args does not register an offense for an invocation without args and with a receiver does not register an offense for an invocation without args registers an offense for an invocation with args when using safe navigation operator registers an offense for an invocation with args RuboCop::Cop::Lint::UselessAssignment when a method argument is not used accepts when a variable is assigned and referenced when defining a module does not register an offense when a variable is assigned while being passed to a method taking block and the variable is not used registers an offense and the variable is used accepts when a variable is assigned in begin and referenced outside accepts when a keyword splat method argument is not used accepts when an unreferenced variable is reassigned in a block accepts when a variable is reassigned multiple times in rescue and referenced after the begin registers an offense when a variable is assigned in 2 identical if branches doesn't think 1 of the 2 assignments is useless when a optional keyword method argument is not used accepts when a variable is assigned and unreferenced in a module registers an offense when an optional method argument is not used accepts when a block method argument is not used accepts when a setter is invoked with operator assignment in loop body accepts when a referenced variable is reassigned but not re-referenced registers an offense for the non-re-referenced assignment when a variable is assigned and unreferenced in a singleton class registers an offense when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch registers an offense for the reassignment in the if branch when a variable is assigned in loop body and unreferenced registers an offense when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch registers an offense for the reassignment in the if branch when a variable is assigned and unreferenced in top level registers an offense when a variable is reassigned multiple times in main body of begin then referenced in ensure accepts when a variable is assigned in loop body and referenced in post until condition accepts when a variable is assigned in main body of begin with rescue but unreferenced registers an offense when a variable is shadowed by a block argument and unreferenced registers an offense when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch registers an offense for the assignment in the if branch when a referenced variable is reassigned but not re-referenced in a method defined in loop registers an offense when a variable is not used and the name starts with _ accepts when a variable that has same name as outer scope variable is not referenced in a method defined in loop registers an offense when a variable is assigned and assigned again in a modifier condition accepts without parentheses accepts with parentheses when a variable is assigned in loop body and referenced in post while condition accepts when a splat method argument is not used accepts when there is only one AST node and it is unused variable registers an offense when a variable is assigned in each branch of if and referenced after the branching accepts when an anonymous keyword splat method argument is defined accepts when a variable is assigned first with ||= and referenced accepts when a variable is assigned and unreferenced in a singleton method defined with self keyword registers an offense when a rescued error variable is wrongly tried to be referenced in another rescue body registers an offense when a variable is assigned with operator assignment in top level registers an offense when a variable is reassigned multiple times in rescue with ensure then referenced after the begin registers an offense when a variable is assigned in main body of begin, rescue and else then referenced after the begin accepts when a variable is reassigned multiple times in main body of begin then referenced after the begin accepts when a variable is assigned and passed to a method followed by method taking block accepts when an unreferenced variable is reassigned and re-referenced registers an offense for the unreferenced assignment when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) when a variable is assigned at the end of rescue and would be referenced with retry accepts when a named capture is unreferenced in other than top level registers an offense when a variable is assigned and unreferenced in a class subclassing another class stored in local variable registers an offense when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching accepts when a referenced variable is reassigned in a block accepts when a local variable is unreferenced and zero arity super is called registers an offense when a variable is reassigned with logical operator assignment and referenced accepts when an assignment in a if branch is referenced in another if branch accepts when a method argument is reassigned but not passed to super registers an offense when a variable is assigned and unreferenced in a method registers an offense when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch registers an offense for the reassignment in the if branch when a variable is referenced in rhs of named capture expression accepts when a variable is reassigned while referencing itself in rhs and referenced accepts when a unreferenced variable is reassigned in same branch and referenced after the branching registers an offense for the unreferenced assignment when a variable is assigned in single branch if and unreferenced registers an offense when a variable is reassigned multiple times in ensure with rescue then referenced after the begin registers an offense when a method argument is reassigned and zero arity super is called accepts when a variable is assigned in each branch of if and referenced in the else branch registers an offense for the assignment in the if branch when a variable is reassigned in a loop until loop accepts post while loop accepts post until loop accepts for loop accepts while loop accepts when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced registers an offense when a named capture is referenced accepts when a block local variable is assigned and unreferenced registers offenses for the assignment when a variable is assigned on each side of && and referenced after the && accepts when a variable is reassigned multiple times in main body of begin then referenced in rescue accepts when a variable is assigned and unreferenced in a class registers an offense when a keyword splat method argument is used accepts when a variable is assigned and unreferenced in a singleton method defined with variable name registers an offense when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin registers offenses for each assignment before ensure when a block local variable is declared but not assigned accepts when a variable is assigned with multiple assignment and unreferenced registers an offense when a unreferenced variable is reassigned on the left side of && and referenced after the && registers an offense for the unreferenced assignment similar name suggestion when there's a similar variable suggests the variable name when there's a similar method invocation with arguments does not suggest any name when there are only less similar names does not suggest any name when there's a similar method invocation with explicit receiver does not suggest any name when there's a similar name but it's in inner scope does not suggest any name when there's a similar variable-like method invocation suggests the method name when a named capture is unreferenced in top level registers an offense when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced registers an offense for the assignment in rhs when a variable is reassigned with binary operator assignment and referenced accepts when a variable is reassigned at the end of loop body and would be referenced in next iteration accepts when a variable is assigned multiple times but unreferenced registers offenses for each assignment when a variable is reassigned at the end of loop body and would be referenced in loop condition accepts when a variable is reassigned in single branch if and referenced in the branch registers an offense for the unreferenced assignment when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced accepts when a variable is assigned with ||= before the last expression of the scope registers an offense when a unreferenced variable is reassigned on the right side of && and referenced after the && accepts when a variable is assigned with ||= at the last expression of the scope registers an offense when a block argument is not used accepts when a variable is reassigned in single branch if and referenced after the branching accepts when a variable is assigned with operator assignment in rescue and would be referenced with retry accepts RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces can handle interpolation in a braceless hash literal accepts hash literals with no braces registers an offense for hashes with no spaces if so configured registers an offense for correct + opposite accepts hashes with spaces by default when EnforcedStyle is no_space accepts multiline hash with comment accepts multiline hash registers an offense for opposite + correct registers an offense for hashes with spaces accepts hashes with no spaces on Hash[{ x: 1 } => [1]] does not register an offense on { key: "{" } does not register an offense with space inside empty braces allowed accepts empty braces with space inside registers an offense for empty braces with no space inside with space inside empty braces not allowed accepts empty braces with no space inside registers an offense for empty braces with space inside when EnforcedStyle is compact accepts multiline hash with comment registers an offense for nested hashes with spaces registers an offense for opposite + correct accepts multiline hash registers offenses for hashes with no spaces doesn't register an offense for non-nested hashes with spaces RuboCop::MagicComment returns true for frozen_string_literal when comment is # frozen-string-literal: true returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid returns nil for encoding when comment is # incoding: utf-8 returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- returns nil for encoding when comment is # -*- frozen-string-literal: true -*- returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi returns nil for encoding when comment is # vim:fileencoding=utf-8 returns nil for frozen_string_literal when comment is # incoding: utf-8 returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| returns true for frozen_string_literal when comment is # frozen_string_literal: true returns nil for encoding when comment is # frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for encoding when comment is # frozen_string_literal: false returns nil for frozen_string_literal when comment is # coding: utf-8 returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true returns false for frozen_string_literal when comment is # frozen_string_literal: false returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; frozen_string_literal: true -*- returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit returns nil for encoding when comment is # frozen_string_literal: true returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns true for frozen_string_literal when comment is # frozen_string_literal:true returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit returns "utf-8" for encoding when comment is # coding: utf-8 returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit returns nil for encoding when comment is # frozen-string-literal: true returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit returns nil for encoding when comment is # frozen_string_literal: invalid returns nil for frozen_string_literal when comment is # encoding: utf-8 returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true returns "utf-8" for encoding when comment is # encoding: utf-8 returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit returns "utf-8" for encoding when comment is # coding: utf-8 returns true for frozen_string_literal when comment is # frozen_string_literal: true returns nil for frozen_string_literal when comment is # coding: utf-8 returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns "utf-8" for encoding when comment is # ENCODING: utf-8 returns nil for encoding when comment is # returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for frozen_string_literal when comment is # returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit returns nil for encoding when comment is # frozen_string_literal:true returns nil for frozen_string_literal when comment is # ENCODING: utf-8 returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi RuboCop::Cop::Style::LineEndConcatenation registers an offense for string concat at line end accepts string concat at line end for special strings like __FILE__ registers an offense for string concat with << at line end autocorrects only the lines that should be autocorrected registers an offense for dynamic string concat at line end registers multiple offenses when there are chained << methods registers multiple offenses when there are chained concatenations accepts string concat at line end when % literals are involved registers offenses only for the appropriate lines in chained concats registers an offense for dynamic string concat with << at line end accepts string concat with a return value of method on an interpolated string accepts string concat with a return value of method on a string registers an offense for string concat with << and \ at line ends autocorrects a + with \ to just \ accepts string concat at line end when followed by comment registers multiple offenses when there are chained concatenationscombined with << calls autocorrects a + with trailing whitespace to \ accepts string concat on the same line accepts string concat at line end when followed by a comment line RuboCop::Cop::Metrics::ModuleLength accepts a module with less than 5 lines rejects a module with more than 5 lines does not count blank lines reports the correct beginning and end lines accepts empty modules accepts a module with 5 lines when a module has inner modules rejects a module with 6 lines that belong to the module directly does not count lines of inner modules when `CountAsOne` is not empty folds array into one line when inspecting a class defined with ::Module.new registers an offense when CountComments is enabled also counts commented lines when a module has inner classes rejects a module with 6 lines that belong to the module directly does not count lines of inner classes when inspecting a class defined with Module.new registers an offense RuboCop::Cop::Style::TrailingBodyOnMethodDefinition registers when body starts on def line & continues many more lines accepts a method with one line of body does not register offense with trailing body on method end auto-corrects with comment after body registers when body starts on def line & continues one more line registers an offense when body trails after method definition auto-correction removes semicolon from method definition but not body auto-corrects body with method definition with args not in parens accepts a method with multiple lines of body when method is not on first line of processed_source auto-corrects offense RuboCop::Cop::Style::VariableInterpolation registers an offense for interpolated global variables in symbol registers an offense for interpolated instance variables registers an offense for interpolated global variables in regexp registers an offense for interpolated global variables in string registers an offense for interpolated global variables in backticks does not register an offense for variables in expressions registers an offense for interpolated class variables registers an offense for interpolated regexp nth back references registers an offense for interpolated regexp back references RuboCop::Cop::Layout::SpaceBeforeFirstArg for method calls with parentheses accepts a method call without space accepts a method call with space after the left parenthesis for method calls without parentheses registers an offense for method call with no spaces before the first arg auto-corrects missing space accepts setter call accepts multiple space containing line break accepts + operator registers an offense and corrects method call with two spaces before the first arg accepts a method call with one space before the first arg when a vertical argument positions are aligned auto-corrects missing space registers an offense when AllowForAlignment is true accepts method calls with aligned first arguments when AllowForAlignment is false registers an offense and corrects method calls with aligned first arguments when using safe navigation operator registers an offense and corrects method call with two spaces before the first arg RuboCop::Cop::Severity has a few required attributes overrides #to_s redefines == to compare severities is frozen Comparable convention is expected to be < warning refactor is expected to be < convention error is expected to be < fatal warning is expected to be < error constructs from code C is expected to eq # F is expected to eq # E is expected to eq # W is expected to eq # R is expected to eq # #level warning is expected to eq 3 fatal is expected to eq 5 convention is expected to eq 2 refactor is expected to eq 1 error is expected to eq 4 #code refactor is expected to eq "R" warning is expected to eq "W" error is expected to eq "E" fatal is expected to eq "F" convention is expected to eq "C" RuboCop::Cop::Lint::UriRegexp registers an offense and corrects using `URI.regexp` without argument registers an offense and corrects using `URI.regexp` with argument registers an offense and corrects using `::URI.regexp` without argument does not register an offense when using `regexp` without receiver does not register an offense when using `regexp` with variable receiver registers an offense and corrects using `::URI.regexp` with argument array argument registers an offense and corrects using `URI.regexp` with literal arrays registers an offense and corrects using `URI.regexp` with %i arrays registers an offense and corrects using `URI.regexp` with %w arrays RuboCop::Cop::Lint::NestedMethodDefinition does not register offense for nested definition inside class_eval does not register offense for nested definition inside module_exec does not register offense for nested definition inside ::Module.new does not register offense for nested definition inside Class.new does not register an offense for a lambda definition inside method does not register offense for nested definition inside ::Class.new does not register offense for nested definition inside class_exec does not register offense for nested definition inside module_eval registers an offense for a nested singleton method definition does not register offense for nested definition inside instance_exec does not register offense for nested definition inside class shovel does not register offense for definition of method on local var does not register offense for nested definition inside Struct.new does not register offense for nested definition inside instance_eval registers an offense for a nested method definition inside lambda does not register offense for nested definition inside Module.new does not register offense for nested definition inside ::Struct.new registers an offense for a nested method definition registers an offense for a nested class method definition RuboCop::Cop::Style::RedundantSortBy autocorrects array.sort_by { |x| x } autocorrects array.sort_by { |y| y } autocorrects array.sort_by do |x| x end RuboCop::Cop::Lint::StructNewOverride does not register an offense with an override within a given block registers an offense using `Struct.new(symbol)` does not register an offense with no overrides registers an offense using `Struct.new(string, ...symbols)` registers an offense using `::Struct.new(symbol)` registers an offense using `Struct.new(symbol, string)` registers an offense using `Struct.new(...symbols)` registers an offense using `Struct.new(...)` with a block registers an offense using `Struct.new(...)` with an option argument registers an offense using `Struct.new(...)` with multiple overrides RuboCop::Cop::Lint::UnderscorePrefixedVariableName when an underscore-prefixed method argument is used registers an offense when an underscore-prefixed variable is used registers an offense when an underscore-prefixed variable is captured by a block accepts when non-underscore-prefixed variable is used does not register an offense in a method calling `binding` without arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used explicitly does not register an offense in a method calling `super` with arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used does not register an offense in a method calling `binding` with arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used does not register an offense when an underscore-prefixed named capture variable is used registers an offense when an underscore-prefixed keyword block argument is used registers an offense when AllowKeywordBlockArguments is set does not register an offense in a method calling `super` without arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used explicitly does not register an offense when an underscore-prefixed variable in top-level scope is used registers an offense when an underscore-prefixed variable is reassigned does not register an offense when an underscore-prefixed block argument is used registers an offense registers an offense RuboCop::Cop::Lint::SafeNavigationChain accepts usages of method chain with safe navigation only with argument registers an offense for safe navigation with + operator accepts usages of safe navigation with | operator registers an offense for safe navigation with []= operator registers an offense for safe navigation with > operator registers an offense for ordinary method call exists after safe navigation method call with an argument accepts usages of safe navigation with == operator accepts usages of safe navigation with assignment method registers an offense for safe navigation with [] operator accepts usages of safe navigation with || operator registers an offense for safe navigation with <= operator accepts usages of safe navigation at last only with argument registers an offense for safe navigation with < operator accepts usages of safe navigation with self assignment method accepts usages of method chain with safe navigation only accepts usages of safe navigation with === operator accepts usages of safe navigation with && operator accepts usages of safe navigation with & operator accepts usages of safe navigation at last only accepts usages of safe navigation with `nil?` method registers an offense for ordinary method chain exists after safe navigation method call registers an offense for ordinary method chain exists after safe navigation method call with a block accepts usages of ordinary method chain with argument accepts usages of safe navigation with `to_d` method registers an offense for ordinary method call exists after safe navigation method call accepts usages of safe navigation with `present?` method accepts usages of ordinary method chain registers an offense for ordinary method chain exists after safe navigation method call with an argument registers an offense for ordinary method chain exists after safe navigation method call with a block-pass accepts usages of safe navigation with `blank?` method registers an offense for safe navigation with >= operator accepts usages of safe navigation with `try` method >= Ruby 2.7 registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter proper highlighting when used with a modifier if when in a begin when there are methods after when in a method when there are methods before RuboCop::Cop::Style::CharacterLiteral auto-corrects ?' to "'" registers an offense for literals like \n accepts literals like ?\C-\M-d registers an offense for character literals accepts ? in a %w literal RuboCop::Cop::Naming::VariableNumber when configured for snake_case registers an offense for normal case numbering in method camel case parameter registers an offense for normal case numbering in method parameter behaves like offense_array registers an offense for ["a1", "a_2"] in snake_case behaves like accepts accepts local_1 in snake_case behaves like accepts accepts _foo in snake_case behaves like accepts accepts a_1_b_1 in snake_case behaves like accepts accepts @foo in snake_case behaves like accepts accepts local_12 in snake_case behaves like accepts accepts @__foo__ in snake_case behaves like accepts accepts local_ in snake_case behaves like offense registers an offense for camelCase1 in snake_case behaves like accepts accepts a_1_b in snake_case behaves like accepts accepts _ in snake_case behaves like offense registers an offense for @@local1 in snake_case behaves like offense registers an offense for @camelCase1 in snake_case behaves like accepts accepts aB_1 in snake_case behaves like offense registers an offense for _unused1 in snake_case behaves like offense registers an offense for aB1 in snake_case behaves like offense registers an offense for local1 in snake_case behaves like accepts accepts local_123 in snake_case behaves like offense registers an offense for @local1 in snake_case when configured for normal registers an offense for snake case numbering in method camel case parameter registers an offense for snake case numbering in method parameter behaves like accepts accepts snake_case in normalcase behaves like offense registers an offense for sha_256 in normalcase behaves like offense registers an offense for myAttribute_1 in normalcase behaves like accepts accepts target_u2f_device in normalcase behaves like offense registers an offense for local_1 in normalcase behaves like offense registers an offense for @@local_1 in normalcase behaves like accepts accepts _foo in normalcase behaves like accepts accepts sha256 in normalcase behaves like offense registers an offense for _myLocal_1 in normalcase behaves like accepts accepts @foo in normalcase behaves like accepts accepts @__foo__ in normalcase behaves like accepts accepts local_ in normalcase behaves like offense registers an offense for @local_1 in normalcase behaves like offense_array registers an offense for ["a_1", "a2"] in normalcase behaves like accepts accepts local1 in normalcase behaves like accepts accepts user1_id in normalcase behaves like offense registers an offense for local_FOO_1 in normalcase behaves like offense registers an offense for @myAttribute_1 in normalcase behaves like accepts accepts localFOO1 in normalcase behaves like offense registers an offense for localFOO_1 in normalcase behaves like accepts accepts foo10_bar in normalcase behaves like accepts accepts user_1_id in normalcase behaves like accepts accepts _ in normalcase when configured for non integer registers an offense for snake case numbering in method parameter registers an offense for normal case numbering in method camel case parameter registers an offense for snake case numbering in method camel case parameter registers an offense for normal case numbering in method parameter behaves like offense registers an offense for @local_1 in non_integer behaves like accepts accepts @foo in non_integer behaves like accepts accepts local_one in non_integer behaves like accepts accepts @@foo in non_integer behaves like offense registers an offense for @myAttribute_1 in non_integer behaves like accepts accepts fooBar in non_integer behaves like accepts accepts _ in non_integer behaves like accepts accepts local_ in non_integer behaves like offense registers an offense for myAttribute_1 in non_integer behaves like offense registers an offense for _myLocal_1 in non_integer behaves like accepts accepts @__foo__ in non_integer behaves like accepts accepts _foo in non_integer behaves like offense registers an offense for local1 in non_integer behaves like accepts accepts localone in non_integer behaves like offense registers an offense for _myLocal1 in non_integer behaves like offense registers an offense for local_1 in non_integer behaves like offense registers an offense for @myAttribute1 in non_integer behaves like offense_array registers an offense for ["a_1", "aone"] in non_integer behaves like offense registers an offense for @local1 in non_integer behaves like offense registers an offense for myAttribute1 in non_integer RuboCop::Cop::Layout::CommentIndentation registers offenses and corrects before __END__ but not after auto-corrects around program structure keywords accepts correctly indented comments with a blank line following the comment accepts a correctly indented comment on outer level registers an offense and corrects a documentation comment accepts a comment that follows code registers an offense and corrects an incorrectly indented (2) comment accepts a correctly indented comment registers an offense for each incorrectly indented comment registers an offense and corrects an incorrectly indented (1) comment near various kinds of brackets accepts correctly indented comments is unaffected by closing bracket that does not begin a line RuboCop::FileFinder #find_file_upwards returns a file to be found upwards returns nil when file is not found #find_last_file_upwards returns nil when file is not found returns the last file found upwards RuboCop::Formatter::FileListFormatter #file_finished displays parsable text RuboCop::Cop::Lint::OrderedMagicComments does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang does not register an offense when using `encoding` magic comment is next of shebang does not register an offense when using `encoding` magic comment is first line does not register an offense when using `encoding` magic comment only registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments does not register an offense when using `frozen_string_literal` magic comment only registers an offense and corrects when `coding` magic comment does not precede all other magic comments registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments RuboCop::Cop::Naming::HeredocDelimiterNaming with a squiggly heredoc does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter with a naked heredoc registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter when the delimiter contains non-letter characters does not register an offense when delimiter contains a number does not register an offense when delimiter contains an underscore with multiple heredocs starting on the same line registers an offense with a trailing non-meaningful delimiter does not register an offense with meaningful delimiters registers an offense with a leading non-meaningful delimiter with an interpolated heredoc does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter with a non-interpolated heredoc when using single quoted delimiters registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter when using non-word delimiters registers an offense when using back tick delimiters registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter when using double quoted delimiters does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter RuboCop::Cop::Commissioner #investigate stores all errors raised by the cops traverses the AST and invoke cops specific callbacks when given a source with parsing errors only calls on_other_file when passed :raise_error option re-raises the exception received while processing when a cop reports offenses returns all offenses found by the cops when given a force passes the input params to all cops/forces that implement their own #investigate method RuboCop::Cop::Layout::ArgumentAlignment aligned with first argument does not crash in autocorrect on dynamic string in parameter value can handle a method call within a method call registers an offense and correct multi-line parametersindented too far accepts correctly aligned arguments with fullwidth characters doesn't get confused by a line break inside a parameter accepts braceless hashes can handle heredoc strings accepts calls that only span one line registers an offense and corrects splat operator doesn't get confused by extra comma at the end can handle other method calls without parentheses accepts correctly aligned arguments doesn't get confused by symbols with embedded expressions doesn't crash and burn when there are nested issues registers an offense and corrects arguments with double indent can handle a string literal as other argument can handle method calls without parentheses doesn't get confused by regexen with embedded expressions accepts multiline []= method call accepts the first parameter being on a new row can handle a call with a block inside another call registers an offense and corrects multiline missed indendation can handle a ternary condition with a block reference doesn't get confused by a symbol argument can handle a correctly aligned string literal as first argument can handle a call embedded in a string registers an offense and corrects multi-line outdented parameters can handle parentheses used with no arguments can handle do-end registers an offense and corrects arguments with single indent can handle a multiline hash as second parameter assigned methods accepts the first parameter being on method row accepts the first parameter being on a new row when using safe navigation operator registers an offense and corrects arguments with single indent aligned with fixed indentation autocorrects by outdenting when indented too far autocorrects by indenting when not indented autocorrects when first line is indented assigned methods with IndentationWidth:Width set to 4 autocorrects even when first argument is in wrong position accepts the first parameter being on a new row accepts the first parameter being on method row with ArgumentAlignment:IndentationWidth set to 4 accepts the first parameter being on a new row accepts the first parameter being on method row multi-line method calls autocorrects relative to position of relevant method call registers offenses and corrects double indentation from relevant method does not err on method call without a method name can handle existing indentation from multi-line method calls RuboCop::Cop::Style::RedundantSelf accepts a self receiver with the square bracket operator accepts a self receiver used to distinguish from constant does not report an offense when self receiver in a method argument and lvalue have the same name accepts a self receiver of methods also defined on `Kernel` reports an offense a self receiver of .call accepts a self receiver on an lvalue of an or-assignment reports an offense a self receiver on an rvalue accepts a self receiver of .() accepts a self receiver on an lvalue of a plus-assignment does not report an offense when receiver and lvalue have the same name does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name accepts a self receiver on an lvalue of an and-assignment accepts a self receiver for methods named like ruby keywords accepts a self receiver with the double less-than operator accepts a self receiver on an lvalue of an assignment does not report an offense when receiver and multiple assigned lvalue have the same name accepts a self receiver on an lvalue of a parallel assignment accepts a self receiver used to distinguish from argument of block class methods accepts a self receiver used to distinguish from local variable accepts a self receiver used to distinguish from optional argument accepts a self receiver used to distinguish from argument accepts a self receiver used to distinguish from blockarg instance methods accepts a self receiver used to distinguish from argument accepts a self receiver used to distinguish from an argument accepts a self receiver used to distinguish from optional argument accepts a self receiver used to distinguish from an argument when an inner method is defined accepts a self receiver used to distinguish from local variable accepts a self receiver used to distinguish from blockarg RuboCop::Cop::Style::ImplicitRuntimeError does not register an offense for `fail` without arguments registers an offense for `raise` without error class registers an offense for `raise` with a multiline string registers an offense for `fail` without error class registers an offense for `fail` with a multiline string does not register an offense for `fail` with an error class does not register an offense for `raise` with an error class does not register an offense for `raise` without arguments RuboCop::Cop::Lint::UriEscapeUnescape registers an offense when using `::URI.escape('http://example.com')` registers an offense when using `URI.decode(enc_uri)` registers an offense when using `URI.encode('http://example.com')` registers an offense when using `::URI.decode(enc_uri)` registers an offense when using `URI.escape('@?@!', '!?')` registers an offense when using `::URI.unescape(enc_uri)` registers an offense when using `URI.unescape(enc_uri)` registers an offense when using `URI.escape('http://example.com')` registers an offense when using `::URI.encode('http://example.com)` RuboCop::Cop::Security::Open accepts open as variable accepts open with a string that interpolates a literal registers an offense for open with dynamic string that is not prefixed accepts open with no arguments accepts open on a literal string registers an offense for open with string that starts with a pipe registers an offense for open accepts File.open as method registers an offense for open with mode argument accepts open with prefix string literal plus something accepts open with string that has a prefixed interpolation RuboCop::Cop::Style::HashAsLastArrayItem when EnforcedStyle is no_braces does not register an offense when hash is not inside array does not register an offense when hash without braces registers an offense and corrects when hash with braces when EnforcedStyle is braces does not register an offense when hash with braces registers an offense and corrects when hash without braces does not register an offense when hash is not inside array RuboCop::Cop::Style::ExpandPathArguments does not register an offense when using `File.expand_path('..', __dir__)` does not register an offense when using `File.expand_path(__FILE__)` registers an offense when using `::File.expand_path('./../..', __FILE__)` registers an offense when using `File.expand_path('./../..', __FILE__)` registers an offense when using `Pathname.new(__FILE__).parent.expand_path` does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` does not register an offense when using `File.expand_path(__dir__)` registers an offense when using `File.expand_path('../..', __FILE__)` does not register an offense when using `File.expand_path(path, __FILE__)` registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` registers an offense when using `File.expand_path('..', __FILE__)` registers an offense when using `File.expand_path('.', __FILE__)` registers an offense when using `File.expand_path('../../lib', __FILE__)` does not register an offense when using `Pathname(__dir__).expand_path` registers an offense when using `Pathname(__FILE__).parent.expand_path` registers an offense when using `File.expand_path('../../..', __FILE__)` RuboCop::Cop::Generator::RequireFileInjector when using an unknown department inserts a `require_relative` statement to the bottom of the file when a `require_relative` entry does not exist from before injects a `require_relative` statement on the right line in the root file when a cop of style department already exists injects a `require_relative` statement on the end of style department when a `require` entry already exists does not write to any file RuboCop::Cop::Style::IfInsideElse ignores unless inside else catches an if..else nested inside an else ignores ternary inside if..else isn't offended if there is a statement preceding the if node isn't offended if there is a statement following the if node isn't offended by if..elsif..else ignores nested ternary expressions ignores if inside unless catches an if node nested inside an else when AllowIfModifier is true accepts a modifier if nested inside an else when AllowIfModifier is false catches a modifier if nested inside an else RuboCop::Cop::Layout::SpaceAroundKeyword behaves like missing after registers an offense for missing space after keyword in `unless""; end` auto-corrects behaves like missing before registers an offense for missing space before keyword in `until 1 do "x"end` auto-corrects behaves like accept before accepts `&&` before keyword in `a&&begin end` behaves like missing after auto-corrects registers an offense for missing space after keyword in `while 1 do"x" end` behaves like missing after auto-corrects registers an offense for missing space after keyword in `1 until""` behaves like missing before registers an offense for missing space before keyword in `case ""when a; end` auto-corrects behaves like missing after registers an offense for missing space after keyword in `1 while""` auto-corrects behaves like missing after auto-corrects registers an offense for missing space after keyword in `case"" when 1; end` behaves like accept after accepts `[` after keyword in `super[1]` behaves like missing after registers an offense for missing space after keyword in `BEGIN{}` auto-corrects behaves like accept after accepts `[` after keyword in `yield[1]` behaves like accept after accepts `(` after keyword in `defined?(1)` behaves like missing before registers an offense for missing space before keyword in `begin "a"end` auto-corrects behaves like accept around accepts `()` around keyword in `(next)` behaves like accept after accepts `rescue` after keyword in `begin; rescue(Error); end` behaves like accept before accepts `<` before keyword in `a` before keyword in `a>begin end` behaves like accept before accepts `+` before keyword in `a+begin; end.method` RuboCop::Cop::Lint::NonDeterministicRequireOrder when requiring files with direct block glob registers an offsense and autocorrects to add .sort.each with top-level ::Dir registers an offense and corrects to add .sort.each with require block passed as parameter registers an offense and autocorrects to add sort with sorted index does not register an offense with unsorted glob registers an offsense and autocorrects to add .sort with require block passed as parameter registers an offense an autocorrects to add sort with top-level ::Dir registers an offense and corrects to add .sort with sorted glob does not register an offense with unsorted index registers an offsense with extra logic registers an offsense and autocorrects to add .sort with require block passed as parameter registers an offense an autocorrects to add sort with top-level ::Dir registers an offense and corrects to add .sort when not requiring files does not register an offense RuboCop::Cop::Style::RedundantCondition ternary expression (?:) accepts expressions when the condition and if branch do not match when condition and if_branch are same registers an offense and corrects nested vars registers an offense and corrects when the else branch contains `and` registers an offense and corrects registers an offense and corrects when the else branch contains an irange registers an offense and corrects class vars registers an offense and corrects when the else branch contains an erange registers an offense and corrects functions registers an offense and corrects when the else branch contains `rescue` when inverted condition (unless) registers no offense when condition and else branch are same accepts complex unless branches registers an offense when regular condition (if) accepts elsif accepts different when the condition does not match the branch when condition and if_branch are same registers an offense and corrects multiline nodes accepts an elsif branch registers an offense and corrects when using modifier if auto-corrects when using `<<` method higher precedence than `||` operator registers an offense and corrects modifier nodes offense accepts when using ternary if in `else` branch registers an offense and corrects complex one liners registers an offense and corrects when a method without argument parentheses in `else` accepts complex else branches registers an offense and corrects registers an offense and corrects when `raise` without argument parentheses in `else` registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch registers an offense and corrects when the else branch contains an irange RuboCop::Formatter::SimpleTextFormatter #report_summary when no files inspected handles pluralization correctly when a offense detected handles pluralization correctly when an offense is corrected prints about correction when 2 offenses are corrected handles pluralization correctly when a file inspected and no offenses detected handles pluralization correctly when 2 offenses detected handles pluralization correctly #report_file the file is outside of the current working directory prints as absolute path the file is under the current working directory prints as relative path when the offense is not corrected prints message as-is when the offense is automatically corrected prints [Corrected] along with message when the offense is marked as todo prints [Todo] along with message RuboCop::Cop::Style::HashEachMethods when node matches a keys#each or values#each when receiver is a send does not register an offense for Hash#each_value registers offense, auto-corrects foo#values.each to foo#each_value does not register an offense for foo#each_key registers offense, auto-corrects foo#keys.each to foo#each_key when receiver is implicit does not register an offense for each_key does not register an offense for `keys.each` does not register an offense for `values.each` does not register an offense for each_value when receiver is a hash literal registers offense, auto-corrects {}#values.each with {}#each_value registers offense, auto-corrects {}#keys.each with {}#each_key does not register an offense for {}#each_key does not register an offense for {}#each_value RuboCop::Cop::Layout::IndentationWidth with Width set to 4 for a file with byte order mark accepts correctly indented method definition with if statement registers an offense for bad indentation of an if body #autocorrect corrects bad indentation with ignored patterns set accepts unindented lines for those keywords with Width set to 2 with case accepts case/when/else laid out as a table accepts correctly indented case/when/else accepts aligned values in when clause accepts case/when/else with then beginning a line registers an offense for bad indentation in a case/when body registers an offense for bad indentation in a case/else body accepts indented when/else plus indented body with unless accepts an empty unless registers an offense for bad indentation of an unless body with def/defs when end is aligned with def with an assignment accepts an empty defs body accepts an empty def body registers an offense for bad indentation of a defs body registers an offense for bad indentation of a def body when modifier and def are on the same line registers an offense for bad indentation of a defs body registers an offense for bad indentation of a def body accepts a correctly aligned body when end is aligned with start of line accepts an empty defs body registers an offense for bad indentation of a defs body accepts an empty def body with an assignment registers an offense for bad indentation of a def body when multiple modifiers and def are on the same line registers an offense for bad indentation of a def body registers an offense for bad indentation of a defs body accepts a correctly aligned body when multiple modifiers are used in a block anda method call is made at end of the block accepts a correctly aligned body registers an offense for bad indentation of a def registers an offense for bad indentation of a def body when modifier and def are on the same line registers an offense for bad indentation of a def body accepts a correctly aligned body registers an offense for bad indentation of a defs body with class registers an offense for bad indentation of a class body accepts an empty class body when consistency style is indented_internal_methods registers an offense for normal non-indented internal methods indentation when defined in a singleton class registers an offense for normal non-indented internal methods indentation with access modifier registers an offense for bad indentation of sections registers an offense and corrects for bad modifier indentation before good method definition when consistency style is normal registers offenses for indented_internal_methods indentation accepts indented public, protected, and private when consistency style is outdent accepts access modifier is outdent with while/until registers an offense for bad indentation of begin/end/while accepts an empty while registers an offense for bad indentation of an until body registers an offense for bad indentation of a while body with block accepts a correctly indented block body registers an offense for bad indentation of a do/end body accepts badly indented code if block end is not on separate line registers an offense for bad indentation of a {} body accepts an empty block body when consistency style is indented_internal_methods registers an offense for bad indentation in a do/end body when using safe navigation operator registers an offense for bad indentation of a {} body registers an offense for an if with setter with def/rescue/end registers an offense for bad indentation of bodies registers an offense for bad indent of defs bodies with a modifier with for accepts an empty for registers an offense for bad indentation of a for body with module when consistency style is normal accepts an empty module body registers an offense for bad indentation of a module body when consistency style is indented_internal_methods accepts normal non-indented internal methods ofmodule functions registers an offense for bad indentation of a module body with if statement accepts a one line if statement accepts if/elsif/else/end laid out as a table registers an offense for bad indentation of an else body when if and elsif body contains no code accepts an empty if accepts `ensure` after an empty body accepts `rescue` after an empty body registers offense for bad indentation of ternary inside else registers an offense for bad indentation of an if body accepts a correctly aligned if/elsif/else/end as a method argument registers an offense for bad indentation of an elsif body accepts if/then/else/end laid out as another table accepts a correctly aligned if/elsif/else/end accepts indentation after if on new line after assignment registers an offense for bad indentation of an else body when if body contains no code does not raise any error with empty braces registers offense for bad indentation of modifier if in else accepts an if/else branches with rescue clauses registers an offense for bad indentation of an else body #autocorrect does not correct in scopes that contain block comments leaves rescue ; end unchanged leaves block unchanged if block end is not on its own line handles lines with only whitespace corrects bad indentation does not indent heredoc strings indents parenthesized expressions with assignment when alignment style is start_of_line and end is aligned with keyword accepts an if/else in assignment on next line registers an offense for an if with element assignment registers an offense for an if with setter registers an offense for a while registers an offense for an if registers an offense for an until and end is aligned randomly registers an offense for an until registers an offense for an if registers an offense for a while and end is aligned with variable accepts an if/else with chaining after the end accepts an if/else with chaining with a block after the end accepts an if with end aligned with element assignment accepts an if/else accepts an if with end aligned with variable accepts an if with end aligned with setter when alignment style is variable and end is aligned with variable accepts an if/else accepts an if/else with chaining after the end accepts an if with end aligned with element assignment accepts an if with end aligned with setter accepts an if with end aligned with variable accepts an if/else with chaining with a block after the end and end is aligned randomly registers an offense for an until registers an offense for a while registers an offense for an if and end is aligned with keyword registers an offense for an until accepts an if/else in assignment on next line registers an offense for an if with setter registers an offense for an if registers an offense for a while registers an offense for an if with element assignment when alignment style is keyword and end is aligned with variable registers an offense for a while registers an offense for an if autocorrects bad indentation and end is aligned with keyword accepts an if in assignment accepts an if/else in assignment accepts an until in assignment accepts an if/else in assignment on next line accepts a while in assignment with begin/rescue/else/ensure/end registers an offense for bad indentation of bodies RuboCop::Cop::Lint::ConstantResolution registers an offense not qualifying a namespace const registers no offense when qualifying a const registers an offense not qualifying a const registers no offense qualifying a namespace const with Only set registers no offense not qualifying another const registers no offense when qualifying a const registers no offense qualifying a namespace const registers no with a namespace const registers an offense with an unqualified const registers an offense when an unqualified namespace const with Ignore set registers no offense with an unqualified const registers no offense when qualifying a const registers no offense qualifying a namespace const registers an with a namespace const registers no offense when an unqualified namespace const registers an offense not qualifying another const RuboCop::Cop::Lint::ShadowingOuterLocalVariable when an outer scope variable is reassigned in a block does not register an offense when a block argument has different name with outer scope variables does not register an offense when a method argument has same name as an outer scope variable does not register an offense when a block argument has same name "_" as outer scope variable "_" does not register an offense when an outer scope variable is referenced in a block does not register an offense when multiple block arguments have a same name starts with "_" does not register an offense when multiple block arguments have same name "_" does not register an offense when a block local variable has same name as an outer scope variable registers an offense when a splat block argument has same name as an outer scope variable registers an offense when a block block argument has same name as an outer scope variable registers an offense when a block argument has same name as an outer scope variable registers an offense when a block argument has a same name starts with "_" as an outer scope variable does not register an offense RuboCop::Cop::Migration::DepartmentName when a disable comment has cop names with departments accepts when an unexpected disable comment format does not register an offense when a disable comment contains an unexpected character for department name accepts when todo/enable comments have cop names without departments registers offenses and corrects when there is space around `:` registers offenses and corrects when using a legacy cop name registers offenses and corrects when a disable comment contains a plain comment accepts RuboCop::Cop::Lint::RedundantRequireStatement registers an offense and corrects when using `require 'enumerator'` RuboCop::YAMLDuplicationChecker when yaml does not have any duplication does not call block when yaml has duplicated keys in the second level calls block >= Ruby 2.5 calls block with keys when yaml has duplicated keys in the top level calls block >= Ruby 2.5 calls block with keys RuboCop::Cop::Lint::ReturnInVoidContext with a setter method containing a return with a value registers an offense with an initialize method containing a return with a value registers an offense with a setter method containing a return without a value accepts when return is in top scope accepts with a non initialize method containing a return accepts with an initialize method containing a return without a value accepts with a class method called initialize containing a return accepts RuboCop::Cop::Style::NegatedWhile registers an offense for while with exclamation point condition accepts a while where only part of the condition is negated registers an offense for while with "not" condition registers an offense for until with exclamation point condition autocorrects by replacing until not with while autocorrects by replacing while not with until does not blow up for empty while condition does not blow up for empty until condition accepts a while where the condition is doubly negated RuboCop::Cop::Style::EmptyBlockParameter registers an offense for an empty block parameter with super accepts an empty block parameter with a lambda registers an offense for an empty block parameter with {} style accepts a block that is {} style without parameter accepts a non-empty block parameter with {} style registers an offense for an empty block parameter with lambda accepts a block that is do-end style without parameter accepts a non-empty block parameter with do-end style registers an offense for an empty block parameter with do-end wtyle RuboCop::Cop::Lint::EmptyEnsure does not register an offense for non-empty ensure registers an offense and corrects empty ensure RuboCop::Cop::Layout::IndentationStyle when EnforcedStyle is tabs auto-corrects a line indented with fractional number ofindentation groups by rounding down registers an offense for a line indented with multiple spaces does not auto-corrects a line with tab other than indentation registers an offense for a line indented with space auto-corrects a line indented with space accepts a line with tabs between string literals accepts a line which begins with tab in a string registers offenses before __END__ but not after auto-corrects a line with tab in a string indented with space auto-corrects a line indented with mixed whitespace accepts a line which begins with tab in a heredoc accepts a line which begins with tab in a multiline heredoc accepts a line a tab other than indentation registers an offense for a line indented with mixed whitespace accepts a line with tab in a string auto-corrects a line indented with multiple spaces custom indentation width uses the configured number of spaces to replace with a tab when EnforcedStyle is spaces accepts a line with tab in a string registers an offense for a line indented with multiple tabs accepts a line with a tab other than indentation registers an offense for a line indented with mixed whitespace auto-corrects a line indented with tab accepts a line with a tab between string literals accepts a line which begins with tab in a string auto-corrects a line with tab in a string indented with tab accepts a line which begins with tab in a heredoc auto-corrects a line indented with multiple tabs auto-corrects a line indented with mixed whitespace does not auto-correct a line with tab other than indentation registers offenses before __END__ but not after accepts a line which begins with tab in a multiline heredoc registers an offense for a line indented with tab custom indentation width uses the configured number of spaces to replace a tab RuboCop::Cop::Style::TrailingCommaInArrayLiteral with single line list of values when EnforcedStyleForMultiline is no_comma accepts rescue clause registers an offense for trailing comma accepts literal without trailing comma accepts single element literal without trailing comma accepts empty literal when EnforcedStyleForMultiline is comma registers an offense for trailing comma accepts single element literal without trailing comma accepts empty literal accepts rescue clause accepts literal without trailing comma when EnforcedStyleForMultiline is consistent_comma accepts literal without trailing comma accepts single element literal without trailing comma accepts rescue clause registers an offense for trailing comma accepts empty literal with multi-line list of values when EnforcedStyleForMultiline is no_comma accepts a literal with no trailing comma accepts HEREDOC with commas auto-corrects unwanted comma where HEREDOC has commas registers an offense for trailing comma when EnforcedStyleForMultiline is comma accepts an empty array being passed as a method argument accepts trailing comma registers an offense for a literal with two of the values on the same line and a trailing comma accepts a multiline array with a single item and trailing comma accepts literal with two of the values on the same line accepts a multiline word array when closing bracket is on same line as last value accepts literal with no trailing comma when EnforcedStyleForMultiline is consistent_comma accepts a multiline word array accepts a multiline array with a single item and trailing comma accepts trailing comma registers an offense for literal with two of the values on the same line and no trailing comma accepts two values on the same line accepts a multiline array with items on a single line andtrailing comma when closing bracket is on same line as last value registers an offense for no trailing comma RuboCop::Cop::Style::Semicolon accepts one line method definitions accepts one line empty module definitions accepts one line empty class definitions registers an offense for one line method with two statements accepts semicolon before end if so configured registers an offense for several expressions accepts semicolon after params if so configured registers an offense for semicolon at the end no matter what accept semicolons inside strings registers an offense for a single expression accepts one line empty method definitions registers an offense for a semicolon at the beginning of a line when AllowAsExpressionSeparator is true accepts several expressions accepts one line method with two statements with a multi-expression line without a semicolon does not register an offense RuboCop::Cop::Layout::MultilineHashKeyLineBreaks without line break after opening bracket registers an offense and corrects nested hashes registers an offense and corrects when key starts on same line as another when on same line does not add any offenses with line break after opening bracket registers an offense and corrects when key starts on same line as another when key starts on same line as another with rockets adds an offense when on all keys on one line different than brackets does not add any offenses when on different lines than brackets but keys on one does not add any offenses RuboCop::Cop::Style::DocumentationMethod when declaring methods outside a class without documentation comment when method is protected does not register an offense with inline `protected` does not register an offense when required for non-public methods registers an offense with inline `protected` registers an offense when method is private does not register an offense with inline `private` does not register an offense does not register an offense with inline `private` and `end` does not register an offense with `end` on the same line when required for non-public methods registers an offense with `end` on the same line registers an offense with inline `private` and `end` registers an offense with inline `private` registers an offense when method is public registers an offense with `end` on the same line registers an offense when declaring methods for class instance without documentation comment registers an offense with `end` on the same line registers an offense with documentation comment does not register an offense with `end` on the same line does not register an offense when method is private does not register an offense with inline `private` and `end` does not register an offense does not register an offense with `end` on the same line does not register an offense with inline `private` when required for non-public methods registers an offense with inline `private` and `end` registers an offense registers an offense with `end` on the same line registers an offense with inline `private` with both public and private methods when required for non-public methods registers an offense when the public method has no documentation registers an offense when the public method has documentation does not register an offense with both public and private methods when the public method has documentation does not register an offense when required for non-public methods registers an offense when the public method has no documentation registers an offense when declaring methods in a class with annotation comment registers an offense with documentation comment when method is public does not register an offense with `end` on the same line does not register an offense with directive comment registers an offense with both public and private methods when required for non-public methods registers an offense when the public method has no documentation registers an offense when the public method has documentation does not register an offense without documentation comment when method is private does not register an offense does not register an offense with inline `private` does not register an offense with `end` on the same line does not register an offense with inline `private` and `end` when required for non-public methods registers an offense with inline `private` registers an offense registers an offense with inline `private` and `end` registers an offense with `end` on the same line wheh method is public registers an offense with `end` on the same line registers an offense when declaring methods in a module without documentation comment when method is public registers an offense with `end` on the same line registers an offense when method is private does not register an offense with inline `private` does not register an offense with `end` on the same line does not register an offense with inline `private` and `end` does not register an offense when required for non-public methods registers an offense with inline `private` and `end` registers an offense registers an offense with inline `private` registers an offense with `end` on the same line when method is module_function registers an offense for separate def registers an offense for inline def with both public and private methods when the public method has no documentation registers an offense when required for non-public methods registers an offense when the public method has documentation does not register an offense with documentation comment when method is module_function does not register an offense for separate def does not register an offense for inline def when method is public does not register an offense with `end` on the same line does not register an offense with documentation comment does not register an offense with `end` on the same line does not register an offense RuboCop::Cop::Style::CaseEquality when AllowOnConstant is true registers an offense and corrects for === when the receiver is a range does not fail when the receiver is implicit does not register an offense for === when the receiver is a constant registers an offense and does not correct for === when receiver is of some other type registers an offense and corrects for === when the receiver is a regexp when AllowOnConstant is false registers an offense and corrects for === when the receiver is a constant registers an offense and corrects for === when the receiver is a range registers an offense and corrects for === when the receiver is a regexp registers an offense and does not correct for === when receiver is of some other type does not fail when the receiver is implicit RuboCop::Cop::Lint::EmptyWhen when a `when` body is missing registers an offense for missing when ... then body registers an offense for missing when ... then body followed by else registers an offense for a missing when body registers an offense for missing when body followed by else registers an offense for missing when body with a comment followed by else registers an offense for missing when body with a comment registers an offense when case line has no expression when `AllowComments: true` accepts an empty when body with a comment when `AllowComments: false` registers an offense for empty when body with a comment when a `when` body is present accepts case with when ... then statements and else clause accepts case with when ... then statements accepts with no case line expression accepts case with when bodies accepts case with when bodies and else clause RuboCop::Formatter::FormatterSet responds to all formatter API methods #custom_formatter_class returns constant represented by the passed string can handle top level namespaced constant name can handle namespaced constant name when non-existent constant name is passed raises error add_formatter can add multiple formatters by being invoked multiple times adds a formatter to itself adds a formatter with specified formatter type when output path is specified adds a formatter outputs to the specified file when parent directories don't exist creates them when output path is omitted adds a formatter outputs to $stdout formatter API method invokes the same method of all containing formatters #close_output_files closes all output files does not close non file output #builtin_formatter_class returns class which matches passed alias name exactly returns class which matches single character alias name returns class which matches double character alias name RuboCop::Cop::Lint::FloatOutOfRange does not register an offense for 0.0 does not register an offense for respectably sized floats does not register an offense for tiny little itty bitty floats on floats so close to zero that nobody can tell the difference registers an offense on whopping big floats which tip the scales registers an offense RuboCop::Cop::Layout::TrailingWhitespace registers offenses before __END__ but not after registers an offense for trailing whitespace in a heredoc string is not fooled by heredoc containing __END__ accepts a line without trailing whitespace registers an offense for a blank line with space auto-corrects unwanted space is not fooled by __END__ within a documentation comment is not fooled by heredoc containing __END__ within a doc comment registers an offense for a line ending with space registers an offense for a line ending with tab when `AllowInHeredoc` is set to true accepts trailing whitespace in a heredoc string registers an offense for trailing whitespace at the heredoc begin RuboCop::Cop::Style::HashTransformKeys below Ruby 2.5 does not flag even if transform_keys could be used when using Ruby 2.5 or newer does not flag each_with_object when its receiver is array literal correctly autocorrects _.map{...}.to_h with block does not flag Hash[_.map{...}] when both key & value are transformed flags Hash[_.map{...}] when transform_keys could be used does not flag _.map{...}.to_h when both key & value are transformed does not flag key transformation in the absence of to_h flags _.map{...}.to_h when transform_keys could be used does not flag each_with_object when both key & value are transformed does not flag each_with_object when its argument is not modified correctly autocorrects Hash[_.map{...}] correctly autocorrects _.map{...}.to_h without block does not flag each_with_object when key transformation uses value does not flag each_with_object when no transformation occurs flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` does not flag key transformation when receiver is array literal with inline block flags each_with_object when transform_keys could be used with multiline block flags each_with_object when transform_keys could be used with safe navigation operator flags each_with_object when transform_keys could be used RuboCop::Cop::Layout::TrailingEmptyLines when EnforcedStyle is final_blank_line auto-corrects missing blank line auto-corrects missing newline registers an offense for multiple trailing blank lines auto-corrects unwanted blank lines registers an offense for no final newline registers an offense for final newline auto-corrects unwanted blank lines in an empty file accepts final blank line registers an offense for multiple blank lines in an empty file when EnforcedStyle is final_newline registers an offense for multiple blank lines in an empty file accepts final blank lines if they come after __END__ in empty file accepts final newline auto-corrects even if some lines have space auto-corrects unwanted blank lines in an empty file accepts final blank lines if they come after __END__ registers an offense for no final newline after assignment accepts an empty file registers an offense for multiple trailing blank lines registers an offense for no final newline after block comment auto-corrects unwanted blank lines RuboCop::Cop::Lint::NestedPercentLiteral registers no offense for percents in the middle of literals registers offense for nested percent literals registers no offense for array registers offense for multiply nested percent literals registers no offense for nestings under percent registers no offense for percent modifier character in isolation registers offense for repeated nested percent literals registers no offense for empty array when handling invalid UTF8 byte sequence registers offense for nested percent literal registers no offense for array RuboCop::Formatter::JSONFormatter #finished sets inspected file count in summary outputs #output_hash as JSON #hash_for_offense sets Offense#correctable? value for :correctable key sets value of #hash_for_location for :location key sets Offense#message value for :message key sets Offense#cop_name value for :cop_name key sets Offense#severity value for :severity key sets Offense#corrected? value for :corrected key #hash_for_file sets relative file path for :path key sets an array of #hash_for_offense values for :offenses key #file_finished adds value of #hash_for_file to #output_hash[:files] adds detected offense count in summary #hash_for_location sets column value for :column key sets length value for :length key sets line value for :line key #started sets target file count in summary RuboCop::Cop::Lint::MissingSuper callbacks does not register an offense when callback has a `super` call registers an offense when class callback without `super` call registers an offense for instance level `method_missing?` with no `super` call does not register an offense when `method_missing?` contains `super` call registers no offense when module callback without `super` call registers an offense for class level `method_missing?` with no `super` call registers an offense when method callback is without `super` call registers an offense when class callback within `self << class` and without `super` call constructor registers an offense when no `super` call does not register an offense for the class without parent class does not register an offense for the class with stateless parent class does not register an offense for the constructor-like method defined outside of a class does not register an offense when there is a `super` call RuboCop::Cop::Lint::EmptyConditionalBody does not register an offense for missing `elsif` body with a comment does not register an offense for missing `unless` body with a comment registers an offense for missing `if` body does not register an offense for missing `if` body with a comment registers an offense for missing `elsif` body registers an offense for missing `unless` body when AllowComments is false registers an offense for missing `elsif` body with a comment registers an offense for missing `if` body with a comment registers an offense for missing `unless` body with a comment RuboCop::Cop::Style::SymbolArray when EnforcedStyle is percent uses %I when appropriate detects right value for MinSize to use for --auto-gen-config does not register an offense if symbol contains whitespace doesn't break when a symbol contains ) does not register an offense for array starting with %i registers an offense in a non-ambiguous block context registers an offense for arrays of symbols does not register an offense for array with non-syms autocorrects arrays of symbols with new line autocorrects arrays of symbols with embedded newlines and tabs does not register an offense in an ambiguous block context detects when the cop must be disabled to avoid offenses autocorrects arrays of one symbol when PreferredDelimiters is specified autocorrects an array using partial newlines autocorrects an array in multiple lines autocorrects an array with delimiters when EnforcedStyle is brackets autocorrects an array has interpolations autocorrects an array starting with %i does not register an offense for arrays of symbols registers an offense for array starting with %i with non-default MinSize does not autocorrect array of one symbol if MinSize > 1 RuboCop::Cop::MessageAnnotator #urls returns reference url when it is specified returns style guide url when it is specified returns an empty array if the reference url is blank returns multiple reference urls returns style guide and reference url when they are specified returns an empty array without StyleGuide URL with style guide url when StyleGuide is not set in the config does not add style guide url when StyleGuide is set in the config adds style guide url when a base URL is specified can use a path-based setting can accept relative paths if base has a full path combines correctly with a target-based setting allows absolute URLs in the cop config does not specify a URL if a cop does not have one when a department other than AllCops is specified returns style guide url when it is specified #annotate when the output format is JSON returns the message unannotated with default options returns the message with options on returns an annotated message RuboCop::Cop::Lint::NumberConversion registers an offense when using `#to_c` when using `#to_i` when using `#to_f` when `#to_i` called on a variable when `#to_i` called on a variable on a hash when `#to_i` called on a variable on a array when `#to_i` called on a hash value when using `#to_i` for integer does not register an offense when using Time/DateTime with multiple method calls when using Float() when using DateTime when using Integer() with integer when using Time when `#to_i` called without a receiver when using Complex() RuboCop::Cop::Security::JSONLoad does not register an offense for JSON under another namespace allows JSON.dump allows JSON.parse registers an offense and corrects JSON.restore registers an offense and corrects JSON.load RuboCop::Cop::Layout::FirstParameterIndentation align_parentheses style valid indentation on multi-line defs accepts correctly indented first element accepts correctly indented first element hash invalid indentation on multi-line defs hash arguments registers an offense and corrects incorrectly indented first element hash arguments static def registers an offense and corrects incorrectly indented first element normal arguments registers an offense and corrects incorrectly indented first element no paren method defs ignores with hash args ignores single line method defs ignores with hash args ignores consistent style single line method defs ignores ignores with hash args no paren method defs ignores with hash args ignores valid indentation on static multi-line defs accepts correctly indented first element hash accepts correctly indented first element invalid indentation on multi-line defs hash arguments static method def registers an offense and corrects incorrectly indented first element hash arguments registers an offense and corrects incorrectly indented first element normal arguments registers an offense and corrects incorrectly indented first element valid indentation on multi-line defs accepts correctly indented first element hash accepts correctly indented first element RuboCop::Cop::Style::EmptyLambdaParameter accepts a keyword lambda does not crash on a super registers an offense for an empty block parameter with a lambda RuboCop::Cop::Style::BarePercentLiterals when EnforcedStyle is percent_q and strings are static accepts %Q() accepts "" string with interpolation registers an offense for %() accepts "" accepts %q accepts regular expressions accepts '' accepts heredoc accepts __FILE__ and strings are dynamic registers an offense for %() accepts %Q() accepts __FILE__ accepts regular expressions accepts "" accepts heredoc accepts %q accepts "" string with interpolation accepts '' when EnforcedStyle is bare_percent and strings are dynamic accepts __FILE__ registers an offense for %Q() accepts heredoc accepts regular expressions accepts "" string with interpolation accepts "" accepts '' accepts %q accepts %() and strings are static accepts heredoc accepts '' accepts %q accepts "" string with interpolation accepts __FILE__ registers an offense for %Q() accepts regular expressions accepts "" accepts %() RuboCop::Cop::Layout::HashAlignment register no offense for superclass call without args accepts single line hash accepts several pairs per line register no offense for yield without args accepts pairs that don't start a line always ignore last argument hash accepts misaligned keys in explicit hash for yield accepts misaligned keys in implicit hash for super accepts misaligned keys in explicit hash accepts misaligned keys in implicit hash accepts misaligned keys in explicit hash for super accepts misaligned keys in implicit hash for yield with multiple preferred(key and table) alignment configuration accepts aligned hash keys with mixed hash style accepts aligned hash keys, by keys registers an offense and corrects misaligned hash values, works separate for each hash accepts an empty hash registers an offense and corrects misaligned hash keys with mixed hash style registers an offense and corrects misaligned hash values, prefer key when least offenses accepts aligned hash keys, by table registers an offense and corrects misaligned hash values registers an offense and corrects misaligned hash values, prefer table when least offenses accepts aligned hash keys, by both table and key config registers an offense and corrects misaligned hash values, prefer table because it is specified first ignore explicit last argument hash registers an offense and corrects misaligned keys in implicit hash for yield registers an offense and corrects misaligned keys in implicit hash accepts misaligned keys in explicit hash for super accepts misaligned keys in explicit hash accepts misaligned keys in explicit hash for yield registers an offense and corrects misaligned keys in implicit hash for super with different settings for => and : registers offenses and correct misaligned entries accepts aligned entries with separator alignment configuration accepts an empty hash registers an offense and corrects misaligned hash rockets accepts pairs that don't start a line accepts aligned hash keys accepts single line hash doesn't break code by moving long keys too far left accepts hashes with different separators accepts several pairs per line registers an offense and corrects misaligned hash values registers an offense and corrects mixed indentation and spacing always inspect last argument hash registers offense and corrects misaligned keys in explicit hash registers an offense and corrects misaligned keys in explicit hash for yield registers offense and corrects misaligned keys in implicit hash registers an offense and corrects misaligned keys in implicit hash for yield registers an offense and corrects misaligned keys in explicit hash for super registers an offense and corrects misaligned keys in implicit hash for super with invalid configuration fails with default configuration registers an offense and corrects alignment when using double splat in an explicit hash registers an offense and corrects separator alignment registers an offense and corrects zero or multiple spaces registers an offense and corrects alignment when using double splat in braces does not register an offense when value starts on next line accepts left-aligned hash keys with single spaces registers an offense and corrects table alignment registers an offense and corrects misaligned hash keys registers an offense and corrects multiline value starts in wrong place registers an offense and corrects misaligned mixed multiline hash keys registers an offense and corrects mixed hash styles with implicit hash as last argument registers an offense and corrects right alignment of keys registers an offense and corrects misaligned hash keys accepts aligned hash keys accepts an empty hash ignore implicit last argument hash registers an offense and corrects misaligned keys in explicit hash for yield registers an offense and corrects misaligned keys in explicit hash registers an offense and corrects misaligned keys in explicit hash for super accepts misaligned keys in implicit hash accepts misaligned keys in implicit hash for super accepts misaligned keys in implicit hash for yield with table alignment configuration accepts single line hash accepts a keyword splat only hash accepts aligned hash keys and values accepts several pairs per line accepts hashes that use different separators and double splats accepts an empty hash registers an offense for misaligned hash values accepts hashes that use different separators accepts a symbol only hash followed by a keyword splat accepts a multiline array of single line hashes accepts pairs that don't start a line registers an offense and corrects for misaligned hash keys registers an offense and corrects misaligned hash rockets with table+separator alignment configuration accepts a single method argument entry with colon RuboCop::Cop::Layout::ArrayAlignment when aligned with first parameter accepts aligned array keys accepts single line array auto-corrects array if the first element being on a new row accepts the first element being on a new row does not auto-correct array within array with too much indentation accepts several elements per line accepts aligned array with fullwidth characters does not auto-correct array within array with too little indentation does not indent heredoc strings in autocorrect registers an offense and corrects misaligned array elements when aligned with fixed indentation registers an offense and corrects misaligned array elements accepts the first element being on a new row accepts aligned array keys does not indent heredoc strings in autocorrect accepts several elements per line auto-corrects array if the first element being on a new row does not auto-correct array within array with too much indentation accepts single line array does not auto-correct array within array with too little indentation accepts aligned array with fullwidth characters RuboCop::Cop::Layout::SpaceAfterMethodName accepts a defs without arguments registers an offense and corrects def with space before the parenthesis registers offense and corrects class def with space before parenthesis accepts an assignment def with arguments but no parentheses accepts a def with arguments but no parentheses registers offense and corrects assignment def with space before parenthesis accepts a def without arguments accepts class method def with arguments but no parentheses RuboCop::Cop::Style::RaiseArgs when enforced style is compact accepts a raise with msg argument accepts a raise with an exception argument with a raise with 2 args reports an offense with correct + opposite reports an offense when used in a ternary expression registers an offense and auto-corrects with a raise with 3 args reports an offense when used in a logical or expression registers an offense and auto-corrects when used in a logical and expression registers an offense and auto-corrects when enforced style is exploded accepts exception constructor with more than 1 argument accepts a raise with msg argument accepts a raise with 2 args accepts a raise with 3 args accepts exception constructor with keyword arguments accepts a raise with splatted arguments with opposite + correct reports an offense for opposite + correct when an exception object is assigned to a local variable auto-corrects to exploded style with a raise with exception object with one argument reports an offense when used in a ternary expression registers an offense and auto-corrects when used in a logical or expression registers an offense and auto-corrects when used in a logical and expression registers an offense and auto-corrects with no arguments reports an offense RuboCop::Cop::Style::TrailingUnderscoreVariable configured to allow named underscore variables registers an offense for an underscore as the last param when there is also an underscore as the first param does not register an offense for multiple named underscores preceded by a splat variable does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain registers an offense for multiple underscore variables preceded by a splat underscore variable registers an offense when underscore is the second to last variable and blank is the last variable does not register an offense for underscores at the beginning does not register an offense for complex nested assignments without trailing underscores does not register an offense for an underscore variable preceded by a named splat underscore variable does not register an offense for a named splat underscore as the last variable does not register an offense when there are no underscores does not register an offense for named variables that start with an underscore does not register an offense for multiple underscores preceded by a splat variable registers an offense when multiple underscores are used as the last variables of parallel assignment does not register an offense for multiple underscore variables preceded by a named splat underscore variable does not register an offense for an underscore preceded by a splat variable and another underscore does not register an offense for a named underscore variable preceded by a splat variable registers an offense when the last variable of parallel assignment is an underscore does not register an offense for nested assignments without trailing underscores registers an offense for splat underscore as the last variable does not register an offense for a named variable preceded by a names splat underscore variable does not register an offense for an underscore preceded by a splat variable registers an offense for complex nested assignments with trailing underscores registers an offense when underscore is the only variable in parallel assignment registers an offense for nested assignments with trailing underscores autocorrect with parentheses leaves parentheses but removes trailing underscores and commas removes assignment part when it is the only variable leaves parentheses but removes trailing underscores removes assignment part when every assignment is to `_` configured to not allow named underscore variables registers an offense for complex nested assignments with trailing underscores registers an offense when underscore is the second to last variable and blank is the last variable registers an offense when the last variable of parallel assignment is an underscore does not register an offense for a named underscore variable preceded by a splat variable does not register an offense for a named variable preceded by a names splat underscore variable does not register an offense when there are no underscores registers an offense for an underscore variable preceded by a named splat underscore variable registers an offense for nested assignments with trailing underscores registers an offense when multiple underscores are used as the last variables of parallel assignment does not register an offense for an underscore preceded by a splat variable does not register an offense for multiple named underscores preceded by a splat variable registers an offense for an underscore preceded by a named splat underscore does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain registers an offense for an underscore as the last param when there is also an underscore as the first param registers an offense for multiple underscore variables preceded by a named splat underscore variable registers an offense for a named splat underscore as the last variable registers an offense for named variables that start with an underscore does not register an offense for nested assignments without trailing underscores does not register an offense for underscores at the beginning does not register an offense for multiple underscores preceded by a splat variable registers an offense for splat underscore as the last variable does not register an offense for complex nested assignments without trailing underscores registers an offense when underscore is the only variable in parallel assignment does not register an offense for an underscore preceded by a splat variable and another underscore registers an offense for multiple underscore variables preceded by a splat underscore variable does not register an offense for a named underscore preceded by a splat variable autocorrect with parentheses leaves parentheses but removes trailing underscores and commas removes assignment part when every assignment is to `_` removes assignment part when it is the only variable leaves parentheses but removes trailing underscores RuboCop::Cop::Style::EmptyElse configured to warn on nil in else given an unless-statement with no else-clause doesn't register an offense with an else-clause containing only the literal nil behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given a case statement with no else-clause doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil using semicolons behaves like auto-correct MissingElse is if does auto-correction MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is case does not auto-correct when the result is assigned to a variable behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is if does auto-correction MissingElse is case does not auto-correct given an if-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil when standalone behaves like auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is if does not auto-correct when the result is assigned to a variable behaves like auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with an else-clause containing only the literal nil using semicolons with multiple elsifs behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is if does not auto-correct with one elsif behaves like auto-correct MissingElse is if does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is both does not auto-correct with no else-clause doesn't register an offense with a completely empty else-clause doesn't register an offense configured to warn on empty else and nil in else given an unless-statement with an else-clause containing only the literal nil behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction with a completely empty else-clause behaves like auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is if does not auto-correct with an else-clause with side-effects doesn't register an offense with no else-clause doesn't register an offense given an if-statement with no else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil with one elsif behaves like auto-correct MissingElse is both does not auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction with multiple elsifs behaves like auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is if does not auto-correct with a completely empty else-clause behaves like auto-correct MissingElse is case does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction given a case statement with an else-clause with side-effects doesn't register an offense with a completely empty else-clause behaves like auto-correct MissingElse is case does not auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is if does auto-correction with no else-clause doesn't register an offense with an else-clause containing only the literal nil behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is case does not auto-correct MissingElse is if does auto-correction configured to warn on empty else given a case statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause behaves like auto-correct MissingElse is if does auto-correction MissingElse is case does not auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with an else-clause with side-effects doesn't register an offense with no else-clause doesn't register an offense given an unless-statement with an else-clause with side-effects doesn't register an offense with a completely empty else-clause behaves like auto-correct MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is if does not auto-correct MissingElse is disabled does auto-correction with no else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given an if-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with an empty comment behaves like auto-correct MissingElse is if does not auto-correct MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is case does auto-correction with a completely empty else-clause using semicolons behaves like auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct not using semicolons behaves like auto-correct MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction in an if-statement behaves like auto-correct MissingElse is case does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with no else-clause doesn't register an offense with nested if and case statement behaves like auto-correct MissingElse is case does not auto-correct MissingElse is if does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction RuboCop::Cop::Lint::EnsureReturn registers an offense and corrects for return with argument in ensure does not check when ensure block has no body does not register an offense for return outside ensure registers an offense and corrects for return in ensure registers an offense when returning multiple values in `ensure` RuboCop::Cop::Lint::UnifiedInteger when Integer when explicitly specified as toplevel constant does not register an offense without any decorations does not register an offense with MyNamespace does not register an offense when Fixnum when explicitly specified as toplevel constant registers an offense with MyNamespace does not register an offense without any decorations registers an offense and autocorrects when Bignum when explicitly specified as toplevel constant registers an offense without any decorations registers an offense and autocorrects with MyNamespace does not register an offense RuboCop::Cop::Style::EachWithObject ignores inject and reduce with passed in, but not returned hash correctly autocorrects ignores inject and reduce with empty body does not blow up for reduce with no arguments correctly autocorrects with return value only ignores inject and reduce with condition as body finds inject and reduce with passed in and returned hash ignores inject and reduce passed in symbol ignores inject/reduce with assignment to accumulator param in block when a simple literal is passed as initial value ignores inject/reduce RuboCop::Cop::Style::UnlessElse unless without else does not register an offense unless with else registers an offense unless with nested if-else registers an offense RuboCop::Cop::Metrics::CyclomaticComplexity when Max is 1 registers an offense for an until block accepts a method with no decision points registers an offense for an unless modifier registers an offense for a `define_method` registers an offense for &. registers an offense for a while block registers an offense for || registers an offense for ||= accepts an empty `define_method` counts only a single method counts enumerating methods with block-pass as +1 accepts complex code outside of methods registers an offense for a case/when block registers an offense for && registers an offense for a for block registers an offense for &&= registers an offense for an elsif block accepts an empty method registers an offense for a rescue block does not count blocks in general registers an offense for or registers an offense for a ternary operator registers an offense for an if modifier counts repeated &. on same untouched local variable as 1 counts enumerating methods with blocks as +1 registers an offense for and deals with nested if blocks containing && and || when Max is 2 counts stupid nested if and else blocks when method is in list of ignored methods does not register an offense when defining a class method does not register an offense when defining an instance method does not register an offense when using `define_method` RuboCop::Cop::Style::RegexpLiteral when EnforcedStyle is set to percent_r a single-line `//` regex with slashes registers an offense a single-line %r regex with slashes is accepted a multi-line `//` regex with slashes registers an offense a single-line `//` regex without slashes registers an offense a multi-line %r regex with slashes is accepted a multi-line %r regex without slashes is accepted a single-line %r regex without slashes is accepted a multi-line `//` regex without slashes registers an offense when EnforcedStyle is set to mixed a single-line `//` regex without slashes is accepted a multi-line `//` regex without slashes registers an offense a single-line %r regex without slashes registers an offense a multi-line %r regex without slashes is accepted a single-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a single-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted a multi-line %r regex with slashes is accepted a multi-line `//` regex with slashes registers an offense when PercentLiteralDelimiters is configured with slashes respects the configuration when auto-correcting when EnforcedStyle is set to slashes a single-line %r regex without slashes registers an offense a single-line `%r//` regex with slashes is accepted when configured to allow inner slashes remains slashes after auto-correction a multi-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted a multi-line %r regex without slashes registers an offense a single-line `//` regex with slashes and interpolation registers an offense when configured to allow inner slashes is accepted a single-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a multi-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a single-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted a single-line `//` regex without slashes is accepted a multi-line `//` regex without slashes is accepted %r regex with other delimiters than curly braces registers an offense when regex contains slashes in interpolation ignores the slashes that do not belong // regex when PercentLiteralDelimiters is configured with brackets respects the configuration when auto-correcting RuboCop::Cop::Lint::SafeNavigationConsistency registers an offense and corrects using safe navigation on the left of && registers an offense and corrects using safe navigation on the left of || registers an offense and corrects using unsafe navigation with grouped conditions registers an offense and corrects when there is code before or after the condition registers an offense and corrects using safe navigation in conditions on the right hand side registers an offense and corrects unsafe navigation that appears before safe navigation registers an offense but does not correct non dot method calls registers an offense and corrects assignment registers an offense and corrects using safe navigation inside of separated conditions registers an offense and corrects using safe navigation on the right of || registers an offense and corrects using safe navigation on the right of && registers a single offense and corrects when safe navigation is used multiple times allows && without safe navigation registers an offense and corrects using unsafe navigation and the safe navigation appears in a group allows || without safe navigation registers and corrects multiple offenses allows calls to methods that nil responds to registers an offense and corrects using unsafe navigation with both && and || allows safe navigation when different variables are used RuboCop::Cop::Style::ClassMethods does not register an offense for methods using self does not register an offense for other top-level singleton methods registers an offense for methods using a module name registers an offense for methods using a class name does not register an offense outside class/module bodies RuboCop::Cop::Style::RedundantRegexpCharacterClass with an array index inside an interpolation does not register an offense with a character class containing a single unicode code-point registers an offense and corrects with a character class containing an escaped ] registers an offense and corrects with a character class containing a single character registers an offense and corrects with a character class containing escaped character requiring escape outside registers an offense and corrects with an interpolated unnecessary-character-class regexp registers an offense and corrects with a character class containing an escaped-b does not register an offense with escaped square brackets surrounding a single character does not register an offense with a character class containing a single unicode character property registers an offense and corrects with a character class containing an escaped-# registers an offense and corrects with a character class containing an escaped [ registers an offense and corrects with a character class containing a single negated unicode character property registers an offense and corrects with consecutive escaped square brackets inside a character class does not register an offense with a character class containing an interpolation does not register an offense with a character class containing a character requiring escape outside does not register an offense with a character class containing two characters does not register an offense with multiple character classes containing single characters registers an offense and corrects with a character class with first element an escaped ] does not register an offense with a negated character class with a single element does not register an offense with a character class containing a space meta-character registers an offense and corrects with a character class containing a negated-space meta-character registers an offense and corrects with a character class containing a space when using free-spaced mode with a single space character class does not register an offense with only /x does not register an offense with /iux does not register an offense with /ix with a commented single-element character class does not register an offense when not using free-spaced mode registers an offense and corrects with an unnecessary-character-class after a comment registers an offense and corrects with consecutive escaped square brackets does not register an offense RuboCop::Cop::Lint::ErbNewArguments <= Ruby 2.5 does not register an offense when using `ERB.new` with non-keyword arguments >= Ruby 2.6 does not register an offense when using `ERB.new` without optional arguments registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments does not register an offense when using `ERB.new` with keyword arguments registers an offense when using `ERB.new` with non-keyword 2nd argument registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments when using `ActionView::Template::Handlers::ERB.new` does not register an offense when using `ERB.new` without arguments RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage registers an offense when using `::RUBY_VERSION` registers an offense when using `RUBY_VERSION` does not register an offense when no `RUBY_VERSION` RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis incorrect cases double case new line detects and fixes nested incorrect case detects incorrect case in array with nested calls and double heredoc and spaced out comma detects double incorrect case detects double incorrect case new line chained calls detects incorrect case in array with double heredoc and spaced out comma detects incorrect case in array with spaced out comma detects simple incorrect case with call after detects incorrect case nested method call with comma detects simple incorrect case comma with spaces and comma in heredoc detects incorrect case with other param before detects simple incorrect case comma with spaces detects complex incorrect case with multiple calls detects and fixes the second detects and fixes the first simple incorrect case detects complex chained incorrect case with multiple calls detects and fixes the first simple incorrect case with call after trailing comma detects simple incorrect case squiggles detects simple incorrect case comma detects incorrect case with other param before constructor detects incorrect case with other param before constructor and raise call detects incorrect case with other param after detects simple incorrect case hash detects correct cases accepts correct case with other param before accepts hash correct case accepts double correct case accepts double correct case nested accepts double correct case new line accepts correct case with other param after accepts simple correct case invocation after the HEREDOC ignores random call after ignores tr ignores random call RuboCop::Cop::Style::HashLikeCase MinBranchesCount: 2 does not register an offense when using `case-when` with non-literal bodies does not register an offense when using `case-when` with literals of different types as conditions registers an offense when using `case-when` with string conditions and literal bodies of the same type registers an offense when using `case-when` with symbol conditions and literal bodies of the same type does not register an offense when using `case-when` with literal bodies of different types does not register an offense when `case` has an `else` branch does not register an offense when using `case-when` with non-literals in conditions MinBranchesCount: 3 does not register an offense when branches count is less than required RuboCop::Cop::Lint::DuplicateElsifCondition registers multiple offenses for multiple repeated elsif conditions registers an offense for repeated elsif conditions does not register an offense for non-repeated elsif conditions registers an offense for subsequent repeated elsif conditions does not register an offense for partially repeated elsif conditions RuboCop::Cop::VariableForce::Reference .new when non variable reference node is passed raises error RuboCop::Cop::Lint::RescueType accepts rescuing nothing within a method definition accepts rescuing a single exception accepts rescue modifier accepts rescuing nothing behaves like offenses def rescue ensure rescuing from :symbol registers an offense and auto-corrects def rescue rescuing from :symbol registers an offense and auto-corrects begin rescue rescuing from :symbol before another exception registers an offense and auto-corrects rescuing from :symbol registers an offense and auto-corrects rescuing from :symbol after another exception registers an offense and auto-corrects begin rescue ensure rescuing from :symbol registers an offense and auto-corrects behaves like offenses begin rescue rescuing from {} before another exception registers an offense and auto-corrects rescuing from {} registers an offense and auto-corrects rescuing from {} after another exception registers an offense and auto-corrects def rescue rescuing from {} registers an offense and auto-corrects begin rescue ensure rescuing from {} registers an offense and auto-corrects def rescue ensure rescuing from {} registers an offense and auto-corrects behaves like offenses begin rescue ensure rescuing from 0.0 registers an offense and auto-corrects begin rescue rescuing from 0.0 after another exception registers an offense and auto-corrects rescuing from 0.0 registers an offense and auto-corrects rescuing from 0.0 before another exception registers an offense and auto-corrects def rescue rescuing from 0.0 registers an offense and auto-corrects def rescue ensure rescuing from 0.0 registers an offense and auto-corrects behaves like offenses def rescue rescuing from [] registers an offense and auto-corrects begin rescue ensure rescuing from [] registers an offense and auto-corrects def rescue ensure rescuing from [] registers an offense and auto-corrects begin rescue rescuing from [] registers an offense and auto-corrects rescuing from [] before another exception registers an offense and auto-corrects rescuing from [] after another exception registers an offense and auto-corrects behaves like offenses def rescue rescuing from 0 registers an offense and auto-corrects begin rescue ensure rescuing from 0 registers an offense and auto-corrects def rescue ensure rescuing from 0 registers an offense and auto-corrects begin rescue rescuing from 0 after another exception registers an offense and auto-corrects rescuing from 0 before another exception registers an offense and auto-corrects rescuing from 0 registers an offense and auto-corrects behaves like offenses def rescue rescuing from "#{string}" registers an offense and auto-corrects begin rescue ensure rescuing from "#{string}" registers an offense and auto-corrects begin rescue rescuing from "#{string}" registers an offense and auto-corrects rescuing from "#{string}" after another exception registers an offense and auto-corrects rescuing from "#{string}" before another exception registers an offense and auto-corrects def rescue ensure rescuing from "#{string}" registers an offense and auto-corrects behaves like offenses def rescue rescuing from 'string' registers an offense and auto-corrects begin rescue rescuing from 'string' after another exception registers an offense and auto-corrects rescuing from 'string' before another exception registers an offense and auto-corrects rescuing from 'string' registers an offense and auto-corrects begin rescue ensure rescuing from 'string' registers an offense and auto-corrects def rescue ensure rescuing from 'string' registers an offense and auto-corrects behaves like offenses begin rescue rescuing from nil before another exception registers an offense and auto-corrects rescuing from nil after another exception registers an offense and auto-corrects rescuing from nil registers an offense and auto-corrects def rescue rescuing from nil registers an offense and auto-corrects begin rescue ensure rescuing from nil registers an offense and auto-corrects def rescue ensure rescuing from nil registers an offense and auto-corrects RuboCop::Cop::Lint::InheritException when class inherits from `Exception` with enforced style set to `runtime_error` registers an offense and corrects when creating a subclass using Class.new registers an offense and corrects with enforced style set to `standard_error` registers an offense and corrects when creating a subclass using Class.new registers an offense and corrects RuboCop::Cop::Lint::RedundantCopDisableDirective .check when there are no disabled lines returns no offense when there are disabled lines and there are no offenses and a comment disables comment is not at the beginning of the file and not all cops have offenses returns an offense itself and all cops disabled on different ranges returns no offense all cops returns an offense multiple cops, with abbreviated names one of them has offenses returns an offense multiple cops returns an offense itself and another cop disabled on the same range returns no offense disabled on different ranges returns no offense and the other cop is disabled a second time returns no offense an unknown cop returns an offense multiple cops, and one of them has offenses returns an offense one cop returns an offense multiple cops, and the leftmost one has no offenses returns an offense misspelled cops returns an offense and there is an offense and a comment disables that cop but on other lines returns an offense that cop returns no offense all cops returns no offense and there are two offenses and a comment disables one cop and then all cops returns an offense one cop twice returns an offense RuboCop::Cop::Lint::Void accepts void unary op + by itself without a begin block accepts void op <=> if on last line accepts void op === by itself without a begin block accepts void op * by itself without a begin block accepts void unary op - if on last line accepts void op - by itself without a begin block accepts void unary op ~ if on last line registers an offense for void op - if not on last line accepts backtick commands accepts void op === if on last line handles `#each` block with single expression registers an offense for void op <=> if not on last line accepts void op + by itself without a begin block accepts percent-x commands accepts void op <= by itself without a begin block accepts void op == by itself without a begin block registers two offenses for void literals in `#tap` method accepts void op % if on last line accepts void op <=> by itself without a begin block accepts void unary op ! by itself without a begin block registers two offenses for void literals in a `#each` method handles explicit begin blocks registers an offense for void var @@var if not on last line registers two offenses for void literals in a setter method registers an offense for void op != if not on last line accepts void unary op - by itself without a begin block accepts void op / by itself without a begin block accepts void op >= by itself without a begin block registers an offense for void op == if not on last line accepts void op > if on last line registers an offense for void `self` if not on last line registers an offense for void op >= if not on last line handles empty block registers an offense for void sign op - if not on last line registers an offense for void sign op + if not on last line accepts void unary op ~ by itself without a begin block accepts void op % by itself without a begin block registers an offense for void var $var if not on last line registers an offense for void var @var if not on last line accepts void op / if on last line registers an offense for void op + if not on last line registers an offense for void `defined?` if not on last line accepts void op + if on last line registers an offense for void op > if not on last line accepts void unary op ! if on last line registers an offense for void op < if not on last line registers an offense for void var VAR if not on last line accepts void op > by itself without a begin block accepts void op < if on last line registers an offense for void lit {} if not on last line registers an offense for void unary op ~ if not on last line accepts void op - if on last line registers an offense for void op <= if not on last line accepts void op == if on last line registers an offense for void lit :test if not on last line registers an offense for void unary op ! if not on last line registers an offense for void op % if not on last line accepts short call syntax registers two offenses for void literals in an initialize method accepts void op >= if on last line accepts void op != by itself without a begin block registers an offense for void lit [1] if not on last line registers an offense for void op === if not on last line accepts void op * if on last line registers an offense for void op / if not on last line accepts void op <= if on last line accepts void op != if on last line registers two offenses for void literals in a `for` accepts void unary op + if on last line accepts void op < by itself without a begin block registers an offense for void var var if not on last line registers an offense for void lit 1 if not on last line registers an offense for void op * if not on last line registers an offense for void lit 2.0 if not on last line registers an offense for void literal in a method definition registers an offense for void lit /test/ if not on last line when checking for methods with no side effects registers an offense for chained methods registers an offense if not on last line when not checking for methods with no side effects does not register an offense for void nonmutating methods RuboCop::Cop::Layout::SpaceAfterNot accepts no space after ! registers an offense and corrects space after ! with the negated receiver wrapped in parentheses accepts space after not keyword registers an offense and corrects a single space after ! registers an offense and corrects multiple spaces after ! RuboCop::Cop::Lint::FlipFlop registers an offense for exclusive flip-flops registers an offense for inclusive flip-flops RuboCop::Cop::Style::RedundantConditional registers an offense for if/else with negated boolean results registers an offense for ternary with boolean results registers an offense for if/elsif/else with boolean results does not register an offense for if/else with non-boolean results allows ternary with non-boolean results registers an offense for if/elsif/else with negated boolean results registers an offense for ternary with negated boolean results registers an offense for if/else with boolean results does not register an offense for if/elsif/else with non-boolean results RuboCop::CommentConfig #cop_enabled_at_line? supports disabling all lines after a directive supports enabling/disabling multiple cops in a single directive supports disabling cops with multiple uppercase letters handles indented single line supports disabling cops with numbers in their name supports enabling/disabling multiple cops along with a comment does not confuse a cop name including "all" with all cops just ignores unpaired enabling directives can handle double disable of one cop does not confuse a comment directive embedded in a string literal with a real comment supports disabling cops on a comment line with an EOL comment supports disabling multiple lines with a pair of directive supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all supports disabling single line with a directive at end of line supports enabling/disabling cops without a prefix RuboCop::Cop::Style::WhileUntilDo accepts do in single-line until registers an offense for do in multiline while accepts multi-line while without do accepts do in single-line while registers an offense for do in multiline until accepts multi-line until without do RuboCop::Cop::Lint::RedundantWithIndex registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` accepts an index is used as a block argument registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` RuboCop::Cop::Style::RedundantCapitalW does not register an offense for array of non-words registers no offense for %W with interpolation registers an offense for misused %W registers no offense for %w without interpolation does not register an offense for array containing non-string registers an offense for misused %W with different bracket registers no offense for normal arrays of strings with interpolation registers no offense for arrays with character constants registers no offense for %w with interpolation-like syntax does not register an offense for array with one element does not register an offense for array with empty strings registers no offense for normal arrays of strings registers no offense for %W with special characters RuboCop::Cop::Style::TrailingCommaInArguments with multi-line list of values when EnforcedStyleForMultiline is no_comma accepts comma inside a heredoc with comments inside accepts comma inside a heredoc with method and comments inside auto-corrects unwanted comma after modified heredoc parameter accepts comma inside a heredoc in brackets accepts a method call with hash parameters at the end and no trailing comma accepts comma inside a modified heredoc parameter registers an offense for trailing comma in a method call with hash parameters at the end accepts comma inside a heredoc parameter at the end when there is string interpolation inside heredoc parameter auto-corrects unwanted comma inside string interpolation accepts comma inside a heredoc parameter accepts comma inside a heredoc parameter when on a single line when EnforcedStyleForMultiline is comma accepts a method call with two parameters on the same line does not break when a safe method call is chained on the offending more complex one accepts trailing comma in a method call with hash parameters at the end accepts a multiline call with a single argument and trailing comma does not break when a method call is chaned on the offending one accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line does not break when a safe method call is chained on the offending simple one accepts a trailing comma in a method call with single line hashes accepts an empty hash being passed as a method argument registers an offense for no trailing comma in a method call with hash parameters at the end accepts missing comma after heredoc with comments when closing bracket is on same line as last value accepts a method call with Hash as last parameter split on multiple lines when EnforcedStyleForMultiline is consistent_comma accepts a trailing comma in a method call with a single hash parameter accepts a trailing comma in a method call with a single hash parameter to a receiver object accepts a trailing comma in a method call with single line hashes accepts a multiline call with single argument on multiple lines auto-corrects missing comma after a heredoc registers an offense for no trailing comma in a method call with hash parameters at the end registers an offense for no trailing comma in a method call withtwo parameters on the same line accepts a multiline call with a single argument and trailing comma accepts trailing comma in a method call with hash parameters at the end accepts no trailing comma in a method call with a block parameter at the end accepts a multiline call with arguments on a single line and trailing comma when closing bracket is on same line as last value registers an offense for a method call, with a Hash as the last parameter, split on multiple lines with single line list of values when EnforcedStyleForMultiline is no_comma accepts method call without parameters accepts chained single-line method calls registers an offense for trailing comma in a method call with hash parameters at the end registers an offense for trailing comma in a method call registers an offense for trailing comma preceded by whitespace in a method call accepts method call without trailing comma with single element hash parameters at the end accepts method call without trailing comma accepts heredoc without trailing comma accepts method call without trailing comma when a line break before a method call when using safe navigation operator registers an offense for trailing comma in a method call with hash parameters at the end registers an offense for trailing comma in a method call when EnforcedStyleForMultiline is consistent_comma accepts method call without trailing comma with single element hash parameters at the end accepts chained single-line method calls accepts method call without trailing comma registers an offense for trailing comma in a method call with hash parameters at the end accepts method call without trailing comma when a line break before a method call registers an offense for trailing comma in a method call registers an offense for trailing comma preceded by whitespace in a method call accepts heredoc without trailing comma accepts method call without parameters when using safe navigation operator registers an offense for trailing comma in a method call with hash parameters at the end registers an offense for trailing comma in a method call when EnforcedStyleForMultiline is comma registers an offense for trailing comma preceded by whitespace in a method call registers an offense for trailing comma in a method call with hash parameters at the end accepts heredoc without trailing comma registers an offense for trailing comma in a method call accepts method call without trailing comma accepts method call without trailing comma with single element hash parameters at the end accepts chained single-line method calls accepts method call without parameters accepts method call without trailing comma when a line break before a method call when using safe navigation operator registers an offense for trailing comma in a method call registers an offense for trailing comma in a method call with hash parameters at the end with a single argument of anonymous function spanning multiple lines when EnforcedStyleForMultiline is consistent_comma accepts a single argument with no trailing comma with a single argument spanning multiple lines when EnforcedStyleForMultiline is consistent_comma accepts a single argument with no trailing comma RuboCop::Cop::Layout::FirstArgumentIndentation when EnforcedStyle is consistent_relative_to_receiver for method calls within method calls without outer parentheses indents all relative to the receiver accepts a first argument with special indentation with outer parentheses registers an offense and corrects an over-indented 1st argument indents all relative to the receiver when IndentationWidth:Width is 2 registers an offense and corrects an over-indented first argument registers an offense and corrects lines affected by other offenses registers an offense and corrects an under-indented first argument accepts operator calls accepts a first argument that is not preceded by a line break accepts method calls with no arguments does not view []= as an outer method call does not view chained call as an outer method call for assignment register an offense and corrects a correctly indented first argument and does not care about the second argument with line break registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when the receiver contains a line break accepts a correctly indented first argument preceded by an empty line registers an offense and corrects an over-indented 1st argument accepts a correctly indented first argument when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when indentation width is overridden for this cop only accepts a correctly indented first argument registers an offense and corrects an over-indented first argument when EnforcedStyle is consistent when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 2 registers an offense and corrects an under-indented first argument does not view chained call as an outer method call registers an offense and corrects an over-indented first argument registers an offense and corrects lines affected by another offense accepts method calls with no arguments does not view []= as an outer method call accepts a first argument that is not preceded by a line break accepts operator calls when using safe navigation operator registers an offense and corrects an under-indented 1st argument when the receiver contains a line break accepts a correctly indented first argument registers an offense and corrects an over-indented first argument accepts a correctly indented first argument preceded by an empty line when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument for assignment accepts a correctly indented first argument and does not care about the second argument with line break registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when indentation width is overridden for this cop only accepts a correctly indented first argument registers an offense and corrects an over-indented first argument for method calls within method calls accepts first argument indented relative to previous line registers an offense and corrects an over-indented first argument when EnforcedStyle is special_for_inner_method_call when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 2 registers an offense and corrects lines affected by another offense registers an offense and corrects an under-indented first argument accepts operator calls accepts a first argument that is not preceded by a line break does not view []= as an outer method call accepts method calls with no arguments does not view chained call as an outer method call registers an offense and corrects an over-indented first argument when using safe navigation operator registers an offense and corrects an under-indented 1st argument for assignment accepts a correctly indented first argument and does not care about the second argument with line break accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when the receiver contains a line break accepts a correctly indented first argument preceded by an empty line accepts a correctly indented first argument registers an offense and corrects an over-indented first argument when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument for method calls within method calls without outer parentheses accepts a first argument with special indentation with outer parentheses registers an offense and corrects an over-indented first argument when indentation width is overridden for this cop only registers an offense and corrects an over-indented first argument accepts a correctly indented first argument when EnforcedStyle is special_for_inner_method_call_in_parentheses for method calls within method calls without outer parentheses accepts a first argument with consistent style indentation with outer parentheses registers an offense and corrects an under-indented first argument accepts a correctly indented first argument in interpolation accepts a correctly indented first argument with fullwidth characters registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 2 accepts a first argument that is not preceded by a line break registers an offense and corrects lines affected by another offense accepts operator calls accepts method calls with no arguments does not view chained call as an outer method call does not view []= as an outer method call registers an offense and corrects an under-indented first argument registers an offense and corrects an over-indented first argument for assignment accepts a correctly indented first argument and does not care about the second argument with line break accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when using safe navigation operator registers an offense and corrects an under-indented 1st argument when the receiver contains a line break accepts a correctly indented first argument registers an offense and corrects an over-indented first argument accepts a correctly indented first argument preceded by an empty line when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when indentation width is overridden for this cop only registers an offense and corrects an over-indented first argument accepts a correctly indented first argument RuboCop::Cop::Style::CommentedKeyword registers an offense when commenting on the same line as `begin` does not register an offense if AST contains # symbol registers an offense for one-line cases registers an offense when commenting on the same line as `def` registers an offense when commenting after keyword with spaces accepts keyword letter sequences that are not keywords registers an offense when commenting on indented keywords registers an offense when commenting on the same line as `class` registers an offense when commenting on the same line as `module` does not register an offense if there are no comments after keywords registers an offense when commenting on the same line as `end` does not register an offense for certain comments RuboCop::Cop::Style::OptionalBooleanParameter does not register an offense when defining method with keyword boolean arg does not register an offense when defining method without args registers an offense when defining method with optional boolean arg registers an offense when defining class method with optional boolean arg registers an offense when defining method with multiple optional boolean args does not register an offense when defining method with optonal non-boolean arg RuboCop::Cop::Style::StabbyLambdaParentheses require_parentheses registers an offense for a stabby lambda without parentheses does not register an offense for a stabby lambda with parentheses behaves like common does not check a stabby lambda without arguments does not check the old lambda syntax does not check a method call named lambda require_no_parentheses registers an offense for a stabby lambda with parentheses behaves like common does not check a stabby lambda without arguments does not check the old lambda syntax does not check a method call named lambda RuboCop::Cop::Style::ArrayJoin registers an offense for an array followed by string does not register an offense for numbers autocorrects '*' to 'join' when there are no spaces autocorrects '*' to 'join' when setting to a variable does not register an offense for ambiguous cases Pending: (Failures listed here are expected and do not affect your suite's status) 1) RuboCop::Cop::Generator compliance with rubocop generates a cop file that has no offense # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/generator_spec.rb:340 2) RuboCop::Cop::Generator compliance with rubocop generates a spec file that has no offense # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/generator_spec.rb:345 3) RuboCop::Cop::Cop.qualified_cop_name raises an error if the cop name is in more than one namespace # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/cop_spec.rb:45 4) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:398 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 5) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:399 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 6) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:400 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 7) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:396 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 8) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:397 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 9) RuboCop::Cop::Layout::AccessModifierIndentation when EnforcedStyle is set to indent registers an offense and corrects access modifiers in arbitrary blocks # Failing in Debian - needs investigation # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/layout/access_modifier_indentation_spec.rb:175 10) 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 # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -5,7 +5,6 @@ while total < 100 total += 1 foo += 1 - ^^^ Useless assignment to variable - `foo`. end total # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/useless_assignment_spec.rb:349:in `block (3 levels) in ' Finished in 2 minutes 28.9 seconds (files took 4.4 seconds to load) 13647 examples, 0 failures, 10 pending Randomized with seed 44618 /usr/bin/ruby3.0 /usr/bin/gem2deb-test-runner ┌──────────────────────────────────────────────────────────────────────────────┐ │ Checking Rubygems dependency resolution on ruby3.0 │ └──────────────────────────────────────────────────────────────────────────────┘ GEM_PATH=/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all:/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -e gem\ \"rubocop\" ┌──────────────────────────────────────────────────────────────────────────────┐ │ Run tests for ruby3.0 from debian/ruby-tests.rake │ └──────────────────────────────────────────────────────────────────────────────┘ RUBYLIB=. GEM_PATH=/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/rubocop/usr/share/rubygems-integration/all:/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.0.0:/var/lib/gems/3.0.0:/usr/local/lib/ruby/gems/3.0.0:/usr/lib/ruby/gems/3.0.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.0.0:/usr/share/rubygems-integration/3.0.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.0.0 ruby3.0 -S rake -f debian/ruby-tests.rake /usr/bin/ruby3.0 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.10.3/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.10.1/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --exclude-pattern spec/rubocop/config_loader_spec.rb --format documentation Run options: include {:focus=>true} All examples were filtered out; ignoring {:focus=>true} Randomized with seed 32560 RuboCop::Cop::Lint::UriRegexp registers an offense and corrects using `URI.regexp` with argument does not register an offense when using `regexp` with variable receiver registers an offense and corrects using `::URI.regexp` without argument registers an offense and corrects using `::URI.regexp` with argument does not register an offense when using `regexp` without receiver registers an offense and corrects using `URI.regexp` without argument array argument registers an offense and corrects using `URI.regexp` with %i arrays registers an offense and corrects using `URI.regexp` with literal arrays registers an offense and corrects using `URI.regexp` with %w arrays RuboCop::Cop::Style::RedundantAssignment does not register an offense when ensure block present reports an offense for def ending with assignment and returning accepts empty method body accepts empty when nodes accepts empty if body when inside an if-branch registers an offense and auto-corrects when rescue blocks present does register an offense and auto-corrects when inside function or rescue block when inside begin-end body registers an offense and auto-corrects when inside a when-branch registers an offense and auto-corrects RuboCop::Cop::Style::VariableInterpolation registers an offense for interpolated regexp back references registers an offense for interpolated class variables registers an offense for interpolated instance variables registers an offense for interpolated global variables in regexp registers an offense for interpolated global variables in backticks registers an offense for interpolated regexp nth back references registers an offense for interpolated global variables in symbol does not register an offense for variables in expressions registers an offense for interpolated global variables in string RuboCop::Cop::Naming::RescuedExceptionsVariableName with default config with implicit rescue without `Exception` variable does not register an offense with `Exception` variable does not register an offense when using `_e` does not register an offense when using `e` registers an offense when using `exc` registers an offense when using `_exc` with explicit rescue without `Exception` variable does not register an offense with lower letters class name does not register an offense with method as `Exception` does not register an offense with expected variable name does not register an offense without variable name registers an offense with unexpected variable name with splat operator as `Exception` list registers an offense with unexpected variable name does not register an offense without variable name does not register an offense with expected variable name with `Exception` variable registers an offense when using `_exc` does not register an offense when using `e` does not register an offense when using `_e` registers offenses when using `foo` and `bar` in multiple rescues registers an offense when using `exc` does not register an offense when using _e followed by e with variable being referenced renames the variable references when auto-correcting with the `PreferredName` setup registers an offense when using `_e` registers an offense when using `e` does not register an offense when using `exception` does not register an offense when using `_exception` registers offenses when using `foo` and `bar` in multiple rescues RuboCop::Cop::Style::SymbolArray when EnforcedStyle is percent registers an offense in a non-ambiguous block context does not register an offense in an ambiguous block context autocorrects arrays of one symbol detects right value for MinSize to use for --auto-gen-config registers an offense for arrays of symbols autocorrects arrays of symbols with new line detects when the cop must be disabled to avoid offenses doesn't break when a symbol contains ) autocorrects arrays of symbols with embedded newlines and tabs does not register an offense for array starting with %i does not register an offense if symbol contains whitespace does not register an offense for array with non-syms uses %I when appropriate when PreferredDelimiters is specified autocorrects an array using partial newlines autocorrects an array with delimiters autocorrects an array in multiple lines when EnforcedStyle is brackets autocorrects an array has interpolations registers an offense for array starting with %i does not register an offense for arrays of symbols autocorrects an array starting with %i with non-default MinSize does not autocorrect array of one symbol if MinSize > 1 RuboCop::Cop::Style::Encoding registers an offense when encoding present and UTF-8 registers an offense for encoding inserted by magic_encoding gem registers an offense for vim-style encoding comments registers no offense when no encoding present registers an offense when encoding present on 2nd line after shebang registers no offense when encoding present but not UTF-8 registers no offense when encoding is in the wrong place RuboCop::Cop::Layout::LeadingCommentSpace does not register an offense for only #s does not register an offense for more than one # accepts rdoc syntax accepts sprockets directives registers an offense and corrects #! after the first line does not register an offense for # followed by no text registers an offense and corrects comment without leading space accepts =begin/=end comments does not register an offense for more than one space does not register an offense for #! on first line Gemfile Ruby comment when config option is enabled file not named Gemfile registers an offense when using ruby config as comment file named Gemfile does not register an offense when using ruby config as comment when config option is disabled registers an offense when using ruby config as comment file named config.ru registers an offense and corrects for #\ after the first line does not register an offense for #\ on first line file not named config.ru registers an offense and corrects #\ on first line registers an offense and corrects #\ after the first line Doxygen style when config option is enabled does not register offense when using Doxygen style when config option is disabled registers an offense and corrects using Doxygen style RuboCop::Cop::Style::OptionalBooleanParameter does not register an offense when defining method with keyword boolean arg does not register an offense when defining method without args does not register an offense when defining method with optonal non-boolean arg registers an offense when defining method with optional boolean arg registers an offense when defining class method with optional boolean arg registers an offense when defining method with multiple optional boolean args RuboCop::Cop::Layout::EmptyLinesAroundClassBody when EnforcedStyle is empty_lines_special class with only constants registers and autocorrects the offenses when first child is method requires blank line at the beginning and ending of class body source without blank lines registers an offense for class not beginning and ending with a blank line when class has a namespace requires no empty lines for namespace but requires blank line at the beginning and ending of class body source with blank lines autocorrects the offenses source without blank lines registers and autocorrects the offenses class with empty body without empty line does NOT register offenses with empty line does NOT register offenses when first child is NOT a method does not require blank line at the beginning of class body but requires blank line before first def definition and requires blank line at the end of class body when class has a namespace requires no empty lines for namespace and does not require blank line at the beginning of class body but requires blank line at the end of class body source with constants registers and autocorrects the offenses source with blank lines registers and autocorrects the offenses source without blank lines registers and autocorrects the offenses source without blank lines registers an offense for class not ending with a blank line source with blank lines registers an offense for class beginning with a blank line source with comment before method definition registers an offense for class beginning with a blank line class with constant and child class registers and autocorrects the offenses when namespace has multiple children requires empty lines for namespace when EnforcedStyle is beginning_only ignores empty lines at the beginning of a class registers an offense for an empty line at the end of a class when EnforcedStyle is empty_lines_except_namespace when has multiple child classes requires empty lines for namespace registers offenses for namespace body starting and ending without a blank when only child is class autocorrects beginning and end registers offenses for namespaced class body not starting with a blank requires no empty lines for namespace registers offense for namespace body ending with a blank registers offenses for namespaced class body not ending with a blank registers offense for namespace body starting with a blank when only child is module registers offense for namespace body ending with a blank registers offense for namespace body starting with a blank requires no empty lines for namespace when EnforcedStyle is empty_lines does not register offenses accepts singleton classes with an empty body accepts classes with an empty body registers an offense for singleton class body not starting or ending with a blank registers an offense for class body not starting or ending with a blank does not register offenses when specifying a superclass that breaks the line when EnforcedStyle is ending_only ignores empty lines at the beginning of a class registers an offense for an empty line at the end of a class when EnforcedStyle is no_empty_lines registers an offense for class body ending with a blank autocorrects singleton class body containing only a blank registers an offense for singleton class body ending with a blank registers an offense for class body starting with a blank RuboCop::Cop::Style::HashTransformKeys below Ruby 2.5 does not flag even if transform_keys could be used when using Ruby 2.5 or newer flags Hash[_.map{...}] when transform_keys could be used does not flag each_with_object when key transformation uses value does not flag key transformation when receiver is array literal does not flag each_with_object when both key & value are transformed does not flag each_with_object when its receiver is array literal does not flag _.map{...}.to_h when both key & value are transformed does not flag key transformation in the absence of to_h does not flag each_with_object when its argument is not modified correctly autocorrects _.map{...}.to_h with block correctly autocorrects Hash[_.map{...}] does not flag each_with_object when no transformation occurs does not flag Hash[_.map{...}] when both key & value are transformed flags _.map{...}.to_h when transform_keys could be used flags _.map{...}.to_h when transform_keys could be used when line break before `to_h` correctly autocorrects _.map{...}.to_h without block with multiline block flags each_with_object when transform_keys could be used with safe navigation operator flags each_with_object when transform_keys could be used with inline block flags each_with_object when transform_keys could be used RuboCop::Cop::Lint::ScriptPermission with stdin skips investigation with file permission 0644 registers an offense for script permission if auto-correction is off leaves the file intact with file permission 0755 accepts with blank accepts without shebang line accepts with shebang line RuboCop Project changelog has either entries, headers, or empty lines has link definitions for all implicit links has newline at end of file entry has a whitespace between the * and the body after version 0.14.0 has a link to the contributors at the end link to related issue has a valid URL has an issue number prefixed with # has a colon and a whitespace at the end contributor name has a unique contributor name body does not start with a lower case ends with a punctuation cop message end with a period or a question mark requiring all of `lib` with verbose warnings enabled emits no warnings default configuration file has configuration for all cops has a period at EOL of description sorts configuration keys alphabetically has a SupportedStyles for all EnforcedStyle and EnforcedStyle is valid does not have nay duplication requires a nicely formatted `VersionAdded` metadata for all cops has a nicely formatted description for all cops RuboCop::Cop::Layout::EmptyLineBetweenDefs accepts a nested def accepts a def that is the first of a module accepts the first def without leading empty line in a class accepts a def that follows an empty line and then a comment accepts a def that follows code and a comment doesn't allow more than the required number of newlines registers an offense for adjacent one-liners by default accepts a def that follows a line with code treats lines with whitespaces as blank finds offenses in inner classes auto-corrects when there are too many new lines when a maximum of empty lines is specified finds an offense for two empty lines finds no offense for one empty line finds no offense for no empty line when there are only comments between defs registers an offense class methods adjacent class methods registers an offense for missing blank line between methods mixed instance and class methods registers an offense for missing blank line between methods conditional method definitions accepts defs inside a conditional without blank lines in between registers an offense for consecutive defs inside a conditional when AllowAdjacentOneLineDefs is enabled registers an offense for adjacent defs if some are multi-line accepts adjacent one-liners when multiple lines between defs are allowed treats lines with whitespaces as blank registers an offense and corrects when there are too many new lines RuboCop::Cop::Layout::SpaceAroundOperators accepts scope operator accepts some operators that are exceptions & don't need spaces accepts operator surrounded by tabs accepts an operator at the end of a line accepts an assignment with spaces accepts operator symbols accepts exclamation point definition accepts an assignment followed by newline accepts argument default values without space accepts the construct class <= Ruby 2.6 does not register an offense when using `ERB.new` without optional arguments registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments registers an offense when using `ERB.new` with non-keyword 2nd argument registers an offense when using `::ERB.new` with non-keyword 2nd, 3rd and 4th arguments registers an offense when using `ERB.new` with non-keyword 2nd and 3rd arguments andkeyword 4th argument registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments andkeyword 5th argument registers an offense when using `ERB.new` with non-keyword 2nd, 3rd and 4th arguments does not register an offense when using `ERB.new` with keyword arguments when using `ActionView::Template::Handlers::ERB.new` does not register an offense when using `ERB.new` without arguments <= Ruby 2.5 does not register an offense when using `ERB.new` with non-keyword arguments RuboCop::Cop::VariableForce::VariableTable #push_scope returns pushed scope object #find_variable with an empty scope stack returns nil #accessible_variables when the direct outer scope has some variables and the current scope is block returns the current and direct outer scope variables and the current scope is not block returns only the current scope variables when the current scope has some variables returns all the variables when there are no variables returns empty array #find_variable when current scope is block when a variable with the target name does not exist in current scope but exists in the direct outer scope returns the direct outer scope variable and does not exist in all outer scopes returns nil but exists in a indirect outer scope when the direct outer scope is not block returns nil when the direct outer scope is block returns the indirect outer scope variable when a variable with the target name exists in current scope and does not exist in outer scope returns the current scope variable and also exists in outer scope returns the current scope variable when current scope is not block when a variable with the target name does not exist in current scope and does not exist in all outer scopes returns nil but exists in the direct outer scope returns nil when a variable with the target name exists in current scope and does not exist in outer scope returns the current scope variable and also exists in outer scope returns the current scope variable #current_scope_level increases by pushing scope decreases by popping scope #pop_scope returns popped scope object #declare_variable adds variable to current scope with its name as key returns the added variable RuboCop::Cop::Style::DateTime registers an offense when using DateTime for current time does not register an offense when using DateTime in another namespace registers an offense when using DateTime for modern date does not register an offense when using DateTime for historic date does not register an offense when using ::DateTime for historic date does not register an offense when using Date for modern date does not register an offense when using Time for current time registers an offense when using ::DateTime for current time when configured to not allow #to_datetime registers an offense when configured to allow #to_datetime does not register an offense RuboCop::Cop::Layout::SpaceBeforeComment accepts an EOL comment with a preceding space registers an offense and corrects missing space before an EOL comment accepts a comment that begins a line accepts a doc comment RuboCop::Cop::Style::CollectionMethods accepts find_all with more than 1 param accepts member? without a block accepts detect without a block accepts collect without a block registers an offense for member? with block accepts member? with more than 1 param accepts find_all without a block registers an offense for collect with block registers an offense for collect with proc param registers an offense for detect with block registers an offense for inject with proc param registers an offense for detect with proc param accepts inject with more than 1 param registers an offense for inject with block registers an offense for member? with proc param registers an offense for find_all with proc param accepts inject without a block accepts collect with more than 1 param accepts detect with more than 1 param registers an offense for find_all with block RuboCop::Cop::Style::RedundantFileExtensionInRequire does not register an offense when requiring filename ending with `.so` registers an offense and corrects when requiring filename ending with `.rb` does not register an offense when requiring filename without an extension does not register an offense when requiring variable as a filename RuboCop::TargetRuby when TargetRubyVersion is not set when .ruby-version is present does not read Gemfile.lock or gems.locked when .ruby-version contains a JRuby version uses the default target ruby version when .ruby-version contains an MRI version reads it to determine the target ruby version when .ruby-version contains a version prefixed by "ruby-" correctly determines the target ruby version when .ruby-version contains "system" version uses the default target ruby version when the MRI version contains multiple digits reads it to determine the target ruby version when .ruby-version contains a Rbx version uses the default target ruby version when .ruby-version is not present when bundler lock files are not present uses the default target ruby version and gems.locked exists uses the default Ruby when jruby is in gems.locked uses the default Ruby when rbx is in gems.locked uses MRI Ruby version when it is present in gems.locked uses MRI Ruby version when it has multiple digits uses the default Ruby when Ruby is not in gems.locked and Gemfile.lock exists uses MRI Ruby version when it has multiple digits uses the default Ruby when Ruby is not in Gemfile.lock uses the default Ruby when jruby is in Gemfile.lock uses MRI Ruby version when it is present in Gemfile.lock uses the default Ruby when rbx is in Gemfile.lock when .ruby-version is not in a parent directory when gems.locked is in a parent directory does when Gemfile.lock is in a parent directory does when .ruby-version is in a parent directory reads it to determine the target ruby version when TargetRubyVersion is set uses TargetRubyVersion does not read .ruby-version does not read Gemfile.lock or gems.locked RuboCop::Cop::Style::ParenthesesAroundCondition allows parens if the condition node is a modifier rescue op accepts parentheses if there is no space between the keyword and (. does not blow up when the condition is a ternary op allows parens if the condition node is a modifier until op does not blow up for empty unless condition allows parens if the condition node is a modifier while op is not confused by leading parentheses in subexpression registers an offense for parentheses around condition allows parens if the condition node is a modifier if op accepts parentheses around condition in a ternary does not blow up for empty if condition allows parens if the condition node is a modifier unless op is not confused by parentheses in subexpression parentheses in multiline conditions are not allowed registers an offense for parentheses around multiline condition safe assignment is allowed accepts setter in condition surrounded with parentheses accepts element assignment in condition surrounded with parentheses accepts variable assignment in condition surrounded with parentheses parentheses in multiline conditions are allowed accepts parentheses around multiline condition registers an offense for parentheses in single line condition safe assignment is not allowed does not accept variable assignment in condition surrounded with parentheses does not accept element assignment in condition surrounded with parentheses RuboCop::Cop::Lint::SafeNavigationWithEmpty in a conditional registers an offense and corrects on `&.empty?` does not register an offense on `.empty?` outside a conditional registers no offense RuboCop::Cop::Lint::IneffectiveAccessModifier when `protected` is applied to a class method registers an offense when there is an intervening instance method still registers an offense when there is `begin` before a method definition does not register an offense when `private_class_method` is used when `private_class_method` contains all private method names doesn't register an offense when `private_class_method` does not contain the method registers an offense when no access modifier is used doesn't register an offense when `private` is applied to a class method registers an offense when a `class << self` block is used doesn't register an offense RuboCop::Cop::Style::MethodDefParentheses require_no_parentheses behaves like no parentheses reports an offense for class def with parameters with parens accepts a class def with parameters with parens reports an offense for opposite + correct reports an offense for def with parameters with parens reports an offense for def with no args and parens accepts def with no args and no parens accepts a def with parameters but no parens auto-removes the parens for defs require_no_parentheses_except_multiline when args are all on a single line behaves like no parentheses reports an offense for opposite + correct reports an offense for def with no args and parens reports an offense for def with parameters with parens accepts a def with parameters but no parens accepts a class def with parameters with parens reports an offense for class def with parameters with parens auto-removes the parens for defs accepts def with no args and no parens when args span multiple lines reports an offense for correct + opposite auto-adds required parens to argument lists on multiple lines require_parentheses auto-adds required parens for a defs reports an offense for correct + opposite auto-adds required parens to argument lists on multiple lines accepts def with no args and no parens reports an offense for class def with parameters but no parens reports an offense for def with parameters but no parens RuboCop::Cop::Layout::EmptyLinesAroundMethodBody accepts method body starting with a line with spaces registers an offense for class method body starting with a blank registers an offense for class method body ending with a blank registers an offense for method body ending with a blank is not fooled by single line methods registers an offense for method body starting with a blank RuboCop::Cop::Lint::RedundantCopDisableDirective .check when there are no disabled lines returns no offense when there are disabled lines and there are two offenses and a comment disables one cop and then all cops returns an offense one cop twice returns an offense and there is an offense and a comment disables that cop but on other lines returns an offense all cops returns no offense that cop returns no offense and there are no offenses and a comment disables multiple cops, and one of them has offenses returns an offense comment is not at the beginning of the file and not all cops have offenses returns an offense all cops returns an offense itself and another cop and the other cop is disabled a second time returns no offense disabled on different ranges returns no offense disabled on the same range returns no offense multiple cops returns an offense an unknown cop returns an offense multiple cops, with abbreviated names one of them has offenses returns an offense one cop returns an offense multiple cops, and the leftmost one has no offenses returns an offense itself and all cops disabled on different ranges returns no offense misspelled cops returns an offense RuboCop::Cop::Style::IfUnlessModifierOfIfUnless provides a good error message ternary with modifier registers an offense and corrects conditional with modifier registers an offense and corrects conditional with modifier in body accepts nested conditionals accepts `unless` / `else` with modifier registers an offense and corrects RuboCop::Cop::Lint::ConstantResolution registers no offense when qualifying a const registers an offense not qualifying a const registers an offense not qualifying a namespace const registers no offense qualifying a namespace const with Only set registers an offense with an unqualified const registers no offense when qualifying a const registers no with a namespace const registers an offense when an unqualified namespace const registers no offense not qualifying another const registers no offense qualifying a namespace const with Ignore set registers no offense when an unqualified namespace const registers no offense with an unqualified const registers an offense not qualifying another const registers an with a namespace const registers no offense when qualifying a const registers no offense qualifying a namespace const RuboCop::Cop::Lint::DuplicateHashKey when there are two duplicated keys in a hash registers two offenses behaves like duplicated literal key registers an offense for duplicated `nil` hash keys behaves like duplicated non literal key does not register an offense for duplicated `%r{abx#{foo}}ixo` hash keys behaves like duplicated non literal key does not register an offense for duplicated `{ some_method_call => :sym }` hash keys behaves like duplicated non literal key does not register an offense for duplicated `/.#{some_method_call}/` hash keys When a key is duplicated three times in a hash literal registers two offenses behaves like duplicated non literal key does not register an offense for duplicated `"#{some_method_call}"` hash keys behaves like duplicated literal key registers an offense for duplicated `%r{abx}ixo` hash keys behaves like duplicated non literal key does not register an offense for duplicated `some_method_call` hash keys behaves like duplicated literal key registers an offense for duplicated `"#{2}"` hash keys target ruby version >= 2.6 behaves like duplicated literal key registers an offense for duplicated `(42..)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x == false)` hash keys behaves like duplicated literal key registers an offense for duplicated `{ :a => 1, :b => 2 }` hash keys behaves like duplicated literal key registers an offense for duplicated `'str'` hash keys behaves like duplicated literal key registers an offense for duplicated `!true` hash keys behaves like duplicated non literal key does not register an offense for duplicated `{ :sym => some_method_call }` hash keys behaves like duplicated literal key registers an offense for duplicated `1` hash keys when there is a duplicated key in the hash literal registers an offense behaves like duplicated non literal key does not register an offense for duplicated `some_method_call(x, y)` hash keys behaves like duplicated literal key registers an offense for duplicated `(false <=> true)` hash keys behaves like duplicated literal key registers an offense for duplicated `1.0` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x && false)` hash keys behaves like duplicated non literal key does not register an offense for duplicated `[some_method_call]` hash keys behaves like duplicated literal key registers an offense for duplicated `/./` hash keys behaves like duplicated non literal key does not register an offense for duplicated `(x or false)` hash keys behaves like duplicated literal key registers an offense for duplicated `[1, 2, 3]` hash keys behaves like duplicated literal key registers an offense for duplicated `false` hash keys behaves like duplicated literal key registers an offense for duplicated `{ a: 1, b: 2 }` hash keys When there is no duplicated key in the hash does not register an offense behaves like duplicated literal key registers an offense for duplicated `(false or true)` hash keys behaves like duplicated literal key registers an offense for duplicated `(false && true)` hash keys behaves like duplicated literal key registers an offense for duplicated `(1)` hash keys RuboCop::Cop::Metrics::BlockLength rejects a block with more than 5 lines accepts empty blocks reports the correct beginning and end lines does not count blank lines does not count commented lines by default rejects brace blocks too accepts a block with multiline receiver and less than 3 lines of body properly counts nested blocks accepts a block with less than 3 lines when `CountAsOne` is not empty folds array into one line when defining a module does not register an offense when defining a class does not register an offense when ExcludedMethods is enabled behaves like ignoring an offense on an excluded method still rejects other methods with long blocks accepts the foo method with a long block when receiver contains whitespaces ignores whitespaces when a method is ignored, but receiver is a module does not report an offense behaves like ignoring an offense on an excluded method still rejects other methods with long blocks accepts the foo method with a long block when CountComments is enabled also counts commented lines RuboCop::Cop::Lint::FlipFlop registers an offense for exclusive flip-flops registers an offense for inclusive flip-flops RuboCop::Cop::Style::MutableConstant Strict: false allows method call assignments behaves like immutable objects allows ::ENV['foo'] to be assigned to a constant allows ::ENV['foo'] to be ||= to a constant behaves like immutable objects allows FOO - BAR to be ||= to a constant allows FOO - BAR to be assigned to a constant behaves like immutable objects allows 'foo' + 'bar' to be ||= to a constant allows 'foo' + 'bar' to be assigned to a constant behaves like immutable objects allows ENV['foo'] to be ||= to a constant allows ENV['foo'] to be assigned to a constant behaves like immutable objects allows 1.5 to be ||= to a constant allows 1.5 to be assigned to a constant behaves like immutable objects allows :sym to be assigned to a constant allows :sym to be ||= to a constant when assigning a range (erange) without parenthesis does not add parenthesis to range enclosed in parentheses adds parenthesis when auto-correcting when assigning a range (irange) without parenthesis does not add parenthesis to range enclosed in parentheses adds parenthesis when auto-correcting behaves like mutable objects when assigning with ||= registers an offense for 'str' assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for 'str' assigned to a constant and corrects by adding .freeze behaves like immutable objects allows FOO + BAR to be assigned to a constant allows FOO + BAR to be ||= to a constant behaves like immutable objects allows 1 to be ||= to a constant allows 1 to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze splat expansion expansion of a range registers an offense and corrects to use to_a.freeze with parentheses registers an offense and corrects to use to_a.freeze behaves like mutable objects when assigning with ||= registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze behaves like mutable objects when assigning with ||= registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when the constant is a frozen string literal when the frozen string literal comment is missing behaves like mutable objects when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when the frozen string literal comment is false behaves like mutable objects when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when the frozen string literal comment is true behaves like immutable objects allows "#{a}" to be assigned to a constant allows "#{a}" to be ||= to a constant behaves like mutable objects when assigning with ||= registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning an array without brackets does not add brackets to %w() arrays adds brackets when auto-correcting Strict: true freezes a heredoc allows calls to freeze behaves like mutable objects when assigning with = registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for %w(a b c) assigned to a constant and corrects by adding .freeze behaves like mutable objects when assigning with ||= registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "top#{1 + 2}" assigned to a constant and corrects by adding .freeze behaves like mutable objects when assigning with ||= registers an offense for 'str' assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for 'str' assigned to a constant and corrects by adding .freeze behaves like immutable objects allows ::OTHER_CONST to be ||= to a constant allows ::OTHER_CONST to be assigned to a constant behaves like immutable objects allows OTHER_CONST to be ||= to a constant allows OTHER_CONST to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for [1, 2, 3] assigned to a constant and corrects by adding .freeze behaves like immutable objects allows ENV['foo'] to be ||= to a constant allows ENV['foo'] to be assigned to a constant operators that produce unfrozen objects registers an offense when operating on a constant and a string registers an offense when operating on multiple strings splat expansion expansion of a range registers an offense and corrects to use to_a.freeze with parentheses registers an offense and corrects to use to_a.freeze when assigning an array without brackets does not add brackets to %w() arrays adds brackets when auto-correcting behaves like immutable objects allows ::Struct.new to be ||= to a constant allows ::Struct.new to be assigned to a constant behaves like mutable objects when assigning with ||= registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for { a: 1, b: 2 } assigned to a constant and corrects by adding .freeze when the frozen string literal comment is missing behaves like mutable objects when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze behaves like immutable objects allows 1.5 to be assigned to a constant allows 1.5 to be ||= to a constant behaves like immutable objects allows Struct.new(:a, :b) to be ||= to a constant allows Struct.new(:a, :b) to be assigned to a constant when assigning with multiple operator calls registers an offense and corrects with parens and freeze behaves like immutable objects allows ::Namespace::OTHER_CONST to be ||= to a constant allows ::Namespace::OTHER_CONST to be assigned to a constant behaves like immutable objects allows ::ENV['foo'] to be ||= to a constant allows ::ENV['foo'] to be assigned to a constant behaves like immutable objects allows 1 to be assigned to a constant allows 1 to be ||= to a constant behaves like immutable objects allows Struct.new(:node) do def assignment? true end end to be ||= to a constant allows Struct.new(:node) do def assignment? true end end to be assigned to a constant behaves like immutable objects allows Struct.new to be ||= to a constant allows Struct.new to be assigned to a constant when the frozen string literal comment is false behaves like mutable objects when assigning with ||= registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with = registers an offense for "#{a}" assigned to a constant and corrects by adding .freeze when assigning with an operator behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze behaves like operator methods registers an offense and corrects with parens and freeze methods and operators that produce frozen objects accepts operating on a constant and an interger accepts comparison operators accepts operating on a constant and a float accepts operating on multiple floats accepts assigning to an environment variable with a fallback accepts checking fixed size accepts operating on multiple integers behaves like immutable objects allows Namespace::OTHER_CONST to be ||= to a constant allows Namespace::OTHER_CONST to be assigned to a constant behaves like immutable objects allows :sym to be ||= to a constant allows :sym to be assigned to a constant behaves like mutable objects when assigning with = registers an offense for Something.new assigned to a constant and corrects by adding .freeze when assigning with ||= registers an offense for Something.new assigned to a constant and corrects by adding .freeze when the frozen string literal comment is true behaves like immutable objects allows "#{a}" to be ||= to a constant allows "#{a}" to be assigned to a constant RuboCop::Cop::Style::IfInsideElse ignores nested ternary expressions catches an if..else nested inside an else ignores if inside unless isn't offended if there is a statement following the if node isn't offended by if..elsif..else ignores unless inside else catches an if node nested inside an else ignores ternary inside if..else isn't offended if there is a statement preceding the if node when AllowIfModifier is true accepts a modifier if nested inside an else when AllowIfModifier is false catches a modifier if nested inside an else RuboCop::Cop::Style::TrailingCommaInArrayLiteral with multi-line list of values when EnforcedStyleForMultiline is comma accepts trailing comma accepts an empty array being passed as a method argument accepts a multiline word array accepts literal with two of the values on the same line registers an offense for a literal with two of the values on the same line and a trailing comma accepts a multiline array with a single item and trailing comma when closing bracket is on same line as last value accepts literal with no trailing comma when EnforcedStyleForMultiline is consistent_comma accepts trailing comma accepts a multiline array with items on a single line andtrailing comma accepts a multiline word array accepts two values on the same line registers an offense for literal with two of the values on the same line and no trailing comma accepts a multiline array with a single item and trailing comma when closing bracket is on same line as last value registers an offense for no trailing comma when EnforcedStyleForMultiline is no_comma registers an offense for trailing comma accepts a literal with no trailing comma accepts HEREDOC with commas auto-corrects unwanted comma where HEREDOC has commas with single line list of values when EnforcedStyleForMultiline is comma accepts literal without trailing comma accepts rescue clause registers an offense for trailing comma accepts empty literal accepts single element literal without trailing comma when EnforcedStyleForMultiline is no_comma accepts single element literal without trailing comma accepts empty literal accepts literal without trailing comma accepts rescue clause registers an offense for trailing comma when EnforcedStyleForMultiline is consistent_comma accepts rescue clause registers an offense for trailing comma accepts single element literal without trailing comma accepts empty literal accepts literal without trailing comma RuboCop::Formatter::HTMLFormatter outputs the result in HTML outputs the cached result in HTML RuboCop::Cop::Bundler::InsecureProtocolSource registers an offense when using `source :rubyforge` registers an offense when using `source :gemcutter` registers an offense when using `source :rubygems` RuboCop::Cop::Style::Documentation accepts namespace module without documentation registers an offense for non-namespace does not raise an error for an implicit match conditional accepts empty class without documentation registers an offense for compact-style nested class registers offense for non-empty class with frozen string comment accepts non-empty class with documentation registers an offense if the comment line contains code registers an offense for compact-style nested module registers an offense for non-empty class with directive comment registers an offense for non-empty class does not consider comment followed by empty line to be class documentation registers an offense for empty module without documentation registers an offense for non-empty class with encoding comment accepts non-empty module with documentation accepts non-empty class with comment that ends with an annotation accepts non-empty class with annotation comment followed by other comment registers an offense for non-empty class with annotation comment accepts namespace class which defines constants accepts namespace module which defines constants accepts namespace class without documentation with # :nodoc: accepts compact-style nested module without documentation registers an offense for nested module without documentation accepts non-namespace module without documentation registers an offense for nested class without documentation accepts compact-style nested class without documentation accepts non-namespace class without documentation with `all` modifier accepts nested class without documentation with `all` modifier accepts nested module without documentation on a subclass accepts non-namespace subclass without documentation registers an offense for nested subclass without documentation with `all` modifier accepts nested subclass without documentation sparse and trailing comments ignores sparse comments inside class node ignores comments after class node end ignores comments after module node end ignores sparse comments inside module node without documentation with non-empty class with constants visibility declaration content does not register an offense with non-empty module with constants visibility declaration content does not register an offense RuboCop::Cop::Generator::RequireFileInjector when a cop of style department already exists injects a `require_relative` statement on the end of style department when a `require` entry already exists does not write to any file when using an unknown department inserts a `require_relative` statement to the bottom of the file when a `require_relative` entry does not exist from before injects a `require_relative` statement on the right line in the root file RuboCop::Cop::Style::RegexpLiteral when EnforcedStyle is set to mixed a multi-line `//` regex with slashes registers an offense a single-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a single-line `//` regex without slashes is accepted a multi-line %r regex without slashes is accepted a single-line %r regex without slashes registers an offense a single-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted a multi-line %r regex with slashes is accepted a multi-line `//` regex without slashes registers an offense when regex contains slashes in interpolation ignores the slashes that do not belong // regex when EnforcedStyle is set to slashes a multi-line `//` regex without slashes is accepted a single-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a single-line `%r//` regex with slashes is accepted when configured to allow inner slashes remains slashes after auto-correction a single-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted a multi-line %r regex without slashes registers an offense a single-line %r regex without slashes registers an offense a multi-line %r regex with slashes is accepted when configured to allow inner slashes registers an offense a single-line `//` regex without slashes is accepted a single-line `//` regex with slashes and interpolation registers an offense when configured to allow inner slashes is accepted a multi-line `//` regex with slashes registers an offense when configured to allow inner slashes is accepted when EnforcedStyle is set to percent_r a multi-line `//` regex without slashes registers an offense a multi-line %r regex without slashes is accepted a single-line %r regex without slashes is accepted a multi-line `//` regex with slashes registers an offense a single-line %r regex with slashes is accepted a multi-line %r regex with slashes is accepted a single-line `//` regex without slashes registers an offense a single-line `//` regex with slashes registers an offense %r regex with other delimiters than curly braces registers an offense when PercentLiteralDelimiters is configured with slashes respects the configuration when auto-correcting when PercentLiteralDelimiters is configured with brackets respects the configuration when auto-correcting RuboCop::Formatter::FileListFormatter #file_finished displays parsable text RuboCop::Cop::Style::DocumentationMethod when declaring methods outside a class when declaring methods for class instance without documentation comment registers an offense with `end` on the same line registers an offense with documentation comment does not register an offense does not register an offense with `end` on the same line with both public and private methods when required for non-public methods registers an offense when the public method has documentation does not register an offense when the public method has no documentation registers an offense when method is private does not register an offense with inline `private` does not register an offense does not register an offense with `end` on the same line does not register an offense with inline `private` and `end` when required for non-public methods registers an offense with inline `private` registers an offense with `end` on the same line registers an offense with inline `private` and `end` registers an offense with both public and private methods when required for non-public methods registers an offense when the public method has no documentation registers an offense when the public method has documentation does not register an offense when declaring methods in a class with annotation comment registers an offense with both public and private methods when required for non-public methods registers an offense when the public method has no documentation registers an offense when the public method has documentation does not register an offense with directive comment registers an offense with documentation comment when method is public does not register an offense with `end` on the same line does not register an offense without documentation comment wheh method is public registers an offense with `end` on the same line registers an offense when method is private does not register an offense with inline `private` and `end` does not register an offense does not register an offense with inline `private` does not register an offense with `end` on the same line when required for non-public methods registers an offense registers an offense with inline `private` registers an offense with `end` on the same line registers an offense with inline `private` and `end` without documentation comment when method is protected does not register an offense with inline `protected` does not register an offense when required for non-public methods registers an offense with inline `protected` registers an offense when method is public registers an offense registers an offense with `end` on the same line when method is private does not register an offense does not register an offense with inline `private` and `end` does not register an offense with `end` on the same line does not register an offense with inline `private` when required for non-public methods registers an offense with inline `private` and `end` registers an offense registers an offense with `end` on the same line registers an offense with inline `private` when declaring methods in a module with documentation comment when method is public does not register an offense with `end` on the same line does not register an offense when method is module_function does not register an offense for separate def does not register an offense for inline def without documentation comment when method is private does not register an offense does not register an offense with inline `private` does not register an offense with inline `private` and `end` does not register an offense with `end` on the same line when required for non-public methods registers an offense with inline `private` registers an offense with `end` on the same line registers an offense with inline `private` and `end` registers an offense when method is module_function registers an offense for inline def registers an offense for separate def when method is public registers an offense with `end` on the same line registers an offense with both public and private methods when the public method has documentation does not register an offense when the public method has no documentation registers an offense when required for non-public methods registers an offense with documentation comment does not register an offense does not register an offense with `end` on the same line RuboCop::Cop::Style::MissingElse configured to warn only on empty if given an if-statement with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with no else-clause registers an offense given an unless-statement with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given a case statement with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with no else-clause doesn't register an offense EmptyElse enabled and set to warn on nil given an unless-statement with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense given an if-statement with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense with an else-clause containing only the literal nil doesn't register an offense given a case statement with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense EmptyElse enabled and set to warn on empty given a case statement with no else-clause registers an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given an unless-statement with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense configured to warn only on empty case given a case statement with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense given an if-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with no else-clause doesn't register an offense with a completely empty else-clause doesn't register an offense given an unless-statement with an else-clause containing only the literal nil doesn't register an offense with no else-clause doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense UnlessElse enabled given a case statement with no else-clause registers an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense with an else-clause with side-effects doesn't register an offense given an unless-statement with no else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense UnlessElse disabled given a case statement with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense with an else-clause containing only the literal nil doesn't register an offense given an unless-statement with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with no else-clause registers an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with no else-clause registers an offense RuboCop::Cop::Layout::IndentationConsistency with case accepts case/when/else with then beginning a line registers an offense and corrects bad indentation in a case/else body accepts case/when/else laid out as a table accepts correctly indented case/when/else registers an offense and corrects bad indentation in a case/when body accepts indented when/else plus indented body with class with normal style configured accepts an empty class body accepts indented public, protected, and private registers an offense and corrects bad indentation in a class body registers an offense and corrects bad indentation in def but not for outdented public, protected, and private with indented_internal_methods style configured accepts different indentation in different visibility sections with top-level code accepts an empty expression string interpolation with def/defs accepts an empty def body registers an offense and corrects bad indentation in a def body registers an offense and corrects bad indentation in a defs body accepts an empty defs body with if statement accepts an if/else in assignment on next line with end aligned with if accepts an if/else in assignment with end aligned with if registers an offense and corrects bad indentation in an elsif body accepts if/elsif/else/end laid out as a table accepts an if/else in assignment with end aligned with variable and chaining after the end accepts an if/else branches with rescue clauses accepts a one line if statement accepts a correctly aligned if/elsif/else/end accepts an if in assignment with end aligned with if registers an offense and corrects bad indentation in an if body accepts if/then/else/end laid out as another table accepts if/elsif/else/end with fullwidth characters accepts an empty if registers an offense and corrects bad indentation in an else body accepts an if/else in assignment with end aligned with variable and chaining with a block after the end accepts an if/else in assignment with end aligned with variable accepts an if in assignment with end aligned with variable with block registers an offense and correct bad indentation in a do/end body accepts a correctly indented block body does not auto-correct an offense within another offense registers an offense and corrects bad indentation in a {} body accepts an empty block body with for registers an offense and corrects bad indentation in a for body accepts an empty for with while/until accepts an empty while registers an offense and corrects bad indentation in begin/end/while registers an offense and corrects bad indentation in an until body registers an offense and corrects bad indentation in a while body with unless accepts an empty unless registers an offense and corrects bad indentation in an unless body with module registers an offense and corrects bad indentation in a module body accepts an empty module body registers an offense and corrects bad indentation of private methods even when there are no public methods registers an offense and corrects bad indentation of private methods RuboCop::Cop::Style::SymbolProc auto-corrects correctly when there are no arguments in parentheses accepts ::Proc.new with 1 argument accepts proc with 1 argument accepts block with splat params accepts empty block body accepts block with no arguments auto-corrects correctly when args have a trailing comma accepts block with more than 1 arguments accepts block with a block argument accepts block with more than 1 expression in body registers an offense for a block when method in body is unary -/+ accepts block with adding a comma after the sole argument accepts lambda with 1 argument accepts block when method in body is not called on block arg accepts ignored method autocorrects multiple aliases with symbols as proc accepts Proc.new with 1 argument does not crash with a bare method call registers an offense for a block with parameterless method call on param when `super` has no arguments registers an offense when the method has arguments registers an offense when `super` has arguments registers an offense RuboCop::Cop::Style::EvenOdd converts x % 2 == 1 to #odd? converts x % 2 != 1 to #even? converts x % 2 != 0 to #odd? converts (x % 2) == 0 to #even? converts (x % 2) != 0 to #odd? converts (x(y) % 2) != 1 to #even? converts x % 2 == 0 to #even? converts (x % 2) == 1 to #odd? converts (x.y % 2) != 1 to #even? accepts x % 3 != 0 converts (x._(y) % 2) != 1 to even? converts complex examples converts (x._(y)) % 2 != 1 to even? accepts x % 2 == 2 accepts x % 3 == 0 converts 1 % 2 != 1 to even? converts x._(y) % 2 != 1 to even? converts (y % 2) != 1 to #even? RuboCop::Cop::Layout::EmptyLinesAroundArguments when extra lines registers and autocorrects offense on correct lines for multi-offense example registers and autocorrects offense when args start on definition line registers and autocorrects offense for empty line after arg registers and autocorrects offense for empty line before arg registers autocorrects empty line whetn args start on definition line registers and autocorrects offense when empty line between normal arg & block arg registers and autocorrects offense on correct line for single offense example registers and autocorrects offense for empty line between args registers and autocorrects offenses when multiple empty lines are detected when using safe navigation operator registers and autocorrects offense for empty line before arg when no extra lines accepts method with argument that trails off heredoc accepts method with no arguments that trails off block accepts method with argument that trails off block accepts multiple listed mixed args accpets one line methods accepts listed args starting on definition line accepts block argument with empty line with multiple arguments ignores empty lines inside of method arguments with one argument ignores empty lines inside of method arguments RuboCop::Cop::Style::TernaryParentheses configured for parentheses on complex and there are no parens with complex condition registers an offense for comparison with method call on receiver registers an offense for arithmetic and equality check registers an offense for boolean expression with inner parens registers an offense for compound boolean expression registers an offense for comparison registers an offense for addition expression registers an offense comparison with exponentiation registers an offense for boolean expression registers an offense for comparison with multiplication registers an offense for subtraction expression with an assignment condition registers an offense for equality check accepts safe assignment when configured to enforce parentheses inclusion with a complex condition registers an offense for boolean expression registers an offense for arithmetic condition registers an offense for negated condition registers an offense for boolean expression using keyword registers an offense for equality check registers an offense for boolean expression containing parens registers an offense when calling method on a receiver with a simple condition registers an offense for accessor in condition registers an offense for yield in condition registers an offense for query method in condition with an assignment condition registers an offense for double assignment registers an offense for triple assignment registers an offense for double assignment with equality check in condition accepts safe assignment in condition configured for parentheses on complex and there are parens accepts condition including a range with a simple condition registers an offense for query method in condition registers an offense for save navigation registers an offense for accessor in condition registers an offense for yield in condition registers an offense with preceding boolean keyword expression with an assignment condition accepts equality check accepts safe assignment accepts safe assignment as part of multiple assignment accepts accepts safe multiple assignment behaves like safe assignment disabled registers an offense for parens around outer assignment registers an offense for parens around inner assignment registers an offense for parens around assignment with method call condition registers an offense for defined check registers an offense when calling method on a receiver registers an offense when calling method with a parameter without accessor in method call parameters registers an offense for array include? without parens registers an offense for array include? with parens with accessor in method call parameters registers an offense for array include? with multiple parameters without parens registers an offense for array include? with multiple parameters with parens registers an offense for array include? without parens with a complex condition registers an offense when calling method on a receiver accepts boolean expression using keywords accepts boolean expression when configured to enforce parentheses omission accepts condition including a range with no space between the parentheses and question mark registers an offense with an unparenthesized method call condition registers an offense when calling method with a parameter registers an offense for defined check when calling method with multiple arguments registers an offense when calling method on a constant receiver registers an offense when calling method on a receiver registers an offense when calling method on a literal receiver registers an offense with a complex condition registers an offense for negated condition registers an offense for equality check registers an offense for boolean expression using keyword accepts parens around inner boolean expression registers an offense for boolean expression registers an offense for arithmetic expression registers an offense for query method on object with a simple condition registers an offense for accessor in condition accepts multi-line boolean expression starting on following line registers an offense for multi-line boolean expression registers an offense for yield in condition registers an offense for query method in condition with an assignment condition registers an offense for equality check accepts double safe assignment accepts safe assignment accepts safe assignment as part of multiple assignment behaves like safe assignment disabled registers an offense for parens around assignment registers an offense for parens around inner assignment registers an offense for parens around outer assignment when `RedundantParenthesis` would cause an infinite loop when `EnforcedStyle: require_parentheses` accepts when `EnforcedStyle: require_parentheses_when_complex` accepts RuboCop::Cop::Lint::ImplicitStringConcatenation when the string literals contain newlines registers an offense does not register an offense for a single string on a string with interpolations does register an offense on a single string literal does not register an offense on adjacent string literals on different lines does not register an offense when inside an array notes that the strings could be separated by a comma instead on adjacent string literals on the same line registers an offense when in a method call's argument list notes that the strings could be separated by a comma instead RuboCop::Cop::Style::RedundantFreeze allows .freeze on method call behaves like mutable objects allows "top#{1 + 2}" with freeze behaves like mutable objects allows (1..5) with freeze behaves like immutable objects registers an offense for frozen ENV['foo'] behaves like mutable objects allows (1...5) with freeze behaves like immutable objects registers an offense for frozen (2 > 1) behaves like immutable objects registers an offense for frozen :"" behaves like mutable objects allows { a: 1, b: 2 } with freeze behaves like immutable objects registers an offense for frozen [1, 2, 3].size behaves like immutable objects registers an offense for frozen (a > b) behaves like immutable objects registers an offense for frozen ::ENV['foo'] behaves like immutable objects registers an offense for frozen 1 behaves like immutable objects registers an offense for frozen (1 + 2) behaves like mutable objects allows [1, 2, 3] with freeze behaves like mutable objects allows (a + b) with freeze behaves like immutable objects registers an offense for frozen ('a' > 'b') behaves like immutable objects registers an offense for frozen :sym behaves like mutable objects allows ('a' * 20) with freeze behaves like mutable objects allows /./ with freeze behaves like immutable objects registers an offense for frozen 1.5 behaves like mutable objects allows 'str' with freeze when the receiver is a frozen string literal when the frozen string literal comment is true behaves like immutable objects registers an offense for frozen "#{a}" when the frozen string literal comment is missing behaves like mutable objects allows "#{a}" with freeze when the frozen string literal comment is false behaves like mutable objects allows "#{a}" with freeze behaves like mutable objects allows ('a' + 'b') with freeze behaves like immutable objects registers an offense for frozen 'foo'.count RuboCop::Cop::Style::ConditionalAssignment allows assignment using different operators in if elsif else allows if elsif else with the same assignment only in if elsif allows if elsif else with the same assignment only in elsif else allows assignment of different variables in case when else allows assignment to the result of a ternary operation allows modifier if inside of if else registers an offense in an if else if the assignment is already at the line length limit registers an offense for assignment in case when then else allows if else without variable assignment allows assignment of different variables in if else allows method calls in if else allows modifier if allows different assignment types in case with when when else registers an offense for assignment in ternary operation using strings allows method calls in conditionals registers an offense for assignment in unless else allows if elsif else with the same assignment only in if else doesn't crash when assignment statement uses chars which have special meaning in a regex allows aref assignment with different indices in if..else counts array assignment when determining multiple assignment registers an offense for assignment in if then elsif then else allows assignment using different operators in if else registers an offense for assignment in case with when when else registers an offense for assignment in if elsif elsif else autocorrects assignment in if else when the assignment spans multiple lines registers an offense for assignment in if elsif else allows assignment using different (method) operators in if..else doesn't crash with empty braces allows assignment in multiple branches when it is wrapped in a modifier correction would exceed max line length allows assignment to the same variable in if else if the correction would create a line longer than the configured LineLength allows assignment to the same variable in case when else if the correction would create a line longer than the configured LineLength allows assignment to the same variable in if else if the correction would cause the condition to exceed the configured LineLength EndAlignment configured to start_of_line auto-correct uses proper end alignment in unless uses proper end alignment in case uses proper end alignment in if behaves like all assignment types for a global variable lval registers an offense for assignment using |= in ternary for a local variable lval registers an offense for assignment using |= in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a class variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a constant lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a global variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a instance variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when with end alignment to keyword for a local variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a constant lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a instance variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a global variable lval registers an offense for assignment using |= in case when registers an offense for assignment using |= in if else for a class variable lval registers an offense for assignment using |= in if else registers an offense for assignment using |= in case when for a instance variable lval registers an offense for assignment using |= in ternary for a class variable lval registers an offense for assignment using |= in ternary for a constant lval registers an offense for assignment using |= in ternary behaves like all assignment types for a instance variable lval registers an offense for assignment using *= in ternary with end alignment to keyword for a local variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a class variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a constant lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a instance variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a global variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else with end alignment to start_of_line for a global variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a local variable lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a instance variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a class variable lval registers an offense for assignment using *= in if else registers an offense for assignment using *= in case when for a constant lval registers an offense for assignment using *= in case when registers an offense for assignment using *= in if else for a constant lval registers an offense for assignment using *= in ternary for a class variable lval registers an offense for assignment using *= in ternary for a local variable lval registers an offense for assignment using *= in ternary for a global variable lval registers an offense for assignment using *= in ternary behaves like all variable types allows assignment to the return of a ternary allows assignment to the return of if else registers an offense assigning any variable type in case when registers an offense assigning any variable type in ternary registers an offense assigning any variable type in if else allows assignment to the return of case when behaves like all variable types registers an offense assigning any variable type in ternary allows assignment to the return of case when registers an offense assigning any variable type in case when allows assignment to the return of if else allows assignment to the return of a ternary registers an offense assigning any variable type in if else behaves like all assignment types for a local variable lval registers an offense for assignment using %= in ternary with end alignment to start_of_line for a constant lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a class variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a global variable lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a local variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in ternary for a constant lval registers an offense for assignment using %= in ternary with end alignment to keyword for a local variable lval registers an offense for assignment using %= in if else registers an offense for assignment using %= in case when for a class variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a instance variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a global variable lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a constant lval registers an offense for assignment using %= in case when registers an offense for assignment using %= in if else for a global variable lval registers an offense for assignment using %= in ternary for a class variable lval registers an offense for assignment using %= in ternary behaves like all assignment types for a class variable lval registers an offense for assignment using >>= in ternary for a instance variable lval registers an offense for assignment using >>= in ternary for a local variable lval registers an offense for assignment using >>= in ternary for a global variable lval registers an offense for assignment using >>= in ternary for a constant lval registers an offense for assignment using >>= in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a class variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a constant lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a instance variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a global variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when with end alignment to keyword for a class variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a global variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a instance variable lval registers an offense for assignment using >>= in case when registers an offense for assignment using >>= in if else for a local variable lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when for a constant lval registers an offense for assignment using >>= in if else registers an offense for assignment using >>= in case when behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in case when corrects comparison methods in if elsif else corrects comparison methods in unless else with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when behaves like all assignment types with end alignment to start_of_line for a instance variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a constant lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a class variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a local variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a global variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a class variable lval registers an offense for assignment using ^= in ternary for a global variable lval registers an offense for assignment using ^= in ternary for a local variable lval registers an offense for assignment using ^= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a class variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a local variable lval registers an offense for assignment using ^= in if else registers an offense for assignment using ^= in case when for a constant lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a instance variable lval registers an offense for assignment using ^= in case when registers an offense for assignment using ^= in if else for a instance variable lval registers an offense for assignment using ^= in ternary for a constant lval registers an offense for assignment using ^= in ternary behaves like all assignment types for a class variable lval registers an offense for assignment using += in ternary with end alignment to start_of_line for a class variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a constant lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a local variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a instance variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a global variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else with end alignment to keyword for a constant lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a local variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a global variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a instance variable lval registers an offense for assignment using += in case when registers an offense for assignment using += in if else for a class variable lval registers an offense for assignment using += in if else registers an offense for assignment using += in case when for a instance variable lval registers an offense for assignment using += in ternary for a constant lval registers an offense for assignment using += in ternary for a global variable lval registers an offense for assignment using += in ternary for a local variable lval registers an offense for assignment using += in ternary behaves like all assignment types for a instance variable lval registers an offense for assignment using **= in ternary for a global variable lval registers an offense for assignment using **= in ternary with end alignment to start_of_line for a constant lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a global variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a class variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a instance variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a local variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when with end alignment to keyword for a local variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a instance variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a constant lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a class variable lval registers an offense for assignment using **= in case when registers an offense for assignment using **= in if else for a global variable lval registers an offense for assignment using **= in if else registers an offense for assignment using **= in case when for a local variable lval registers an offense for assignment using **= in ternary for a class variable lval registers an offense for assignment using **= in ternary for a constant lval registers an offense for assignment using **= in ternary with nested conditionals does not consider branches of nested ifs eventually autocorrects all branches auto-correct corrects =~ in ternary operations corrects assignment to unbracketed array in if else preserves comments during correction in case when else preserves comments during correction in if else multiple assignment does not register an offense in if else does not register an offense in case when constant assignment corrects if..else with top-level constant corrects if..else with namespaced constant self.attribute= assignment corrects if..else with different receivers doesn't register an offense assignment from a method corrects unless else corrects if else corrects case when aref assignment corrects if..else with different indices doesn't register an offense behaves like all variable types allows assignment to the return of if else allows assignment to the return of a ternary registers an offense assigning any variable type in case when allows assignment to the return of case when registers an offense assigning any variable type in if else registers an offense assigning any variable type in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when behaves like all assignment types with end alignment to keyword for a constant lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a global variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a local variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a class variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a instance variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else with end alignment to start_of_line for a global variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a constant lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a class variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a instance variable lval registers an offense for assignment using ||= in case when registers an offense for assignment using ||= in if else for a local variable lval registers an offense for assignment using ||= in if else registers an offense for assignment using ||= in case when for a local variable lval registers an offense for assignment using ||= in ternary for a instance variable lval registers an offense for assignment using ||= in ternary for a constant lval registers an offense for assignment using ||= in ternary for a class variable lval registers an offense for assignment using ||= in ternary for a global variable lval registers an offense for assignment using ||= in ternary behaves like all variable types allows assignment to the return of a ternary registers an offense assigning any variable type in if else registers an offense assigning any variable type in ternary registers an offense assigning any variable type in case when allows assignment to the return of if else allows assignment to the return of case when behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in case when corrects comparison methods in if elsif else with end alignment to keyword corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when behaves like all assignment types with end alignment to start_of_line for a constant lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a instance variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a local variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a class variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a global variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a global variable lval registers an offense for assignment using << in ternary with end alignment to keyword for a local variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a constant lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a instance variable lval registers an offense for assignment using << in if else registers an offense for assignment using << in case when for a global variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a class variable lval registers an offense for assignment using << in case when registers an offense for assignment using << in if else for a class variable lval registers an offense for assignment using << in ternary for a instance variable lval registers an offense for assignment using << in ternary for a local variable lval registers an offense for assignment using << in ternary for a constant lval registers an offense for assignment using << in ternary behaves like else followed by new conditional without else allows if elsif else unless behaves like all assignment types for a class variable lval registers an offense for assignment using -= in ternary for a local variable lval registers an offense for assignment using -= in ternary for a constant lval registers an offense for assignment using -= in ternary for a instance variable lval registers an offense for assignment using -= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a instance variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a constant lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a class variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a local variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when with end alignment to start_of_line for a global variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a instance variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a local variable lval registers an offense for assignment using -= in case when registers an offense for assignment using -= in if else for a class variable lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a constant lval registers an offense for assignment using -= in if else registers an offense for assignment using -= in case when for a global variable lval registers an offense for assignment using -= in ternary IncludeTernaryExpressions false allows assignment in ternary operation behaves like else followed by new conditional without else allows if elsif else if assignment as the last statement allows variable assignment in unless else with more than variable assignment allows multiple assignment in if elsif elsif else allows more than variable assignment in if elsif else allows multiple assignment in case statements when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignments in case when if there are uniq variables in the when branches allows multiple assignment in case when else when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignments in case when with multiple whens allows multiple assignment in if elsif else when the last assignment is the same and the earlier assignments do not appear in all branches allows multiple assignment in if else allows multiple assignment in unless else allows more than variable assignment in if else allows multiple assignments in case when with only one when allows variable assignment in case when else with more than variable assignment allows multiple assignment in if elsif else allows assignment in if elsif else with some branches only containing variable assignment and others containing more than variable assignment behaves like allows out of order multiple assignment in if elsif else allows out of order multiple assignment in if elsif else multiple assignment in only one branch allows multiple assignment is in if allows multiple assignment is in elsif registers an offense when multiple assignment is in else behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when empty branch allows case with an empty else allows if elsif without else allows an empty if statement allows assignment in if without an else allows an empty when branch with an else allows assignment in unless without an else allows assignment in case when without an else allows an empty elsif statement behaves like all assignment types with end alignment to keyword for a global variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a local variable lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a constant lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a instance variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a class variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a instance variable lval registers an offense for assignment using = in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a constant lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a global variable lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a instance variable lval registers an offense for assignment using = in if else registers an offense for assignment using = in case when for a class variable lval registers an offense for assignment using = in case when registers an offense for assignment using = in if else for a global variable lval registers an offense for assignment using = in ternary for a class variable lval registers an offense for assignment using = in ternary for a local variable lval registers an offense for assignment using = in ternary for a constant lval registers an offense for assignment using = in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in case when corrects comparison methods in unless else configured to check conditions with multiple statements allows assignment in multiple branches when it is wrapped in a modifier registers an offense for multiple assignment when an earlier assignment is is protected by a modifier assignment as the last statement registers an offense in case when else with more than variable assignment registers offense for multiple assignment in unless else registers an offense in if else with more than variable assignment registers offense for multiple assignments in case when with only one when registers an offense in if elsif else with more than variable assignment register an offense for multiple assignment in if else registers offense for multiple assignments in case when with multiple whens registers an offense in unless else with more than variable assignment registers an offense for multiple assignment in if elsif else registers an offense in if elsif else with some branches only containing variable assignment and others containing more than variable assignment registers offense for multiple assignment in if elsif elsif else multiple assignment in only one branch registers an offense when multiple assignment is in else registers an offense when multiple assignment is in if registers an offense when multiple assignment is in elsif behaves like allows out of order multiple assignment in if elsif else allows out of order multiple assignment in if elsif else auto-correct corrects multiple assignment in if elsif else with multiple elsifs corrects assignment in an if statement that is nested in unless else corrects multiple assignment in if else corrects multiple assignment in unless else corrects multiple assignment in case when corrects multiple assignment in if elsif else corrects multiple assignment in case when with multiple whens behaves like all assignment types for a instance variable lval registers an offense for assignment using &&= in ternary for a local variable lval registers an offense for assignment using &&= in ternary with end alignment to keyword for a class variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a instance variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a global variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a constant lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a local variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a global variable lval registers an offense for assignment using &&= in ternary for a class variable lval registers an offense for assignment using &&= in ternary with end alignment to start_of_line for a constant lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a global variable lval registers an offense for assignment using &&= in case when registers an offense for assignment using &&= in if else for a class variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a instance variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a local variable lval registers an offense for assignment using &&= in if else registers an offense for assignment using &&= in case when for a constant lval registers an offense for assignment using &&= in ternary behaves like all assignment types for a class variable lval registers an offense for assignment using /= in ternary with end alignment to start_of_line for a local variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a global variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a class variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a constant lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a instance variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a constant lval registers an offense for assignment using /= in ternary for a local variable lval registers an offense for assignment using /= in ternary with end alignment to keyword for a class variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a global variable lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a local variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a constant lval registers an offense for assignment using /= in if else registers an offense for assignment using /= in case when for a instance variable lval registers an offense for assignment using /= in case when registers an offense for assignment using /= in if else for a global variable lval registers an offense for assignment using /= in ternary for a instance variable lval registers an offense for assignment using /= in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when behaves like all assignment types for a global variable lval registers an offense for assignment using &= in ternary for a class variable lval registers an offense for assignment using &= in ternary for a instance variable lval registers an offense for assignment using &= in ternary with end alignment to start_of_line for a instance variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a local variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a class variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a constant lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a global variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a constant lval registers an offense for assignment using &= in ternary for a local variable lval registers an offense for assignment using &= in ternary with end alignment to keyword for a global variable lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a instance variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a class variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else for a constant lval registers an offense for assignment using &= in if else registers an offense for assignment using &= in case when for a local variable lval registers an offense for assignment using &= in case when registers an offense for assignment using &= in if else behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when behaves like all assignment types with end alignment to start_of_line for a global variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a local variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a class variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a constant lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a instance variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a constant lval registers an offense for assignment using <<= in ternary for a local variable lval registers an offense for assignment using <<= in ternary for a global variable lval registers an offense for assignment using <<= in ternary for a instance variable lval registers an offense for assignment using <<= in ternary for a class variable lval registers an offense for assignment using <<= in ternary with end alignment to keyword for a constant lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a instance variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a global variable lval registers an offense for assignment using <<= in if else registers an offense for assignment using <<= in case when for a class variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else for a local variable lval registers an offense for assignment using <<= in case when registers an offense for assignment using <<= in if else behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to keyword corrects comparison methods in unless else corrects comparison methods in if elsif else corrects comparison methods in case when with end alignment to start_of_line corrects comparison methods in unless else corrects comparison methods in case when corrects comparison methods in if elsif else behaves like all variable types allows assignment to the return of a ternary registers an offense assigning any variable type in case when allows assignment to the return of case when allows assignment to the return of if else registers an offense assigning any variable type in ternary registers an offense assigning any variable type in if else behaves like all variable types registers an offense assigning any variable type in if else registers an offense assigning any variable type in case when allows assignment to the return of case when allows assignment to the return of a ternary allows assignment to the return of if else registers an offense assigning any variable type in ternary behaves like comparison methods registers an offense for comparison methods in ternary operations with end alignment to start_of_line corrects comparison methods in case when corrects comparison methods in unless else corrects comparison methods in if elsif else with end alignment to keyword corrects comparison methods in if elsif else corrects comparison methods in unless else corrects comparison methods in case when for if elsif else if else autocorrects the inner offense first autocorrects the outer offense later behaves like all variable types allows assignment to the return of if else allows assignment to the return of a ternary registers an offense assigning any variable type in if else registers an offense assigning any variable type in ternary allows assignment to the return of case when registers an offense assigning any variable type in case when RuboCop::Cop::Style::Attr registers offense for attr within class_eval accepts attr when it has a receiver registers offense for attr within module_eval registers an offense attr does not register offense for custom `attr` method accepts attr when it does not take arguments auto-corrects attr with multiple names to attr_reader attr to attr_reader attr, false to attr_reader attr :name, true to attr_accessor :name RuboCop::Cop::Style::ColonMethodDefinition accepts a class method defined using . using the class name registers an offense for a class method defined using :: using self registers an offense for a class method defined using :: RuboCop::Cop::Lint::BigDecimalNew registers an offense and corrects using `::BigDecimal.new()` does not register an offense when using `BigDecimal()` registers an offense and corrects using `BigDecimal.new()` RuboCop::Cop::Layout::BlockEndNewline accepts a one-liner registers an offense and corrects when multiline block } is not on its own line registers an offense and corrects when multiline block end is not on its own line accepts multiline blocks with newlines before the end registers an offense and corrects when `}` of multiline block without processing is not on its own line RuboCop::Cop::Security::Open accepts open as variable accepts File.open as method registers an offense for open accepts open on a literal string accepts open with no arguments registers an offense for open with dynamic string that is not prefixed registers an offense for open with mode argument accepts open with a string that interpolates a literal registers an offense for open with string that starts with a pipe accepts open with string that has a prefixed interpolation accepts open with prefix string literal plus something RuboCop::Cop::Layout::SpaceAfterSemicolon registers an offense and corrects semicolon without space after it does not crash if semicolon is the last character of the file inside block braces when EnforcedStyle for SpaceInsideBlockBraces is no_space accepts no space between a semicolon and a closing brace behaves like common behavior accepts a space between a semicolon and a closing brace when EnforcedStyle for SpaceInsideBlockBraces is space registers an offense and corrects no space between a semicolon and a closing brace behaves like common behavior accepts a space between a semicolon and a closing brace RuboCop::Cop::Lint::MultipleComparison accepts to use one compare operator registers an offense for x <= y < z registers an offense for x > y <= z registers an offense for x < y < z registers an offense for x > y >= z registers an offense for x < y > z registers an offense for x > y < z registers an offense for x < y <= z registers an offense for x <= y >= z registers an offense for x < y >= z registers an offense for x >= y < z registers an offense for x <= y > z registers an offense for x > y > z registers an offense for x >= y > z registers an offense for x >= y <= z registers an offense for x <= y <= z registers an offense for x >= y >= z RuboCop::Formatter::TapFormatter #finished when any offenses are detected reports all detected offenses for all failed files when no offenses are detected does not report offenses #file_finished when no offenses are detected prints "ok" when any offenses are detected prints "not ok" RuboCop::Cop::Lint::AmbiguousBlockAssociation behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense without parentheses without receiver registers an offense with assignment registers an offense with receiver registers an offense when using safe navigation operator registers an offense rspec expect {}.to change {} registers an offense as a hash key registers an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense behaves like accepts does not register an offense RuboCop::Cop::Style::WordArray when EnforcedStyle is percent registers an offense for strings with newline and tab escapes keeps the line breaks in place after auto-correct detects right value of MinSize to use for --auto-gen-config auto-corrects an array of words in multiple lines registers an offense for an array with comments outside of it does not register an offense for array of non-words does not register an offense for array starting with %w does not register an offense for array with empty strings registers an offense for arrays of double quoted strings registers an offense for arrays with character constants does not register an offense on non-word strings auto-corrects an array of words using partial newlines does not register an offense for an array with comments in it registers an offense in a non-ambiguous block context does not register offense for array with allowed number of strings detects when the cop must be disabled to avoid offenses auto-corrects an array of words registers an offense for arrays of strings containing hyphens registers an offense for arrays of single quoted strings auto-corrects an array with one element does not register an offense in an ambiguous block context does not register an offense for array containing non-string doesn't fail in wacky ways when multiple cop instances are used uses %W when autocorrecting strings with embedded newlines and tabs auto-corrects an array of words and character constants when the default external encoding is US-ASCII registers an offense for arrays of unicode word characters when the default external encoding is UTF-8 registers an offense for arrays of unicode word characters with a treacherous WordRegex configuration doesn't break when words contain whitespace doesn't break when words contain delimiters when PreferredDelimiters is specified autocorrects an array with delimiters with a custom WordRegex configuration registers an offense for arrays of email addresses with non-default MinSize does not autocorrects arrays of one symbol if MinSize > 1 with a WordRegex configuration which accepts almost anything uses %w for strings which only appear to have an escape uses %W when autocorrecting strings with non-printable chars when the WordRegex configuration is not a Regexp still parses the code without raising an error when EnforcedStyle is array does not register an offense for arrays of double quoted strings does not register an offense for arrays of strings with hyphens doesn't fail on strings which are not valid UTF-8 autocorrects a %w() array which uses single quotes does not register an offense for arrays of single quoted strings autocorrects a %W() array which uses escapes autocorrects a %W() array which uses string with hyphen autocorrects a %w() array which uses string with hyphen autocorrects a %W() array which uses string interpolation registers an offense for a %w() array doesn't fail with `encoding: binary RuboCop::Cop::Layout::EmptyLinesAroundModuleBody when EnforcedStyle is no_empty_lines registers an offense for module body ending with a blank registers an offense for module body starting with a blank autocorrects beginning and end when EnforcedStyle is empty_lines registers an offense for module body not ending with a blank accepts modules with an empty body registers an offense for module body not starting or ending with a blank autocorrects beginning and end when EnforcedStyle is empty_lines_except_namespace when only child is class registers offense for namespace body ending with a blank requires no empty lines for namespace registers offense for namespace body starting with a blank when has multiple child modules registers offenses for namespace body starting and ending without a blank requires empty lines for namespace when only child is module autocorrects beginning and end requires no empty lines for namespace registers offenses for namespaced module body not starting with a blank registers offense for namespace body ending with a blank registers offenses for namespaced module body not ending with a blank registers offense for namespace body starting with a blank when EnforcedStyle is empty_lines_special module with constant and child module registers and autocorrects the offenses module with empty body without empty line does NOT register offenses with empty line does NOT register offenses when first child is method requires blank line at the beginning and ending of module body when module has a namespace requires no empty lines for namespace but requires blank line at the beginning and ending of module body source without blank lines registers and autocorrects the offenses source with blank lines autocorrects the offenses source without blank lines registers an offense for module not beginning and ending with a blank line when first child is NOT a method 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 source with comment before method definition registers an offense for module beginning with a blank line when module has a namespace 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 source without blank lines registers and autocorrects the offenses source with constants registers and autocorrects the offenses source with blank lines registers and autocorrects the offenses source without blank lines registers an offense for module not ending with a blank line source with blank lines registers an offense for module beginning with a blank line module with only constants registers and autocorrects the offenses when namespace has multiple children requires empty lines for namespace RuboCop::Cop::Layout::AccessModifierIndentation when EnforcedStyle is set to outdent registers an offense and corrects private indented to method depth in singleton class accepts private def indented to method depth in a module accepts private with argument indented to method depth in a class accepts module fn with argument indented to method depth in a module registers an offense and corrects private indented to method depth in a module accepts private def indented to method depth in class defined with Class.new accepts private with argument indented to method depth in singleton class accepts private with argument indented to method depth in a module registers an offense and corrects private indented to method depth in class defined with Class.new accepts private def indented to method depth in singleton class accepts private def indented to method depth in a class accepts private with argument indented to method depth in module defined with Module.new accepts protected indented to the containing class indent level accepts private indented to the containing class indent level registers an offense and corrects private indented to method depth in module defined with Module.new accepts private with argument indented to method depth in class defined with Class.new accepts module fn def indented to method depth in a module registers an offense and corrects misaligned access modifiers in nested classes registers offense and corrects private indented to method depth in a class accepts private def indented to method depth in module defined with Module.new registers an offense and corrects module_function indented to method depth in a module when EnforcedStyle is set to indent accepts properly indented protected accepts properly indented private accepts indented access modifiers with arguments in nested classes registers an offense and corrects misaligned access modifiers in nested classes accepts methods with a body registers an offense and corrects correct + opposite alignment registers an offense and corrects misaligned private in class defined with Class.new accepts properly indented private in module defined with Module.new registers an offense and corrects access modifiers in arbitrary blocks (PENDING: Failing in Debian - needs investigation) registers an offense and corrects misaligned private in module registers an offense and corrects misaligned module_function in module registers an offense and corrects opposite + correct alignment registers an offense and corrects misaligned private registers an offense and corrects misaligned private in module defined with Module.new registers an offense and corrects misaligned protected registers an offense and corrects misaligned private in a singleton class accepts an empty class when 4 spaces per indent level are used accepts properly indented private when indentation width is overridden for this cop only accepts properly indented private RuboCop::Cop::Metrics::AbcSize when Max is 2 accepts two assignments when Max is 10.3 reports size and max as <10, 10, 40> 42.43/10.3 when Max is 1000.3 reports size and max as <1000, 1000, 4000> 4243/1000 when Max is 0 registers an offense for an assignment of a local variable treats safe navigation method calls like regular method calls + a condition registers an offense for a `define_method` registers an offense for an if modifier accepts an empty method registers an offense for an assignment of an element registers an offense for complex content including A, B, and C scores accepts an empty `define_method` when method is in list of ignored methods does not register an offense when defining an instance method does not register an offense when using `define_method` does not register an offense when defining a class method when Max is 100.321 reports size and max as <100, 100, 400> 424.3/100.3 when Max is 2.3 accepts a total score of 2.24 when Max is 1.3 reports size and max as <1, 1, 4> 4.24/1.3 RuboCop::Cop::Lint::NonLocalExitFromIterator allows return in define_method allows return in define_singleton_method allows return with value when the return is within a nested method definition allows return in an instance method definition allows return in a class method definition when block is followed by method chain and has single argument registers an offense and has no argument allows and has multiple arguments registers an offense when block in middle of nest is followed by method chain registers offenses when lambda is inside of block followed by method chain allows when block is lambda allows when block is not followed by method chain allows RuboCop::Config #patterns_to_include when config file has AllCops => Include key returns the Include value #for_department accepts a Symbol always returns the department's config #file_to_include? when the passed path matches any of patterns to include returns true when the passed path does not match any of patterns to include returns false #deprecation_check when there is no AllCops configuration does not yield when there is AllCops configuration if there are is an Includes key yields if there are is an Excludes key yields if there are no Excludes or Includes keys does not yield #validate when the configuration includes any unrecognized parameter prints a warning message when the configuration includes multiple valid enforced styles does not raise validation error when the configuration includes Lint/Syntax cop when the configuration does not match the default raises validation error when the configuration matches the default does not raise validation error when the configuration includes any unrecognized cop name raises an validation error when the configuration includes an invalid EnforcedStyle raises validation error when the configuration includes an obsolete EnforcedStyle parameter raises validation error when the configuration includes a valid EnforcedStyle does not raise validation error when the configuration includes an empty section raises validation error when the configuration includes obsolete parameters and cops raises validation error when the configuration includes a valid enforced style does not raise validation error when the configuration includes any common parameter does not raise validation error when the configuration includes an invalid enforced style raises validation error when the configuration includes the obsolete Style/IfUnlessModifier: MaxLineLength parameter raises validation error when the configuration includes an obsolete parameter raises validation error conflicting Safe settings when the configuration includes an unsafe cop that is explicitly declared to have a safe auto-correction raises validation error when the configuration includes an unsafe cop without a declaration of its auto-correction does not raise validation error when the configuration includes an obsolete cop raises validation error when the configuration includes multiple but config does not allow raises validation error when all cops are both Enabled and Disabled by default raises validation error when the configuration includes multiple valid enforced styles and one invalid style raises validation error when the empty section is AllCops raises validation error when the configuration is in the base RuboCop config folder is not validated when the configuration includes the obsolete Style/WhileUntilModifier: MaxLineLength parameter raises validation error when the configuration includes multiple invalid enforced styles raises validation error #check when a deprecated configuration is detected prints a warning message for the loaded path #make_excludes_absolute when config is in subdirectory generates valid absolute directory when config is in root directory generates valid absolute directory #patterns_to_exclude when config file has AllCops => Exclude key returns the Exclude value whether the cop is enabled when an entire cop department is enabled but an individual cop is disabled still disables the cop when an entire cop department is disabled but an individual cop is enabled still disables the cop when configuration has no mention of a cop enables the cop that is not mentioned when all cops are explicitly enabled by default enables the cop that is not mentioned when all cops are disabled by default disables the cop that is not mentioned when a cop has configuration but no explicit Enabled setting enables the cop by default #for_badge works if department has no config takes into account the department #possibly_include_hidden? returns true when Include config includes a toplevel dotfile returns true when Include config only includes regular paths returns true when Include config includes a regex returns true when Include config includes a dotfile in a path #file_to_exclude? when the passed path does not match any of patterns to exclude returns false when the passed path matches any of patterns to exclude returns true #allowed_camel_case_file? when the passed path does not match allowed camel case patterns to include is expected to equal false when the passed path is a gemspec is expected to equal true when the passed path matches allowed camel case patterns to include is expected to equal true RuboCop::Formatter::Colorizable #black invokes #colorize(string, black #blue invokes #colorize(string, blue #cyan invokes #colorize(string, cyan #magenta invokes #colorize(string, magenta #red invokes #colorize(string, red #white invokes #colorize(string, white #yellow invokes #colorize(string, yellow #green invokes #colorize(string, green #colorize when the global Rainbow.enabled is false and the formatter's output is a tty does nothing and the formatter's output is not a tty does nothing when the global Rainbow.enabled is true and output is not a tty, but --color option was provided colorizes the passed string and the formatter's output is not a tty does nothing and the formatter's output is a tty colorizes the passed string RuboCop::Cop::Style::Strip registers an offense for str.rstrip.lstrip registers an offense for str.lstrip.rstrip RuboCop::Cop::Style::WhenThen registers an offense for when x; accepts ; separating statements in the body of when when inspecting a case statement with an empty branch does not register an offense RuboCop::Cop::Style::CommentAnnotation accepts a keyword that is just the beginning of a sentence accepts upper case keyword alone accepts a comment that is obviously a code example accepts a keyword that is somewhere in a sentence accepts upper case keyword with colon, space and note missing space after colon registers an offense and adds space lower case keyword registers an offense and upcases capitalized keyword registers an offense and upcases upper case keyword with colon by no note registers an offense without auto-correction when a keyword is not in the configuration accepts the word without colon with configured keyword registers an offense for a missing colon after the word missing colon registers an offense and adds colon offenses in consecutive inline comments registers each of them RuboCop::Cop::Lint::UnifiedInteger when Integer when explicitly specified as toplevel constant does not register an offense without any decorations does not register an offense with MyNamespace does not register an offense when Bignum without any decorations registers an offense and autocorrects when explicitly specified as toplevel constant registers an offense with MyNamespace does not register an offense when Fixnum with MyNamespace does not register an offense without any decorations registers an offense and autocorrects when explicitly specified as toplevel constant registers an offense RuboCop::Cop::Layout::EmptyComment register offenses and correct multiple aligned empty comments next to code registers an offense and corrects using multiline empty comments does not register an offense when using comment text with leading and trailing blank lines registers an offense and corrects using an empty comment next to code register offenses and correct multiple empty comments next to code registers an offense and corrects using single line empty comment registers an offense and corrects an empty comment without space next to code does not register an offense when using comment text allow border comment (default) does not register an offense when using border comment allow margin comment (default) does not register an offense when using margin comment disallow border comment registers an offense and corrects using border comment registers an offense and corrects using single line empty comment disallow margin comment registers an offense and corrects using margin comment RuboCop::Cop::Style::PercentQLiterals when EnforcedStyle is lower_case_q with interpolation accepts single quotes accepts double quotes accepts %q accepts %Q without interpolation accepts %q accepts double quotes accepts single quotes registers offense for %Q with special characters accepts %Q accepts %q when EnforcedStyle is upper_case_q without interpolation accepts %Q registers offense for %q accepts double quotes accepts single quotes with special characters accepts %q accepts %Q with interpolation accepts double quotes accepts %q accepts %Q accepts single quotes RuboCop::Cop::Layout::EmptyLinesAroundAttributeAccessor does not registers an offense and corrects when using `if` ... `else` branches accepts code that separates a attribute accessor from the code with a newline accepts code when used in class definition registers an offense and corrects for code that immediately follows accessor accepts code when attribute method is method chained accepts code that separates attribute accessors from the code with a newline registers an offense and corrects for code that immediately follows accessor with comment when `AllowAliasSyntax: true` does not register an offense for code that immediately `alias` syntax after accessor when `AllowedMethods: private` does not register an offense for code that immediately ignored methods after accessor when `AllowedMethods: []` registers an offense for code that immediately ignored methods after accessor when `AllowAliasSyntax: false` registers an offense for code that immediately `alias` syntax after accessor RuboCop::Cop::Style::ExplicitBlockArgument registers an offense and corrects when `yield` inside block has no arguments does not register an offense when `yield` is not inside block registers an offense and corrects when block just yields its arguments registers an offense and corrects when method contains multiple `yield`s correctly corrects when the method call has a trailing comma in its argument list does not register an offense when `yield` is the sole block body correctly corrects when method already has an explicit block argument registers an offense and corrects when block yields several first its arguments does not register an offense when `yield` arguments is not a prefix of block arguments RuboCop::Cop::Generator #write_spec generates a helpful starting spec file with the class filled in refuses to overwrite existing files #write_source refuses to overwrite existing files generates a helpful source file with the name filled in #snake_case converts "Lint" to snake_case converts "RSpec" to snake_case converts "FooBar" to snake_case compliance with rubocop generates a cop file that has no offense (PENDING: Temporarily skipped with xit) generates a spec file that has no offense (PENDING: Temporarily skipped with xit) #inject_config with version provided uses the provided version when it is the first in alphabetical order inserts the cop when it is the last in alphabetical order inserts the cop when it is the middle in alphabetical order inserts the cop .new does not accept an unqualified cop #todo provides a checklist for implementing the cop RuboCop::Cop::Lint::BinaryOperatorWithIdenticalOperands does not register an offense when using binary operator with different operands registers an offense when binary operator has identical nodes does not register an offense when using arithmetic operator with numerics RuboCop::Cop::MessageAnnotator #urls returns an empty array if the reference url is blank returns reference url when it is specified returns style guide and reference url when they are specified returns an empty array without StyleGuide URL returns style guide url when it is specified returns multiple reference urls #annotate with options on returns an annotated message with default options returns the message when the output format is JSON returns the message unannotated with style guide url when a base URL is specified can accept relative paths if base has a full path combines correctly with a target-based setting can use a path-based setting does not specify a URL if a cop does not have one allows absolute URLs in the cop config when a department other than AllCops is specified returns style guide url when it is specified when StyleGuide is set in the config adds style guide url when StyleGuide is not set in the config does not add style guide url RuboCop::Cop::Layout::SpaceInLambdaLiteral when configured to enforce spaces registers an offense and corrects no space between -> and ( does not register an offense for no space between -> and { registers an offense and corrects no space in both lambdas when nested does not register an offense for multi-line lambdas does not register an offense for a space between -> and ( registers an offense and corrects no space in the inner nested lambda registers an offense and corrects no space in the outer nested lambda when configured to enforce no space register offenses and correct spaces in both lambdas when nested does not register an offense for a space between -> and { registers an offense and corrects a space between -> and ( does not register an offense for no space between -> and ( does not register an offense for multi-line lambdas registers an offense and corrects spaces between -> and ( registers an offense and corrects a space in the inner nested lambda registers an offense and corrects a space in the outer nested lambda RuboCop::Cop::Layout::RescueEnsureAlignment accepts correctly aligned rescue in assigned begin-end block accepts end being misaligned accepts rescue and ensure on the same line accepts correctly aligned ensure accepts the modifier form accepts correctly aligned rescue allows inline access modifier with public_class_method modifier rescue with def registers an offense correct alignment ensure with def correct alignment registers an offense rescue with defs registers an offense correct alignment ensure with defs registers an offense correct alignment with private_class_method modifier ensure with def registers an offense correct alignment rescue with def registers an offense correct alignment ensure with defs registers an offense correct alignment rescue with defs registers an offense correct alignment with private modifier ensure with defs registers an offense correct alignment rescue with defs correct alignment registers an offense ensure with def registers an offense correct alignment rescue with def correct alignment registers an offense rescue with module registers an offense when rescue used with module ensure with begin registers an offense when ensure used with begin >= Ruby 2.5 accepts aligned rescue in do-end block in a method accepts aligned rescue in do-end block assigned to class variable accepts aligned rescue do-end block assigned to local variable accepts aligned rescue in do-end block on multi-assignment accepts aligned rescue in assigned do-end block starting on newline accepts aligned rescue in do-end block assigned to global variable accepts aligned rescue in do-end block accepts aligned rescue in do-end block on or-assignment accepts aligned rescue in do-end block on and-assignment accepts aligned rescue in do-end block on operation assignment accepts aligned rescue in do-end block assigned to class accepts aligned rescue in do-end block assigned to instance variable rescue in do-end block on operation assignment registers an offense rescue in do-end block assigned to global variable registers an offense rescue in assigned do-end block starting on newline registers an offense rescue with do-end block registers an offense rescue in do-end block assigned to class registers an offense rescue in do-end block on or-assignment registers an offense rescue in do-end block assigned to local variable registers an offense rescue in do-end block assigned to class variable registers an offense rescue in do-end block on multi-assignment registers an offense rescue in do-end block on and-assignment registers an offense rescue in do-end block assigned to instance variable registers an offense rescue with defs registers an offense ensure with module registers an offense when ensure used with module rescue with begin registers an offense as RHS of assignment registers offense for incorrect alignment accepts multi-line, indented accepts multi-line, aligned rescue with class registers an offense when rescue used with class excluded file processes excluded files with issue ensure with def registers an offense ensure with defs registers an offense rescue with def registers an offense ensure with class registers an offense allows inline expression before ensure registers an offense rescue registers an offense RuboCop::Cop::Naming::MethodName when configured for camelCase registers an offense for mixed snake case and camel case in attr. registers an offense for camel case methods names in attr. registers an offense for mixed snake case and camel case in attr. registers an offense for capitalized camel case name in attr. registers an offense for capitalized camel case registers an offense for mixed snake case and camel case registers an offense for singleton upper case method without corresponding class accepts class emitter method in a module, even when it is defined inside another method accepts class emitter method in a module accepts one line methods accepts camel case in singleton method name registers an offense for snake case name in attr. registers an offense for correct + opposite accepts class emitter method in a class, even when it is defined inside another method accepts operator definitions accepts camel case in instance method name accepts class emitter method in a class accepts unary operator definitions accepts camel case names in attr. registers an offense for singleton snake_case method within class registers an offense for snake case in names when specifying `IgnoredPatterns` does not register an offense for snake case method name matching `IgnoredPatterns` does not register an offense for camel case method name in attr. does not register an offense for snake case method name in attr. does not register an offense for camel case method name matching `IgnoredPatterns` when configured for snake_case registers an offense for opposite + correct registers an offense for camel case method names in attr. registers an offense for capitalized camel case name in attr. registers an offense for singleton upper case method without corresponding class accepts operator definitions accepts snake case in names accepts class emitter method in a module, even when it is defined inside another method registers an offense for camel case methods names in attr. registers an offense for mixed snake case and camel case in attr. accepts snake case in attr. accepts class emitter method in a module registers an offense for camel case in singleton method name accepts unary operator definitions accepts one line methods registers an offense for mixed snake case and camel case in attr. registers an offense for singleton camelCase method within class accepts class emitter method in a class, even when it is defined inside another method registers an offense for mixed snake case and camel case accepts class emitter method in a class registers an offense for capitalized camel case registers an offense for camel case in instance method name when specifying `IgnoredPatterns` does not register an offense for camel case method name matching `IgnoredPatterns` does not register an offense for snake case method name in attr. does not register an offense for camel case method name in attr. does not register an offense for snake case method name matching `IgnoredPatterns` RuboCop::Cop::Lint::FormatParameterMismatch does not register an offense when single argument is a hash does not register an offense for format with splat argument does not register an offense when arguments and fields match registers an offense if extra argument for dynamic width not given correctly ignores double percent finds faults even when the string looks like a HEREDOC constants do not register offenses ignores percent right next to format string does not register an offense when using named parameters does not register an offense for sprintf with splat argument accepts an extra argument for dynamic width does not register an offense when using named parameters with escaped `%` does not register an offense when single argument is not an array registers an offense when calling Kernel.sprintf and the fields do not match does not register offense for `String#%` when arguments, fields match registers an offense when there are less arguments than expected does not register an offense argument is the result of a message send registers an offense when calling Kernel.format and the fields do not match registers offense with sprintf registers an offense for String#% identifies correctly digits for spacing in format registers an offense when there are more arguments than expected correctly parses different sprintf formats accepts an extra arg for dynamic width with other preceding flags on format with %<> interpolations and 1 argument does not register an offense and multiple arguments registers an offense behaves like variables does not register an offense for format called on a variable does not register an offense for format called on a variable does not register an offense for % called on a variable behaves like variables does not register an offense for % called on a variable does not register an offense for format called on a variable does not register an offense for format called on a variable with wildcard does not register an offense for width and precision does not register an offense for width does not register an offense for multiple wildcards does not register an offense for precision behaves like variables does not register an offense for % called on a variable does not register an offense for format called on a variable does not register an offense for format called on a variable when format is invalid registers an offense when using (digit)$ flag registers an offense when mismatch between the maximum value specified by (digit)$ flag and the number of arguments does not register an offense does not register an offense when match between the maximum value specified by (digit)$ flag and the number of arguments when format is not a string literal does not register an offense when passed an empty array does not register an offense behaves like variables does not register an offense for % called on a variable does not register an offense for format called on a variable does not register an offense for format called on a variable on format with %{} interpolations and multiple arguments registers an offense and 1 argument does not register an offense when multiple arguments are called for and a single send node is passed does not register an offense and a single variable argument is passed does not register an offense when splat argument is present does not register an offense when args count is less than expected when args count is more than expected registers an offense for `#format` registers an offense for `#sprintf` registers an offense for `#%` when argument itself contains format characters and formats in format string and argument are not equal ignores argument formatting behaves like variables does not register an offense for format called on a variable does not register an offense for % called on a variable does not register an offense for format called on a variable RuboCop::Cop::Cop will set custom severity if present will warn if custom severity is invalid will set default severity initially has 0 offenses will report registered offenses keeps track of offenses Registry #with_department has at least one cop per department returns 0 for an invalid type has each cop in exactly one type #departments is expected to include :Style is expected to include :Lint contains every value only once has departments with lint cops has right department has right name with style cops has right name has right department #safe_autocorrect? when auto-correction of the cop is declared unsafe is expected to equal false when safety is undeclared is expected to equal true when cop is declared unsafe is expected to equal false with no submodule has right department has right name setting of Offense#corrected attribute when cop does not support autocorrection is not specified (set to nil) when autocorrect is requested is not specified (set to nil) when disable_uncorrectable is enabled is set to true when cop supports autocorrection when autocorrection is not needed is set to false when offense was corrected is set to true when offense was not corrected because of an error is set to false #relevant_file? when the file is an anonymous source is expected to equal true when the file doesn't match the Include configuration is expected to equal false when the file matches the Include configuration is expected to equal true .qualified_cop_name returns the cop name in a different namespace if the provided namespace is incorrect returns the given cop name if it already has a namespace raises an error if the cop name is in more than one namespace (PENDING: Temporarily skipped with xit) returns the given cop name if it is not found in any namespace returns the given cop name if it already has a namespace even when the cop exists in multiple namespaces adds namespace if the cop name is found in exactly one namespace for a cop with a name registers offense with its name when disabled by a comment ignore_disable_comments is false will set offense as disabled ignore_disable_comments is true will not set offense as disabled #autocorrect? when the option is not given is expected to equal false when the option is given is expected to equal true when cop does not support autocorrection is expected to equal false when disable_uncorrectable is enabled is expected to equal true when the cop is set to not autocorrect is expected to equal false RuboCop::Cop::Style::RedundantConditional registers an offense for if/elsif/else with boolean results registers an offense for ternary with boolean results registers an offense for if/else with negated boolean results does not register an offense for if/else with non-boolean results registers an offense for if/else with boolean results registers an offense for ternary with negated boolean results does not register an offense for if/elsif/else with non-boolean results registers an offense for if/elsif/else with negated boolean results allows ternary with non-boolean results RuboCop::Cop::Style::EachWithObject ignores inject and reduce with passed in, but not returned hash finds inject and reduce with passed in and returned hash ignores inject and reduce passed in symbol correctly autocorrects ignores inject/reduce with assignment to accumulator param in block does not blow up for reduce with no arguments ignores inject and reduce with condition as body correctly autocorrects with return value only ignores inject and reduce with empty body when a simple literal is passed as initial value ignores inject/reduce RuboCop::Cop::Bundler::OrderedGems When gem groups is separated by multiline comment with TreatCommentsAsGroupSeparators: false registers an offense with TreatCommentsAsGroupSeparators: true accepts When a gem is sorted but not so when disregarding _- by default registers an offense when ConsiderPunctuation is true does not register an offense When the gemfile is empty does not register any offenses When a gem declaration takes several lines registers an offense When gems are alphabetically sorted does not register any offenses When a gem that starts with a capital letter is sorted does not register an offense When gems are not alphabetically sorted registers an offense When gems have an inline comment, and not sorted registers an offense When each individual group of line is sorted does not register any offenses When there are duplicated gems in group registers an offense When gems are asciibetically sorted irrespective of _ does not register an offense when a gem is referenced from a variable ignores the line resets the sorting to a new block When each individual group of line is not sorted registers some offenses When a gem that starts with a capital letter is not sorted registers an offense RuboCop::Cop::Style::OrAssignment when using var = if var; var; else; something; end registers an offense with global variables registers an offense with normal variables does not register an offense if any of the variables are different registers an offense with class variables registers an offense with instance variables when using var = var ? var : something registers an offense with class variables registers an offense with normal variables registers an offense with global variables registers an offense with instance variables does not register an offense if any of the variables are different when `then` branch body is empty registers an offense when using `elsif` statement does not register an offense when using var = something unless var registers an offense for normal variables registers an offense for global variables registers an offense for instance variables registers an offense for class variables does not register an offense if any of the variables are different when using unless var; var = something; end registers an offense for normal variables does not register an offense if any of the variables are different registers an offense for global variables registers an offense for instance variables registers an offense for class variables RuboCop::Cop::Style::IdenticalConditionalBranches on case without else doesn't register an offense on if..else with identical bodies registers an offense on case with identical leading lines registers an offense with empty brace does not raise any error on case with empty when doesn't register an offense on if..else with slightly different trailing lines doesn't register an offense on case with identical bodies registers an offense on if..else with identical leading lines registers an offense on if..else with identical trailing lines registers an offense when one of the case branches is empty does not register an offense on case with identical trailing lines registers an offense on if..elsif with no else doesn't register an offense RuboCop::Cop::Layout::MultilineMethodArgumentLineBreaks when many arguments are on multiple lines, two on same line registers an offense and corrects when two arguments are on next line does not add any offenses when argument starts on same line but ends on different line registers an offense and corrects when second argument starts on same line as end of first registers an offense and corrects when many arguments are on multiple lines, three on same line registers an offense and corrects when one argument on same line does not add any offenses when bracket hash assignment on multiple lines does not add any offenses when many arguments including hash are on multiple lines, three on same line registers an offense and corrects when bracket hash assignment key on multiple lines does not add any offenses RuboCop::Cop::Bundler::DuplicatedGem when investigating Gemfiles and the file is empty does not register any offenses and a gem is duplicated in default group registers an offense and no duplicate gems are present does not register any offenses and a duplicated gem is in a git/path/group/platforms block registers an offense when investigating Ruby files does not register any offenses RuboCop::Cop::Lint::StructNewOverride registers an offense using `Struct.new(...symbols)` registers an offense using `Struct.new(...)` with multiple overrides registers an offense using `Struct.new(symbol)` does not register an offense with no overrides does not register an offense with an override within a given block registers an offense using `::Struct.new(symbol)` registers an offense using `Struct.new(symbol, string)` registers an offense using `Struct.new(...)` with an option argument registers an offense using `Struct.new(string, ...symbols)` registers an offense using `Struct.new(...)` with a block RuboCop::Cop::Style::GlobalVars does not register an offense for built-in variable $LAST_MATCH_INFO does not register an offense for built-in variable $PREMATCH does not register an offense for built-in variable $DEFAULT_OUTPUT does not register an offense for built-in variable $: registers an offense for $custom does not register an offense for built-in variable $OFS does not register an offense for built-in variable $OUTPUT_FIELD_SEPARATOR does not register an offense for built-in variable $$ does not register an offense for built-in variable $-w does not register an offense for built-in variable $NR does not register an offense for built-in variable $-F does not register an offense for built-in variable $SAFE does not register an offense for built-in variable $CLASSPATH does not register an offense for built-in variable $< does not register an offense for built-in variable $~ does not register an offense for built-in variable $PID does not register an offense for built-in variable $FIELD_SEPARATOR does not register an offense for built-in variable $+ does not register an offense for built-in variable $-p does not register an offense for built-in variable $; does not register an offense for built-in variable $RS does not register an offense for built-in variable $-l does not register an offense for built-in variable $POSTMATCH does not register an offense for built-in variable $CHILD_STATUS does not register an offense for built-in variable $` does not register an offense for built-in variable $PROGRAM_NAME does not register an offense for built-in variable $> does not register an offense for built-in variable $INPUT_RECORD_SEPARATOR does not register an offense for built-in variable $ENV_JAVA does not register an offense for built-in variable $ERROR_INFO allows user permitted variables does not register an offense for built-in variable $-a does not register an offense for built-in variable $stdout does not register an offense for built-in variable $_ does not register an offense for built-in variable $ARGV does not register an offense for built-in variable $FS does not register an offense for backrefs like $1 does not register an offense for built-in variable $! does not register an offense for built-in variable $' does not register an offense for built-in variable $ORS does not register an offense for built-in variable $0 does not register an offense for built-in variable $& does not register an offense for built-in variable $-I does not register an offense for built-in variable $? does not register an offense for built-in variable $-i does not register an offense for built-in variable $DEFAULT_INPUT does not register an offense for built-in variable $stdin does not register an offense for built-in variable $\ does not register an offense for built-in variable $-0 does not register an offense for built-in variable $/ does not register an offense for built-in variable $" does not register an offense for built-in variable $-d does not register an offense for built-in variable $= does not register an offense for built-in variable $-v does not register an offense for built-in variable $LAST_READ_LINE does not register an offense for built-in variable $* does not register an offense for built-in variable $, does not register an offense for built-in variable $DEBUG does not register an offense for built-in variable $LOAD_PATH does not register an offense for built-in variable $OUTPUT_RECORD_SEPARATOR does not register an offense for built-in variable $stderr does not register an offense for built-in variable $ERROR_POSITION does not register an offense for built-in variable $LOADED_FEATURES does not register an offense for built-in variable $FILENAME does not register an offense for built-in variable $VERBOSE does not register an offense for built-in variable $JRUBY_REVISION does not register an offense for built-in variable $MATCH does not register an offense for built-in variable $@ does not register an offense for built-in variable $. does not register an offense for built-in variable $PROCESS_ID does not register an offense for built-in variable $IGNORECASE does not register an offense for built-in variable $JRUBY_VERSION does not register an offense for built-in variable $LAST_PAREN_MATCH does not register an offense for built-in variable $INPUT_LINE_NUMBER RuboCop::Cop::Lint::DuplicateCaseCondition accepts non-redundant case expressions with an else expression accepts non-redundant case expressions registers multiple offenses for multiple repeated case conditionals accepts trivial case expressions registers an offense for subsequent repeated case conditionals accepts similar but not equivalent && expressions registers multiple offenses for repeated multi-value condtionals registers an offense for repeated case conditionals registers an offense for repeated logical operator when expressions RuboCop::Cop::Layout::SpaceAroundEqualsInParameterDefault when EnforcedStyle is space accepts default value assignment with spaces and unary + operator registers an offense and corrects assigning empty string without space registers an offense and corrects assignment of empty list without space accepts default value assignment with space registers an offense and corrects default value assignment without space registers an offense and corrects missing space for arguments with unary operators when EnforcedStyle is no_space registers an offense and corrects default value assignment with space accepts default value assignment without space registers an offense and corrects assignment of empty string with space registers an offense and corrects assignment of empty list with space RuboCop::Cop::EnforceSuperclass registers an offense for single-line definitions registers an offense for models that subclass ::ActiveRecord::Base registers an offense for Class.new definition registers an offense for model defined using top-level registers an offense for models that subclass ActiveRecord::Base registers an offense for top-level constant ::Class.new definition when ApplicationRecord subclasses ActiveRecord::Base behaves like no offense registers no offenses for `ApplicationRecord = Class.new(::ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) ` behaves like no offense registers no offenses for `class ApplicationRecord < ActiveRecord::Base; end` behaves like no offense registers no offenses for `::ApplicationRecord = ::Class.new(::ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) do; end ` behaves like no offense registers no offenses for `ApplicationRecord = Class.new(ActiveRecord::Base) ` behaves like no offense registers no offenses for `class ::ApplicationRecord < ActiveRecord::Base; end` behaves like no offense registers no offenses for `::ApplicationRecord = Class.new(ActiveRecord::Base) do; end ` when MyModel subclasses ApplicationRecord behaves like no offense registers no offenses for `MyModel = Class.new(ApplicationRecord) do end MyModel = Class.new(ApplicationRecord) ` behaves like no offense registers no offenses for `class MyModel < ::ApplicationRecord; end` behaves like no offense registers no offenses for `class MyModel < ApplicationRecord; end` behaves like no offense registers no offenses for `MyModel = ::Class.new(::ApplicationRecord) do end MyModel = ::Class.new(::ApplicationRecord) ` RuboCop::TargetFinder #find(..., :only_recognized_file_types) does not find hidden files returns absolute paths when a file with a ruby filename is passed picks all the ruby files when same paths are passed does not return duplicated file paths when files with ruby interpreters are passed picks all the ruby files when no argument is passed finds files under the current directory when a pattern is passed finds files which match the pattern when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments includes them when a directory path is passed finds files under the specified directory when a hidden directory path is passed finds files under the specified directory when input is passed on stdin includes the file when a hidden directory path is passed finds files under the specified directory when a non-ruby file is passed doesn't pick the file when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments includes them when files with a ruby extension are passed picks all the ruby files when local AllCops/Include lists two patterns picks two files when a subdirectory AllCops/Include only lists one pattern picks two files when some paths are specified in the configuration Exclude and they are explicitly passed as arguments normally does not exclude them when it's forced to adhere file exclusion configuration excludes them #find(..., :all_file_types) returns absolute paths does not find hidden files when a directory path is passed finds files under the specified directory when a non-ruby file is passed picks the file when a file with a ruby filename is passed picks all the ruby files when no argument is passed finds files under the current directory when files with a ruby extension are passed picks all the ruby files when local AllCops/Include lists two patterns picks all the ruby files when a subdirectory AllCops/Include only lists one pattern picks all the ruby files when files with ruby interpreters are passed picks all the ruby files when a pattern is passed finds files which match the pattern when same paths are passed does not return duplicated file paths when a hidden directory path is passed finds files under the specified directory when input is passed on stdin includes the file when some non-known Ruby files are specified in the configuration Include and they are explicitly passed as arguments includes them when some paths are specified in the configuration Exclude and they are explicitly passed as arguments when it's forced to adhere file exclusion configuration excludes them normally does not exclude them when some non-known Ruby files are specified in the configuration Include and they are not explicitly passed as arguments includes them #find_files works also if a folder is named "," does not search excluded top level directories #target_files_in_dir picks files specified to be included in config picks files with extension .rb does not pick files with no extension and no ruby shebang does not pick files specified to be excluded in config does not pick directories picks ruby executable files with no extension w/ --fail-fast option works when an exception is raised while reading file and debug mode is enabled outputs error message and debug mode is disabled outputs nothing RuboCop::Formatter::WorstOffendersFormatter #finished when there are many offenses sorts by offense count first and then by cop name RuboCop::Cop::Layout::EndAlignment registers an offense for mismatched puts 1; while test end accepts matching puts 1; if ... end accepts matching puts 1; class ... end accepts matching module ... end auto-corrects mismatched puts 1; class Test end accepts matching class ... end accepts matching if ... end auto-corrects mismatched module Test end auto-corrects mismatched puts 1; unless test end accepts matching class ... end auto-corrects mismatched puts 1; while test end registers an offense for mismatched puts 1; unless test end can handle modifier if accepts matching case ... end registers an offense for mismatched puts 1; class Test end registers an offense for mismatched while test end registers an offense for mismatched until test end accepts matching while ... end auto-corrects mismatched while test end auto-corrects mismatched case a when b end can handle ternary if registers an offense for mismatched case a when b end accepts matching unless ... end registers an offense for mismatched puts 1; class Test end registers an offense for mismatched if test end auto-corrects mismatched puts 1; until test end accepts matching puts 1; case ... end registers an offense for mismatched puts 1; if test end registers an offense for mismatched module Test end auto-corrects mismatched puts 1; if test end auto-corrects mismatched if test end auto-corrects mismatched puts 1; class Test end auto-corrects mismatched puts 1; case a when b end accepts matching puts 1; until ... end registers an offense for mismatched unless test end registers an offense for mismatched puts 1; case a when b end accepts matching until ... end registers an offense for mismatched module Test end auto-corrects mismatched module Test end registers an offense for mismatched puts 1; until test end accepts matching puts 1; unless ... end accepts matching puts 1; module ... end auto-corrects mismatched until test end accepts matching puts 1; while ... end auto-corrects mismatched unless test end when EnforcedStyleAlignWith is variable accepts matching case ... end registers an offense for mismatched puts 1; until test end accepts matching until ... end accepts matching while ... end registers an offense for mismatched if test end auto-corrects mismatched if test end accepts matching puts 1; if ... end registers an offense for mismatched puts 1; class Test end auto-corrects mismatched puts 1; case a when b end auto-corrects mismatched class Test end auto-corrects mismatched until test end accepts matching if ... end auto-corrects mismatched puts 1; class Test end auto-corrects mismatched module Test end registers an offense for mismatched puts 1; module Test end accepts matching puts 1; class ... end auto-corrects mismatched case a when b end accepts matching puts 1; while ... end accepts matching class ... end registers an offense for mismatched puts 1; unless test end registers an offense for mismatched class Test end auto-corrects mismatched puts 1; until test end accepts matching puts 1; unless ... end registers an offense for mismatched module Test end registers an offense for mismatched puts 1; if test end registers an offense for mismatched until test end accepts matching module ... end registers an offense for mismatched puts 1; case a when b end accepts matching unless ... end accepts matching puts 1; until ... end accepts matching puts 1; case ... end auto-corrects mismatched unless test end auto-corrects mismatched while test end registers an offense for mismatched unless test end registers an offense for mismatched while test end auto-corrects mismatched puts 1; module Test end auto-corrects mismatched puts 1; while test end accepts matching puts 1; module ... end auto-corrects mismatched puts 1; if test end registers an offense for mismatched case a when b end auto-corrects mismatched puts 1; unless test end registers an offense for mismatched puts 1; while test end when end is preceded by something else than whitespace does not register an offense case as argument when EnforcedStyleAlignWith is start_of_line registers an offense for mismatched test case a when b end accepts matching test case a when b ... end auto-corrects mismatched test case a when b end when EnforcedStyleAlignWith is variable auto-corrects mismatched test case a when b end accepts matching test case ... end registers an offense for mismatched test case a when b end when EnforcedStyleAlignWith is keyword registers an offense for mismatched test case a when b end auto-corrects mismatched test case a when b end accepts matching test case ... end regarding assignment when EnforcedStyleAlignWith is variable accepts matching h.k = if ... end accepts matching a, b = if ... end auto-corrects mismatched a, b = if test end registers an offense for mismatched @@var << if test end registers an offense for mismatched @var = if test end registers an offense for mismatched var ||= if test end auto-corrects mismatched CNST = if test end auto-corrects mismatched var << unless test end auto-corrects mismatched @@var << if test end registers an offense for mismatched $var = if test end accepts matching var = until ... end registers an offense for mismatched var &&= if test end registers an offense for mismatched var = until test end.j registers an offense for mismatched CNST << if test end auto-corrects mismatched var = unless test end registers an offense for mismatched var = until test end accepts matching var = unless ... end auto-corrects mismatched var << case a when b end auto-corrects mismatched CNST << if test end auto-corrects mismatched var << until test end auto-corrects mismatched var = until test do_something end auto-corrects mismatched var &&= if test end registers an offense for mismatched var[x] = while test end accepts matching var << if ... end auto-corrects mismatched var << if test end auto-corrects mismatched h[k] = if test end accepts matching var ||= if ... end registers an offense for mismatched var << if test end auto-corrects mismatched h.k = if test end accepts matching var = while ... end registers an offense for mismatched CNST = if test end registers an offense for mismatched h[k] = if test end accepts matching var = if ... end registers an offense for mismatched var << until test end registers an offense for mismatched var = until test do_something end auto-corrects mismatched var = until test end auto-corrects mismatched var = # comment while test end registers an offense for mismatched var += if test end registers an offense for mismatched var = # comment while test end accepts matching var = until ... end auto-corrects mismatched var += if test end registers an offense for mismatched var = if test end accepts matching CNST = if ... end registers an offense for mismatched var = if test end accepts matching var = until ... end registers an offense for mismatched h.k = if test end auto-corrects mismatched @var << if test end registers an offense for mismatched var << case a when b end registers an offense for mismatched var = case a when b end registers an offense for mismatched h[k] << if test end registers an offense for mismatched var = unless test end auto-corrects mismatched var ||= if test end auto-corrects mismatched var = unless test end auto-corrects mismatched var = case a when b end accepts matching @var = if ... end accepts matching var &&= if ... end auto-corrects mismatched var = while test end accepts matching var = if ... end accepts matching @@var = if ... end registers an offense for mismatched a, b = if test end registers an offense for mismatched $var << if test end accepts matching var += if ... end registers an offense for mismatched var = unless test end auto-corrects mismatched @@var = if test end auto-corrects mismatched @var = if test end accepts matching h[k] = if ... end accepts matching $var = if ... end auto-corrects mismatched var = if test end auto-corrects mismatched $var << if test end auto-corrects mismatched $var = if test end accepts matching var = case ... end auto-corrects mismatched var = until test end.j registers an offense for mismatched @@var = if test end auto-corrects mismatched var[x] = while test end auto-corrects mismatched h[k] << if test end registers an offense for mismatched var << unless test end registers an offense for mismatched @var << if test end registers an offense for mismatched var = while test end auto-corrects mismatched var = if test end when EnforcedStyleAlignWith is keyword accepts matching var[0] = case ... end registers an offense for mismatched var << until test end registers an offense for mismatched var = unless test end accepts matching var = while ... end auto-corrects mismatched var = until test end auto-corrects mismatched var = if test end registers an offense for mismatched var = if test end auto-corrects mismatched var = unless test end accepts matching var = unless ... end accepts matching var = if ... end registers an offense for mismatched var = until test end auto-corrects mismatched var = while test end accepts matching var = until ... end accepts matching var = case ... end auto-corrects mismatched var << until test end registers an offense for mismatched var = while test end when EnforcedStyleAlignWith is start_of_line registers an offense for mismatched puts(if test end) accepts matching var << while ... end registers an offense for mismatched var = if test end registers an offense for mismatched case a when b end auto-corrects mismatched puts(if test end) accepts matching puts 1; until ... end auto-corrects mismatched var << unless test end auto-corrects mismatched var = if test end registers an offense for mismatched puts 1; while test end registers an offense for mismatched module Test end auto-corrects mismatched unless test end registers an offense for mismatched var = if test end accepts matching puts 1; case ... end auto-corrects mismatched puts 1; while test end auto-corrects mismatched var = while test end registers an offense for mismatched puts 1; if test end auto-corrects mismatched var = case a when b end registers an offense for mismatched var << while test end accepts matching puts 1; module ... end registers an offense for mismatched puts 1; until test end accepts matching var = while ... end registers an offense for mismatched var << until test end registers an offense for mismatched var = case a when b end auto-corrects mismatched puts 1; unless test end auto-corrects mismatched var << if test end registers an offense for mismatched puts 1; unless test end auto-corrects mismatched module Test end auto-corrects mismatched puts 1; case a when b end registers an offense for mismatched var = until test end accepts matching var = case ... end auto-corrects mismatched puts 1; if test end accepts matching puts 1; while ... end auto-corrects mismatched puts 1; module Test end registers an offense for mismatched puts 1; module Test end registers an offense for mismatched var << if test end registers an offense for mismatched unless test end accepts matching puts 1; if ... end auto-corrects mismatched if test end auto-corrects mismatched until test end registers an offense for mismatched var << case a when b end registers an offense for mismatched puts 1; case a when b end accepts matching puts 1; unless ... end registers an offense for mismatched class Test end auto-corrects mismatched puts 1; until test end auto-corrects mismatched var = until test end accepts matching var = if ... end accepts matching var = until ... end auto-corrects mismatched while test end registers an offense for mismatched while test end auto-corrects mismatched puts 1; class Test end auto-corrects mismatched var = if test end registers an offense for mismatched var = while test end auto-corrects mismatched var = unless test end registers an offense for mismatched var = unless test end auto-corrects mismatched var << until test end registers an offense for mismatched var << unless test end registers an offense for mismatched if test end auto-corrects mismatched class Test end auto-corrects mismatched case a when b end accepts matching var = unless ... end accepts matching puts 1; class ... end registers an offense for mismatched until test end auto-corrects mismatched var << while test end auto-corrects mismatched var << case a when b end registers an offense for mismatched puts 1; class Test end accepts matching var = if ... end correct + opposite registers an offense and corrects RuboCop::Cop::Naming::ConstantName registers an offense for snake case in const name does not check names if rhs is a method call with conditional assign registers an offense for camel case in const name checks qualified const names does not check names if rhs is a `Class.new` does not check names if rhs is a method call allows screaming snake case in const name registers an offense for camel case in const namewhen using frozen range assignment does not check names if rhs is a `Class.new` with conditional assign registers offenses for camel case in multiple const assignment does not check names if rhs is a method call with block does not check if rhs is another constant does not check if rhs is a non-offensive const assignment registers 1 offense if rhs is offending const assignment registers an offense for non-POSIX upper case in const name registers an offense for camel case in const namewhen using frozen object assignment does not check names if rhs is a `Struct.new` allows screaming snake case with POSIX upper case characters allows screaming snake case in multiple const assignment does not check names if rhs is a `Struct.new` with conditional assign when a rhs is a conditional expression when conditional branches contain a value other than a constant does not check names when conditional branches contain only string values registers an offense when conditional branches contain only constants does not check names RuboCop::Cop::Lint::BooleanSymbol does not register an offense when using `false` registers an offense when using `:false` registers an offense when using `:true` does not register an offense when using `true` does not register an offense when using regular symbol when using the new hash syntax registers an offense when using `key: :false` registers an offense when using `true:` registers an offense when using `false:` RuboCop::CLI does not register any offenses for an empty file finds a file with no .rb extension but has a shebang line registers an offense for a syntax error checks a given file with faults and returns 1 can process a file with an invalid UTF-8 byte sequence registers an offense for Parser warnings cops can exclude files based on config ignores excluded files when lines end with CR+LF reports an offense when given a file/directory that is not under the current dir and the Rakefile path is relative checks a Rakefile but Style/FileName does not report and the directory is relative checks a Rakefile but Style/FileName does not report and the Rakefile path is absolute checks a Rakefile but Style/FileName does not report and the directory is absolute checks a Rakefile but Style/FileName does not report configuration of target Ruby versions when configured with an unknown version fails with an error message when configured with an unsupported ruby fails with an error message style guide only usage via the config AllCops/DisabledByDefault when it is true runs only the cop configured in .rubocop.yml when it is false runs all cops that are enabled in default configuration AllCops/StyleGuideCopsOnly when it is true skips cops that have no link to a style guide when it is false runs cops for rules regardless of any link to the style guide via the cli option --only-guide-cops skips cops that have no link to a style guide runs cops for rules that link to a style guide overrides configuration of AllCops/StyleGuideCopsOnly unknown cop in configuration file is given prints the error and exists with code 2 when checking a correct file returns 0 when super is used with a block still returns 0 obsolete cops when configuration for TrailingComma is given fails with an error message when interrupted returns 130 configuration from file does not read files in excluded list ignores excluded files works when a cop that others depend on is disabled allows the default configuration file as the -c argument does not consider Include parameters in subdirectories works when a configuration file passed by -c specifies Exclude with regexp can disable parser-derived offenses with warning severity can be configured to merge a parameter that is a hash can use an alternative max line length from a config file uses the DefaultFormatter if another formatter is not specified can exclude a vendor directory indirectly fails when a configuration file specifies an invalid Severity prints an error message for an unrecognized EnforcedStyle shows an error if the input file cannot be found works when a configuration file specifies Severity for Metrics/ParameterLists and Layout prints a warning for an unrecognized configuration parameter can have different config files in different directories excludes the vendor directory by default displays style guide URLs if DisplayStyleGuide is true cannot disable Syntax offenses can exclude a typical vendor directory prefers a config file in ancestor directory to another in home matches included/excluded files correctly when . argument is given displays cop names if DisplayCopNames is false only reads configuration in explicitly included hidden directories works when a configuration file specifies Severity for Metrics/ParameterLists and Layout/LineLength can be configured with project config to disable a certain error can exclude a vendor directory with an erroneous config file works when a configuration file passed by -c specifies Exclude with strings fails when a configuration file has invalid YAML syntax finds included files can exclude directories relative to .rubocop.yml can be configured to override a parameter that is a hash in a special case can be configured with option to disable a certain error prints an error for an unrecognized cop name in .rubocop.yml when --force-default-config option is specified when no config file specified ignores config file when config file specified with -c ignores config file when MultilineMethodCallIndentation is used with aligned style and IndentationWidth parameter fails with an error message when configuration is taken from $HOME/.rubocop.yml handles relative excludes correctly when run from project root without using namespace can be configured with option to disable a certain error when a file inherits from a higher level inherits relative excludes correctly when configured for indented_internal_methods style indentation registers offense for normal indentation in module accepts indented_internal_methods style indentation registers offense for normal indentation in class when a value in a hash is overridden with nil acts as if the key/value pair was removed when MultilineOperationIndentation is used with aligned style and IndentationWidth parameter fails with an error message when obsolete MultiSpaceAllowedForOperators param is used displays a warning configuration of `require` unknown library is specified exits with 2 rubocop:disable comment can disable all cops on a single line can disable selected cops in a code section can disable selected cops on a single line can disable all cops in a code section Specify `--init` option to `rubocop` command when .rubocop.yml does not exist generate a .rubocop.yml file when .rubocop.yml already exists fails with an error message without using namespace can disable selected cops on a single line but prints a warning when --auto-correct-all is given does not trigger RedundantCopDisableDirective due to lines moving around when not necessary causes an offense to be reported and RedundantCopDisableDirective is disabled through department does not report RedundantCopDisableDirective offenses and RedundantCopDisableDirective is individually excluded does not report RedundantCopDisableDirective offenses and RedundantCopDisableDirective is individually disabled does not report RedundantCopDisableDirective offenses and there are no other offenses exits with error code when errors are raised while processing files due to bugs displays an error message to stderr RuboCop::Cop::Layout::TrailingEmptyLines when EnforcedStyle is final_blank_line accepts final blank line auto-corrects unwanted blank lines auto-corrects missing newline registers an offense for no final newline auto-corrects missing blank line registers an offense for multiple blank lines in an empty file auto-corrects unwanted blank lines in an empty file registers an offense for multiple trailing blank lines registers an offense for final newline when EnforcedStyle is final_newline registers an offense for no final newline after block comment auto-corrects unwanted blank lines in an empty file accepts final blank lines if they come after __END__ in empty file registers an offense for multiple blank lines in an empty file accepts final newline accepts an empty file auto-corrects even if some lines have space auto-corrects unwanted blank lines registers an offense for multiple trailing blank lines accepts final blank lines if they come after __END__ registers an offense for no final newline after assignment RuboCop::Cop::Layout::ElseAlignment accepts a ternary if with def/defs accepts an empty def body accepts an empty defs body when modifier and def are on the same line registers an offense for else not aligned with private accepts a correctly aligned body with if statement accepts a correctly aligned if/elsif/else/end accepts a one line if statement registers an offense for misaligned else accepts an if/else branches with rescue clauses accepts indentation after else when if is on new line after assignment registers an offense for misaligned elsif for a file with byte order mark accepts a correctly aligned if/elsif/else/end with assignment when alignment style is variable and end is aligned with keyword registers an offense for an if registers offenses for an if with setter registers an offense for an if with element assignment and end is aligned with variable accepts an if-elsif-else with end aligned with setter accepts an if/else accepts an if-else with end aligned with setter accepts an if/else with chaining after the end accepts an if/else with chaining with a block after the end accepts an if with end aligned with element assignment when alignment style is keyword by choice and end is aligned with keyword accepts an if/else in assignment accepts an until in assignment accepts an if in assignment accepts an if/else in assignment on next line accepts a while in assignment and end is aligned with variable registers an offense for an if with begin/rescue/else/ensure/end registers an offense for misaligned else accepts a correctly aligned else with def/rescue/else/end accepts a correctly aligned else registers an offense for misaligned else with def/rescue/else/ensure/end registers an offense for misaligned else accepts a correctly aligned else >= Ruby 2.5 ensure/rescue/else in Block Argument accepts a correctly aligned else registers an offense for misaligned else with unless registers an offense for misaligned else accepts an empty unless accepts a correctly aligned else in an otherwise empty unless with case accepts case without else accepts else aligned with when but not with case accepts correctly aligned case/when/else registers an offense for misaligned else >= Ruby 2.7 with case match accepts correctly aligned empty else accepts case match without else accepts correctly aligned case/when/else registers an offense for misaligned else RuboCop::Cop::Style::NumericLiterals ignores non-decimal literals registers an offense for an integer with misplaced underscore accepts short numbers without underscore autocorrects numbers with spaces between leading minus and numbers autocorrects negative floating-point numbers does not count a leading minus sign as a digit registers an offense for a long undelimited integer autocorrects numeric literal with exponent (large E) and dot accepts a short integer without underscore accepts long numbers with underscore autocorrects negative numbers handles numeric literal with exponent registers an offense for a float with a long undelimited integer part accepts integers with less than three places at the end autocorrects numeric literal with exponent and dot strict registers an offense for an integer with misplaced underscore RuboCop::Cop::Style::HashSyntax configured to enforce ruby19 style with SpaceAroundOperators disabled auto-corrects even if there is no space around => with SpaceAroundOperators enabled registers an offense when symbol keys have strings in them registers offense when keys start with an uppercase letter accepts hash rockets when symbol characters are not supported preserves quotes during autocorrection registers offense for hash rocket syntax when new is possible accepts hash rockets when keys have different types auto-corrects a missing space when hash is used as argument accepts an empty hash accepts new syntax in a hash literal registers an offense for hash rockets in method calls accepts new syntax in method calls registers an offense for mixed syntax when new is possible accepts hash rockets when symbol keys end with = auto-corrects even if it interferes with SpaceAroundOperators if PreferHashRocketsForNonAlnumEndingSymbols is true accepts hash rockets when symbols end with ? accepts hash rockets when symbols end with ! when using a return value uses `return` registers an offense and corrects when enclosed in parentheses registers an offense and corrects when not enclosed in parentheses if PreferHashRocketsForNonAlnumEndingSymbols is false registers an offense for hash rockets when symbols end with ? registers an offense for hash rockets when symbols end with ! configured to use hash rockets when symbol values are found registers an offense for hashes with elements on multiple lines accepts ruby19 syntax when no elements have symbol values in method calls accepts ruby19 syntax when no elements have symbol values accepts hash in ruby19 style with no symbol values auto-corrects to hash rockets when all elements have symbol value registers an offense when using hash rockets and no elements have a symbol value accepts an empty hash registers an offense when any element has a symbol value in method calls accepts both hash rockets and ruby19 syntax in the same code registers an offense when any element uses a symbol for the value configured to enforce hash rockets style registers an offense for 1.9 style in method calls accepts hash rockets in a hash literal registers an offense for mixed syntax registers offense for Ruby 1.9 style accepts an empty hash accepts hash rockets in method calls UseHashRocketsWithSymbolValues has no impact does not register an offense when there is a symbol value configured to enforce ruby 1.9 style with no mixed keys UseHashRocketsWithSymbolValues enabled auto-corrects to hash rockets when all elements have symbol value registers an offense when any element uses a symbol for the value accepts an empty hash registers an offense for hash rockets in method calls registers an offense when keys have different types and styles accepts new syntax in a hash literal accepts new syntax in method calls registers an offense when keys have whitespaces in them accepts new syntax when keys are interpolated string registers an offense for mixed syntax when new is possible registers offense for hash rocket syntax when new is possible registers an offense when keys start with a digit registers an offense when any element has a symbol value in method calls registers an offense when keys have special symbols in them accepts hash rockets when keys have different types UseHashRocketsWithSymbolValues disabled registers an offense for mixed syntax when new is possible registers offense for hash rocket syntax when new is possible accepts new syntax when keys are interpolated string accepts new syntax in a hash literal registers an offense when keys start with a digit registers an offense when keys have special symbols in them registers an offense when keys have whitespaces in them accepts an empty hash accepts hash rockets when keys have different types registers an offense when keys have different types and styles accepts new syntax in method calls registers an offense for hash rockets in method calls configured to enforce no mixed keys accepts new hash style registers an offense when keys have different types and styles accepts hash rockets when keys start with a digit accepts an empty hash accepts new syntax in a hash literal registers an offense when keys have special symbols and mix styles accepts hash rockets when keys have different types accepts new syntax in method calls accepts the hash rocket syntax when new is possible registers an offense when keys start with a digit and mix styles registers an offense when keys have whitespaces and mix styles auto-corrects mixed key hashes accepts hash rockets when keys have special symbols in them accepts hash rockets when keys have whitespaces in them accepts old hash rockets style accepts hash rockets in method calls registers an offense for mixed syntax when new is possible RuboCop::Cop::InternalAffairs::UselessMessageAssertion registers an offense for described_class::MSG in let registers an offense for specs that assert using the MSG does not register an offense for an assertion about the message RuboCop::Cop::Naming::MethodParameterName does not register offense for empty kwrestarg registers offense for offensive default parameter does not register for method without parameters does not register offense for empty restarg registers offense when parameter contains uppercase characters registers offense for offensive keyword parameters registers offense when parameter ends in number on class method can register multiple offenses in one method definition registers offense when parameter is less than minimum length does not register offense for valid parameter names does not register offense for valid keyword parameters does not register offense for valid default parameters registers offense when parameter ends in number does not register offense for valid parameter names on self.method when using argument forwarding does not register an offense with AllowedNames accepts specified block param names accepts underscore param names accepts param names prefixed with underscore registers unlisted offensive names with AllowNamesEndingInNumbers accept parameters that end in numbers with ForbiddenNames registers offense for parameter listed as forbidden accepts parameter that uses a forbidden name's letters RuboCop::Cop::Style::MultilineBlockChain accepts a chain of calls followed by a multi-line block accepts a multi-line block chained with calls on one line accepts a chain of blocks spanning one line with multi-line block chaining accepts a chain where the first block is single-line registers two offenses for a chain of three blocks registers an offense for a slightly more complicated case registers an offense for a chain where the second block is single-line registers an offense for a simple case RuboCop::Cop::Force #run_hook invokes a hook in all cops .force_name returns the class name without namespace RuboCop::Cop::Layout::SpaceAfterComma block argument commas without space behaves like ends with an item does auto-correction registers an offense behaves like trailing comma accepts the last comma inside hash braces when EnforcedStyle for SpaceInsideBlockBraces is no_space accepts no space between a comma and a closing brace behaves like common behavior accepts a space between a comma and a closing brace when EnforcedStyle for SpaceInsideBlockBraces is space registers an offense for no space between a comma and a closing brace behaves like common behavior accepts a space between a comma and a closing brace array index commas without space behaves like trailing comma accepts the last comma behaves like ends with an item registers an offense does auto-correction method call arg commas without space behaves like ends with an item does auto-correction registers an offense RuboCop::Cop::Lint::DeprecatedClassMethods prefer `File.exist?` over `File.exists?` does not register an offense for File.exist? registers an offense and corrects File.exists? registers an offense and corrects ::File.exists? prefer `block_given?` over `iterator?` registers an offense and corrects iterator? does not register an offense for block_given? does not register an offense for offensive method `iterator?`on other receivers prefer `Dir.exist?` over `Dir.exists?` registers an offense and corrects Dir.exists? does not register an offense for offensive method `exists?`on other receivers does not register an offense for Dir.exist? registers an offense and corrects ::Dir.exists? RuboCop::Cop::Style::TrailingCommaInHashLiteral with single line list of values when EnforcedStyleForMultiline is consistent_comma accepts empty literal accepts literal without trailing comma accepts single element literal without trailing comma registers an offense for trailing comma in a literal when EnforcedStyleForMultiline is no_comma accepts literal without trailing comma accepts empty literal accepts single element literal without trailing comma registers an offense for trailing comma in a literal when EnforcedStyleForMultiline is comma accepts literal without trailing comma accepts empty literal accepts single element literal without trailing comma registers an offense for trailing comma in a literal with multi-line list of values when EnforcedStyleForMultiline is consistent_comma registers an offense for no trailing comma accepts trailing comma after a heredoc accepts a multiline hash with pairs on a single line andtrailing comma accepts trailing comma accepts a multiline hash with a single pair and trailing comma when closing bracket is on same line as last value registers an offense for literal with no trailing comma when EnforcedStyleForMultiline is comma registers an offense for trailing comma in a comment accepts a multiline hash with a single pair and trailing comma registers an offense for no trailing comma accepts trailing comma after a heredoc accepts trailing comma when closing bracket is on same line as last value accepts literal with no trailing comma when EnforcedStyleForMultiline is no_comma registers an offense for trailing comma in literal accepts comma inside a heredoc parameters at the end accepts literal with no trailing comma accepts comma in comment after last value item RuboCop::Cop::Layout::FirstMethodArgumentLineBreak ignores arguments listed on a single line registers an offense and corrects hash arg spanning multiple lines ignores kwargs listed on a single line when the arguments are used in `super` registers an offense and corrects hash arg without a line break before the first pair ignores arguments without parens ignores methods without arguments args listed on the first line registers an offense and corrects using safe navigation operator registers an offense and corrects registers an offense and corrects using `super` RuboCop::Cop::Style::RescueStandardError explicit accepts rescue modifier when rescuing in a method definition accepts rescuing StandardError by itself accepts rescuing StandardError by itself, assigned to a variable accepts rescueing a single error other than StandardError accepts rescueing a single error other than StandardError, assigned to a variable accepts rescuing StandardError with other errors accepts rescuing StandardError with other errors, assigned to a variable when rescue is called without an error class registers an offense when the error is assigned to a variable registers an offense when rescuing in a begin block accepts rescuing a single error other than StandardErrorassigned to a variable accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing StandardError by itself accepts rescuing StandardError with other errors accepts rescuing a single error other than StandardError accepts rescuing StandardError by itself, assigned to a variable when calling rescue without an error class registers an offense when the error is assigned to a variable registers an offense implicit accepts rescue modifier when rescuing in a method definition accepts rescuing a single error other than StandardError, assigned to a variable accepts rescuing no error class, assigned to a variable accepts rescuing no error class accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing StandardError with other errors accepts rescuing a single error other than StandardError when rescuing StandardError by itself registers an offense when the error is assigned to a variable registers an offense when rescuing in a begin block accepts rescuing StandardError with other errors, assigned to a variable accepts rescuing a single error class other than StandardError accepts rescuing no error class, assigned to a variable accepts rescuing a single error class other than StandardError, assigned to a variable accepts rescuing StandardError with other errors accepts rescuing ::StandardError with other errors accpets rescuing no error class when rescuing StandardError by itself registers an offense with ::StandardError registers an offense when the error is assigned to a variable registers an offense with ::StandardError registers an offense RuboCop::Cop::Lint::NestedPercentLiteral registers no offense for nestings under percent registers offense for nested percent literals registers offense for repeated nested percent literals registers no offense for percents in the middle of literals registers no offense for percent modifier character in isolation registers no offense for array registers offense for multiply nested percent literals registers no offense for empty array when handling invalid UTF8 byte sequence registers no offense for array registers offense for nested percent literal RuboCop::Cop::Style::StringConcatenation registers an offense and corrects for string concatenation correctly handles strings with special characters does not register an offense when using `+` with all non string arguments registers an offense and corrects for string concatenation as part of other expression RuboCop::Cop::Naming::MemoizedInstanceVariableName EnforcedStyleForLeadingUnderscores: optional memoized variable matches method name does not register an offense without a leading underscore does not register an offense with a leading `_` for both names does not register an offense with a leading `_` for method name does not register an offense with a leading underscore EnforcedStyleForLeadingUnderscores: required registers an offense when it has leading `_` but names do not match does not register an offense with a leading `_` for both names registers an offense when names match but missing a leading _ with default EnforcedStyleForLeadingUnderscores => disallowed memoized variable after other code does not match method name registers an offense for a predicate method registers an offense for a bang method registers an offense memoized variable does not match method name during assignment registers an offense memoized variable matches method name does not registers an offense when method has leading `_` does not register an offense with a leading `_` for both names does not register an offense memoized variable matches method name for block does not register an offense memoized variable matches predicate method name does not register an offense memoized variable matches bang method name does not register an offense code follows memoized variable assignment does not register an offense instance variables in initialize methods does not register an offense memoized variable after other code does not register an offense non-memoized variable does not match method name does not register an offense memoized variable matches method name during assignment does not register an offense memoized variable does not match method name for block registers an offense memoized variable does not match method name registers an offense memoized variable does not match class method name registers an offense RuboCop::StringInterpreter .interpret handles extended unicode handles hex handles unicode handles octal behaves like simple escape handles \\f behaves like simple escape handles \\b behaves like simple escape handles \\t behaves like simple escape handles \\r behaves like simple escape handles \\n behaves like simple escape handles \\e behaves like simple escape handles \\s behaves like simple escape handles \\a behaves like simple escape handles \\n behaves like simple escape handles \\v RuboCop::Cop::Style::AsciiComments registers an offense for comments with mixed chars accepts comments with only ascii chars registers an offense for a comment with non-ascii chars when certain non-ascii chars are allowed accepts comment with allowed non-ascii chars registers an offense for comments with non-allowed non-ascii chars RuboCop::Formatter::QuietFormatter #report_summary when 2 offenses detected handles pluralization correctly when 2 offenses are corrected handles pluralization correctly when an offense is corrected prints about correction when a file inspected and no offenses detected handles pluralization correctly when no files inspected handles pluralization correctly when a offense detected handles pluralization correctly #report_file the file is under the current working directory prints as relative path the file is outside of the current working directory prints as absolute path when the offense is not corrected prints message as-is when the offense is automatically corrected prints [Corrected] along with message RuboCop::Cop::Layout::MultilineArrayBraceLayout ignores empty arrays ignores implicit arrays ignores single-line arrays when comment present before closing brace corrects closing brace without crashing behaves like multiline literal brace layout method argument when arguments to a method and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element but no comment after the last element autocorrects the closing brace behaves like multiline literal brace layout trailing comma symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element behaves like multiline literal brace layout heredoc detects heredoc structures that are safe to add to ignores heredocs that could share a last line auto-corrects safe heredoc offenses new_line style opening brace on same line as first element detects closing brace on same line as last element autocorrects closing brace on same line as last element allows closing brace on different line from last element detects closing brace on same line as last multiline element allows closing brace on different line from multi-line element opening brace on separate line from first element autocorrects closing brace on same line from last element detects closing brace on same line as last element allows closing brace on separate line from last multiline element allows closing brace on separate line from last element same_line style opening brace on same line as first element detects closing brace on different line from multiline element allows closing brace on same line from last element allows closing brace on same line as multi-line element autocorrects closing brace on different line as last element detects closing brace on different line from last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element detects closing brace on different line from last element allows closing brace on same line as last element autocorrects closing brace on different line from last element allows closing brace on same line as last multiline element symmetrical style opening brace on same line as first element autocorrects closing brace on different line from last element detects closing brace on different line from last element allows closing brace on same line as last multiline element allows closing brace on same line as last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element allows closing brace on separate line from last multiline element detects closing brace on same line as last element allows closing brace on separate line from last element autocorrects closing brace on same line from last element RuboCop::Cop::Lint::EnsureReturn does not register an offense for return outside ensure registers an offense and corrects for return in ensure registers an offense and corrects for return with argument in ensure does not check when ensure block has no body registers an offense when returning multiple values in `ensure` RuboCop::Cop::Naming::VariableName when configured for camelCase accepts camel case in class variable name registers an offense for camel case when invoking method args accepts screaming snake case constants registers an offense for snake case in method parameter registers an offense for rest arguments accepts camel case local variables marked as unused registers an offense for snake case in local variable name registers an offense for block arguments accepts camel case in instance variable name registers an offense for keyword rest arguments accepts camel case in local variable name accepts assigning to camel case constant accepts one symbol size local variables accepts screaming snake case globals registers an offense for keyword arguments registers an offense for default method arguments registers an offense for opposite + correct accepts assignment with indexing of self accepts local variables marked as unused when configured for snake_case accepts local variables marked as unused registers an offense for camel case in local variable name registers an offense for default method arguments registers an offense for camel case in class variable name accepts one symbol size local variables accepts screaming snake case constants registers an offense for method arguments registers an offense for rest arguments registers an offense for camel case when invoking method args registers an offense for camel case in instance variable name accepts assigning to camel case constant accepts assignment with indexing of self registers an offense for block arguments registers an offense for keyword rest arguments registers an offense for keyword arguments registers an offense for camel case local variables marked as unused accepts screaming snake case globals registers an offense for correct + opposite RuboCop::Cop::InternalAffairs::MethodNameEqual registers an offense when using `#method == other_node.do_something` does not register an offense when using `#method?` registers an offense when using `#method == :do_something` RuboCop::Cop::Style::Next doesn't reindent heredoc bodies when autocorrecting handles `then` when autocorrecting does not blow up on empty body until block allows empty blocks allows loops with conditions at the end with ternary op does not crash with empty brackets handles nested autocorrections does not crash with an empty body branch does not blow up on empty body while block keeps comments when autocorrecting does not blow up on empty body for block allows super nodes Invalid MinBodyLength fails with an error MinBodyLength: 3 accepts if whose body has 1 line behaves like iterators registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition reports an offense for if whose body has 3 lines registers an offense for if inside of select registers an offense for if inside of downto allows loops with if with else at the end registers an offense for if inside of each registers an offense for if inside of reject registers an offense for if inside of reject! auto-corrects a misaligned end registers an offense for if inside of nested iterators registers an offense for if inside of each_with_object registers an offense for if inside of for registers an offense for if inside of map registers an offense for if inside of nested iterators registers an offense for if inside of loop allows loops with conditional break registers an offense for if inside of collect allows loops with if with else, nested in another condition registers an offense for if inside of select! registers an offense for if inside of times allows loops with conditional return allows loops with if being the entire body with else EnforcedStyle: skip_modifier_ifs allows modifier if EnforcedStyle: always registers an offense for modifier if behaves like iterators registers an offense for unless inside of downto reports an offense for unless whose body has 3 lines registers an offense for unless inside of loop registers an offense for unless inside of times registers an offense for unless inside of collect registers an offense for unless inside of select registers an offense for a condition at the end of an iterator when there is more in the iterator than the condition registers an offense for unless inside of map registers an offense for unless inside of reject registers an offense for unless inside of each allows loops with conditional break registers an offense for unless inside of reject! registers an offense for unless inside of for allows loops with conditional return auto-corrects a misaligned end allows loops with unless being the entire body with else registers an offense for unless inside of each_with_object registers an offense for unless inside of nested iterators registers an offense for unless inside of nested iterators allows loops with unless with else at the end allows loops with unless with else, nested in another condition registers an offense for unless inside of select! EnforcedStyle: skip_modifier_ifs allows modifier unless EnforcedStyle: always registers an offense for modifier unless RuboCop::Cop::Lint::EmptyExpression when used in a condition registers an offense inside `elsif` registers an offense inside `case` registers an offense in the condition of a ternary operator registers an offense inside `if` registers an offense inside `when` registers an offense in the return value of a ternary operator when used as a return value registers an offense in the return value of a condition registers an offense in the return value of a method registers an offense in the return value of a case statement when used as a standalone expression registers an offense with nested empty expressions registers an offense when used as an assignment registers an offense for the assigned value RuboCop::Cop::Lint::ShadowedException multiple rescues registers an offense when a higher level exception is rescued before a lower level exception accepts rescuing a known exception after an unknown exceptions accepts rescuing a known exception between unknown exceptions registers an offense when a higher level exception is rescued before a lower level exception when there are multiple exceptions rescued in a group ignores expressions of non-const accepts rescuing custom exceptions in multiple rescue groups accepts rescuing exceptions in order of level with multiple exceptions in a group accepts many (>= 7) rescue groups accepts rescuing a known exception before an unknown exceptions registers an offense for two exceptions when there are multiple levels of exceptions in the same rescue accepts rescuing exceptions in order of level with multiple exceptions in a group with custom exceptions accepts rescuing exceptions in order of level registers an offense rescuing out of order exceptions when there is an ensure registers an offense rescuing Exception before an unknown exceptions last rescue does not specify exception class highlights range ending at rescue keyword exceptions from different ancestry chains accepts rescuing exceptions in another order accepts rescuing exceptions in one order splat arguments accepts splat arguments passed to multiple rescues registers an offense for splat arguments rescued after rescuing a known exception registers an offense for splat arguments rescued after rescuing Exception modifier rescue accepts rescue in its modifier form single rescue rescue a exception without causing constant name deprecation warning accepts rescue containing multiple same error code exceptions accepts rescuing a single exception that has an else accepts an empty rescue accepts rescuing a custom exception and a standard exception accepts rescuing a single exception registers an offense for the same exception multiple times accepts splat arguments passed to rescue accepts rescuing a single exception that is assigned to a variable accepts rescuing a multiple exceptions that are not ancestors that have an else accepts rescuing a single exception that has an ensure registers an offense rescuing Exception with any other error or exception accepts rescuing multiple custom exceptions registers an offense rescuing exceptions that are ancestors of each other accepts rescuing a single custom exception when there are multiple levels of exceptions in the same rescue registers an offense for two exceptions registers an offense for more than two exceptions RuboCop::Cop::Layout::LeadingEmptyLines accepts not having a blank line before a comment accepts not having a blank line before code registers an offense and corrects multiple new lines before a class registers an offense and corrects a new line before a comment registers an offense and corrects a new line before code allows an empty input allows blank lines without any comments or code accepts not having a blank line before a class registers an offense and corrects a new line before a class auto-correct in collaboration does not invoke conflicts with other cops RuboCop::Cop::Style::RedundantException accepts a fail with ::RuntimeError if it does not have 2 args reports an offense for a fail with ::RuntimeError.new reports an offense for a fail with RuntimeError accepts a fail with RuntimeError if it does not have 2 args accepts rescue w/ non redundant error reports an offense for a raise with RuntimeError and () reports an offense for a fail with RuntimeError.new reports an offense for a raise with RuntimeError reports an offense for a raise with ::RuntimeError.new reports an offense for a fail with ::RuntimeError.new reports an offense for a fail with RuntimeError.new reports an offense for a raise with ::RuntimeError.new accepts rescue w/ non redundant error accepts rescue w/ non redundant error accepts a raise with ::RuntimeError if it does not have 2 args reports an offense for a fail with RuntimeError and () reports an offense for a raise with RuntimeError.new reports an offense for a raise with ::RuntimeError accepts a raise with RuntimeError if it does not have 2 args reports an offense for a raise with RuntimeError.new reports an offense for a fail with ::RuntimeError accepts rescue w/ non redundant error reports an offense for a fail with ::RuntimeError and () reports an offense for a raise with ::RuntimeError and () RuboCop::Cop::Style::TrailingCommaInBlockArgs when `lambda` has multiple arguments registers an offense and corrects when a trailing comma isn't needed does not register an offense when more than one argument is present with no trailing comma do/end block format does not register an offense when a trailing comma is required does not register an offense when no arguments are present ignores commas in default argument strings does not register an offense when more than one argument is present with no trailing comma does not register an offense for default arguments does not register an offense for an empty block does not register an offense for keyword arguments preserves semicolons in block/local variables registers an offense when a trailing comma is not needed when `->` has multiple arguments does not registers an offense curly brace block format does not register an offense when a trailing comma is required does not register an offense for keyword arguments ignores commas in default argument strings registers an offense when a trailing comma is not needed does not register an offense when no arguments are present does not register an offense when more than one argument is present with no trailing comma does not register an offense for default arguments preserves semicolons in block/local variables RuboCop::Cop::Lint::DuplicateElsifCondition does not register an offense for non-repeated elsif conditions does not register an offense for partially repeated elsif conditions registers an offense for repeated elsif conditions registers an offense for subsequent repeated elsif conditions registers multiple offenses for multiple repeated elsif conditions RuboCop::CLI --disable-uncorrectable does not disable anything for cops that support autocorrect if a one-line disable statement doesn't fit adds before-and-after disable statement if one one-line disable statement fits adds it adds it when the cop supports autocorrect but does not correct the offense and there are two offenses of the same kind on one line adds a single one-line disable statement but there are more offenses on the line and they don't all fit adds both one-line and before-and-after disable statements RuboCop::Runner #run if a cop crashes does not call ResultCache#save if -s/--stdin is used with an offense returns false sends the offense to a formatter if there is an offense in an inspected file sends the offense to a formatter returns false if there are no offenses in inspected files returns true #run with cops autocorrecting each-other if there is an offense in an inspected file aborts because of an infinite loop #run when interrupted with SIGINT returns false RuboCop::Cop::Style::SingleArgumentDig dig over a variable as caller with single argument registers an offense and corrects unsuitable use of dig when using dig with splat operator does not register an offense with multiple arguments does not register an offense when without a receiver does not register an offense dig over literal with multiple arguments does not register an offense when using dig with splat operator does not register an offense with single argument registers an offense and corrects unsuitable use of dig RuboCop::Cop::Style::NilComparison configured with predicate preferred registers an offense for === nil registers an offense for == nil configured with comparison preferred registers an offense for nil? RuboCop::Cop::Lint::NestedMethodDefinition does not register offense for nested definition inside class_exec does not register offense for nested definition inside Class.new registers an offense for a nested singleton method definition registers an offense for a nested class method definition does not register offense for nested definition inside Struct.new does not register offense for nested definition inside module_eval does not register offense for nested definition inside Module.new does not register offense for definition of method on local var does not register offense for nested definition inside ::Class.new registers an offense for a nested method definition registers an offense for a nested method definition inside lambda does not register offense for nested definition inside ::Module.new does not register offense for nested definition inside instance_eval does not register an offense for a lambda definition inside method does not register offense for nested definition inside class shovel does not register offense for nested definition inside instance_exec does not register offense for nested definition inside ::Struct.new does not register offense for nested definition inside class_eval does not register offense for nested definition inside module_exec RuboCop::Cop::Naming::ClassAndModuleCamelCase allows module_parent method accepts CamelCase names is not fooled by qualified names registers an offense for underscore in class and module name custom allowed names does not register offense for multiple allowed names RuboCop::Formatter::TextUtil pluralize will pluralize negative quantities less than -1 will pluralize fractions will pluralize quantities greater than 1 will pluralize -1 will not pluralize 1 will change 0 to no when configured will not change 0 to no RuboCop::RakeTask running tasks exits when result is not 0 and fail_on_error is true will not error when result is not 0 and fail_on_error is false runs with default options uses the default formatter from .rubocop.yml if no formatter option is given allows nested arrays inside formatters, options, and requires runs with specified options if a block is given auto_correct runs with --auto-correct-all runs with with the options that were passed to its parent task defining tasks creates a rubocop task and a rubocop auto_correct task creates a named task and a named auto_correct task RuboCop::Formatter::SimpleTextFormatter #report_summary when a offense detected handles pluralization correctly when 2 offenses detected handles pluralization correctly when a file inspected and no offenses detected handles pluralization correctly when an offense is corrected prints about correction when 2 offenses are corrected handles pluralization correctly when no files inspected handles pluralization correctly #report_file when the offense is marked as todo prints [Todo] along with message when the offense is not corrected prints message as-is the file is under the current working directory prints as relative path when the offense is automatically corrected prints [Corrected] along with message the file is outside of the current working directory prints as absolute path RuboCop::Cop::Lint::FloatComparison registers an offense when comparing with float does not register an offense when comparing with float using epsilon registers an offense when comparing with float method that can return numeric and returns float registers an offense when comparing with float returning method registers an offense when comparing with arightmetic operator on floats registers an offense when comparing with method on float receiver does not register an offense when comparing with float method that can return numeric and returns integer RuboCop::Cop::Style::EmptyLiteral Empty String does not register an offense for String.new("top") registers an offense for String.new registers an offense for String.new() registers an offense for ::String.new does not register an offense for ::String.new("top") when double-quoted string literals are preferred registers an offense for String.new registers an offense for ::String.new when frozen string literals is enabled does not register an offense for String.new Empty Array does not register an offense for ::Array.new with block registers an offense for Array.new registers an offense for Array.new() does not register Array.new with block in other block registers an offense for ::Array.new auto-corrects Array.new in block in block does not register an offense for Array.new(3) does not registers an offense Array.new with block Empty Hash does not register an offense for Hash.new(3) registers an offense for ::Hash.new auto-correct changes Hash.new to {} and wraps it in parentheses when it is the only argument to super auto-correct Hash.new to {} as the only parameter to a method does not register an offense for Hash.new { block } auto-correct changes Hash.new to {} and wraps all arguments in parentheses when it is the first argument to super registers an offense for Hash.new() registers an offense for Hash.new does not register an offense for ::Hash.new(3) auto-corrects Hash.new in block auto-correct Hash.new to {} as the first parameter to a method auto-corrects Hash.new to {} in various contexts does not register an offense for ::Hash.new { block } RuboCop::Cop::Style::GuardClause does not report an offense if return is inside elsif registers an error with raise "error" in the else branch does not report an offense if next is inside if..elsif..else..end does not report an offense if next is inside elsif does not report an offense if raise "error" is inside elsif does not report an offense if break is inside elsif registers an offense when using `and return` in `else` branch registers an error with next in the if branch does not report an offense if raise "error" is inside if..elsif..else..end registers an error if non-control-flow branch has multiple lines registers an offense when using `and return` in `then` branch registers an error with break in the else branch doesn't report an offense if condition has multiple lines registers an error with return in the else branch registers an error if non-control-flow branch has multiple lines accepts a method whose body is a modifier if / unless does not report an offense if break is inside if..elsif..else..end doesn't register an error if condition has multiple lines registers an error with return in the if branch doesn't register an error if control flow expr has multiple lines registers an error with next in the else branch doesn't register an error if condition has multiple lines doesn't register an error if condition has multiple lines does not report an offense if body is if..elsif..end registers an error if non-control-flow branch has multiple lines does not report an offense if return is inside if..elsif..else..end registers an error with break in the if branch doesn't register an error if control flow expr has multiple lines doesn't register an error if condition has multiple lines doesn't register an error if control flow expr has multiple lines registers an error with raise "error" in the if branch doesn't register an error if control flow expr has multiple lines registers an offense when using `|| raise` in `then` branch accepts a method which body does not end with if / unless registers an error if non-control-flow branch has multiple lines registers an offense when using `|| raise` in `else` branch does not register an offense when assigning the result of a guard condition with `else` accepts a method with empty parentheses as its body accepts a method which body is if / unless with else with Metrics/MaxLineLength enabled registers an offense with non-modifier example code if too long for single line Invalid MinBodyLength fails with an error method in module registers an offense for singleton methods registers an offense for instance method MinBodyLength: 1 reports an offense for if whose body has 1 line with Metrics/MaxLineLength disabled registers an offense with modifier example code regardless of length behaves like reports offense reports an offense if method body is if / unless without else reports an offense if method body ends with if / unless without else behaves like reports offense reports an offense if method body is if / unless without else reports an offense if method body ends with if / unless without else MinBodyLength: 4 accepts a method whose body has 3 lines RuboCop::Cop::Style::Not parenthesizes when `not` is applied to or parenthesizes when `not` would change the meaning of a binary exp does not register an offense for ! parenthesizes when `not` is applied to a ternary op parenthesizes when `not` is applied to and auto-corrects "not" with ! uses the reverse operator when `not` is applied to a comparison registers an offense for not auto-corrects "not" followed by parens with ! RuboCop::Cop::Layout::EmptyLinesAroundAccessModifier EnforcedStyle is `only_before` does not register an offense when `end` immediately after private accepts blank line after public accepts missing blank line after protected registers an offense for blank line after private accepts missing blank line after private registers an offense for blank line after protected registers an offense for missing blank line before module_function does not register an offense when `end` immediately after protected registers an offense for missing blank line before public registers an offense for missing blank line before private accepts blank line after module_function registers an offense for missing blank line before protected EnforcedStyle is `around` ignores comment line before protected requires blank line when next line started with end accepts missing blank line when specifying a superclass that breaks the line ignores module_function with a right-hand-side condition accepts missing blank line when specifying a superclass that breaks the line accepts missing blank line when specifying a superclass that breaks the line accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line ignores protected inside a method call accepts missing blank line when at the end of specifying a superclass accepts missing blank line when at the beginning of class accepts missing blank line when at the beginning of class accepts missing blank line when specifying a superclass that breaks the line requires blank line after public requires blank line when next line started with end requires blank line after private accepts missing blank line when at the beginning of module requires blank line after, but not before, protected when at the beginning of class/module accepts missing blank line when at the beginning of module ignores public inside a method call accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line autocorrects blank line after #{access_modifier} with comment requires blank line after protected accepts missing blank line when at the beginning of sclass accepts missing blank line when at the end of specifying `self` requires blank line before module_function recognizes blank lines with DOS style line endings accepts missing blank line when at the end of specifying a superclass accepts missing blank line when at the end of block accepts missing blank line when at the end of block ignores private inside a method call ignores an accessor with the same name as private above a method definition ignores comment line before private accepts missing blank line when specifying `self` that breaks the line requires blank line after, but not before, private when at the beginning of class/module accepts missing blank line when specifying `self` that breaks the line ignores an accessor with the same name as public above a method definition ignores private deep inside a method call ignores public deep inside a method call accepts missing blank line when at the end of block requires blank line before protected recognizes blank lines with DOS style line endings accepts missing blank line when at the beginning of class requires blank line after, but not before, module_function when at the beginning of class/module ignores protected with a right-hand-side condition accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line ignores an accessor with the same name as protected above a method definition accepts missing blank line when at the end of specifying a superclass accepts missing blank line when at the end of specifying a superclass accepts missing blank line when at the end of block accepts missing blank line when specifying `self` that breaks the line accepts missing blank line when at the end of specifying `self` accepts missing blank line when at the beginning of module accepts missing blank line when at the beginning of module ignores module_function deep inside a method call requires blank line after, but not before, public when at the beginning of class/module requires blank line when next line started with end autocorrects blank line after #{access_modifier} with comment requires blank line when next line started with end accepts missing blank line when at the beginning of class ignores private with a right-hand-side condition ignores an accessor with the same name as module_function above a method definition accepts missing blank line when at the beginning of sclass autocorrects blank line after #{access_modifier} with comment requires blank line after module_function ignores comment line before module_function ignores module_function inside a method call requires blank line before public accepts missing blank line when at the beginning of sclass accepts missing blank line when at the beginning of filewhen specifying a superclass that breaks the line accepts missing blank line when at the beginning of sclass accepts missing blank line when at the end of specifying `self` ignores protected deep inside a method call accepts missing blank line when at the end of specifying `self` recognizes blank lines with DOS style line endings ignores public with a right-hand-side condition recognizes blank lines with DOS style line endings autocorrects blank line after #{access_modifier} with comment requires blank line before private ignores comment line before public accepts missing blank line when specifying `self` that breaks the line at the beginning of block for blocks defined with do accepts missing blank line requires blank line after, but not before, protected accepts missing blank line with arguments for blocks defined with {} accepts missing blank line with arguments accepts missing blank line at the beginning of block for blocks defined with do accepts missing blank line with arguments accepts missing blank line requires blank line after, but not before, public for blocks defined with {} accepts missing blank line accepts missing blank line with arguments at the beginning of block for blocks defined with do accepts missing blank line with arguments accepts missing blank line requires blank line after, but not before, private for blocks defined with {} accepts missing blank line accepts missing blank line with arguments at the beginning of block for blocks defined with {} accepts missing blank line accepts missing blank line with arguments for blocks defined with do accepts missing blank line with arguments requires blank line after, but not before, module_function accepts missing blank line RuboCop::Cop::Style::ClassVars registers an offense for class variable declaration does not register an offense for class variable usage registers an offense for class variable set in class registers an offense for class variable set on class receiver RuboCop::Cop::Layout::SpaceBeforeComma registers an offense and corrects method call arg with space before comma handles more than one space before a comma does not register an offense for no spaces before comma registers an offense and corrects array index with space before comma registers an offense and corrects block argument with space before comma RuboCop::Cop::Layout::FirstHashElementIndentation when hash is operand registers an offense and corrects incorrectly indented first pair registers an offense and corrects incorrectly indented } accepts correctly indented first pair when the HashAlignment style is separator for : registers an offense and corrects incorrectly indented } registers an offense and corrects incorrectly indented first pair with : accepts correctly indented first pair when hash is right hand side in assignment accepts single line hash accepts a first pair on the same line as the left brace accepts an empty hash accepts correctly indented first pair accepts several pairs per line registers an offense and corrects incorrectly indented first pair when indentation width is overridden for this cop accepts correctly indented first pair registers an offense and corrects incorrectly indented first pair when the HashAlignment style is separator for => registers an offense and corrects incorrectly indented } accepts correctly indented first pair registers an offense and corrects incorrectly indented first pair with => when hash is method argument and arguments are surrounded by parentheses and EnforcedStyle is special_inside_parentheses accepts normal indentation for hash within hash accepts special indentation for second argument accepts special indentation for first argument registers an offense and corrects 'align_braces' indentation registers an offense and corrects 'consistent' indentation when using safe navigation operator registers an offense and corrects 'consistent' indentation and EnforcedStyle is consistent accepts normal indentation for first argument accepts normal indentation for second argument registers an offense and corrects incorrect indentation and argument are not surrounded by parentheses accepts braceless hash registers an offense for incorrectly indented multi-line hash with braces accepts a correctly indented multi-line hash with braces accepts single line hash with braces when hash is argument to setter registers an offense and corrects incorrectly indented first pair accepts correctly indented first pair when EnforcedStyle is align_braces accepts several pairs per line accepts an empty hash accepts single line hash registers an offense and corrects incorrectly indented } accepts correctly indented first pair accepts a first pair on the same line as the left brace when 'special_inside_parentheses' style is used registers an offense and corrects incorrect indentation when 'consistent' style is used registers an offense and correcs incorrect indentation RuboCop::ResultCache cached result that was saved with no command line option when --format is given is valid and can be loaded when --display-cop-names is given is invalid when a cache source is read has utf8 encoding when --only is given is invalid when offenses are saved by autocorrect run serializes them with :uncorrected status when no option is given is valid and can be loaded when file contents have changed is invalid when a symlink is present in the cache location and symlink attack protection is disabled permits caching and prints no warning and symlink attack protection is enabled prevents caching and prints a warning when file permission have changed is invalid when team external_dependency_checksum is the same is valid when team external_dependency_checksum changes is invalid when end of line characters have changed is invalid the cache path when CacheRootDirectory is set contains the given root when CacheRootDirectory not set and XDG_CACHE_HOME is not set contains $HOME/.cache and XDG_CACHE_HOME is set contains the given path and UID #save when the @path is not writable behaves like invalid cache location doesn't raise an exception behaves like invalid cache location doesn't raise an exception when the default internal encoding is UTF-8 writes non UTF-8 encodable data to file with no exception .cleanup removes the oldest files in the cache if needed RuboCop::Cop::Style::SignalException when enforced style is `raise` registers an offense for `fail` with `Kernel` as explicit receiver registers an offense for fail in begin section accepts `fail` if a custom `fail` singleton method is defined accepts `fail` with explicit receiver registers an offense for fail in def body registers an offense for fail in rescue section accepts `fail` if a custom `fail` instance method is defined when enforced style is `fail` registers an offense for `raise` with `Kernel` as explicit receiver registers an offense for raise in begin section registers an offense for raise in def body registers an offense for raise in rescue section accepts `raise` with explicit receiver when enforced style is `semantic` registers an offense for `raise` and `fail` with `::Kernel` as explicit receiver registers one offense for each raise registers an offense for raise in begin section registers an offense for fail in rescue section accepts raise in def rescue section is not confused by nested begin/rescue accepts `raise` and `fail` with explicit receiver accepts raise in rescue section registers an offense for raise in def body registers an offense for fail in def rescue section registers an offense for raise not in a begin/rescue/end accepts raise in def with multiple rescues registers only offense for one raise that should be fail registers an offense for fail in second rescue registers an offense for `raise` and `fail` with `Kernel` as explicit receiver RuboCop::Cop::Layout::ClosingParenthesisIndentation accepts begin nodes that are not grouped expressions for method definitions with line break before 1st parameter accepts a correctly aligned ) registers an offense for misaligned ) with no line break before 1st parameter accepts a correctly aligned ) accepts empty () registers an offense for misaligned ) for method chains can handle multiple chains with differing breaks registers an offense and corrects method chains when using safe navigation operator registers an offense and corrects misaligned ) for grouped expressions with no line break before 1st operand registers an offense for misaligned ) accepts ) that does not begin its line accepts a correctly aligned ) with line break before 1st operand accepts a correctly aligned ) registers an offense for misaligned ) for method assignments with indented parameters without arguments accepts a correctly aligned ) against ( accepts empty () registers an offense for misaligned ) can handle indentation up against the left edge can handle indentation up against the method with no line break before 1st parameter can handle indentation up against the left edge can handle hash arguments that are not broken over lines can handle inner method calls accepts a correctly aligned ) can handle individual arguments that are broken over lines accepts a correctly indented ) registers an offense for misaligned ) with line break before 1st parameter accepts a correctly aligned ) registers an offense for misaligned ) for method calls with line break before 1st parameter accepts a correctly aligned ) registers an offense for misaligned ) without arguments accepts empty () accepts a correctly aligned ) against ( can handle indentation up against the left edge with no line break before 1st parameter registers an offense and corrects misindented ) when ) is aligned with the params accepts a correctly aligned ) accepts a correctly indented ) accepts a correctly indented ) inside a block registers an offense for misaligned ) with first multiline arg on new line accepts ) on the same level as ( with second arg on new line accepts ) on the same level as ( with args on same line RuboCop::Cop::Style::LineEndConcatenation accepts string concat at line end when % literals are involved registers an offense for dynamic string concat at line end accepts string concat with a return value of method on a string registers offenses only for the appropriate lines in chained concats registers multiple offenses when there are chained concatenationscombined with << calls registers an offense for dynamic string concat with << at line end accepts string concat at line end when followed by comment autocorrects a + with trailing whitespace to \ accepts string concat at line end when followed by a comment line registers multiple offenses when there are chained << methods accepts string concat with a return value of method on an interpolated string autocorrects a + with \ to just \ accepts string concat at line end for special strings like __FILE__ accepts string concat on the same line registers an offense for string concat with << and \ at line ends registers multiple offenses when there are chained concatenations registers an offense for string concat with << at line end registers an offense for string concat at line end autocorrects only the lines that should be autocorrected RuboCop::Cop::Style::OptionalArguments allows methods with multiple optional arguments at the end allows methods with only one optional argument allows methods with only required arguments registers an offense for each optional argument when multiple optional arguments are followed by a required argument allows methods with only optional arguments allows methods without arguments registers an offense when an optional argument is followed by a required argument allows methods with only one required argument named params required params allows optional arguments to come before a mix of required and optional named argument registers an offense for optional arguments that come before required arguments where there are name arguments allows optional arguments before required named arguments with default values allows optional arguments before an optional named argument RuboCop::Cop::Layout::FirstArrayElementIndentation when EnforcedStyle is align_brackets registers an offense and corrects incorrectly indented ] accepts multi-assignments with brackets accepts an empty array accepts single line array accepts correctly indented first element accepts several elements per line accepts a first element on the same line as the left bracket accepts multi-assignments with no brackets when 'consistent' style is used registers an offense and corrects incorrectly indented 1st element registers an offense and corrects incorrect indentation when 'special_inside_parentheses' style is used registers an offense and corrects incorrect indentation when indentation width is overridden for this cop accepts correctly indented first element registers an offense and corrects indentation that does not match IndentationWidth when array is argument to setter registers an offense and corrects incorrectly indented first element accepts correctly indented first element when array is right hand side in assignment accepts a first element on the same line as the left bracket registers an offense and corrects incorrectly indented first element accepts several elements per line accepts multi-assignments with brackets accepts single line array accepts multi-assignments with no brackets accepts correctly indented first element accepts an empty array when array is method argument and argument are not surrounded by parentheses registers an offense and corrects incorrectly indented multi-line array with brackets accepts bracketless array accepts a correctly indented multi-line array with brackets accepts single line array with brackets and arguments are surrounded by parentheses and EnforcedStyle is special_inside_parentheses registers an offense and corrects 'consistent' indentation accepts normal indentation for array within array registers an offense and corrects 'align_brackets' indentation accepts special indentation for second argument accepts special indentation for first argument when using safe navigation operator registers an offense and corrects 'consistent' indentation and EnforcedStyle is consistent accepts normal indentation for first argument registers an offense and corrects incorrect indentation accepts normal indentation for second argument when array is operand registers an offense and corrects incorrectly indented ] registers an offense and corrects incorrectly indented first element accepts correctly indented first element when indentation width is overridden for this cop registers an offense and corrects incorrectly indented 1st element accepts correctly indented first element RuboCop::Cop::Lint::ShadowedArgument block argument shadowing when multiple arguments are shadowed and one of them shadowed within a lambda while another is shadowed outside registers an offense when a block local variable is assigned but no argument is shadowed accepts when a single argument is shadowed registers an offense and the argument is not used accepts when binding is used registers an offense when IgnoreImplicitReferences config option is set to true accepts and shadowed within a block registers an offense without specifying where the reassignment took place and the block is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and was used before shadowing accepts and the block is nested within a block registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the block occurs after the reassignment registers an offense and the argument was not shadowed outside the block accepts and shadowed within a conditional registers an offense without specifying where the reassignment took place and the argument was not shadowed outside the conditional accepts and was used before shadowing accepts and the conditional occurs after the reassignment registers an offense and the conditional is nested within a lambda registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the conditional is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts when zsuper is used accepts method argument shadowing when multiple arguments are shadowed and one of them shadowed within a lambda while another is shadowed outside registers an offense when a single argument is shadowed registers an offense when argument was used in shorthand assignment does not register an offense and the argument is not used accepts and shadowed within a conditional registers an offense without specifying where the reassignment took place and the conditional is nested within a lambda registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the conditional is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the argument was not shadowed outside the conditional accepts and was used before shadowing accepts and the conditional occurs after the reassignment registers an offense when reassigning to splat variable does not register an offense and shadowed within a block registers an offense without specifying where the reassignment took place and the block is nested within a block registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts and the argument was not shadowed outside the block accepts and the block occurs after the reassignment registers an offense and was used before shadowing accepts and the block is nested within a conditional registers an offense without specifying where the reassignment took place and the argument was used before shadowing accepts when binding is used registers an offense when IgnoreImplicitReferences config option is set to true accepts when zsuper is used registers an offense when argument was shadowed by zsuper registers an offense when IgnoreImplicitReferences config option is set to true accepts when argument was shadowed by zsuper does not register an offense when a splat argument is shadowed registers an offense RuboCop::Cop::Naming::AsciiIdentifiers when AsciiConstants is true does not get confused by a byte order mark registers an offense for a variable name with non-ascii chars does not get confused by an empty file registers an offense for a constant name with non-ascii chars registers an offense for a variable name with mixed chars accepts identifiers with only ascii chars when AsciiConstants is false does not get confused by a byte order mark registers an offense for a variable name with mixed chars accepts constants with only ascii chars does not get confused by an empty file accepts identifiers with only ascii chars registers an offense for a variable name with non-ascii chars RuboCop::Cop::Style::ClassCheck when enforced style is is_a? registers an offense for kind_of? and corrects to is_a? when enforced style is kind_of? registers an offense for is_a? and corrects to kind_of? RuboCop::Cop::Lint::RescueException does not register an offense for rescue with no class and => e does not register an offense for rescue with other class does not register an offense for rescue with no class does not register an offense for rescue with other classes registers an offense for rescue with StandardError, Exception registers an offense for rescue from Exception registers an offense for rescue with ::Exception does not crash when the namespace of a rescued class is in a local variable registers an offense for rescue with Exception => e does not crash when the splat operator is used in a rescue does not register an offense for rescue with a module prefix RuboCop::Cop::Metrics::ModuleLength accepts empty modules reports the correct beginning and end lines accepts a module with 5 lines does not count blank lines rejects a module with more than 5 lines accepts a module with less than 5 lines when `CountAsOne` is not empty folds array into one line when CountComments is enabled also counts commented lines when a module has inner classes does not count lines of inner classes rejects a module with 6 lines that belong to the module directly when inspecting a class defined with ::Module.new registers an offense when inspecting a class defined with Module.new registers an offense when a module has inner modules rejects a module with 6 lines that belong to the module directly does not count lines of inner modules RuboCop::Cop::Lint::UselessAssignment when a block local variable is assigned and unreferenced registers offenses for the assignment when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand referenced after the branching accepts when a splat method argument is not used accepts when a keyword splat method argument is used accepts when a variable is assigned and unreferenced in a method registers an offense when a named capture is unreferenced in other than top level registers an offense when there's an unreferenced reassignment in a if branch while the variable is referenced in the paired elsif branch registers an offense for the reassignment in the if branch when a variable is reassigned multiple times in rescue with ensure then referenced after the begin registers an offense when a variable is assigned in loop body and referenced in post until condition accepts when an unreferenced variable is reassigned and re-referenced registers an offense for the unreferenced assignment when an unreferenced variable is reassigned in a block accepts when a variable is reassigned multiple times in main body of begin then referenced in ensure accepts when a variable is reassigned multiple times in main body of begin then referenced after the begin accepts when a variable is reassigned with logical operator assignment and referenced accepts when a method argument is reassigned and zero arity super is called accepts when a variable that has same name as outer scope variable is not referenced in a method defined in loop registers an offense when an assignment in a if branch is referenced in another if branch accepts when a named capture is unreferenced in top level registers an offense when a named capture is referenced accepts when a variable is assigned with ||= at the last expression of the scope registers an offense when a unreferenced variable is reassigned on the left side of && and referenced after the && registers an offense for the unreferenced assignment when a optional keyword method argument is not used accepts when a variable is assigned and unreferenced in a class subclassing another class stored in local variable registers an offense when a variable is assigned in branch of modifier if that references the variable in its conditional clauseand unreferenced registers an offense when a variable is assigned in loop body and unreferenced registers an offense when a keyword splat method argument is not used accepts when a local variable is unreferenced and zero arity super is called registers an offense when a referenced variable is reassigned but not re-referenced in a method defined in loop registers an offense when a variable is assigned and unreferenced in a module registers an offense when a variable is assigned in loop body and referenced in post while condition accepts when an anonymous keyword splat method argument is defined accepts when an optional method argument is not used accepts when a variable is assigned and assigned again in a modifier condition accepts with parentheses accepts without parentheses when a variable is reassigned with binary operator assignment and referenced accepts when a variable is reassigned multiple times in ensure with rescue then referenced after the begin registers an offense when a referenced variable is reassigned in a block accepts when a variable is assigned in each branch of if and referenced in the else branch registers an offense for the assignment in the if branch when a variable is assigned in single branch if and unreferenced registers an offense when a unreferenced variable is reassigned on the right side of && and referenced after the && accepts when a block argument is not used accepts when a variable is reassigned with multiple assignment while referencing itself in rhs and referenced accepts when a variable is reassigned in single branch if and referenced in the branch registers an offense for the unreferenced assignment similar name suggestion when there's a similar variable-like method invocation suggests the method name when there's a similar variable suggests the variable name when there's a similar name but it's in inner scope does not suggest any name when there's a similar method invocation with arguments does not suggest any name when there are only less similar names does not suggest any name when there's a similar method invocation with explicit receiver does not suggest any name when a variable is assigned while being passed to a method taking block and the variable is used accepts and the variable is not used registers an offense when a variable is assigned in main body of begin with rescue but unreferenced registers an offense when a variable is assigned in 2 identical if branches doesn't think 1 of the 2 assignments is useless when a variable is assigned and unreferenced in top level registers an offense when a variable is assigned with operator assignment in rescue and would be referenced with retry accepts when a variable is reassigned in a loop post while loop accepts while loop accepts for loop accepts post until loop accepts until loop accepts when a variable is assigned on each side of && and referenced after the && accepts when there's an unreferenced reassignment in a if branch while the variable is referenced in a case branch in the paired else branch registers an offense for the reassignment in the if branch when a method argument is reassigned but not passed to super registers an offense when a variable is assigned and unreferenced in a class registers an offense when a variable is assigned with ||= before the last expression of the scope registers an offense when there's an unreferenced assignment in top level if branch while the variable is referenced in the paired else branch registers an offense for the assignment in the if branch when a setter is invoked with operator assignment in loop body accepts when a variable is reassigned in loop body but won't be referenced either next iteration or loop condition registers an offense (PENDING: Requires an advanced logic that checks whether the return value of an operator assignment is used or not.) when a variable is reassigned and unreferenced in a if branch while the variable is referenced in the paired else branch registers an offense for the reassignment in the if branch when a rescued error variable is wrongly tried to be referenced in another rescue body registers an offense when a variable is assigned with operator assignment in top level registers an offense when a variable is referenced in rhs of named capture expression accepts when a variable is not used and the name starts with _ accepts when a variable is assigned first with ||= and referenced accepts when a referenced variable is reassigned but not re-referenced registers an offense for the non-re-referenced assignment when a variable is assigned and passed to a method followed by method taking block accepts when a block local variable is declared but not assigned accepts when a variable is assigned in begin and referenced outside accepts when a block method argument is not used accepts when a variable is reassigned while referencing itself in rhs and referenced accepts when a variable is shadowed by a block argument and unreferenced registers an offense when a variable is assigned in main body of begin, rescue and else then referenced after the begin accepts when a method argument is not used accepts when a variable is reassigned multiple times in rescue and referenced after the begin registers an offense when a variable is assigned in main body of begin, rescue and else and reassigned in ensure then referenced after the begin registers offenses for each assignment before ensure when a variable is assigned and referenced when defining a module does not register an offense when a variable is assigned and unreferenced in a singleton class registers an offense when a unreferenced variable is reassigned in same branch and referenced after the branching registers an offense for the unreferenced assignment when a variable is assigned and unreferenced in a singleton method defined with variable name registers an offense when a variable is assigned with multiple assignment and unreferenced registers an offense when a variable is reassigned in single branch if and referenced after the branching accepts when there is only one AST node and it is unused variable registers an offense when a variable is reassigned at the end of loop body and would be referenced in loop condition accepts when a variable is assigned at the end of rescue and would be referenced with retry accepts when a variable is assigned multiple times but unreferenced registers offenses for each assignment when a variable is assigned and unreferenced in a singleton method defined with self keyword registers an offense when a variable is reassigned multiple times in main body of begin then referenced in rescue accepts when a variable is assigned in each branch of if and referenced after the branching accepts when a variable is reassigned with binary operator assignment while assigning to itself in rhs then referenced registers an offense for the assignment in rhs when a variable is reassigned at the end of loop body and would be referenced in next iteration accepts RuboCop::Cop::Lint::UselessElseWithoutRescue with `else` with `rescue` accepts with `else` without `rescue` registers an offense RuboCop::Cop::Lint::ShadowingOuterLocalVariable when a block argument has same name as an outer scope variable registers an offense when a block local variable has same name as an outer scope variable registers an offense when a block block argument has same name as an outer scope variable registers an offense when a method argument has same name as an outer scope variable does not register an offense when a splat block argument has same name as an outer scope variable registers an offense when multiple block arguments have same name "_" does not register an offense when an outer scope variable is referenced in a block does not register an offense when multiple block arguments have a same name starts with "_" does not register an offense when a block argument has same name "_" as outer scope variable "_" does not register an offense when a block argument has different name with outer scope variables does not register an offense when an outer scope variable is reassigned in a block does not register an offense when a block argument has a same name starts with "_" as an outer scope variable does not register an offense RuboCop::Cop::Lint::SendWithMixinArgument registers an offense when using `send` with `extend` registers an offense when using `__send__` method registers an offense when using `send` with `include` registers an offense when using `send` with `prepend` does not register an offense when using `prepend` registers an offense when using `public_send` method does not register an offense when using `include` does not register an offense when using `extend` does not register an offense when not using a mixin method when using namespace for module registers an offense when using `send` with `include` when specifying a mixin method as a string registers an offense when using `send` with `extend` registers an offense when using `send` with `include` registers an offense when using `send` with `prepend` RuboCop::Cop::Style::MinMax with an array literal containing calls to `#min` and `#max` when the expression is used as a return value registers an offense if the receivers match does not register an offense if the receivers do not match does not register an offense if there are additional elements does not register an offense if the receiver is implicit when the expression is used in a parallel assignment does not register an offense if the receiver is implicit does not register an offense if the receivers do not match registers an offense if the receivers match does not register an offense if there are additional elements when the expression stands alone does not register an offense if the receiver is implicit does not register an offense if there are additional elements registers an offense if the receivers match does not register an offense if the receivers do not match RuboCop::Cop::Style::RaiseArgs when enforced style is compact accepts a raise with msg argument accepts a raise with an exception argument when used in a logical or expression registers an offense and auto-corrects when used in a logical and expression registers an offense and auto-corrects with correct + opposite reports an offense with a raise with 2 args reports an offense with a raise with 3 args reports an offense when used in a ternary expression registers an offense and auto-corrects when enforced style is exploded accepts a raise with msg argument accepts a raise with 2 args accepts exception constructor with more than 1 argument accepts a raise with 3 args accepts a raise with splatted arguments accepts exception constructor with keyword arguments when an exception object is assigned to a local variable auto-corrects to exploded style with a raise with exception object with one argument reports an offense when used in a logical or expression registers an offense and auto-corrects with no arguments reports an offense when used in a ternary expression registers an offense and auto-corrects when used in a logical and expression registers an offense and auto-corrects with opposite + correct reports an offense for opposite + correct RuboCop::Cop::Style::StructInheritance registers an offense when extending instance of Struct with do ... end accepts plain class registers an offense when extending instance of ::Struct acceps assignment to ::Struct.new registers an offense when extending instance of ::Struct with do ... end accepts assignment to block form of Struct.new registers an offense when extending instance of Struct accepts assignment to Struct.new accepts extending DelegateClass registers an offense when extending instance of `Struct` when there is a comment before class declaration RuboCop::Cop::Lint::InterpolationCheck registers an offense and corrects for interpolation in single quoted string does not register an offense for escaped crab claws in dstr does not register an offense for an escaped interpolation does not register an offense for interpolation in a regexp registers an offense and corrects when including interpolation and double quoted string in single quoted string does not crash for \xff does not register an offense for properly interpolation strings does not register an offense for interpolation in nested strings RuboCop::Cop::Lint::RedundantWithIndex accepts an index is used as a block argument registers an offense for `ary.each_with_index { |v| v }` and corrects to `ary.each` registers an offense when using `ary.each.with_index(1) { |v| v }` and correct to `ary.each { |v| v }` registers an offense when using `ary.each.with_index { |v| v }` and corrects to `ary.each` registers an offense when using `ary.each_with_object([]).with_index { |v| v }` and corrects to `ary.each_with_object([]) { |v| v }` RuboCop::Cop::Layout::SpaceAroundBlockParameters when EnforcedStyleInsidePipes is space registers an offense and corrects spacing in lambda args registers an offense and corrects extra space before first parameter accepts an empty block accepts line break after closing pipe registers an offense and corrects multiple spaces after last parameter accepts a block with parameters but no body accepts a block parameter without preceding space registers an offense for no space before first parameter accepts a block with spaces in the right places skips lambda without parens registers an offense and corrects space with parens at middle registers an offense and corrects a lambda for no space before first parameter registers an offense and corrects no space after closing pipe registers an offense and corrects a lambda for extra spacebefore first parameter registers an offense and corrects missing space before first argument and after last argument registers an offense and corrects a lambda for no space after last parameter registers an offense and corrects a lambda for multiple spacesafter last parameter registers an offense and corrects block arguments inside Hash#each accepts a lambda with spaces in the right places registers an offense and corrects multiple spaces before parameter skips lambda without args registers an offense and corrects no space after last parameter trailing comma registers an offense and corrects no space after the last comma accepts space after the last comma when EnforcedStyleInsidePipes is no_space accepts block parameters with surrounding space that includes line breaks skips lambda without parens accepts a block with parameters but no body registers an offense and corrects a lambda for space before first parameter registers an offense and corrects a lambda for space after the last parameter accepts a block parameter without preceding space registers an offense and corrects space before first parameter skips lambda without args registers an offense and corrects for space with parens accepts line break after closing pipe accepts an empty block registers an offense and corrects multiple spaces before parameter registers an offense and corrects all types of spacing issues for a lambda registers an offense and corrects all types of spacing issues registers an offense and corrects no space after closing pipe accepts a block with spaces in the right places accepts a lambda with spaces in the right places registers an offense and corrects space after last parameter trailing comma accepts no space after the last comma registers an offense for space after the last comma RuboCop::Cop::Bundler::GemComment when investigating Ruby files does not register any offenses when investigating Gemfiles and the gem is permitted does not register any offenses when the "OnlyFor" option is set when the version specifiers are checked when a gem is uncommented and has options but no version specifiers does not register an offense when a gem is uncommented and has a version specifier along with unrelated options registers an offense when a gem is uncommented and has a version specifier registers an offense when a gem is uncommented and has no extra options does not register an offense when a gem is commented does not register an offense when a gem is uncommented and has multiple version specifiers registers an offense and some other options are checked when a gem is uncommented and has one of the checked options registers an offense when a gem is uncommented and has a version specifier but no other options does not register an offense when a gem is uncommented and only unchecked options does not register an offense and a gem has no comment registers an offense and the gem is commented does not register any offenses and the file is empty does not register any offenses and the file contains source and group does not register any offenses RuboCop::Cop::Style::ConditionalAssignment IncludeTernaryExpressions false allows assigning any variable type to ternary SingleLineConditionsOnly true registers an offense for assignment to an if then else registers an offense for assignment using a method that ends with an equal sign registers an offense for assignment using []= corrects assignment when without `else` branch allows a method call in the subject of a ternary operator registers an offense for assignment to case when then else corrects assignment to a namespaced constant behaves like all variable types allows assignment to if without else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to unless else registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to if else behaves like multiline all variable types allow assigning any variable type to a multiline unless else assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like multiline all variable types allow assigning any variable type to a multiline case when assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like all variable types registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to unless else allows assignment to if without else registers an offense assigning any variable type to ternary does not crash for rescue assignment registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsewith multiple assignment behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to unless else registers an offense for any assignment to ternary behaves like multiline all variable types allow assigning any variable type to a multiline if else assigning any variable type to a multiline case when assigning any variable type to a multiline if elsif else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch behaves like all variable types does not crash for rescue assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to if else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to unless else allows assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to ternary behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to ternary behaves like all variable types allows assignment to if without else registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if else does not crash for rescue assignment registers an offense assigning any variable type to unless else registers an offense assigning any variable type to ternary behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all variable types allow assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to if else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else allows any assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to unless else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to unless else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all variable types registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to unless else allows assignment to if without else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if else does not crash for rescue assignment registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsif else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all variable types allow assigning any variable type to a multiline case when assigning any variable type to a multiline if elsif else assigning any variable type to a multiline if else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline unless else behaves like multiline all assignment types allow any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense any assignment to case when behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to unless else behaves like all assignment types allows any assignment to if without else registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense for any assignment to ternary behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all variable types allow assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to an if else with multiline in one branch behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to ternary behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense any assignment to if else behaves like all variable types registers an offense assigning any variable type to if else registers an offense assigning any variable type to unless else allows assignment to if without else registers an offense assigning any variable type to ternary does not crash for rescue assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to if elsewith multiple assignment behaves like all assignment types registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to unless else behaves like multiline all variable types allow assigning any variable type to a multiline if else assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else assigning any variable type to a multiline unless else behaves like all assignment types registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to case when behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like all variable types does not crash for rescue assignment registers an offense assigning any variable type to if elsewith multiple assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if else allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsif else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like single line condition auto-correct corrects assignment to a ternary operator corrects assignment to a case when else condition corrects assignment to an if else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to an if elsif else condition corrects assignment to a case when else with multiple whens corrects assignment to an unless else condition for loop ignores pseudo assignments in a for loop behaves like multiline all assignment types allow any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like multiline all assignment types allow any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when SingleLineConditionsOnly false corrects assignment to a case when else with multiple whens corrects assignment to a case when else condition corrects assignment to a multiline if else condition corrects assignment to an unless else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to a multiline if elsif else condition behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all assignment types registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else behaves like all assignment types registers an offense for any assignment to ternary registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense any assignment to case when allows any assignment to if without else behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline case when behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else assigning any variable type to a multiline case when behaves like multiline all variable types offense assigning any variable type to a multiline case when assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense any assignment to if else allows any assignment to if without else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like all assignment types registers an offense any assignment to case when registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to unless else allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to case when behaves like multiline all variable types offense assigning any variable type to a multiline unless else assigning any variable type to a multiline if elsif else assigning any variable type to a multiline case when assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline if else any assignment to a multiline case when behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all variable types registers an offense assigning any variable type to unless else registers an offense for assigning any variable type to case when registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsif else allows assignment to if without else does not crash for rescue assignment registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsewith multiple assignment behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types allows any assignment to if without else registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to ternary behaves like all assignment types registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline if elsif else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline unless else assigning any variable type to a multiline case when behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to ternary behaves like all assignment types registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense any assignment to case when registers an offense for any assignment to ternary allows any assignment to if without else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all variable types registers an offense assigning any variable type to if else allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to unless else registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to if elsewith multiple assignment behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline case when assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline if elsif else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like single line condition auto-correct corrects assignment to an if elsif else condition corrects assignment to a case when else condition corrects assignment to an if elsif else with multiple elsifs corrects assignment to a case when else with multiple whens corrects assignment to a ternary operator corrects assignment to an unless else condition corrects assignment to an if else condition behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to ternary behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else allows any assignment to if without else registers an offense for any assignment to ternary registers an offense any assignment to if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline if else any assignment to a multiline unless else behaves like all variable types does not crash for rescue assignment allows assignment to if without else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if else registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to ternary behaves like all assignment types allows any assignment to if without else registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when registers an offense for any assignment to unless else behaves like multiline all assignment types offense any assignment to a multiline unless else any assignment to a multiline case when any assignment to a multiline if else behaves like multiline all variable types offense assigning any variable type to a multiline if else assigning any variable type to a multiline unless else assigning any variable type to an if else with multiline in one branch assigning any variable type to a multiline case when assigning any variable type to a multiline if elsif else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline unless else any assignment to a multiline case when behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else allows any assignment to if without else registers an offense for any assignment to ternary behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to unless else registers an offense for any assignment to ternary allows any assignment to if without else registers an offense any assignment to case when behaves like all variable types does not crash for rescue assignment registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to if elsif else registers an offense assigning any variable type to unless else allows assignment to if without else registers an offense assigning any variable type to ternary registers an offense assigning any variable type to if else behaves like multiline all assignment types offense any assignment to a multiline case when any assignment to a multiline unless else any assignment to a multiline if else behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary allows any assignment to if without else behaves like all assignment types registers an offense any assignment to if else registers an offense for any assignment to ternary registers an offense any assignment to case when allows any assignment to if without else registers an offense for any assignment to unless else behaves like all variable types registers an offense assigning any variable type to if elsif else allows assignment to if without else registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to ternary registers an offense for assigning any variable type to case when registers an offense assigning any variable type to if else registers an offense assigning any variable type to unless else does not crash for rescue assignment behaves like all assignment types registers an offense any assignment to if else allows any assignment to if without else registers an offense any assignment to case when registers an offense for any assignment to ternary registers an offense for any assignment to unless else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else behaves like all assignment types registers an offense for any assignment to ternary registers an offense for any assignment to unless else allows any assignment to if without else registers an offense any assignment to case when registers an offense any assignment to if else behaves like all assignment types registers an offense any assignment to case when registers an offense for any assignment to unless else registers an offense any assignment to if else registers an offense for any assignment to ternary allows any assignment to if without else behaves like all variable types registers an offense assigning any variable type to if elsif else registers an offense for assigning any variable type to case when does not crash for rescue assignment registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to ternary allows assignment to if without else registers an offense assigning any variable type to if else registers an offense assigning any variable type to unless else behaves like all variable types registers an offense for assigning any variable type to case when registers an offense assigning any variable type to unless else registers an offense assigning any variable type to if elsif else does not crash for rescue assignment registers an offense assigning any variable type to if elsewith multiple assignment registers an offense assigning any variable type to ternary allows assignment to if without else registers an offense assigning any variable type to if else behaves like multiline all assignment types offense any assignment to a multiline if else any assignment to a multiline case when any assignment to a multiline unless else RuboCop::Cop::VariableForce::Variable #referenced? when the variable has an assignment and the variable is referenced is expected to be truthy and the variable is not yet referenced is expected to be falsey when the variable is not assigned is expected to be falsey and the variable is referenced is expected to be truthy .new when non variable declaration node is passed raises error RuboCop::Cop::Style::Proc accepts the ::Proc.new call without block accepts the Proc.new call without block registers an offense for a Proc.new call registers an offense for ::Proc.new RuboCop::Cop::Layout::MultilineOperationIndentation when EnforcedStyle is indented registers an offense and corrects aligned operands in if conditions registers an offense and corrects one space indentation of second line accepts indentation of assignment accepts indented operands in if body accepts indentation of return if condition accepts the indentation of a broken string registers an offense for a 2 space indentation of unless condition accepts indented operands in while body accepts an expression where the first operand spans multiple lines accepts double indentation of until condition accepts indented operands in unless body accepts indentation of next if condition accepts indented operands in ordinary statement registers an offense and corrects wrong indentation of for expression accepts indentation of return unless condition accepts no extra indentation of third line registers an offense and corrects an unindented multiline operation that is the left operand in another operation accepts double indentation of while condition accepts two spaces indentation in assignment of array element registers an offense for a 2 space indentation of while condition accepts indented operands inside and outside a block registers an offense and corrects correct + unrecognized style accepts double indentation of unless condition accepts normal indentation inside grouped expression registers an offense for a 2 space indentation of if condition accepts any indentation of method parameters registers an offense and corrects no indentation of second line registers an offense and corrects extra indentation of third line accepts indented operands in an array accepts double indentation of if condition registers an offense and corrects aligned operators in assignment accepts normal indentation of method parameters accepts indented operands in until body accepts two spaces indentation of second line accepts indented operands in for body accepts indented operands in if condition registers an offense and corrects three space indentation of second line accepts unary operations accepts special indentation of for expression registers an offense and corrects aligned code on LHS of equality operator registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array registers an offense for a 2 space indentation of until condition accepts indentation of next unless condition does not check method calls accepts any indentation of parameters to #[] accepts two spaces indentation in assignment of local variable accepts alignment inside a grouped expression when indentation width is overridden for this cop registers an offense and corrects accepts indented operands in unless body registers an offense for a 4 space indentation of if condition accepts indented operands in while body registers an offense for a 4 space indentation of until condition registers an offense for a 4 space indentation of while condition accepts indentation of until condition which is offset by a single normal indentation step accepts indentation of while condition which is offset by a single normal indentation step accepts indentation of unless condition which is offset by a single normal indentation step accepts indented operands in until body registers an offense for a 4 space indentation of unless condition accepts indented operands in if body accepts indented operands in if condition accepts indentation of if condition which is offset by a single normal indentation step when EnforcedStyle is aligned accepts indented operands in for body registers an offense and corrects emacs ruby-mode 1.1 indentation of an expression in an array accepts aligned operands in assignment accepts unary operations accepts two spaces indentation in assignment of array element accepts two spaces indentation of second line registers an offense and corrects indented operand in second argument does not check method calls registers an offense and corrects an unindented multiline operation that is the left operand in another operation registers an offense for misaligned operands in while condition accepts any indentation of parameters to #[] accepts no extra indentation of third line registers an offense for misaligned operands in unless condition registers an offense and corrects indented operands in if condition registers an offense and corrects unaligned operands in op-assignment registers an offense for misaligned operands in if condition registers an offense and corrects extra indentation of third line registers an offense and corrects misaligned operands in unless condition accepts indented operands with ternary operators registers an offense and corrects three space indentation of second line registers an offense and corrects misaligned string operand when plus is used accepts an expression where the first operand spans multiple lines accepts indented operands inside and outside a block registers an offense and corrects one space indentation of second line accepts alignment inside a grouped expression accepts aligned or:ed operands in assignment accepts indented operands in ordinary statement registers an offense and corrects misaligned string operand when the first operand has backslash continuation accepts indented code on LHS of equality operator accepts indented operands inside block + assignment accepts aligned operands in if condition accepts indented operands in an array accepts two spaces indentation in assignment of local variable registers an offense and corrects indented second part of string registers an offense and corrects no indentation of second line registers an offense for misaligned operands in until condition RuboCop::Cop::InternalAffairs::RedundantLocationArgument when location argument is not passed does not register an offense when location argument is passed when location argument does not equal to :expression does not register an offense when location argument is :expression removes default `location` when preceded by another keyword registers an offense removes default `location` surrounded by other keywords when there is a message argument registers an offense RuboCop::Cop::Layout::EmptyLineAfterGuardClause accpets a guard clause when the next line is `rescue`-`else` registers an offense and corrects a guard clause is before `begin` registers an offense and corrects a `raise` guard clause not followed by empty line when `unless` condition is after heredoc accepts a guard clause followed by end registers an offense and corrects a `raise` guard clause not followed by empty line when `if` condition is after heredoc registers an offense and corrects a guard clause that is a ternary operator accpets a guard clause when the next line is `ensure` accepts using guard clause is after `raise` accepts a guard clause when the next line is `else` registers an offense and corrects a guard clause not followed by empty line accepts a guard clause inside oneliner block accepta a guard clause after a single line heredoc registers an offense and corrects a guard clause not followed by empty line when guard clause including heredoc registers an offense and corrects when using `or return` before guard condition registers an offense and corrects a method starting with end_ accepts a modifier if when the next line is `end` accepts a `raise` guard clause not followed by empty line when guard clause is after condition without method invocation accpets a guard clause when the next line is `elsif` registers an offense and corrects a `raise` guard clause not followed by empty line when guard clause is after method call with argument accepts modifier if accepts a guard clause when the next line is `rescue` registers an offense and corrects `next` guard clause not followed by empty line registers an offense and corrects only the last guard clause registers an offense and corrects when using `and return` before guard condition accepts a guard clause followed by empty line when guard clause including heredoc registers an offense and corrects a next guard clause not followed by empty line when guard clause is after heredoc including string interpolation accepts multiple guard clauses accepta a guard clause that is after multiline heredoc accpets a guard clause that is after a multiline heredoc nested argument call accpets a guard clause that is after a multiline heredoc with chained calls RuboCop::Cop::Lint::NumberConversion registers an offense when `#to_i` called on a variable when using `#to_i` for integer when `#to_i` called on a hash value when `#to_i` called on a variable on a array when using `#to_f` when using `#to_i` when `#to_i` called on a variable on a hash when using `#to_c` does not register an offense when using Float() when using Complex() when using Integer() with integer when using DateTime when `#to_i` called without a receiver when using Time when using Time/DateTime with multiple method calls RuboCop::Cop::Layout::ArrayAlignment when aligned with first parameter does not auto-correct array within array with too little indentation registers an offense and corrects misaligned array elements accepts several elements per line does not indent heredoc strings in autocorrect accepts aligned array keys auto-corrects array if the first element being on a new row accepts the first element being on a new row accepts single line array accepts aligned array with fullwidth characters does not auto-correct array within array with too much indentation when aligned with fixed indentation accepts single line array registers an offense and corrects misaligned array elements does not indent heredoc strings in autocorrect accepts the first element being on a new row accepts several elements per line accepts aligned array with fullwidth characters accepts aligned array keys auto-corrects array if the first element being on a new row does not auto-correct array within array with too little indentation does not auto-correct array within array with too much indentation RuboCop::Cop::Style::ModuleFunction when enforced style is `forbidden` registers an offense for `module_function` without an argument accepts `extend self` in a class registers an offense for `extend self` in a module in a module with private methods in a module with declarative private when enforced style is `module_function` accepts for `extend self` in a module with declarative private registers an offense for `extend self` in a module accepts for `extend self` in a module with private methods accepts `extend self` in a class when enforced style is `extend_self` accepts module_function with an argument registers an offense for `module_function` without an argument RuboCop::Cop::Layout::FirstParameterIndentation align_parentheses style valid indentation on multi-line defs accepts correctly indented first element hash accepts correctly indented first element invalid indentation on multi-line defs hash arguments static def registers an offense and corrects incorrectly indented first element hash arguments registers an offense and corrects incorrectly indented first element normal arguments registers an offense and corrects incorrectly indented first element single line method defs ignores ignores with hash args no paren method defs ignores ignores with hash args consistent style single line method defs ignores ignores with hash args no paren method defs ignores ignores with hash args valid indentation on multi-line defs accepts correctly indented first element accepts correctly indented first element hash invalid indentation on multi-line defs hash arguments static method def registers an offense and corrects incorrectly indented first element hash arguments registers an offense and corrects incorrectly indented first element normal arguments registers an offense and corrects incorrectly indented first element valid indentation on static multi-line defs accepts correctly indented first element hash accepts correctly indented first element RuboCop::Cop::Style::EndBlock reports an offense and corrects END block does not report offenses for other blocks RuboCop::Cop::Layout::MultilineHashKeyLineBreaks with line break after opening bracket registers an offense and corrects when key starts on same line as another when key starts on same line as another with rockets adds an offense when on all keys on one line different than brackets does not add any offenses when on different lines than brackets but keys on one does not add any offenses without line break after opening bracket registers an offense and corrects nested hashes registers an offense and corrects when key starts on same line as another when on same line does not add any offenses RuboCop::Cop::Style::Alias when EnforcedStyle is prefer_alias_method does not register an offense for alias in an instance_eval block registers an offense for alias with symbol args does not register an offense for alias with gvars does not register an offense for alias_method registers an offense for alias with bareword args when EnforcedStyle is prefer_alias registers an offense for alias_method in a module block does not register an offense for alias_method with non-literal constant argument does not register an offense for alias_method with explicit receiver does not register an offense for alias in an instance_eval block does not register an offense for alias_method with non-literal method call argument registers an offense for alias_method at the top level registers an offense for alias with symbol args registers an offense for alias_method in a class block does not register an offense for alias_method in a method def does not register an offense for alias_method in a block does not register an offense for alias_method in self.method def does not register an offense for alias with bareword args RuboCop::Cop::Style::NestedModifier auto-corrects unless with a comparison operator + if does not add redundant parentheses in auto-correction auto-corrects unless + unless adds parentheses when needed in auto-correction auto-corrects if + if registers one offense for more than two modifiers adds parentheses to method arguments when needed in auto-correction auto-corrects if + unless auto-corrects unless + if until behaves like not correctable does not auto-correct when until is the inner modifier does not auto-correct when until is the outer modifier while behaves like not correctable does not auto-correct when while is the inner modifier does not auto-correct when while is the outer modifier RuboCop::Cop::Style::FormatString when enforced style is percent accepts sprintf without arguments registers an offense for sprintf registers an offense for format with 3 arguments accepts format without arguments accepts sprintf with 1 argument registers an offense for format accepts String#% registers an offense for format with a hash argument registers an offense for sprintf with a hash argument accepts format with 1 argument registers an offense for sprintf with 3 arguments when enforced style is sprintf registers an offense for something followed by an array registers an offense for variable argument but does not auto-correct registers an offense for a string followed by something registers an offense for String#% with a hash argument registers an offense for format with 2 arguments registers an offense for variable argument and assignment but does not auto-correct registers an offense for format works if the first operand contains embedded expressions does not register an offense for numbers does not register an offense for ambiguous cases when enforced style is format registers an offense for something followed by a hash does not register an offense for ambiguous cases registers an offense for a string followed by something works if the first operand contains embedded expressions registers an offense for something followed by an array registers an offense for sprintf does not register an offense for numbers registers an offense for sprintf with 2 arguments does not auto-correct String#% with variable argument and assignment registers an offense for variable argument but does not auto-correct RuboCop::Cop::Layout::ExtraSpacing when AllowForAlignment is true ignores whitespace inside a string registers an offense and corrects extra spacing in class inheritance ignores whitespace at the beginning of the line ignores trailing whitespace accepts space between key and value in a hash with hash rockets registers an offense and corrects double extra spacing in variable assignment registers an offense and corrects alignment with token not preceded by space accepts aligned values of an implicit hash literal registers an offense and corrects extra spacing before a unary plus in an argument list registers an offense and corrects extra space before a float when spaces are present in a single-line hash literal registers an offense and corrects hashes with hash rockets registers an offense and corrects hashes with symbol keys with extra spacing for alignment purposes such as lining up assignments with empty lines and comments in between allows it such as aligning = on lines where there are trailing comments allows it such as lining up assignments allows it such as aligning comments on non-adjacent lines allows it such as aligning long assignment expressions that include line breaks allows it such as aligning with the same character allows it such as aligning tokens with empty line between allows it such as lining up different kinds of assignments allows it when ForceEqualSignAlignment is true registers an offense and corrects consecutive aref assignments which are not aligned does not register offenses for multiple complex nested assignments does not register an offense when optarg equals is not aligned with assignment equals sign registers an offense and corrects consecutive assignments that are not aligned does not register an offense if assignments are separated by blanks register offenses and correct consecutive operator assignments which are not aligned register offenses and correct consecutive attribute assignments which are not aligned aligns the first assignment with the following assignment does not register alignment errors on outdented lines does not register an offense if assignments are aligned register offenses and correct complex nested assignments when AllowBeforeTrailingComments is false regsiters offense does not trigger on only one space before comment true allows it doesn't interfere with AllowForAlignment being false such as aligning with the same character registers offense(s) such as aligning tokens with empty line between registers offense(s) such as aligning long assignment expressions that include line breaks registers offense(s) such as lining up different kinds of assignments registers offense(s) such as aligning = on lines where there are trailing comments registers offense(s) such as lining up assignments registers offense(s) such as lining up assignments with empty lines and comments in between registers offense(s) such as aligning comments on non-adjacent lines registers offense(s) being true such as aligning with the same character allows it such as aligning = on lines where there are trailing comments allows it such as lining up different kinds of assignments allows it such as aligning tokens with empty line between allows it such as aligning comments on non-adjacent lines allows it such as lining up assignments allows it such as aligning long assignment expressions that include line breaks allows it such as lining up assignments with empty lines and comments in between allows it when AllowForAlignment is false ignores whitespace at the beginning of the line registers an offense and corrects extra spacing before a unary plus in an argument list ignores trailing whitespace registers an offense and corrects double extra spacing in variable assignment registers an offense and corrects alignment with token not preceded by space registers an offense and corrects extra spacing in class inheritance ignores whitespace inside a string registers an offense and corrects extra space before a float accepts aligned values of an implicit hash literal accepts space between key and value in a hash with hash rockets with extra spacing for alignment purposes such as aligning with the same character registers offense(s) such as aligning tokens with empty line between registers offense(s) such as aligning comments on non-adjacent lines registers offense(s) such as lining up assignments registers offense(s) such as lining up assignments with empty lines and comments in between registers offense(s) such as aligning long assignment expressions that include line breaks registers offense(s) such as lining up different kinds of assignments registers offense(s) such as aligning = on lines where there are trailing comments registers offense(s) when spaces are present in a single-line hash literal registers an offense and corrects hashes with symbol keys registers an offense and corrects hashes with hash rockets RuboCop::Cop::Style::ReturnNil when enforced style is `return_nil` does not register an offense for returning others registers an offense for return when enforced style is `return` does not register an offense for return nil from iterators does not register an offense for returning others registers an offense for return nil RuboCop::Cop::Style::StringLiterals when ConsistentQuotesInMultiline is true and EnforcedStyle is double_quotes registers an offense for mixed quote styles in a continued string accepts continued strings using all double quotes doesn't register offense for single quotes with embedded double registers an offense for unneeded single quotes in continuation and EnforcedStyle is single_quotes doesn't register offense for double quotes with embedded single doesn't choke on heredocs with inconsistent indentation accepts continued strings using all single quotes registers an offense for strings with line breaks in them accepts for double quotes with an escaped special character registers an offense for unneeded double quotes in continuation doesn't register offense for double quotes with interpolation registers an offense for mixed quote styles in a continued string accepts for double quotes with an escaped normal character configured with double quotes preferred accepts single quotes in interpolation registers offense for escaped single quote in single quotes registers offense for single quotes when double quotes would be equivalent registers offense for opposite + correct accepts %q and %Q quotes can handle a built-in constant parsed as string accepts single quotes when they are needed accepts heredocs accepts % quotes accepts ' in a %w accepts single quotes in string with escaped non-' character accepts escaped single quote in string with escaped non-' character does not accept multiple escaped single quotes in single quotes flags single quotes with plain # (not #@var or #{interpolation} accepts double quotes accepts single quotes at the start of regexp literals configured with single quotes preferred accepts heredocs accepts double quotes when interpolating & quotes in multiple lines detects unneeded double quotes within concatenated string registers offense for correct + opposite accepts double quotes when single quotes are used accepts single quotes in interpolation registers an offense for "\"" accepts single quotes accepts \\\n in a string can handle a built-in constant parsed as string accepts double quotes at the start of regexp literals accepts % quotes registers an offense for words with non-ascii chars registers offense for double quotes when single quotes suffice can handle character literals accepts double quotes when interpolating an instance variable accepts %q and %Q quotes accepts double quotes when unicode control sequence is used accepts double quotes in interpolation accepts double quotes when interpolating a class variable accepts double quotes with some other special symbols accepts double quotes when new line is used accepts double quotes when interpolating a global variable accepts " in a %w does not register an offense for words with non-ascii chars and other control sequences accepts double quotes when control characters are used when configured with a bad value fails RuboCop::Cop::Layout::SpaceAfterColon accepts colon in ternary followed by space registers an offense and corrects colon without space after it registers an offense and corrects a keyword optional argument without a space accepts colons denoting required keyword argument accepts hash rockets accepts colons in strings accepts hashes with a space after colons accepts colons in symbols accepts required keyword arguments accepts if RuboCop::Cop::Layout::SpaceAroundMethodCallOperator does not register an offense when no method call operator safe navigation operator does not register an offense when no space around method call does not register an offense when no space around any `.` operators autocorrects offense when space after first method call operator autocorrects offense when space around intermediate method call operator registers an offense when space before last method call operator autocorrects offense when space before last method call operator registers an offense when space after first method call operator registers an offense when space after last method call operator autocorrects offense when spaces after method call registers an offense when space after method call registers an offense when spaces after method call registers an offense when space around intermediate method call operator autocorrects offense when space after last method call operator registers an offense when space before first method call operator registers an offense when spaces around method call autocorrects offense when spaces around method call autocorrects offense when space around multiple method call operator autocorrects offense when space before method call autocorrects offense when spaces before method call registers an offense when space around multiple method call operator registers an offense when space before method call registers an offense when spaces before method call autocorrects offense when space after method call autocorrects offense when space before first method call operator when multi line method call registers an offense when space before method call in suffix chaining registers an offense when space before method call does not register an offense when no space after the `&.` autocorrects offense when space before method call autocorrects offense when space before method call in suffix chaining :: operator autocorrects offense when space after method call registers an offense when spaces after method call registers an offense when multiple spaces with assignment registers an offense when space after method call registers an offense when space after first operator with assignment autocorrects offense when space around intermediate method call operator registers an offense when space after last method call operator autocorrects offense when space after first operator with assignment autocorrects offense when space after last method call operator does not register an offense when no space around method call autocorrects offense when multiple spaces with assignment does not register an offense if no space before `::` operator with assignment registers an offense when space around intermediate method call operator does not register an offense if no space with conditionals autocorrects offense when spaces after method call does not register an offense if no space before `::` operator with inheritance autocorrects offense when space around multiple method call operator registers an offense when space around multiple method call operator does not register an offense when no space around any `.` operators when multi line method call registers an offense when space before method call autocorrects offense when space before method call does not register an offense when no space after the `::` dot operator registers an offense when space before method call registers an offense when space before last method call operator registers an offense when space around intermediate method call operator autocorrects offense when space before last method call operator registers an offense when spaces after `Proc#call` shorthand call registers an offense when spaces before method call autocorrects offense when space after method call registers an offense when space after method call autocorrects offense when spaces after method call autocorrects offense when space around intermediate method call operator registers an offense when space after last method call operator registers an offense when space after first method call operator autocorrects offense when spaces before method call registers an offense when space before first method call operator registers an offense when space around multiple method call operator autocorrects offense when spaces after `Proc#call` shorthand call autocorrects offense when space before first method call operator autocorrects offense when space before method call autocorrects offense when space around multiple method call operator autocorrects offense when space after first method call operator registers an offense when spaces after method call autocorrects offense when space after last method call operator does not register an offense when no space around method call autocorrects offense when spaces around method call does not register an offense when no space around any `.` operators registers an offense when spaces around method call when multi line method call does not register an offense when no space after the `.` registers an offense when space before method call registers an offense when space before method call in suffix chaining autocorrects offense when space before method call autocorrects offense when space before method call in suffix chaining when there is a space between `.` operator and a comment does not register an offense when there is not a space before `.` registers an offense when there is a space before `.` RuboCop::Cop::Style::YodaCondition enforce not yoda accepts method call on receiver on left accepts global variable on left registers an offense for string literal on left accepts variable on left after assign accepts number on left of <=> registers an offense for nil on left accepts instance variable on left accepts accessor and variable on left in boolean expression accepts string literal on left of case equality check registers an offense number on left accepts __FILE__ on left in program name check accepts subtraction expression on left of comparison accepts array of numbers on both sides accepts safe navigation on left registers an offense number on left of comparison accepts string literal on right accepts __FILE__ on left in negated program name check accepts number on both sides accepts interpolated string on left registers an offense for boolean literal on left accepts interpolated regex on left accepts negation accepts class variable on left accepts assignment with EnforcedStyle: forbid_for_equality_operators_only accepts number on left of comparison registers an offense for equality check registers an offense for negated equality check accepts nil on left of comparison accepts mixed order in comparisons within an if or ternary statement registers an offense for number on left in if condition registers an offense for number on left of <= in ternary condition registers an offense for number on left in modifier if registers an offense for number on left of >= in ternary condition registers an offense for number on left of comparison in if condition registers an offense for nil on left in ternary condition enforce yoda accepts negation accepts subtraction on right of comparison accepts string literal on left accepts variable on right after assignment registers an offense for number on right accepts class variable on right registers an offense for nil on right registers an offense for string literal on right accepts numbers on both sides registers an offense for number on right of comparison accepts string literal on right of case equality check accepts assignment accepts arrays of numbers on both sides accepts instance variable on right accepts safe navigation on right accepts method call on receiver on right accepts global variable on right accepts accessor and variable on right in boolean expression registers an offense for boolean literal on right accepts number on left of <=> within an if or ternary statement registers an offense for nil on right in ternary condition registers an offense number on right of comparison in if condition registers an offense number on right in if condition registers an offense for number on right of <= in ternary condition registers an offense for number on right of >= in ternary condition registers an offense for number on right in modifier if with EnforcedStyle: require_for_equality_operators_only accepts number on right of comparison accepts nil on right of comparison registers an offense for equality check accepts mixed order in comparisons registers an offense for negated equality check RuboCop::Cop::Security::MarshalLoad does not register an offense Marshal methods under another namespace registers an offense for using Marshal.restore allows using dangerous Marshal methods for deep cloning registers an offense for using Marshal.load does not register an offense for Marshal.dump RuboCop::CLI --except when a cop name is not specified displays how to use `--except` option when one cop is given without namespace disables the given cop when one cop plus one namespace are given runs all cops except the given when several cops are given disables the given cops including Lint disables the given cops including RedundantCopDisableDirective disables the given cops including Lint/RedundantCopDisableDirective when one name is given exits with error if the cop name is incorrect displays correction candidate if an incorrect cop name is given exits with error if Lint/Syntax is given exits with error if an empty string is given exits with error if Syntax is given -D/--display-cop-names shows cop names --no-display-cop-names does not show cop names DisplayCopNames: false in .rubocop.yml shows cop names without --display-cop-names does not show cop names with --auto-correct-all and disabled offense succeeds when there is only a disabled offense --list-target-files when there are some files when there is an include and exclude prints the included files and not the excluded ones when there are no includes or excludes prints known ruby files when there are no files prints nothing with --list-target-files prints nothing with -L --only when one cop is given exits with error if cop name Lint/RedundantCopDisableDirective is passed exits with error if cop name RedundantCopDisableDirective is passed only checks syntax if Lint/Syntax is given accepts cop names from plugins displays correction candidate if an incorrect cop name is given enables the given cop runs just one cop only checks syntax if Syntax is given exits with error if an empty string is given exits with error if an incorrect cop name is passed when specifying a pending cop when Style department is disabled does not show pending cop warning when Style department is enabled when specifying `NewCops: disable` in .rubocop.yml does not display a pending cop warning when specifying `NewCops: pending` in .rubocop.yml displays a pending cop warning when specifying `NewCops: enable` in .rubocop.yml does not display a pending cop warning when `VersionAdded` is not specified accepts cop names from plugins with a pending cop warning when `VersionAdded` is specified accepts cop names from plugins with a pending cop warning when using `--enable-pending-cops` command-line option does not display a pending cop warning when using `--disable-pending-cops` command-line option does not display a pending cop warning without using namespace runs just one cop when several cops are given runs the given cops and --lint runs the given cops plus all enabled lint cops when a namespace is given runs all enabled cops in that namespace when three namespaces are given runs all enabled cops in those namespaces when a cop name is not specified displays how to use `--only` option --show-cops with one of the cops misspelled skips the unknown cop with --force-default-config prioritizes default config with one cop given prints the current configuration prints that cop and nothing else with two cops given prints the current configuration with no args prints all available cops and their description prints all departments prints all cops in their right department listing prints the current configuration -S/--display-style-guide shows reference entry shows style guide entry shows style guide and reference entries --fail-level option fails when option is equal to the severity level fails when option is less than the severity level succeeds when option is greater than the severity level with --auto-correct-all succeeds when option is refactor and all offenses are autocorrected fails when option is autocorrect and all offenses are autocorrected succeeds when option is not given and all offenses are autocorrected fails when option is A and all offenses are autocorrected with --display-only-fail-level-offenses outputs offense message when fail-level is equal to the severity doesn't output offense message when less than the fail-level outputs offense message when fail-level is less than the severity with disabled line still checks unprinted offense if they're a redundant disable doesn't consider a unprinted offense to be a redundant disable --only-recognized-file-types when not explicitly included does not include the file given on the command line but option is not given includes the file given on the command line when explicitly included includes the file given on the command line --parallel on Unix-like systems prints a message if --debug is specified does not print a message if --debug is not specified in combination with --force-default-config does not parse local configuration in combination with --ignore-parent-exclusion does ignore the exclusion in the parent directory configuration combined with AllCops:UseCache:false fails with an error message -o/--out option is applied to the previously specified formatter redirects output to the specified file -E/--extra-details shows extra details -V exits cleanly option is invalid suggests to use the --help flag -d/--debug shows cop names shows config files -f/--format can be used multiple times custom formatter when unknown class name is specified aborts with error message when a class name is specified uses the class as a formatter builtin formatters when emacs format is specified outputs with emacs format when simple format is specified outputs with simple format when json format is specified and offenses come from the cache and a message has binary encoding outputs JSON code without crashing when clang format is specified outputs with clang format when unknown format name is specified aborts with error message when html format is specified and offenses come from the cache and a message has binary encoding outputs HTML code without crashing --force-exclusion when explicitly excluded excludes files specified in the configuration Exclude even if they are explicitly passed as arguments with already excluded by default excludes files excluded by default even if they are explicitly passed as arguments --stdin prints corrected code to stdout if --auto-correct-all is used does not accept more than one file path detects CR at end of line causes source code to be read from stdin requires a file path --lint runs only lint cops --version exits cleanly RuboCop::Cop::Layout::DefEndAlignment when EnforcedStyleAlignWith is start_of_line auto-corrects mismatched def test end accepts matching def ... end accepts matching def ... end auto-corrects mismatched foo def test end accepts matching foo def ... end accepts matching foo bar def ... end accepts matching defs ... end registers an offense for mismatched def test end registers an offense for mismatched foo def test end auto-corrects mismatched def Test.test end registers an offense for mismatched def Test.test end correct + opposite registers an offense when EnforcedStyleAlignWith is def registers an offense for mismatched foo def test end accepts matching foo def ... end auto-corrects mismatched foo def test end accepts matching defs ... end registers an offense for mismatched def test end registers an offense for mismatched def Test.test end accepts matching def ... end auto-corrects mismatched def test end auto-corrects mismatched def Test.test end correct + opposite registers an offense RuboCop::Cop::Layout::SpaceAroundKeyword behaves like missing before auto-corrects registers an offense for missing space before keyword in `for x in []do end` behaves like accept around accepts `[]` around keyword in `[begin end]` behaves like accept before accepts `-` before keyword in `a-begin end` behaves like accept after accepts `[` after keyword in `yield[1]` behaves like accept before accepts `|` before keyword in `loop { |x|break }` behaves like accept after accepts `(` after keyword in `defined?(1)` behaves like missing after registers an offense for missing space after keyword in `return""` auto-corrects behaves like missing before registers an offense for missing space before keyword in `for x in [] do "x"end` auto-corrects behaves like accept before accepts `==` before keyword in `a==begin end` behaves like accept before accepts `=` before keyword in `a=begin end` behaves like accept before accepts `!` before keyword in `!yield.method` behaves like accept after accepts `(` after keyword in `super(1)` behaves like accept around accepts `,` around keyword in `a 1,next,1` behaves like accept after accepts `.` after keyword in `yield.method` behaves like accept after accepts `rescue` after keyword in `begin; rescue(Error); end` behaves like missing before auto-corrects registers an offense for missing space before keyword in `1or 2` behaves like missing before registers an offense for missing space before keyword in `if a; ""elsif b; end` auto-corrects behaves like missing after registers an offense for missing space after keyword in `until 1 do"x" end` auto-corrects behaves like missing before registers an offense for missing space before keyword in `begin ""ensure end` auto-corrects behaves like accept after accepts `.` after keyword in `begin end.inspect` behaves like missing before registers an offense for missing space before keyword in `begin "a"end` auto-corrects behaves like accept before accepts `!` before keyword in `!yield` behaves like accept after accepts `[` after keyword in `super[1]` behaves like accept before accepts `+` before keyword in `a+begin end` behaves like accept after accepts `(` after keyword in `break(1)` behaves like accept after accepts `\n` after keyword in `test do end` behaves like accept before accepts `>` before keyword in `a>begin end` behaves like missing after registers an offense for missing space after keyword in `case"" when 1; end` auto-corrects behaves like accept around accepts `;` around keyword in `test do;end` behaves like accept after accepts `(` after keyword in `return(1)` behaves like missing after registers an offense for missing space after keyword in `not""` auto-corrects behaves like accept before accepts `&&` before keyword in `a&&begin end` behaves like missing after registers an offense for missing space after keyword in `super""` auto-corrects behaves like missing after registers an offense for missing space after keyword in `1 until""` auto-corrects behaves like missing before registers an offense for missing space before keyword in `""rescue a` auto-corrects behaves like missing after auto-corrects registers an offense for missing space after keyword in `a rescue""` behaves like missing after registers an offense for missing space after keyword in `a do|x| end` auto-corrects behaves like missing before registers an offense for missing space before keyword in `while 1 do "x"end` auto-corrects behaves like missing after registers an offense for missing space after keyword in `yield""` auto-corrects behaves like missing before registers an offense for missing space before keyword in `1and 2` auto-corrects behaves like missing after auto-corrects registers an offense for missing space after keyword in `if a; else"" end` behaves like accept after accepts `(` after keyword in `not(1)` behaves like accept before accepts `<` before keyword in `a= 2.5 accepts key access to hash >= Ruby 2.7 accepts methods being aligned with method that is an argumentwhen using numbered parameter RuboCop::Cop::Lint::ToJSON registers an offense and corrects using `#to_json` without arguments does not register an offense when using `#to_json` with arguments RuboCop::Cop::RangeHelp source indicated by #range_with_surrounding_space when side is :right is expected to eq "a(2) " when side is :left is expected to eq " a(2)" when side is :both is expected to eq " a(2) " source indicated by #range_with_surrounding_comma when side is :left is expected to eq ",Error" when side is :right is expected to eq "Error," when side is :both is expected to eq ",Error," source indicated by #range_by_whole_lines with a whole line except newline selected without include_final_newline is expected to eq "puts 'example'" with include_final_newline is expected to eq "puts 'example'\n" when part of a single line is selected with include_final_newline is expected to eq "puts 'example'\n" without include_final_newline is expected to eq "puts 'example'" with beginning of one line with include_final_newline is expected to eq "puts 'another example'\n" without include_final_newline is expected to eq "puts 'another example'" with a whole line plus beginning of next line without include_final_newline is expected to eq "puts 'example'\nputs 'another example'" with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n" with end of one line without include_final_newline is expected to eq "puts 'example'" with include_final_newline is expected to eq "puts 'example'\n" with parts of four lines with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else\n" without include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n\nsomething_else" with parts of two lines with include_final_newline is expected to eq "puts 'example'\nputs 'another example'\n" without include_final_newline is expected to eq "puts 'example'\nputs 'another example'" when source doesn't end with a newline with include_final_newline is expected to eq "newline_at_end" is expected to eq 30 without include_final_newline is expected to eq "newline_at_end" RuboCop::Cop::Layout::ClosingHeredocIndentation accepts correctly indented closing heredoc when aligned at the beginning of method definition and using `strip_indent` does not register an offense for correctly indented empty heredocs registers an offense for incorrectly indented empty heredocs accepts correctly indented closing heredoc when aligned at the beginning of method definition does not register an offense for a << heredoc accepts correctly indented closing heredoc when heredoc contents is after closing heredoc accepts correctly indented closing heredoc when heredoc contents with blank line accepts correctly indented closing heredoc accepts correctly indented closing heredoc when aligned at the beginning of method definition and content is empty registers an offense for bad indentation of a closing heredoc accepts correctly indented closing heredoc when heredoc contents is before closing heredoc RuboCop::Cop::Naming::BinaryOperatorParameterName does not register an offense for []= does not register an offense for << does not register an offense for arg named _other registers an offense for `#eql?` when argument is not named other does not register an offense for arg named other does not register an offense for === registers an offense for `#equal?` when argument is not named other does not register an offense for non binary operators registers an offense for `#+` when argument is not named other works properly even if the argument not surrounded with braces does not register an offense for [] RuboCop::Cop::Severity is frozen overrides #to_s redefines == to compare severities has a few required attributes Comparable error is expected to be < fatal warning is expected to be < error refactor is expected to be < convention convention is expected to be < warning #level error is expected to eq 4 convention is expected to eq 2 fatal is expected to eq 5 refactor is expected to eq 1 warning is expected to eq 3 constructs from code C is expected to eq # E is expected to eq # F is expected to eq # W is expected to eq # R is expected to eq # #code fatal is expected to eq "F" refactor is expected to eq "R" convention is expected to eq "C" error is expected to eq "E" warning is expected to eq "W" RuboCop::Cop::Layout::MultilineBlockLayout autocorrects in more complex case with lambda and assignment, and aligns the next line two spaces out from the start of the block registers an offense and corrects for missing newline in do/end block with params registers an offense and corrects line-break before arguments with empty block does not register offenses when there is a newline for {} block registers an offense and corrects for missing newline in {} block with params registers offenses when there are not too many parameters to fit on one line registers an offense and corrects line-break within arguments registers an offense for missing newline in do/end block w/o params registers an offense and corrects line-break before arguments registers offenses and corrrects for new lambda literal syntax registers an offense and corrects for missing newline before opening parenthesis `(` for block body does not register an offense for one-line do/end blocks does not register offenses when there are too many parameters to fit on one line does not register offenses when there is a newline for do/end block doesn't move end keyword in a way which causes infinite loop in combination with Style/BlockEndNewLine auto-corrects nested parens correctly does not error out when the block is empty does not register an offense for one-line {} blocks registers an offense and corrects a line break within destructured arguments registers an offense and corrects a do/end block with a mult-line body does not auto-correct a trailing comma when only one argument is present registers an offense and corrects a line-break within arguments registers an offense and corrects for missing newline in {} block w/o params registers offenses and corrects for lambdas considers the extra space required to join the lines together RuboCop::Cop::Naming::HeredocDelimiterNaming with a squiggly heredoc registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter with a non-interpolated heredoc when using non-word delimiters registers an offense when using double quoted delimiters registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter when using back tick delimiters does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter when using single quoted delimiters registers an offense with a non-meaningful delimiter does not register an offense with a meaningful delimiter with multiple heredocs starting on the same line registers an offense with a leading non-meaningful delimiter does not register an offense with meaningful delimiters registers an offense with a trailing non-meaningful delimiter with a naked heredoc does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter with an interpolated heredoc does not register an offense with a meaningful delimiter registers an offense with a non-meaningful delimiter when the delimiter contains non-letter characters does not register an offense when delimiter contains an underscore does not register an offense when delimiter contains a number RuboCop::Cop::Security::YAMLLoad registers an offense and corrects a fully qualified ::YAML.load does not register an offense for YAML.load under a different namespace does not register an offense for YAML.dump registers an offense and corrects load with a literal string RuboCop::Cop::Style::ParallelAssignment corrects when using nested indentation corrects when the right variable is a symbol array allows more right variables than left variables registers an offense when right hand side has namespaced constants registers an offense when assigning to same variables in same order corrects when using single indentation corrects when the number of left hand variables matches the number of right hand variables corrects when the right variable is a word array corrects when using constants corrects parallel assignment in until statements corrects when the right variable is an array registers an offense with attributes when assignments must be reordered to preserve meaning corrects when the expression uses a modifier until statement corrects when the expression uses a modifier if statement inside a method allows more left variables than right variables corrects parallel assignment in while statements registers an offense when the right side has mixed expressions corrects when the expression uses a modifier rescue statement as the only thing inside of a method corrects when the expression is missing spaces registers an offense when the right side has mulitple arrays corrects when the expression uses a modifier while statement registers an offense when the right side has constants registers an offense when the right side has multiple hashes corrects when the expression uses a modifier unless statement registers an offense when the right side has methods with/without blocks corrects parallel assignment in unless statements corrects parallel assignment inside rescue statements within method definitions corrects when assigning to method returns corrects when the expression uses a modifier rescue statement inside of a method corrects when assigning from multiple methods with blocks corrects when the expression uses a modifier if statement registers an offense when assignments must be reordered to preserve meaning registers an offense when left hand side ends with an implicit variable corrects when assignments must be reordered to avoid changing meaning registers an offense with indices of different variables registers an offense when right hand side has maps with blocks registers an offense when assigning to namespaced constants allows expanding an assigned var corrects parallel assignment in rescue statements within begin ... rescue corrects parallel assignment in if statements corrects when the expression uses a modifier rescue statement registers an offense with indices registers an offense with indices and attributes when assignments must be reordered to preserve meaning behaves like allowed allows assignment of: a, = 1, 2, 3 behaves like allowed allows assignment of: CONSTANT, = 1, 2 behaves like allowed allows assignment of: obj.attr1, ary[0] = ary[0], obj.attr1 behaves like allowed allows assignment of: begin_token, end_token = CONSTANT behaves like allowed allows assignment of: a, b = *foo behaves like allowed allows assignment of: a, b = (a + b), (a - b) behaves like allowed allows assignment of: a, b = foo.map { |e| e.id } behaves like allowed allows assignment of: a, *b = [1, 2, 3] behaves like allowed allows assignment of: a, b, c = 1, 2, *node behaves like allowed allows assignment of: a, = *foo behaves like allowed allows assignment of: a, = 1 behaves like allowed allows assignment of: a, b, c = b, c, a behaves like allowed allows assignment of: a, b = b, a behaves like allowed allows assignment of: array = [1, 2, 3]; a, = array; behaves like allowed allows assignment of: ary[0], ary[1], ary[2] = ary[1], ary[2], ary[0] behaves like allowed allows assignment of: a = a behaves like allowed allows assignment of: a = 1 behaves like allowed allows assignment of: a, = *'foo' behaves like allowed allows assignment of: self.a, self.b = self.b, self.a behaves like allowed allows assignment of: a, b = foo() behaves like allowed allows assignment of: a = 1; b = 2; behaves like allowed allows assignment of: *a, b = [1, 2, 3] behaves like allowed allows assignment of: a, b, c = *node, 1, 2 using custom indentation width works with nesting works with standard correction works with rescue works with guard clauses behaves like allowed allows assignment of: a[0], a[1] = a[1], a[0] behaves like allowed allows assignment of: foo = [1, 2, 3]; a, b, c = foo; behaves like allowed allows assignment of: obj.attr1, obj.attr2 = obj.attr2, obj.attr1 behaves like allowed allows assignment of: a, = a behaves like allowed allows assignment of: a, b = Float::INFINITY behaves like allowed allows assignment of: a = *'foo' behaves like allowed allows assignment of: self.a, self.b = b, a RuboCop::Cop::Lint::Void registers an offense for void `self` if not on last line registers an offense for void op - if not on last line registers an offense for void lit [1] if not on last line accepts void op == by itself without a begin block registers an offense for void var var if not on last line registers an offense for void unary op ! if not on last line registers an offense for void `defined?` if not on last line registers an offense for void lit /test/ if not on last line accepts void op + by itself without a begin block handles explicit begin blocks accepts void unary op ~ by itself without a begin block accepts void op == if on last line accepts void op > if on last line accepts void unary op ~ if on last line registers an offense for void op != if not on last line accepts short call syntax accepts backtick commands accepts void op + if on last line accepts void op < if on last line registers an offense for void op === if not on last line accepts void unary op ! by itself without a begin block registers two offenses for void literals in `#tap` method handles empty block registers an offense for void op > if not on last line accepts void op % if on last line accepts void op < by itself without a begin block accepts void op * if on last line registers an offense for void lit 1 if not on last line registers two offenses for void literals in a `for` registers an offense for void var $var if not on last line registers an offense for void op * if not on last line accepts void op <= by itself without a begin block accepts void op != by itself without a begin block registers two offenses for void literals in a `#each` method registers an offense for void op < if not on last line registers an offense for void var @@var if not on last line registers an offense for void lit 2.0 if not on last line registers an offense for void op >= if not on last line accepts void op <=> if on last line accepts void op >= by itself without a begin block registers two offenses for void literals in a setter method registers an offense for void sign op + if not on last line accepts void op === by itself without a begin block registers an offense for void op / if not on last line accepts void op >= if on last line accepts void op - by itself without a begin block registers an offense for void literal in a method definition registers an offense for void var VAR if not on last line accepts void op % by itself without a begin block registers two offenses for void literals in an initialize method accepts void op / by itself without a begin block registers an offense for void op <=> if not on last line registers an offense for void op == if not on last line registers an offense for void lit :test if not on last line accepts void op <=> by itself without a begin block accepts percent-x commands registers an offense for void op + if not on last line accepts void unary op - if on last line accepts void unary op + if on last line accepts void op / if on last line accepts void op * by itself without a begin block registers an offense for void lit {} if not on last line registers an offense for void unary op ~ if not on last line accepts void op <= if on last line registers an offense for void op % if not on last line accepts void op - if on last line accepts void unary op ! if on last line registers an offense for void op <= if not on last line accepts void op > by itself without a begin block registers an offense for void sign op - if not on last line accepts void unary op - by itself without a begin block accepts void op === if on last line handles `#each` block with single expression accepts void op != if on last line registers an offense for void var @var if not on last line accepts void unary op + by itself without a begin block when not checking for methods with no side effects does not register an offense for void nonmutating methods when checking for methods with no side effects registers an offense for chained methods registers an offense if not on last line RuboCop::Cop::Lint::Loop registers an offense and corrects for begin/end/while accepts loop/break if registers an offense for begin/end/until accepts loop/break unless RuboCop::Cop::Style::AccessModifierDeclarations when `inline` is configured does not offend when private is inlined with a method accepts when #{access_modifier} is a hash literal value does not offend when protected is inlined with a symbol does not offend when protected is inlined with a method offends when protected is not inlined and has a comment does not offend when public is inlined with a method offends when protected is not inlined offends when public is not inlined and has a comment does not offend when private is inlined with a symbol offends when public is not inlined accepts when #{access_modifier} is a hash literal value does not offend when public is inlined with a symbol accepts when #{access_modifier} is a hash literal value offends when private is not inlined and has a comment offends when private is not inlined do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol when `group` is configured offends when protected is inlined with a method offends when private is inlined with a method does not offend when private is not inlined and has a comment offends when public is inlined with a method accepts when #{access_modifier} is a hash literal value does not offend when private is not inlined accepts when #{access_modifier} is a hash literal value does not offend when public is not inlined accepts when #{access_modifier} is a hash literal value does not offend when public is not inlined and has a comment does not offend when protected is not inlined does not offend when protected is not inlined and has a comment do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol do not allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol allow access modifiers on symbols accepts when argument to #{access_modifier} is a symbol RuboCop::Cop::Lint::PercentStringArray detecting quotes or commas in a %w/%W string adds an offense and corrects when tokens contain both types of quotes accepts likely false positive %W(#{a} b) accepts likely false positive :"#{a}" adds an offense and corrects when there are no quotes but one comma accepts likely false positive %W(' " ! = # ,) accepts tokens without quotes or commas accepts likely false positive %w(' " ! = # ,) accepts likely false positive %w(' ") adds an offense and corrects when tokens contain quotes and are comma separated accepts likely false positive %W(' ") accepts tokens without quotes or commas adds an offense and corrects when one token is quoted but there are no commas accepts likely false positive %w(#{a} b) accepts likely false positive :"#{a}" adds an offense and corrects when tokens contain both types of quotes adds an offense and corrects when tokens contain quotes and are comma separated adds an offense and corrects when there are no quotes but one comma adds an offense and corrects when one token is quoted but there are no commas with invalid byte sequence in UTF-8 accepts if tokens contain invalid byte sequence only add an offense and corrects when tokens contain quotes with binary encoded source accepts if tokens contain no quotes adds an offense and corrects when tokens contain quotes RuboCop::Cop::Corrector #rewrite allows replacement of a range allows insertion after a source range allows removal of characters preceding range allows insertion before and after a source range allows removal of characters from range beginning accepts a node instead of a range allows removal of a range allows insertion before a source range raises a useful error if not given a node or a range allows removal of characters fron range ending when range is from incorrect source raises exception from insert_after raises exception from replace raises exception from remove_preceding raises exception from remove_leading raises exception from remove_trailing raises exception from insert_before raises exception from remove RuboCop::Cop::Lint::EmptyConditionalBody does not register an offense for missing `unless` body with a comment registers an offense for missing `elsif` body does not register an offense for missing `if` body with a comment registers an offense for missing `unless` body does not register an offense for missing `elsif` body with a comment registers an offense for missing `if` body when AllowComments is false registers an offense for missing `if` body with a comment registers an offense for missing `elsif` body with a comment registers an offense for missing `unless` body with a comment RuboCop::YAMLDuplicationChecker when yaml has duplicated keys in the top level calls block >= Ruby 2.5 calls block with keys when yaml has duplicated keys in the second level calls block >= Ruby 2.5 calls block with keys when yaml does not have any duplication does not call block RuboCop::Cop::Lint::DuplicateRescueException registers an offense when duplicate exception exists within rescues with empty `rescue` branch registers an offense when duplicate exception exists registers an offense when duplicate exception splat exists registers an offense when duplicate exception exists within rescues with `else` branch does not register an offense when there are no duplicate exceptions registers an offense when multiple duplicate exceptions exist RuboCop::Cop::Style::UnpackFirst registers offense when using `#unpack` with `#first` when using `#unpack` with `#at` when using `#unpack` with dot and square brackets when using `#unpack` with square brackets when using `#unpack` with `#slice` does not register offense when using `#unpack1` when using `#unpack` accessing second element RuboCop::Cop::Layout::ArgumentAlignment aligned with first argument can handle a string literal as other argument registers an offense and corrects multiline missed indendation registers an offense and correct multi-line parametersindented too far can handle a multiline hash as second parameter doesn't get confused by extra comma at the end doesn't get confused by a symbol argument accepts braceless hashes accepts correctly aligned arguments with fullwidth characters can handle a call with a block inside another call does not crash in autocorrect on dynamic string in parameter value doesn't get confused by symbols with embedded expressions can handle a method call within a method call can handle a correctly aligned string literal as first argument registers an offense and corrects splat operator doesn't crash and burn when there are nested issues accepts the first parameter being on a new row accepts calls that only span one line registers an offense and corrects arguments with double indent can handle a ternary condition with a block reference can handle a call embedded in a string can handle other method calls without parentheses accepts multiline []= method call can handle do-end registers an offense and corrects arguments with single indent can handle parentheses used with no arguments doesn't get confused by a line break inside a parameter registers an offense and corrects multi-line outdented parameters can handle method calls without parentheses accepts correctly aligned arguments can handle heredoc strings doesn't get confused by regexen with embedded expressions assigned methods accepts the first parameter being on method row accepts the first parameter being on a new row when using safe navigation operator registers an offense and corrects arguments with single indent aligned with fixed indentation autocorrects by outdenting when indented too far autocorrects by indenting when not indented autocorrects when first line is indented assigned methods with ArgumentAlignment:IndentationWidth set to 4 accepts the first parameter being on method row accepts the first parameter being on a new row with IndentationWidth:Width set to 4 accepts the first parameter being on a new row accepts the first parameter being on method row autocorrects even when first argument is in wrong position multi-line method calls can handle existing indentation from multi-line method calls registers offenses and corrects double indentation from relevant method autocorrects relative to position of relevant method call does not err on method call without a method name RuboCop::PathUtil #relative_path supports custom base paths builds paths relative to PWD by default as a stop-gap #match_path? does not match file in a subdirectory does not match dir/** for file in hidden dir matches dir/** for hidden file matches glob expressions matches strings to the full path does not match invalid UTF-8 paths matches regexps #absolute? returns a falsey value for a path beginning with a directory name returns a truthy value for a path beginning with slash RuboCop::Cop::Layout::SpaceInsideStringInterpolation when EnforcedStyle is space accepts empty interpolation for ill-formatted string interpolations registers offenses and autocorrects for well-formatted string interpolations does not register an offense for excess literal spacing for "no_space" style formatted string interpolations registers offenses and autocorrects when EnforcedStyle is no_space does not touch spaces inside the interpolated expression accepts empty interpolation for well-formatted string interpolations accepts excess literal spacing for "space" style formatted string interpolations registers offenses and autocorrects for ill-formatted string interpolations registers offenses and autocorrects finds interpolations in string-like contexts when interpolation starts or ends with a line break does not register an offense ignores comments and whitespace when looking for line breaks RuboCop::Cop::Style::FormatStringToken supports flags and modifiers handles dstrs ignores `%r` regexp ignores xstr ignores time format and unrelated `format` method using ignores regexp ignores http links ignores time format (when used as argument to strftime) handles __FILE__ ignores time format when it is stored in a variable ignores percent escapes ignores placeholder arguments ignores time format (when used as argument to strptime) works inside hashes behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for template style configures the enforced style to template after inspecting "%{a}" when enforced style is template configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style supports dynamic string with interpolation when enforced style is annotated gives a helpful error message behaves like enforced styles for format string tokens when enforced style is annotated configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for template style supports dynamic string with interpolation when enforced style is template supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is annotated supports dynamic string with interpolation registers offenses for template style sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for template style when enforced style is template sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is annotated supports dynamic string with interpolation registers offenses for template style configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" behaves like enforced styles for format string tokens when enforced style is template sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style supports dynamic string with interpolation when enforced style is annotated supports dynamic string with interpolation registers offenses for template style configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation when enforced style is template configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style supports dynamic string with interpolation behaves like enforced styles for format string tokens when enforced style is annotated configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for template style supports dynamic string with interpolation when enforced style is template registers offenses for annotated style supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" when enforced style is template gives a helpful error message behaves like enforced styles for format string tokens when enforced style is template registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" when enforced style is annotated registers offenses for template style sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for template style behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" registers offenses for template style behaves like enforced styles for format string tokens when enforced style is template supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style configures the enforced style to template after inspecting "%{a}" when enforced style is annotated registers offenses for template style sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation behaves like enforced styles for format string tokens when enforced style is annotated registers offenses for template style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" when enforced style is template configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" registers offenses for template style behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" registers offenses for template style supports dynamic string with interpolation configures the enforced style to template after inspecting "%{a}" when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation sets the enforced style to annotated after inspecting "%s" registers offenses for annotated style behaves like enforced styles for format string tokens when enforced style is template configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for annotated style sets the enforced style to annotated after inspecting "%s" when enforced style is annotated configures the enforced style to template after inspecting "%{a}" supports dynamic string with interpolation registers offenses for template style sets the enforced style to annotated after inspecting "%s" when enforced style is unannotated gives a helpful error message behaves like enforced styles for format string tokens when enforced style is annotated sets the enforced style to annotated after inspecting "%s" configures the enforced style to template after inspecting "%{a}" registers offenses for template style supports dynamic string with interpolation when enforced style is template configures the enforced style to template after inspecting "%{a}" sets the enforced style to annotated after inspecting "%s" supports dynamic string with interpolation registers offenses for annotated style RuboCop::Cop::Style::GlobalStdStream does not register an offense when assigning std stream const to std stream gvar does not register an offense when assigning other const to std stream gvar registers an offense and corrects when using std stream as const does not register an offense when using non std stream const RuboCop::Cop::Layout::SpaceAfterMethodName accepts a def without arguments accepts a defs without arguments accepts class method def with arguments but no parentheses accepts a def with arguments but no parentheses registers an offense and corrects def with space before the parenthesis accepts an assignment def with arguments but no parentheses registers offense and corrects class def with space before parenthesis registers offense and corrects assignment def with space before parenthesis RuboCop::Cop::Style::WhileUntilDo accepts do in single-line while registers an offense for do in multiline until accepts multi-line until without do accepts do in single-line until registers an offense for do in multiline while accepts multi-line while without do RuboCop::Cop::Lint::MissingCopEnableDirective when the maximum range size is infinite registers an offense when a cop is disabled and never re-enabled does not register an offense when the disable cop is re-enabled when the maximum range size is finite registers an offense when a cop is disabled for too many lines registers an offense when a cop is disabled and never re-enabled does not register an offense when the disable cop is re-enabled within the limit RuboCop::Cop::Style::NegatedUnless does not blow up for empty unless condition does not blow up for ternary ops does not blow up on a negated ternary operator does not blow up for empty if condition with “postfix” style does not register an offense for prefix registers an offense for postfix with “prefix” style registers an offense for prefix does not register an offense for postfix with “both” style accepts an unless/else with negative condition registers an offense for unless with exclamation point condition registers an offense for unless with "not" condition autocorrects by replacing parenthesized unless not with if accepts an unless where the condition is doubly negated accepts an unless where only part of the condition is negated RuboCop::Cop::Metrics::Utils::CodeLengthCalculator #calculate raises when unknown foldable type is passed when method does not count blank lines folds hashes if asked counts comments if asked folds heredocs if asked folds arrays if asked calculates method length when class folds heredocs if asked does not count lines of inner classes folds hashes if asked counts comments if asked folds arrays if asked does not count blank lines calculates class length RuboCop::Cop::Style::Copyright does not register an offense when the notice is present does not register an offense when the notice is not the first comment does not register an offense when the notice is in a block comment when the copyright notice is missing and the source code file starts with a shebang adds an offense when the copyright notice comes after any code adds an offense when the source code file is empty adds an offense when the copyright notice is missing fails to autocorrect if no AutocorrectNotice is given fails to autocorrect when the AutocorrectNotice does not match the Notice pattern adds an offense when the copyright notice is missing and the source code file starts with shebang and an encoding comment adds an offense when the copyright notice is missing and the source code file starts with an encoding comment adds an offense RuboCop::Cop::Lint::SuppressedException with AllowComments set to false does not register an offense for rescue with body registers an offense for empty rescue block when empty rescue for `def` registers an offense for empty rescue without comment registers an offense for empty rescue with comment Ruby 2.5 or higher when empty rescue for `do` block registers an offense for empty rescue without comment registers an offense for empty rescue with comment when empty rescue for defs registers an offense for empty rescue without comment registers an offense for empty rescue with comment with AllowComments set to true does not register an offense for empty rescue with comment registers an offense for empty rescue on single line with a comment after it when empty rescue for `def` does not register an offense for empty rescue with comment registers an offense for empty rescue without comment when empty rescue for `defs` does not register an offense for empty rescue with comment registers an offense for empty rescue without comment Ruby 2.5 or higher when empty rescue for `do` block does not register an offense for empty rescue with comment registers an offense for empty rescue without comment RuboCop::Cop::Naming::AccessorMethodName registers an offense for singleton method set_... with one args accepts singleton method get_something with args registers an offense for method set_something with one arg registers an offense for singleton method get_... with no args accepts method set_something with no args accepts method get_something with args accepts singleton method set_something with two args accepts singleton method set_something with no args registers an offense for method get_... with no args accepts method set_something with two args RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis incorrect cases incorrect case in array with double heredoc and spaced out comma detects simple incorrect case comma detects incorrect case with other param before constructor and raise call detects incorrect case nested method call with comma detects nested incorrect case detects simple incorrect case comma with spaces detects simple incorrect case with call after trailing comma detects complex incorrect case with multiple calls detects and fixes the first detects and fixes the second incorrect case in array with nested calls and double heredoc and spaced out comma detects simple incorrect case detects simple incorrect case hash detects incorrect case with other param before constructor detects double incorrect case detects incorrect case in array with spaced out comma detects double incorrect case new line chained calls detects simple incorrect case comma with spaces and comma in heredoc detects incorrect case with other param before detects double case new line detects and fixes complex chained incorrect case with multiple calls detects and fixes the first simple incorrect case with call after detects simple incorrect case squiggles detects incorrect case with other param after detects correct cases accepts correct case with other param before accepts simple correct case accepts correct case with other param after accepts double correct case accepts double correct case nested accepts hash correct case accepts double correct case new line invocation after the HEREDOC ignores tr ignores random call after ignores random call RuboCop::Cop::Style::EmptyBlockParameter accepts a block that is {} style without parameter registers an offense for an empty block parameter with {} style accepts a non-empty block parameter with {} style accepts a non-empty block parameter with do-end style accepts an empty block parameter with a lambda registers an offense for an empty block parameter with do-end wtyle registers an offense for an empty block parameter with lambda accepts a block that is do-end style without parameter registers an offense for an empty block parameter with super RuboCop::Cop::Style::MethodCallWithArgsParentheses when EnforcedStyle is omit_parentheses auto-corrects multi-line calls with trailing whitespace accepts special lambda call syntax accepts parens in block passing calls accepts parens in single-line inheritance register an offense for hashes in keyword values register an offense for parens in do-end blocks accepts parens in chaining with safe operators accepts parens in literals with unary operators as first argument register an offense for parens in method call without args register an offense in multi-line inheritance accepts parens in args splat register an offense for camel-case methods with arguments register an offense for parens in the last chain register an offense for multi-line method calls accepts parens in blocks with braces register an offense for superclass call with parens auto-corrects single-line calls accepts parens in range literals accepts parens in implicit #to_proc accepts no parens in method call with args accepts parens in chaining with operators accepts parens in calls with logical operators accepts parens in calls with hash as arg register an offense in assignments accepts parens in argument calls with braced blocks accepts parens in super calls with braced blocks accepts parens in slash regexp literal as argument register an offense in complex conditionals accepts parens in ternary condition calls accepts parens in default keyword argument value calls accepts parens in args with ternary conditions accepts parens in super method calls as arguments accepts no parens in method call without args accepts parens in nested method args accepts parens in calls with args with logical operators accepts parens in camel case method without args accepts parens in method args accepts parens in splat calls register an offense for %r regex literal as arguments accepts parens in default argument value calls auto-corrects complex multi-line calls accepts parens in super without args accepts parens in chained method calls register an offense for yield call with parens allowing parens in camel-case methods accepts parens for camel-case method names allowing parenthesis in chaining register offense for single-line chaining without previous parens accepts no parens in the last call if previous calls with parens accepts parens in the last call if any previous calls with parentheses register offense for multi-line chaining without previous parens allowing parens in multi-line calls accepts parens for multi-line calls when EnforcedStyle is require_parentheses (default) register an offense for methods starting with capital without parens register no offense for yield without args auto-corrects calls where the argument node is a number auto-corrects parenthesized args for local methods by removing space register an offense for non-receiver method call without parens auto-corrects calls with multiple args by adding needed braces accepts no parens for unary operators register an offense for superclass call without parens auto-corrects calls where arg is method call register no offense for superclass call without args accepts parens in method call with do-end blocks register no offense for superclass call with parens auto-corrects fully parenthesized args by removing space register an offense for method call without parens accepts parens in method call with args auto-corrects calls where the argument node is a constant accepts no parens in method call without args auto-corrects call with multiple args by adding braces auto-corrects partially parenthesized args by adding needed braces accepts no parens for operators auto-corrects calls where multiple args are method calls register an offense for yield without parens accepts no parens for setter methods ignores method listed in IgnoredMethods when using safe navigation operator register an offense for method call without parens when inspecting macro methods in a class body does not register an offense in a module body does not register an offense IgnoredPatterns ignored methods listed in IgnoredPatterns when inspecting macro methods with IncludedMacros in a module body finds offense in a class body finds offense for a macro not on the included list allows for a macro in both IncludedMacros and IgnoredMethods allows RuboCop::Cop::Gemspec::RubyVersionGlobalsUsage registers an offense when using `RUBY_VERSION` does not register an offense when no `RUBY_VERSION` registers an offense when using `::RUBY_VERSION` RuboCop::Cop::Lint::DuplicateMethods registers offense for a duplicate instance method in separate files doesn't register an offense for different private methods in dynamic class doesn't register an offense for alias for gvar in dynamic module doesn't register an offense for non-duplicate alias in dynamic module registers an offense for duplicate method in class registers offenses for duplicate attr_accessor in dynamic module doesn't register an offense for non-duplicate method in class accepts for attr_writer and getter in module registers an offense for duplicate attr_writer in dynamic class registers an offense for duplicate class methods in class registers offenses for duplicate attr_accessor in module registers an offense for duplicate attr_writer in class_eval block registers an offense for duplicate protected methods in class doesn't register an offense for non-duplicate method in class_eval block doesn't register an offense for non-duplicate method in dynamic class registers an offense for duplicate class methods with named receiver in module registers an offense when class << exp is used (PENDING: No reason given) understands class << self registers an offense for duplicate attr_reader in dynamic class registers an offense when class << exp is used (PENDING: No reason given) registers offenses for duplicate attr_accessor in dynamic class understands class << self doesn't register offense for non-duplicate class methods in dynamic module doesn't register offense for non-duplicate class methods in class registers an offense for duplicate attr in dynamic module registers an offense for duplicate private self methods in class_eval block registers an offense for duplicate protected methods in dynamic module registers an offense for duplicate alias in dynamic class registers an offense for duplicate private self methods in module registers an offense for a duplicate class method in separate dynamic class blocks doesn't register an offense for non-duplicate method in dynamic module doesn't register an offense for non-duplicate method in module registers an offense for duplicate attr in class_eval block registers an offense for duplicate attr in module registers an offense for duplicate alias in module registers an offense for duplicate method in dynamic class registers an offense for duplicate private self methods in dynamic module registers an offense for duplicate class methods with named receiver in class registers offenses for duplicate attr_accessor in class_eval block registers an offense for duplicate class methods in class_eval block registers 2 offenses for pair of duplicate methods in module registers an offense for duplicate method in dynamic module registers an offense for duplicate protected methods in class_eval block registers an offense when class << exp is used (PENDING: No reason given) doesn't register an offense for non-duplicate alias in dynamic class registers an offense for a duplicate class method in separate class blocks accepts for attr_writer and getter in dynamic module registers an offense for duplicate attr_reader in module accepts for attr_writer and getter in class registers an offense for duplicate class methods in module accepts for attr_reader and setter in module registers an offense when class << exp is used (PENDING: No reason given) registers an offense for duplicate class methods with `self` and named receiver in module recognizes difference between instance and class methods in module doesn't register an offense for non-duplicate alias in class registers an offense for duplicate method in class_eval block registers an offense for duplicate attr_reader in class registers 2 offenses for pair of duplicate methods in dynamic class doesn't register an offense for different private methods in class accepts for attr_reader and setter in dynamic class registers an offense for duplicate alias in dynamic module registers offenses for duplicate assignable attr in module understands nested modules doesn't register offense for non-duplicate class methods in module registers an offense when class << exp is used (PENDING: No reason given) registers an offense for duplicate class methods in dynamic class registers an offense for duplicate attr_reader in dynamic module registers an offense for a duplicate instance method in separate class_eval block blocks registers an offense for duplicate alias_method in class understands nested modules registers an offense for duplicate class methods with `self` and named receiver in class registers an offense for duplicate alias_method in class_eval block understands nested modules registers offenses for duplicate assignable attr in dynamic module registers an offense for a duplicate instance method in separate class blocks registers offense for a duplicate instance method in separate files registers an offense for duplicate attr_writer in module registers an offense for a duplicate instance method in separate dynamic class blocks ignores Class.new blocks which are assigned to local variables ignores method definitions in RSpec `describe` blocks doesn't register an offense for different private methods in class_eval block registers an offense for duplicate private methods in class_eval block registers an offense for a duplicate instance method in separate module blocks accepts for non-duplicate alias_method in module registers offenses for duplicate assignable attr in class_eval block doesn't register offense for non-duplicate class methods in class_eval block registers an offense for duplicate attr in class registers offense for a duplicate instance method in separate files registers an offense for duplicate alias_method in module registers offense for a duplicate instance method in separate files registers an offense for duplicate private self methods in dynamic class doesn't register an offense for alias for gvar in module recognizes difference between instance and class methods in dynamic module recognizes difference between instance and class methods in dynamic class registers an offense for duplicate attr_writer in dynamic module accepts for attr_reader and setter in class_eval block registers an offense for duplicate attr_writer in class doesn't register offense for non-duplicate class methods in dynamic class registers an offense for duplicate private methods in dynamic module registers an offense for duplicate private methods in dynamic class understands class << self registers an offense for duplicate protected methods in module registers an offense for duplicate private methods in class doesn't register an offense for alias for gvar in class_eval block recognizes difference between instance and class methods in class_eval block accepts for attr_writer and getter in class_eval block registers an offense for duplicate alias_method in dynamic module registers an offense for duplicate alias_method in dynamic class registers an offense for duplicate protected methods in dynamic class registers 2 offenses for pair of duplicate methods in class accepts for attr_reader and setter in dynamic module registers an offense for duplicate method in module registers an offense for a duplicate class method in separate module blocks registers an offense for a duplicate class method in separate class_eval block blocks accepts for non-duplicate alias_method in class doesn't register an offense for different private methods in dynamic module registers an offense for duplicate attr in dynamic class registers an offense for duplicate class methods with `<<` and named receiver in class understands nested modules understands class << self registers an offense for a duplicate instance method in separate dynamic module blocks accepts for non-duplicate alias_method in class_eval block registers an offense for duplicate alias in class_eval block accepts for attr_writer and getter in dynamic class understands nested modules registers an offense for a duplicate class method in separate dynamic module blocks doesn't register an offense for non-duplicate alias in class_eval block registers offenses for duplicate attr_accessor in class understands class << A registers an offense for duplicate class methods with `<<` and named receiver in module accepts for non-duplicate alias_method in dynamic class registers an offense for duplicate alias in class registers 2 offenses for pair of duplicate methods in dynamic module doesn't register an offense for different private methods in module registers an offense for duplicate private self methods in class registers offense for a duplicate instance method in separate files registers an offense for duplicate class methods in dynamic module doesn't register an offense for non-duplicate alias in module understands class << self registers offenses for duplicate assignable attr in dynamic class doesn't register an offense for alias for gvar in dynamic class registers 2 offenses for pair of duplicate methods in class_eval block recognizes difference between instance and class methods in class accepts for non-duplicate alias_method in dynamic module handles class_eval with implicit receiver registers an offense for duplicate private methods in module registers an offense for duplicate attr_reader in class_eval block registers offenses for duplicate assignable attr in class accepts for attr_reader and setter in class registers an offense for duplicate methods at top level doesn't register an offense for alias for gvar in class when path is not in the project root adds a message with absolute path when path is in the project root adds a message with relative path RuboCop::Cop::Layout::EndOfLine when EnforcedStyle is crlf does not register offense for no CR at end of file registers an offense for CR+LF highlights the whole offending line does not register offenses after __END__ accepts an empty file and there are many lines ending with LF registers only one offense can inspect non-UTF-8 encoded source with proper encoding comment and the default external encoding is US_ASCII does not crash on UTF-8 encoded non-ascii characters can inspect non-UTF-8 encoded source with proper encoding comment and source is a string registers an offense when EnforcedStyle is native registers an offense for an incorrect EOL when EnforcedStyle is lf highlights the whole offending line does not register offenses after __END__ registers an offense for CR+LF registers an offense for CR at end of file accepts an empty file and there are many lines ending with CR+LF can inspect non-UTF-8 encoded source with proper encoding comment registers only one offense and source is a string registers an offense and the default external encoding is US_ASCII does not crash on UTF-8 encoded non-ascii characters can inspect non-UTF-8 encoded source with proper encoding comment RuboCop::Cop::Lint::DeprecatedOpenSSLConstant does not register an offense with cipher constant and send argument is a method registers an offense with AES + blocksize constant and corrects registers an offense when using an digest constant with chained methods and corrects registers an offense when using ::Digest class methods on an algorithm constant and corrects registers an offense with cipher constant and one argument and corrects registers an offense when building an instance using an digest constant and corrects does not register an offense with cipher constant and argument is a variable registers an offense with cipher constant and two arguments and corrects does not register an offense when using cipher with a string registers an offense with cipher constant and double quoted string argument and corrects does not register an offense with cipher constant and argument is a constant does not register an offense when using ::Digest class methods with an algorithm string and value does not register an offense when building digest using an algorithm string registers an offense with AES + blocksize constant and mode argument and corrects when used in a block registers an offense when using ::Digest class methods on an algorithm constant and corrects RuboCop::Cop::Style::RedundantSort registers an offense when [-1] is called on sort registers an offense when [-1] is called on sort_by registers an offense when at(0) is called on sort_by does not register an offense when sort_by is not given a block does not register an offense when sort_by is used without first does not register an offense for sort!.first does not register an offense when first has an argument registers an offense when slice(0) is called on sort_by registers an offense when last is called on sort_by no block registers an offense when last is called with sort registers an offense when first is called with sort registers an offense when [](-1) is called on sort_by registers an offense when [](0) is called on sort does not register an offense when first is used before sort does not register an offense when first is used without sort_by registers an offense when slice(-1) is called on sort_by registers an offense when [0] is called on sort_by registers an offense when [0] is called on sort registers an offense when last is called on sort with comparator registers an offense when slice(0) is called on sort registers an offense when first is called on sort_by no block registers an offense when at(-1) is called with sort does not register an offense for sort_by!(&:something).last registers an offense when first is called on sort_by registers an offense when last is called on sort_by >= Ruby 2.7 when using numbered parameter registers an offense and corrects when first is called on sort_by registers an offense and corrects when at(0) is called on sort_by registers an offense and corrects when last is called on sort with comparator when not taking first or last element does not register an offense when at(-2) is called on sort_by does not register an offense when [1] is called on sort RuboCop::Cop::Naming::HeredocDelimiterCase when enforced style is lowercase with a non-interpolated heredoc does not register an offense with a lowercase delimiter registers an offense with an uppercase delimiter registers an offense with a camel case delimiter with an interpolated heredoc does not register an offense with a lowercase delimiter registers an offense with a camel case delimiter registers an offense with an uppercase delimiter with a squiggly heredoc registers an offense with an uppercase delimiter does not register an offense with a lowercase delimiter registers an offense with a camel case delimiter when enforced style is uppercase with an interpolated heredoc does not register an offense with an uppercase delimiter registers an offense with a lowercase delimiter registers an offense with a camel case delimiter with a squiggly heredoc registers an offense with a camel case delimiter does not register an offense with an uppercase delimiter registers an offense with a lowercase delimiter with a non-interpolated heredoc when using single quoted delimiters does not register an offense with an uppercase delimiter registers an offense with a camel case delimiter registers an offense with a lowercase delimiter when using double quoted delimiters registers an offense with a lowercase delimiter registers an offense with a camel case delimiter does not register an offense with an uppercase delimiter when using non-word delimiters does not register an offense when using back tick delimiters registers an offense with a lowercase delimiter registers an offense with a camel case delimiter does not register an offense with an uppercase delimiter RuboCop::Cop::Gemspec::RequiredRubyVersion registers an offense when `required_ruby_version` is not specified target ruby version > 2.7 registers an offense when `required_ruby_version` is specified with ~> and is lower than `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with >= and is lower than `TargetRubyVersion` false negatives does not register an offense when `required_ruby_version` is assigned as a variable (an array of string literal) does not register an offense when `required_ruby_version` is assigned as a variable (string literal) target ruby version > 2.6 does not register an offense when `required_ruby_version` is specified with ~> and equals `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with >= without a minor version and is lower than `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with >= and equals `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with ~> without a minor version and is lower than `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with >= without a patch version and equals `TargetRubyVersion` does not register an offense when `required_ruby_version` is specified with ~> without a patch version and equals `TargetRubyVersion` does not register an offense when lowest version of `required_ruby_version` equals `TargetRubyVersion` target ruby version > 2.5 registers an offense when `required_ruby_version` is specified with ~> and is higher than `TargetRubyVersion` registers an offense when `required_ruby_version` is specified with >= and is higher than `TargetRubyVersion` RuboCop::Cop::Metrics::MethodLength accepts empty methods does not count commented lines by default accepts a method with less than 5 lines accepts a method with multiline arguments and less than 5 lines of body properly counts lines when method ends with block is not fooled by one-liner methods, syntax #1 does not count blank lines is not fooled by one-liner methods, syntax #2 when method is defined with `define_method` registers an offense when method is an instance method registers an offense when method is defined on a singleton class registers an offense when method is a class method registers an offense when `CountAsOne` is not empty folds array into one line when CountComments is enabled also counts commented lines when method is defined in `ExcludedMethods` accepts the foo method with more than 5 lines still rejects other methods with more than 5 lines RuboCop::Cop::Layout::ClassStructure #autocorrect when there is a comment in the macro method autocorrects the offenses with attribute macros before after validations is expected to eq class Person include AnotherModule extend SomeModule CustomError = Cla...rotected_method end private def some_private_method end end with protected methods declared before private is expected to eq class MyClass def public_method end private def first_private...ar before `private_methods`. end def second_protected_method end end with a complete ordered example does not create offense simple example is expected to eq "class Person\n include AnotherModule\n extend SomeModule\n CONST = 'wrong place'\nend\n" RuboCop::Options option --cache fails if no argument is given accepts true as argument fails if unrecognized argument is given accepts false as argument --display-only-failed fails if given without --format junit works if given with --format junit -h/--help shows help text lists all builtin formatters exits cleanly --require requires the passed path incompatible cli options rejects using -V with --show-cops mentions all incompatible options when more than two are used rejects using -v with --show-cops rejects using -v with -V --disable-uncorrectable fails if given alone without --auto-correct/-a accepts together with --auto-correct-all accepts together with --auto-correct --safe-auto-correct is a deprecated alias --fail-level accepts severity initial letters accepts the "fake" severities A/autocorrect accepts full severity names -s/--stdin fails if no paths are given fails if more than one path is given succeeds with exactly one path --auto-gen-only-exclude fails if given without --auto-gen-config --auto-gen-config accepts other options --exclude-limit fails if given last without argument fails if given without --auto-gen-config fails if given first without argument fails if given alone without argument --parallel combined with --cache false fails with an error message combined with --fail-fast fails with an error message combined with --auto-correct fails with an error message combined with --auto-gen-config fails with an error message options precedence RUBOCOP_OPTS environment variable has lower precedence then command line options has higher precedence then options from .rubocop file .rubocop directory is ignored and command line options are used .rubocop file has lower precedence then command line options has lower precedence then options from RUBOCOP_OPTS env variable RuboCop::Cop::Style::BisectedAttrAccessor does not register an offense when accessors are withing different visibility scopes registers an offense and corrects when both accessors of the name exists registers an offense and corrects when attr and attr_writer exists does not register an offense when only one accessor of the name exists registers an offense and corrects when both accessors of the splat exists registers an offense and corrects when withing eigenclass registers an offense and corrects when both accessors of the name exists and accessor contains multiple names registers an offense and corrects when both accessors are in the same visibility scope does not register an offense when using `attr_accessor` RuboCop::Cop::Style::RedundantBegin accepts a defs with required begin block auto-corrects when there are trailing comments accepts a def with required begin block doesn't modify spacing when auto-correcting reports an offense for defs with redundant begin block accepts a def with a begin block after a statement reports an offense for def with redundant begin block reports an offense for single line def with redundant begin block >= ruby 2.5 accepts super with block registers an offense for a do-end block with redundant begin-end accepts a {} block with a begin-end accepts a stabby lambda with a begin-end accepts a block with a begin block after a statement < Ruby 2.5 accepts a do-end block with a begin-end RuboCop::Cop::Metrics::BlockNesting accepts `Max` levels of nesting accepts if/elsif `Max + 2` levels of `if` nesting registers an offense `Max + 1` levels of `if` nesting registers an offense when CountBlocks is true nested multiline block registers an offense nested inline block registers an offense nested modifier `while` registers an offense nested `while` registers an offense nested `rescue` registers an offense when CountBlocks is false accepts nested inline blocks accepts nested multiline blocks nested modifier `until` registers an offense Multiple nested `ifs` at same level registers 2 offenses nested `until` registers an offense nested `for` registers an offense nested `case` registers an offense RuboCop::Cop::InternalAffairs::NodeDestructuring registers an offense when destructuring using a splat does not register an offense when receiver is named `array` when destructuring using `node.children` registers an offense when receiver is named `send_node` registers an offense when receiver is named `node` RuboCop::Cop::Lint::HeredocMethodCallPosition incorrect cases simple incorrect case detects with trailing comma in method call detects simple incorrect case with paren detects chained case with parens detects chained case without args detects chained case no parens detects chained case with multiple line args detects correct cases accepts simple correct case ignores if no call accepts chained correct case RuboCop::Cop::Style::TrailingCommaInArguments with multi-line list of values when EnforcedStyleForMultiline is comma accepts trailing comma in a method call with hash parameters at the end registers an offense for no trailing comma in a method call with hash parameters at the end does not break when a safe method call is chained on the offending more complex one accepts an empty hash being passed as a method argument accepts a method call with two parameters on the same line accepts a trailing comma in a method call with single line hashes accepts no trailing comma in a method call with a multiline braceless hash at the end with more than one parameter on a line accepts missing comma after heredoc with comments does not break when a safe method call is chained on the offending simple one accepts a multiline call with a single argument and trailing comma does not break when a method call is chaned on the offending one when closing bracket is on same line as last value accepts a method call with Hash as last parameter split on multiple lines when EnforcedStyleForMultiline is consistent_comma accepts trailing comma in a method call with hash parameters at the end accepts no trailing comma in a method call with a block parameter at the end accepts a multiline call with arguments on a single line and trailing comma registers an offense for no trailing comma in a method call withtwo parameters on the same line accepts a multiline call with a single argument and trailing comma accepts a trailing comma in a method call with single line hashes accepts a trailing comma in a method call with a single hash parameter accepts a trailing comma in a method call with a single hash parameter to a receiver object accepts a multiline call with single argument on multiple lines auto-corrects missing comma after a heredoc registers an offense for no trailing comma in a method call with hash parameters at the end when closing bracket is on same line as last value registers an offense for a method call, with a Hash as the last parameter, split on multiple lines when EnforcedStyleForMultiline is no_comma registers an offense for trailing comma in a method call with hash parameters at the end accepts a method call with hash parameters at the end and no trailing comma accepts comma inside a modified heredoc parameter accepts comma inside a heredoc parameter at the end accepts comma inside a heredoc in brackets accepts comma inside a heredoc with comments inside accepts comma inside a heredoc with method and comments inside auto-corrects unwanted comma after modified heredoc parameter when there is string interpolation inside heredoc parameter accepts comma inside a heredoc parameter when on a single line auto-corrects unwanted comma inside string interpolation accepts comma inside a heredoc parameter with a single argument of anonymous function spanning multiple lines when EnforcedStyleForMultiline is consistent_comma accepts a single argument with no trailing comma with a single argument spanning multiple lines when EnforcedStyleForMultiline is consistent_comma accepts a single argument with no trailing comma with single line list of values when EnforcedStyleForMultiline is consistent_comma accepts method call without trailing comma with single element hash parameters at the end accepts method call without parameters accepts method call without trailing comma when a line break before a method call accepts chained single-line method calls accepts heredoc without trailing comma registers an offense for trailing comma in a method call registers an offense for trailing comma in a method call with hash parameters at the end accepts method call without trailing comma registers an offense for trailing comma preceded by whitespace in a method call when using safe navigation operator registers an offense for trailing comma in a method call with hash parameters at the end registers an offense for trailing comma in a method call when EnforcedStyleForMultiline is no_comma accepts method call without parameters accepts chained single-line method calls accepts method call without trailing comma when a line break before a method call registers an offense for trailing comma in a method call accepts method call without trailing comma registers an offense for trailing comma preceded by whitespace in a method call accepts method call without trailing comma with single element hash parameters at the end accepts heredoc without trailing comma registers an offense for trailing comma in a method call with hash parameters at the end when using safe navigation operator registers an offense for trailing comma in a method call registers an offense for trailing comma in a method call with hash parameters at the end when EnforcedStyleForMultiline is comma registers an offense for trailing comma in a method call accepts method call without trailing comma accepts heredoc without trailing comma accepts chained single-line method calls accepts method call without parameters registers an offense for trailing comma in a method call with hash parameters at the end accepts method call without trailing comma with single element hash parameters at the end registers an offense for trailing comma preceded by whitespace in a method call accepts method call without trailing comma when a line break before a method call when using safe navigation operator registers an offense for trailing comma in a method call with hash parameters at the end registers an offense for trailing comma in a method call RuboCop::Cop::Lint::UriEscapeUnescape registers an offense when using `::URI.unescape(enc_uri)` registers an offense when using `URI.escape('http://example.com')` registers an offense when using `::URI.decode(enc_uri)` registers an offense when using `URI.decode(enc_uri)` registers an offense when using `::URI.escape('http://example.com')` registers an offense when using `URI.encode('http://example.com')` registers an offense when using `URI.escape('@?@!', '!?')` registers an offense when using `::URI.encode('http://example.com)` registers an offense when using `URI.unescape(enc_uri)` RuboCop::Cop::Lint::UnusedMethodArgument when IgnoreEmptyMethods config parameter is set registers an offense for a non-empty method with multiple unused parameters accepts an empty method with a single unused parameter accepts an empty singleton method with a single unused parameter registers an offense for a non-empty method with a single unused parameter accepts an empty method with multiple unused parameters when IgnoreNotImplementedMethods config parameter is set accepts an empty method with multiple unused parameters accepts a method with a single unused parameter & raises ::NotImplementedError accepts a method with a single unused parameter & raises NotImplementedError accepts a method with a single unused parameter & fails with message accepts an empty singleton method with a single unused parameter &raise NotImplementedError registers an offense for a non-empty method with multiple unused parameters accepts a method with a single unused parameter & fails without message registers an offense for a non-empty method with a single unused parameter inspection in a method calling `super` with arguments when a method argument is unused registers an offense when a singleton method argument is unused registers an offense when a required keyword argument is unused registers an offense but does not suggest underscore-prefix in a method calling `binding` without arguments accepts all arguments inside another method definition registers offenses when a splat argument is unused registers an offense and preserves the splat in a method calling `super` without arguments when a method argument is not used explicitly accepts since the arguments are guaranteed to be the same as superclass' ones and the user has no control on them when a variable is unused does not care when a trailing block argument is unused registers an offense and removes the unused block arg when an argument with a default value is unused registers an offense and preserves the default value when a block argument is unused does not care when a method takes multiple arguments and all the arguments are unused registers offenses and suggests the use of `*` and auto-corrects to add underscore-prefix to all arguments and an argument is unused registers an offense and adds underscore-prefix and there is some whitespace around the unused argument registers an offense and preserves whitespace and arguments are swap-assigned accepts and one argument is assigned to another, whilst other's value is not used registers an offense in a method calling `binding` with arguments when a method argument is unused registers an offense when an optional keyword argument is unused registers an offense but does not suggest underscore-prefix and AllowUnusedKeywordArguments set does not care when an underscore-prefixed method argument is unused accepts when a method argument is used accepts RuboCop::Cop::Style::EmptyLambdaParameter does not crash on a super accepts a keyword lambda registers an offense for an empty block parameter with a lambda RuboCop::Cop::Style::EmptyMethod when configured with compact style with a non-empty instance method definition allows multi line method with comment allows single line method allows multi line method with an empty instance method definition registers an offense for method with arguments registers an offense for method with blank line registers an offense for empty method registers an offense for method with closing paren on following line allows single line method registers an offense for method with arguments without parens with a non-empty class method definition allows multi line method allows multi line method with comment allows single line method with an empty class method definition registers an offense for empty method with arguments registers an offense for empty method allows single line method registers an offense for method with blank line when configured with expanded style with an empty class method definition registers an offense for single line method allows multi line method with a blank line allows empty multi line method with a non-empty instance method definition allows multi line method allows multi line method with a comment allows single line method with a non-empty class method definition allows single line method allows multi line method with comment allows multi line method when method is nested in class scope registers an offense for single line method with an empty instance method definition allows multi line method registers an offense for single line method allows multi line method with blank line RuboCop::Cop::Lint::LiteralInInterpolation accepts interpolation of irange where endpoints are not literals handles backslach in double quotes when auto-correction accepts empty interpolation handles double quotes in single quotes when auto-correction handles nested interpolations when auto-correction accepts interpolation of xstr handles backslach in single quotes when auto-correction accepts interpolation of erange where endpoints are not literals behaves like literal interpolation removes interpolation around false when there is more text removes interpolation around multiple false registers an offense only for final false in interpolation registers an offense for false in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple :symbol registers an offense only for final :symbol in interpolation registers an offense for :symbol in interpolation and removes interpolation around it removes interpolation around :symbol when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final %w[v1 v2] in interpolation registers an offense for %w[v1 v2] in interpolation and removes interpolation around it removes interpolation around multiple %w[v1 v2] removes interpolation around %w[v1 v2] when there is more text when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %w[v1] when there is more text removes interpolation around multiple %w[v1] registers an offense only for final %w[v1] in interpolation registers an offense for %w[v1] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %i[s1 s2] when there is more text registers an offense for %i[s1 s2] in interpolation and removes interpolation around it removes interpolation around multiple %i[s1 s2] registers an offense only for final %i[s1 s2] in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final %i[ s1 s2 ] in interpolation removes interpolation around %i[ s1 s2 ] when there is more text removes interpolation around multiple %i[ s1 s2 ] registers an offense for %i[ s1 s2 ] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple {"a" => "b"} removes interpolation around {"a" => "b"} when there is more text registers an offense for {"a" => "b"} in interpolation and removes interpolation around it registers an offense only for final {"a" => "b"} in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %i[s1 s2] when there is more text removes interpolation around multiple %i[s1 s2] registers an offense only for final %i[s1 s2] in interpolation registers an offense for %i[s1 s2] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 1..2 when there is more text registers an offense only for final 1..2 in interpolation registers an offense for 1..2 in interpolation and removes interpolation around it removes interpolation around multiple 1..2 when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple 2.0 registers an offense for 2.0 in interpolation and removes interpolation around it removes interpolation around 2.0 when there is more text registers an offense only for final 2.0 in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 1.2e-3 when there is more text registers an offense for 1.2e-3 in interpolation and removes interpolation around it registers an offense only for final 1.2e-3 in interpolation removes interpolation around multiple 1.2e-3 when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for 0o377 in interpolation and removes interpolation around it removes interpolation around 0o377 when there is more text registers an offense only for final 0o377 in interpolation removes interpolation around multiple 0o377 when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around %w[] when there is more text removes interpolation around multiple %w[] registers an offense only for final %w[] in interpolation registers an offense for %w[] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense for 123_456_789_123_456_789 in interpolation and removes interpolation around it removes interpolation around multiple 123_456_789_123_456_789 removes interpolation around 123_456_789_123_456_789 when there is more text registers an offense only for final 123_456_789_123_456_789 in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final 1_123 in interpolation registers an offense for 1_123 in interpolation and removes interpolation around it removes interpolation around 1_123 when there is more text removes interpolation around multiple 1_123 when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 1...2 when there is more text removes interpolation around multiple 1...2 registers an offense only for final 1...2 in interpolation registers an offense for 1...2 in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around 0xaabb when there is more text removes interpolation around multiple 0xaabb registers an offense for 0xaabb in interpolation and removes interpolation around it registers an offense only for final 0xaabb in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like literal interpolation removes interpolation around multiple ["a", "b"] registers an offense only for final ["a", "b"] in interpolation registers an offense for ["a", "b"] in interpolation and removes interpolation around it removes interpolation around ["a", "b"] when there is more text when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final [] in interpolation removes interpolation around [] when there is more text removes interpolation around multiple [] registers an offense for [] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like non-special string literal interpolation registers an offense for 'foo' and removes the interpolation and quotes around 'foo' behaves like special keywords registers an offense and autocorrects interpolation after __ENCODING__ accepts strings like __ENCODING__ behaves like literal interpolation removes interpolation around multiple 1 removes interpolation around 1 when there is more text registers an offense for 1 in interpolation and removes interpolation around it registers an offense only for final 1 in interpolation when there is non-literal and literal interpolation when literal interpolation is after non-literal only removes interpolation around literal when literal interpolation is before non-literal only removes interpolation around literal behaves like literal interpolation registers an offense only for final true in interpolation registers an offense for true in interpolation and removes interpolation around it removes interpolation around true when there is more text removes interpolation around multiple true when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like special keywords accepts strings like __FILE__ registers an offense and autocorrects interpolation after __FILE__ behaves like literal interpolation removes interpolation around -1 when there is more text registers an offense only for final -1 in interpolation removes interpolation around multiple -1 registers an offense for -1 in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like special keywords registers an offense and autocorrects interpolation after __END__ accepts strings like __END__ behaves like literal interpolation registers an offense for nil in interpolation and removes interpolation around it removes interpolation around multiple nil removes interpolation around nil when there is more text registers an offense only for final nil in interpolation when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like special keywords accepts strings like __LINE__ registers an offense and autocorrects interpolation after __LINE__ in string-like contexts removes interpolation in symbols removes interpolation in regular expressions removes interpolation in backticks behaves like literal interpolation registers an offense only for final :"symbol" in interpolation registers an offense for :"symbol" in interpolation and removes interpolation around it removes interpolation around :"symbol" when there is more text removes interpolation around multiple :"symbol" when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal behaves like non-special string literal interpolation registers an offense for "foo" and removes the interpolation and quotes around "foo" behaves like literal interpolation registers an offense only for final %I[s1 s2] in interpolation removes interpolation around %I[s1 s2] when there is more text removes interpolation around multiple %I[s1 s2] registers an offense for %I[s1 s2] in interpolation and removes interpolation around it when there is non-literal and literal interpolation when literal interpolation is before non-literal only removes interpolation around literal when literal interpolation is after non-literal only removes interpolation around literal RuboCop::Cop::Style::EvalWithLocation registers an offense when using `#class_eval` without any arguments registers an offense when using `#eval` without any arguments accepts `eval` with a string, a filename and `__LINE__` accepts `eval` with a string, a filename and `__LINE__` on a new line registers an offense when using `#eval` without lineno accepts `eval` with a code that is a variable registers an offense when using `#class_eval` with an incorrect lineno registers an offense when using `#module_eval` without any arguments registers an offense when using `#eval` with a string on a new line registers an offense when using `#instance_eval` without any arguments registers an offense when using `#eval` with `binding` only registers an offense when using `#eval` with a heredoc and an incorrect line number accepts `eval` with a heredoc, a filename and `__LINE__ + 1` registers an offense when using `#eval` with an incorrect line number RuboCop::Cop::Lint::RegexpAsCondition does not register an offense for a regexp literal outside conditions registers an offense and corrects for a regexp literal in `if` condition does not register an offense for a regexp literal with `=~` operator RuboCop::Cop::Naming::VariableNumber when configured for non integer registers an offense for normal case numbering in method parameter registers an offense for snake case numbering in method camel case parameter registers an offense for snake case numbering in method parameter registers an offense for normal case numbering in method camel case parameter behaves like accepts accepts @@foo in non_integer behaves like offense_array registers an offense for ["a_1", "aone"] in non_integer behaves like offense registers an offense for local1 in non_integer behaves like offense registers an offense for @local_1 in non_integer behaves like offense registers an offense for local_1 in non_integer behaves like accepts accepts fooBar in non_integer behaves like accepts accepts @foo in non_integer behaves like accepts accepts _ in non_integer behaves like offense registers an offense for @local1 in non_integer behaves like accepts accepts @__foo__ in non_integer behaves like accepts accepts _foo in non_integer behaves like offense registers an offense for _myLocal_1 in non_integer behaves like offense registers an offense for myAttribute1 in non_integer behaves like offense registers an offense for @myAttribute_1 in non_integer behaves like accepts accepts localone in non_integer behaves like offense registers an offense for @myAttribute1 in non_integer behaves like accepts accepts local_one in non_integer behaves like offense registers an offense for myAttribute_1 in non_integer behaves like accepts accepts local_ in non_integer behaves like offense registers an offense for _myLocal1 in non_integer when configured for normal registers an offense for snake case numbering in method parameter registers an offense for snake case numbering in method camel case parameter behaves like accepts accepts snake_case in normalcase behaves like accepts accepts user_1_id in normalcase behaves like accepts accepts local1 in normalcase behaves like accepts accepts sha256 in normalcase behaves like accepts accepts user1_id in normalcase behaves like accepts accepts target_u2f_device in normalcase behaves like accepts accepts local_ in normalcase behaves like offense registers an offense for sha_256 in normalcase behaves like accepts accepts @__foo__ in normalcase behaves like offense registers an offense for localFOO_1 in normalcase behaves like offense registers an offense for local_1 in normalcase behaves like offense registers an offense for myAttribute_1 in normalcase behaves like offense registers an offense for local_FOO_1 in normalcase behaves like offense_array registers an offense for ["a_1", "a2"] in normalcase behaves like offense registers an offense for @myAttribute_1 in normalcase behaves like accepts accepts _ in normalcase behaves like accepts accepts _foo in normalcase behaves like offense registers an offense for @local_1 in normalcase behaves like accepts accepts localFOO1 in normalcase behaves like offense registers an offense for @@local_1 in normalcase behaves like offense registers an offense for _myLocal_1 in normalcase behaves like accepts accepts foo10_bar in normalcase behaves like accepts accepts @foo in normalcase when configured for snake_case registers an offense for normal case numbering in method camel case parameter registers an offense for normal case numbering in method parameter behaves like accepts accepts _ in snake_case behaves like accepts accepts local_ in snake_case behaves like accepts accepts local_12 in snake_case behaves like accepts accepts @__foo__ in snake_case behaves like accepts accepts local_1 in snake_case behaves like accepts accepts @foo in snake_case behaves like accepts accepts local_123 in snake_case behaves like accepts accepts _foo in snake_case behaves like offense registers an offense for aB1 in snake_case behaves like offense registers an offense for @local1 in snake_case behaves like accepts accepts a_1_b in snake_case behaves like offense_array registers an offense for ["a1", "a_2"] in snake_case behaves like offense registers an offense for @camelCase1 in snake_case behaves like accepts accepts aB_1 in snake_case behaves like offense registers an offense for @@local1 in snake_case behaves like accepts accepts a_1_b_1 in snake_case behaves like offense registers an offense for camelCase1 in snake_case behaves like offense registers an offense for local1 in snake_case behaves like offense registers an offense for _unused1 in snake_case RuboCop::Cop::Layout::EmptyLines registers an offense for consecutive empty lines handles comments does not register an offense for empty lines in a string does not register an offense for heredocs with empty lines inside works when there are no tokens RuboCop::Cop::Style::TrivialAccessors registers an offense on class reader registers an offense on instance reader registers an offense on one-liner writer accepts non-trivial reader registers an offense on class writer accepts non-trivial writer flags a reader inside a class, inside an instance_eval call registers an offense on reader with `private` accepts expressions within reader accepts reader nested within a module accepts expressions within writer registers an offense on instance writer accepts reader with different ivar name accepts reader nested within an instance_eval calll accepts blocks accepts splats accepts writer nested within an instance_eval call registers an offense on one-liner reader accepts writer using top level accepts an initialize method looking like a writer registers an offense on writer without braces accepts reader using top level registers an offense on reader with braces accepts writer with different ivar name registers an offense on DSL-style trivial writer accepts writer in a module accepts writer nested within a module ignore class methods accepts class writer accepts class reader exact name match disabled registers an offense when names mismatch in reader registers an offense when names mismatch in writer with allowed methods accepts allowed reader accepts allowed writer with AllowPredicates: false accepts allowed predicate with DSL allowed accepts DSL-style writer allow predicates accepts predicate-like reader disallow predicates does not accept predicate-like reader RuboCop::Cop::Layout::DotPosition Leading dots style accepts leading do in multi-line method call does not err on method call on same line registers an offense for trailing dot in multi-line call registers an offense for correct + opposite does not err on method call with no dots does not err on method call without a method name when there is an intervening blank line does not register offense when there is an intervening line comment does not register offense when using safe navigation operator registers an offense for correct + opposite accepts leading do in multi-line method call Trailing dots style accepts trailing dot in multi-line method call does not err on method call without a method name does not err on method call with no dots does not err on method call on same line registers an offense for leading dot in multi-line call does not get confused by several lines of chained methods when using safe navigation operator registers an offense for correct + opposite accepts trailing dot in multi-line method call RuboCop::Cop::Layout::EmptyLinesAroundBlockBody when EnforcedStyle is empty_lines for do end block registers an offense for block body not starting or ending with a blank ignores block with an empty body is not fooled by single line blocks when EnforcedStyle is no_empty_lines for { } block registers an offense for block body starting with a blank is not fooled by single line blocks registers an offense for block body ending with a blank accepts block body starting with a line with spaces registers an offense for block body starting with a blank passed to a multi-line method call when EnforcedStyle is empty_lines for { } block is not fooled by single line blocks registers an offense for block body not starting or ending with a blank ignores block with an empty body when EnforcedStyle is no_empty_lines for do end block is not fooled by single line blocks registers an offense for block body ending with a blank registers an offense for block body starting with a blank accepts block body starting with a line with spaces registers an offense for block body starting with a blank passed to a multi-line method call RuboCop::Cop::Style::MissingRespondToMissing registers an offense when method_missing is implemented as a class methods allows method_missing and respond_to_missing? when defined with inline access modifier registers an offense respond_to_missing? is implemented as an instance method and method_missing is implemented as a class method allows method_missing and respond_to_missing? implemented as class methods registers an offense respond_to_missing? is implemented as a class method and method_missing is implemented as an instance method allows method_missing and respond_to_missing? implemented as instance methods registers an offense when respond_to_missing? is not implemented allows method_missing and respond_to_missing? when defined with inline access modifier and method_missing is not qualified by inline access modifier RuboCop::Cop::Style::MixinGrouping when configured with grouped style when using a mix of diffent methods registers an offense with some duplicated mixin methods allows all different mixin methods when using `prepend` registers an offense for single mixins in separate calls, interspersed registers an offense when other mixins have receivers registers an offense for single mixins in separate calls when using `extend` registers an offense for single mixins in separate calls when using include registers an offense for several mixins in separate calls allows include with an explicit receiver registers an offense for single mixins in separate calls when configured with separated style when using `prepend` registers an offense for several mixins in one call when using a mix of diffent methods registers an offense for some calls having several mixins when using `include` registers an offense for several mixins in one call registers an offense for several mixins in separate calls allows include call as an argument to another method when using `extend` registers an offense for several mixins in one call RuboCop::Cop::Lint::NextWithoutAccumulator behaves like reduce/inject given a reduce block accepts next with a value registers an offense for a bare next accepts next within a nested block given an unrelated block accepts next with a value accepts a bare next behaves like reduce/inject given a inject block accepts next within a nested block accepts next with a value registers an offense for a bare next RuboCop::Cop::Lint::RandOne behaves like offenses Kernel.rand(1) registers an offense behaves like offenses rand(1.0) registers an offense behaves like no offense Kernel.rand does not register an offense behaves like offenses Kernel.rand(-1.0) registers an offense behaves like offenses ::Kernel.rand(1) registers an offense behaves like no offense rand does not register an offense behaves like offenses rand(-1.0) registers an offense behaves like offenses Kernel.rand 1.0 registers an offense behaves like no offense Kernel.rand(-1..1) does not register an offense behaves like no offense rand(-1..1) does not register an offense behaves like no offense rand(2) does not register an offense behaves like offenses rand(-1) registers an offense behaves like no offense Kernel.rand 2 does not register an offense behaves like offenses rand 1 registers an offense behaves like no offense ::Kernel.rand does not register an offense behaves like offenses Kernel.rand(-1) registers an offense RuboCop::Cop::Style::NumericLiteralPrefix binary literals registers an offense for uppercase prefix does not register offense for lowercase prefix decimal literals registers an offense for prefixes does not register offense for no prefix hex literals does not register offense for lowercase prefix registers an offense for uppercase prefix octal literals when config is zero_only registers an offense for prefix `0O` and `0o` does not register offense for prefix `0` when config is zero_with_o does not register offense for lowercase prefix registers an offense for prefixes `0` and `0O` RuboCop::Cop::Style::StringLiteralsInInterpolation configured with double quotes preferred registers an offense for single quotes within embedded expression in a heredoc string registers an offense for single quotes within embedded expression when configured with a bad value fails configured with single quotes preferred accepts double quotes on static strings within a method accepts double quotes on a broken static string can handle character literals can handle a built-in constant parsed as string registers an offense for double quotes within embedded expression registers an offense for double quotes within embedded expression in a heredoc string accepts double quotes on a static string RuboCop::Cop::Style::MultilineWhenThen registers an offense for empty when statement with then doesn't register an offense for singleline when statement with then doesn't register an offense when `then` required for a body of `when` is used doesn't register an offense for multiline when statementwith then followed by other lines autocorrects when the body of `when` branch starts with `then` does not register an offense for array when statement with then does not register an offense for hash when statement with then doesn't register an offense for empty when statement without then doesn't register an offense for multiline when statement without then registers an offense for multiline when statement with then RuboCop::Cop::Gemspec::DuplicatedAssignment registers an offense when using `spec.add_dependency` twice registers an offense when `name=` method call is not block value registers an offense when using `name=` twice with `cbase` registers an offense when using `name=` twice registers an offense when using `version=` twice registers an offense when using `<<` twice RuboCop::Cop::Lint::CircularArgumentReference circular argument references in ordinal arguments when the seemingly-circular default value is a method call does not register an offense when the method contains a circular argument reference registers an offense when the method does not contain a circular argument reference does not register an offense circular argument references in keyword arguments when the keyword argument is not circular, but calls a method of its own class with a self specification does not register an offense when the keyword argument is not circular, but calls a method of some other object with the same name does not register an offense when there are multiple offensive keyword arguments registers an offense when the keyword argument is not circular does not register an offense when there is one circular argument reference registers an offense when the keyword argument is not circular, and calls a method does not register an offense RuboCop::Cop::Lint::RedundantSplatExpansion accepts expanding a variable as a method parameter registers an offense and corrects an array literal being expanded in a rescue allows assigning a variable to a splat expansion of a variable allows an array using a constructor allows assigning to a splat allows assigning to an expanded range allows expanding a method call on an array literal allows splat expansion inside of an array allows expansions of an array that is assigned to a variable in rescue allows assigning to a splat variable assignment to splat expansion registers an offense and corrects an array using a constructor registers and corrects an array using top-level const splat expansion inside of an array registers an offense and corrects expansion of %W to a list of words registers an offense and corrects expansion of %w to a list of words registers an offense and corrects the expansion of an array literalinside of an array literal expanding Array.new call on array literal with ::Array.new when the array literal contains exactly one element registers an offense and corrects when the array literal contains more than one element accepts when the array literal contains exactly one element registers an offense and corrects behaves like array splat expansion method parameters registers an offense and converts to a list of arguments behaves like splat literal assignment registers an offense and removes the splat from array behaves like splat expansion behaves like splat literal assignment registers an offense and converts to an array method parameters registers an offense and converts to an array behaves like splat expansion method parameters registers an offense and converts to an array behaves like splat literal assignment registers an offense and converts to an array behaves like array splat expansion method parameters registers an offense and converts to a list of arguments behaves like splat literal assignment registers an offense and removes the splat from array behaves like splat expansion behaves like splat literal assignment registers an offense and converts to an array method parameters registers an offense and converts to an array expanding an array literal in a when condition allows an array using a constructor registers an offense and corrects an array using %w registers an offense and corrects an array using %W allows an array that is assigned to a variable registers an offense and corrects %I to a list of symbols registers an offense and corrects %i to a list of symbols registers an offense and corrects an array using [] behaves like splat expansion method parameters registers an offense and converts to an array behaves like splat literal assignment registers an offense and converts to an array behaves like array splat expansion method parameters registers an offense and converts to a list of arguments behaves like splat literal assignment registers an offense and removes the splat from array arrays being expanded with %i variants using splat expansion splat expansion inside of an array registers an offense and corrects %i to a list of symbols registers an offense and changes %I to a list of symbols splat expansion of method parameters registers an offense and corrects an array literal %I registers an offense and corrects an array literal %i behaves like array splat expansion method parameters registers an offense and converts to a list of arguments behaves like splat literal assignment registers an offense and removes the splat from array behaves like array splat expansion behaves like splat literal assignment registers an offense and removes the splat from array method parameters registers an offense and converts to a list of arguments RuboCop::Cop::Style::SingleLineMethods registers an offense for a single-line method auto-corrects def with semicolon before end auto-corrects def with argument and no parentheses accepts a multi-line method auto-corrects defs with parentheses after method name does not crash on an method with a capitalized name auto-corrects def with semicolon after method name auto-corrects def with argument in parentheses when AllowIfMethodIsEmpty is enabled accepts a single-line empty method when AllowIfMethodIsEmpty is disabled registers an offense for an empty method RuboCop::Cop::Style::MixinUsage does not register an offense when using inside nested module include registers an offense when using only `include` statement doesn't register an offense when `include` call is a method argument registers an offense when using outside class (used below) does not register an offense when using inside block does not register an offense when using `include` in method definition inside class registers an offense when using `include` in method definition outside class or module registers an offense when using outside class (used above) does not register an offense when using inside block and `if` condition is after `include` does not register an offense when using outside class does not register an offense when using inside class does not register an offense when using `include` in method definition inside module Multiple definition classes in one does not register an offense when using inside class Nested module registers an offense when using outside class prepend registers an offense when using outside class does not register an offense when using inside class extend registers an offense when using outside class does not register an offense when using inside class RuboCop::Cop::Metrics::ClassLength accepts a class with 5 lines does not count blank lines rejects a class with more than 5 lines accepts empty classes reports the correct beginning and end lines accepts a class with less than 5 lines when a class has inner classes does not count lines of inner classes rejects a class with 6 lines that belong to the class directly when inspecting a class defined with Class.new registers an offense when CountComments is enabled also counts commented lines when `CountAsOne` is not empty folds array into one line when inspecting a class defined with ::Class.new registers an offense RuboCop::Cop::Layout::FirstMethodParameterLineBreak accepts methods without params accepts params listed on a single line accepts single-line methods registers an offense and corrects params on first line of singleton method registers an offense and corrects params with default values accepts params without parens registers an offense and corrects params listed on the first line RuboCop::Cop::Metrics::CyclomaticComplexity when Max is 2 counts stupid nested if and else blocks when Max is 1 registers an offense for an unless modifier registers an offense for a `define_method` registers an offense for or registers an offense for && registers an offense for || registers an offense for an if modifier registers an offense for a for block accepts an empty method registers an offense for an elsif block registers an offense for &&= registers an offense for &. deals with nested if blocks containing && and || registers an offense for an until block counts only a single method counts repeated &. on same untouched local variable as 1 registers an offense for a rescue block accepts a method with no decision points accepts complex code outside of methods registers an offense for a while block counts enumerating methods with blocks as +1 registers an offense for a case/when block accepts an empty `define_method` counts enumerating methods with block-pass as +1 does not count blocks in general registers an offense for and registers an offense for ||= registers an offense for a ternary operator when method is in list of ignored methods does not register an offense when defining a class method does not register an offense when defining an instance method does not register an offense when using `define_method` RuboCop::Cop::Style::MethodCalledOnDoEndBlock with a {} block accepts a multi-line block with a chained call accepts a single-line block with a chained call with a multi-line do..end block accepts a chained block accepts it if there is no chained call registers an offense for a chained call when using safe navigation operator registers an offense for a chained call with a single-line do..end block accepts a single-line do..end block with a chained block registers an offense for a chained call RuboCop::Cop::Layout::SpaceInsideReferenceBrackets with space inside empty braces allowed registers offense and corrects empty brackets with no space inside accepts empty brackets with space inside registers offense and corrects empty brackets with more than one space inside when EnforcedStyle is space registers an offense and corrects when a reference bracket with no leading whitespace is assigned by another reference bracket registers an offense and corrects second ref brackets with no trailing whitespace registers an offense and corrects when a reference bracket is assigned by another reference bracket with no trailing whitespace registers an offense and corrects ref brackets with no leading whitespace accepts an array as a reference object does not register offense for array literals does not register offense for ref bcts with spaces that assign does not register offense for reference brackets with spaces registers and corrects multiple offenses in one set of ref brackets accepts square brackets as method name accepts spaces in array brackets registers an offense and corrects when a reference bracket with no trailing whitespace is assigned by another reference bracket registers an offense and corrects third ref brackets with no leading whitespace accepts square brackets called with method call syntax registers an offense and correct third ref brackets with no trailing whitespace registers an offense and corrects second ref brackets with no leading whitespace registers and corrects multiple offenses for multiple sets of ref brackets registers an offense and corrects ref brackets with no trailing whitespace when EnforcedStyle is no_space register and correct multiple offenses for multiple sets of ref brackets does not register offense for array literals registers an offense and corrects outer ref brackets accepts square brackets as method name registers an offense and corrects ref brackets with leading whitespace accepts an array as a reference object does not register offense for ref bcts with no spaces that assign registers an offense and corrects third ref brackets with trailing whitespace registers an offense and correcs when a reference bracket with a trailing whitespace is assigned by another reference bracket does not register offense for reference brackets with no spaces registers an offense and corrects when a reference bracket with a leading whitespace is assigned by another reference bracket accpets extra spacing in array brackets registers multiple offenses and corrects one set of ref brackets accepts square brackets called with method call syntax registers an offense and corrects when a reference bracket is assigned by another reference bracket with trailing whitespace registers an offense and corrects second ref brackets with trailing whitespace registers an offense and corrects third ref brackets with leading whitespace registers multiple offenses and corrects multiple sets of ref brackets registers an offense and corrects ref brackets with trailing whitespace registers an offense and corrects second ref brackets with leading whitespace with space inside empty brackets not allowed registers an offense and corrects empty brackets with multiple spaces inside accepts empty brackets with no space inside registers an offense and corrects empty brackets with 1 space inside RuboCop::Cop::Layout::ConditionPosition accepts condition on the same line accepts condition on a different line for modifiers accepts condition on a different line for modifiers registers an offense and corrects for condition on the next line registers an offense and corrects for elsif condition on the next line accepts condition on a different line for modifiers accepts condition on the same line handles ternary ops accepts condition on the same line accepts condition on a different line for modifiers registers an offense and corrects for condition on the next line registers an offense and corrects for condition on the next line accepts condition on the same line registers an offense and corrects for condition on the next line RuboCop::Cop::Style::RedundantReturn auto-corrects by removing redundant returns reports an offense for def with only a return accepts return in a non-final position does not blow up on empty if body reports an offense for defs with only a return reports an offense for def ending with return does not blow up on empty method body reports an offense for defs ending with return when multi-value returns are allowed accepts def ending with return accepts defs with only a return accepts def with only a return accepts defs ending with return when return has no arguments behaves like common behavior registers an offense for return and autocorrects replacing return with nil behaves like common behavior registers an offense for return() and autocorrects replacing return() with nil when rescue and return blocks present does register an offense and auto-corrects when inside function or rescue block when multi-value returns are not allowed reports an offense for def with only a return reports an offense for def ending with return auto-corrects by making an implicit hash explicit reports an offense for defs ending with return auto-corrects removes return when using an explicit hash reports an offense for defs with only a return when case nodes are empty accepts empty when nodes when return is inside an if-branch registers an offense and auto-corrects when return is inside a when-branch registers an offense and auto-corrects when return is inside begin-end body registers an offense and auto-corrects RuboCop::Cop::Style::NestedParenthesizedCalls on a permitted method doesn't register an offense backslash newline in method call registers an offense on a call to a setter method doesn't register an offense on a non-parenthesized call nested in a parenthesized one with a single argument to the nested call registers an offense when using safe navigation operator registers an offense with multiple arguments to the nested call registers an offense on a method call with no arguments doesn't register an offense on a deeply nested argument doesn't register an offense on a nested, parenthesized method call doesn't register an offense on a non-parenthesized method call doesn't register an offense on an aref, nested in a parenthesized method call doesn't register an offense on a call with no arguments, nested in a parenthesized one doesn't register an offense RuboCop::Cop::Lint::DisjunctiveAssignmentInConstructor constructor has disjunctive assignment LHS is ivar registers an offense and corrects constructor calls super after assignment registers an offense and corrects constructor calls any method before disjunctive assignment accepts constructor calls super before disjunctive assignment accepts LHS is lvar accepts constructor does not have disjunctive assignment accepts empty constructor accepts RuboCop::Cop::Lint::ElseLayout registers an offense for expr on same line as else handles modifier forms handles ternary ops accepts proper else handles empty braces accepts single-expr else regardless of layout can handle elsifs RuboCop::Cop::Lint::EmptyInterpolation registers an offense and corrects #{} in interpolation registers an offense and corrects #{ } in interpolation finds interpolations in string-like contexts accepts non-empty interpolation RuboCop::Cop::Layout::EmptyLineAfterMagicComment registers an offense for documentation immediately following comment registers an offense for code that immediately follows comment accepts a source file with only a magic comment registers an offense when multiple magic comments without empty line accepts code that separates the comment from the code with a newline accepts an empty source file RuboCop::Cop::Style::BlockComments auto-corrects a block comment into a regular comment auto-corrects a block comment into a regular comment (without trailingnewline) auto-corrects an empty block comment by removing it registers an offense for block comments accepts regular comments RuboCop::Cop::Lint::Debugger reports an offense for a web console binding call does not report an offense for a pry in comments reports an offense for a byebug with an argument call reports an offense for a remote_pry binding with an argument call does not report an offense for save_and_open_page with Kernel does not report an offense for a console method does not report an offense for a remote_byebug method reports an offense for a byebug call does not report an offense for a pry method does not report an offense for a debugger method does not report an offense for a save_and_open_screenshot in comments does not report an offense for a console in comments reports an offense for a debugger call reports an offense for a irb binding call reports an offense for a binding.pry with Kernel call does not report an offense for a save_screenshot in comments reports an offense for a binding.irb with Kernel call does not report an offense for a irb method does not report an offense for a save_and_open_page method does not report an offense for a byebug method reports an offense for a pry_remote binding call reports an offense for a pry binding call does not report an offense for a save_and_open_page in comments does not report an offense for a non-pry binding does not report an offense for a irb in comments reports an offense for a pry binding with an argument call reports an offense for a remote_pry binding call reports an offense for a pry_remote binding with an argument call reports an offense for a debugger with ::Kernel call reports an offense for a debugger with an argument call does not report an offense for a remote_pry in comments does not report an offense for a debugger in comments does not report an offense for a save_and_open_screenshot method does not report an offense for a remote_pry method does not report an offense for a pry_remote method reports an offense for a remote_byebug call reports an offense for a Pry.rescue call reports an offense for a debugger with Kernel call does not report an offense for a byebug in comments does not report an offense for a remote_byebug in comments does not report an offense for a pry_remote in comments does not report an offense for a save_screenshot method with capybara debug method call reports an offense for save_and_open_screenshot reports an offense for save_screenshot reports an offense for save_and_open_page with an argument reports an offense for save_screenshot reports an offense for save_and_open_screenshot reports an offense for save_and_open_page RuboCop::Cop::Lint::TopLevelReturnWithArgument Code segment with only top-level return statement Expects multiple offenses from the return with arguments statements Expects offense from the return with arguments Expects no offense from the return without arguments Code segment with inline if along with top-level return Expects no offense from the return without arguments Expects multiple offense from the return with arguments Code segment with method-level return statements Expects offense when method-level & top-level return co-exist Code segment containing semi-colon separated statements Expects an offense from the return with arguments and multi-line code Expects no offense from the return with arguments and multi-line code Code segment with block level returns other than the top-level return Expects no offense from the return without arguments Expects offense from the return with arguments RuboCop::Cop::Style::Lambda when using safe navigation operator does not break with enforced `lambda` style with a single line lambda literal with arguments registers an offense without arguments registers an offense without argument parens and spaces registers an offense with a multiline lambda literal without arguments registers an offense with arguments registers an offense with enforced `literal` style with a single line lambda method call with arguments registers an offense without arguments registers an offense with a multiline lambda method call without arguments registers an offense with arguments registers an offense with default `line_count_dependent` style when calling a lambda method without a block does not register an offense unusual lack of spacing with a multiline lambda literal with no arguments and no spacing registers an offense with empty arguments registers an offense without parentheses registers an offense with no parentheses and many args registers an offense with no arguments and bad spacing registers an offense with no parentheses and bad spacing registers an offense without any spacing registers an offense without spacing before arguments registers an offense without spacing after arguments registers an offense with a multiline braces lambda literal as a keyword argument registers an offense with a multiline lambda literal with arguments registers an offense without arguments registers an offense with a multiline lambda method call does not register an offense >= Ruby 2.7 when using numbered parameter with a single line lambda literal does not register an offense with a single line lambda method call registers an offense with a multiline lambda method call does not register an offense with a single line lambda literal does not register an offense with a single line lambda method call with arguments registers an offense without arguments registers an offense with a multiline do-end lambda as a parenthesized kwarg registers an offense with a multiline do-end lambda literal as a keyword argument registers an offense with a multiline lambda literal as an argument registers an offense RuboCop::Cop::Style::PercentLiteralDelimiters `%x` interpolated system call registers an offense for other delimiters does not register an offense for preferred delimiters does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters when containing preferred delimiter characters in interpolation `%I` interpolated symbol array registers an offense for other delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for preferred delimiters `%W` interpolated string array registers an offense for other delimiters when containing preferred delimiter characters in interpolation registers an offense for other delimiters does not register an offense for preferred delimiters does not register an offense for other delimiters when containing preferred delimiter characters `%` interpolated string registers an offense for other delimiters when containing preferred delimiter characters in interpolation registers an offense for a string with no content registers an offense for other delimiters does not register an offense for other delimiters when containing preferred delimiter characters does not register an offense for preferred delimiters registers an offense when the source contains invalid characters `%Q` interpolated string does not register an offense for preferred delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters `%q` string does not register an offense for other delimiters when containing preferred delimiter characters does not register an offense for preferred delimiters registers an offense for other delimiters `%w` string array does not register an offense for preferred delimiters with only a closing delimiter does not register an offense for other delimiters when containing preferred delimiter characters registers an offense for other delimiters does not register an offense for preferred delimiters does not register an offense for preferred delimiters with a pairing delimiters does not register an offense for preferred delimiters with not a pairing delimiter auto-correct preserves line breaks when fixing a multiline array fixes a string array in a scope preserves irregular indentation when correcting a multiline array preserves indentation when correcting a multiline array behaves like escape characters corrects %Q with \n in it corrects %Q with \t in it behaves like escape characters corrects % with \t in it corrects % with \n in it behaves like escape characters corrects %s with \t in it corrects %s with \n in it behaves like escape characters corrects %i with \t in it corrects %i with \n in it behaves like escape characters corrects %q with \t in it corrects %q with \n in it behaves like escape characters corrects %w with \n in it corrects %w with \t in it behaves like escape characters corrects %r with \t in it corrects %r with \n in it behaves like escape characters corrects %W with \n in it corrects %W with \t in it behaves like escape characters corrects %x with \t in it corrects %x with \n in it `%r` interpolated regular expression does not register an offense for preferred delimiters registers an offense for a regular expression with option registers an offense for other delimiters registers an offense for other delimiters when containing preferred delimiter characters in interpolation does not register an offense for other delimiters when containing preferred delimiter characters `default` override allows individual preferred delimiters to override `default` allows all preferred delimiters to be set with one key `%s` symbol does not register an offense for preferred delimiters registers an offense for other delimiters invalid cop config raises an error when invalid configuration is specified `%i` symbol array does not register an offense for non-preferred delimiters enclosing escaped delimiters does not register an offense for preferred delimiters registers an offense for other delimiters RuboCop::Cop::Style::RedundantInterpolation registers an offense for "#{$var}" registers an offense for ["#{@var}"] registers an offense for "%|#{1 + 1}|" registers an offense for "#{$1}" registers an offense for "#@@var" accepts strings that are part of a %W() accepts strings with characters before the interpolation registers an offense for "#{@var}" registers an offense for "#{@@var}" registers an offense for "%Q(#{1 + 1})" registers an offense for "#$1" registers an offense for "#@var" registers an offense for "#$+" registers an offense for "#{var}" accepts strings implicitly concatenated with an earlier string registers an offense for "#{1 + 1; 2 + 2}" registers an offense for "#{$+}" registers an offense for "#$var" registers an offense for "#{1 + 1}" accepts strings with characters after the interpolation accepts strings implicitly concatenated with a later string RuboCop::ConfigObsoletion #validate when the configuration includes any obsolete parameters prints a warning message when the configuration includes any obsolete cop name prints a warning message RuboCop::Cop::Style::RedundantRegexpCharacterClass with escaped square brackets surrounding a single character does not register an offense with a character class containing a space meta-character registers an offense and corrects with a character class containing two characters does not register an offense with a negated character class with a single element does not register an offense with a character class containing an escaped ] registers an offense and corrects with a character class containing a space when using free-spaced mode with a single space character class does not register an offense with /iux does not register an offense with only /x does not register an offense with /ix with a commented single-element character class does not register an offense with an unnecessary-character-class after a comment registers an offense and corrects when not using free-spaced mode registers an offense and corrects with consecutive escaped square brackets inside a character class does not register an offense with a character class containing escaped character requiring escape outside registers an offense and corrects with a character class containing a single unicode character property registers an offense and corrects with a character class with first element an escaped ] does not register an offense with a character class containing an interpolation does not register an offense with an array index inside an interpolation does not register an offense with a character class containing a single character registers an offense and corrects with a character class containing a single unicode code-point registers an offense and corrects with a character class containing a character requiring escape outside does not register an offense with a character class containing an escaped-b does not register an offense with multiple character classes containing single characters registers an offense and corrects with a character class containing an escaped-# registers an offense and corrects with a character class containing a negated-space meta-character registers an offense and corrects with a character class containing an escaped [ registers an offense and corrects with an interpolated unnecessary-character-class regexp registers an offense and corrects with consecutive escaped square brackets does not register an offense with a character class containing a single negated unicode character property registers an offense and corrects RuboCop::Cop::Lint::RaiseException does not register an offense for `raise` without arguments registers an offense and corrects for `raise` with `::Exception` and message registers an offense and corrects for `raise` with `::Exception.new` registers an offense and corrects for `fail` with `Exception` registers an offense and corrects for `raise` with `Exception.new` and message registers an offense and corrects for `raise` with `Exception` registers an offense and corrects for `raise` with `Exception` and message registers an offense and corrects for `raise` with `Exception.new(args*)` does not register an offense for `fail` without arguments does not register an offense when raising Exception with explicit namespace registers an offense and corrects for `fail` with `Exception` and message registers an offense and corrects for `raise` with `::Exception` registers an offense and corrects for `fail` with `Exception.new` and message when under namespace does not register an offense when Exception without cbase specified registers an offense and corrects when Exception with cbase specified RuboCop::FileFinder #find_file_upwards returns nil when file is not found returns a file to be found upwards #find_last_file_upwards returns nil when file is not found returns the last file found upwards RuboCop::Cop::Style::BlockDelimiters always braces accepts a single line block with braces accepts a multi-line functional block with do-end if it is an ignored method accepts a multi-line block that needs braces to be valid ruby does not auto-correct do-end if {} would change the meaning registers an offense for multi-lined do-end blocks when combined with attribute assignment registers an offense for multi-line chained do-end blocks registers an offence for a multi-line block with do-end registers an offense for a single line block with do-end when there are braces around a multi-line block allows when combined with attribute assignment allows in the simple case allows when the block is being chained line count-based style does not auto-correct {} if do-end would change the meaning auto-corrects do and end for single line blocks to { and } does not auto-correct do-end if {} would change the meaning accepts a single line block with braces registers an offense for a single line block with do-end accepts a multi-line block that needs braces to be valid ruby accepts a multi-line block with do-end when there are braces around a multi-line block can handle special method names such as []= and done? accepts a multi-line functional block with {} if it is an ignored method registers an offense in the simple case registers an offense when combined with attribute assignment does not auto-correct {} if do-end would introduce a syntax error accepts braces if do-end would change the meaning registers an offense for braces if do-end would not change the meaning auto-corrects adjacent curly braces correctly auto-corrects { and } to do and end Semantic style accepts a single line block with {} if used in an array accepts a multi-line block with braces when passed to a method allows {} if it is a known procedural method registers an offense for a multi-line block with braces if the return value is not used accepts a multi-line functional block with do-end if it is an ignored method auto-corrects do-end to {} if it is a functional block and does not change the meaning auto-corrects do-end to {} with appropriate spacing accepts a single line block with {} if used in an if statement accepts a multi-line block with braces if the return value is assigned registers an offense for a multi-line block with do-end if the return value is attribute-assigned allows {} if it is a known functional method registers an offense for a multi-line block with do-end if the return value is assigned accepts a multi-line block with braces when passed to a known functional method accepts a multi-line block with braces if it is the return value of its scope registers an offense for a multi-line block with do-end if the return value is passed to a method accepts a single line block with {} if used in an erange accepts a single line block with {} if used in a logical and accepts a multi-line block with braces when chained accepts a single line block with {} if used in a logical or accepts a multi-line block with do-end if it is the return value of its scope accepts a multi-line functional block with do-end if it is a known procedural method auto-corrects do-end to {} if it is a functional block accepts a single line block with {} if used in an irange with a procedural multi-line block auto-corrects { and } to do and end auto-corrects { and } to do and end with appropriate spacing with a procedural one-line block with AllowBracesOnProceduralOneLiners true accepts a single line procedural do-end block accepts a single line procedural block with braces with AllowBracesOnProceduralOneLiners false or unset registers an offense for a single line procedural block accepts a single line block with do-end if it is procedural braces for chaining style accepts a multi-line block that needs braces to be valid ruby allows do/end inside Hash[] disallows {} with no chain inside of Hash[] accepts a single line block with braces allows when :[] is chained registers an offense for a single line block with do-end accepts a multi-line block with do-end allows chaining to } inside of Hash[] accepts a multi-line functional block with {} if it is an ignored method registers an offense for multi-line chained do-end blocks with safe navigation registers an offense for multi-line chained do-end blocks when there are braces around a multi-line block allows when the block is being chained registers an offense when combined with attribute assignment allows when the block is being chained with attribute assignment registers an offense in the simple case BracesRequiredMethods other methods auto-corrects { and } to do and end allows braces BracesRequiredMethods methods allows braces registers an offense with do RuboCop::Cop::Style::NegatedWhile registers an offense for until with exclamation point condition accepts a while where the condition is doubly negated autocorrects by replacing while not with until registers an offense for while with "not" condition registers an offense for while with exclamation point condition does not blow up for empty while condition accepts a while where only part of the condition is negated autocorrects by replacing until not with while does not blow up for empty until condition RuboCop::Cop::Lint::OrderedMagicComments does not register an offense when using `frozen_string_literal` magic comment only does not register an offense when using `encoding` magic comment is first line does not register an offense when using `encoding` magic comment is next of shebang registers an offense and corrects when `coding` magic comment does not precede all other magic comments registers an offense and corrects when an `encoding` magic comment does not precede all other magic comments does not register an offense when using `encoding` magic comment only does not register an offense when using `encoding: Encoding::SJIS` Hash notation after`frozen_string_literal` magic comment registers an offense and corrects when using `frozen_string_literal` magic comment is next of shebang registers an offense and corrects when `-*- encoding : ascii-8bit -*-` magic comment does not precede all other magic comments RuboCop::Cop::Style::TrailingBodyOnMethodDefinition auto-corrects body with method definition with args not in parens accepts a method with one line of body registers an offense when body trails after method definition registers when body starts on def line & continues many more lines auto-correction removes semicolon from method definition but not body accepts a method with multiple lines of body registers when body starts on def line & continues one more line auto-corrects with comment after body does not register offense with trailing body on method end when method is not on first line of processed_source auto-corrects offense RuboCop::Cop::Security::Eval accepts eval with a multiline string accepts eval as method accepts eval with a string that interpolates a literal registers an offense for eval with string that has an interpolation registers an offense for eval as function accepts eval on a literal string accepts eval as variable registers an offense `Binding#eval` accepts eval with no arguments registers an offense for eval as command with an explicit binding, filename, and line number registers an offense for eval as command registers an offense for eval as function accepts eval on a literal string RuboCop::Cop::Lint::UnusedBlockArgument inspection in a method calling `binding` with arguments when a method argument is unused registers an offense when a block takes single argument and the argument is unused registers an offense and suggests omitting that and the method call is `define_method` registers an offense when a lambda block takes arguments and all the arguments are unused registers offenses and suggests using a proc and an argument is unused registers an offense when a block have a block local variable and the variable is unused registers an offense when an underscore-prefixed block argument is not used accepts when a block takes multiple arguments and all the arguments are unused registers offenses and suggests omitting them and unused arguments span multiple lines registers offenses and suggests omitting them and all arguments are used accepts and an argument is unused registers an offense and an argument with default value is unused registers an offense and preserves default value and one argument is assigned to another, whilst other's value is not used registers an offense and a splat argument is unused registers an offense and preserves splat and arguments are swap-assigned accepts when a method argument is not used does not care with an empty block when not configured to ignore empty blocks registers an offense when configured to ignore empty blocks does not register an offense when an optional keyword argument is unused when the method call is `define_method` registers an offense when AllowUnusedKeywordArguments set does not care when the method call is not `define_method` registers an offense when AllowUnusedKeywordArguments set does not care when a variable is not used does not care in a method calling `binding` without arguments accepts all arguments inside a method definition registers offenses when IgnoreEmptyBlocks config parameter is set accepts an empty block with multiple unused parameters registers an offense for a non-empty block with an unused parameter registers an offense for a non-empty block with multiple unused args accepts an empty block with a single unused parameter RuboCop::Cop::Style::HashTransformValues flags Hash[_.map{...}] when transform_values could be used does not flag each_with_object when both key & value are transformed flags _.map {...}.to_h when transform_values could be used when line break before `to_h` does not flag value transformation when receiver is array literal does not flag _.map{...}.to_h when both key & value are transformed does not flag each_with_object when its argument is not modified does not flag each_with_object when value transformation uses key does not flag Hash[_.map{...}] when both key & value are transformed does not flag each_with_object when receiver is array literal does not flag each_with_object when no transformation occurs does not flag value transformation in the absence of to_h correctly autocorrects _.map{...}.to_h with block flags _.map {...}.to_h when transform_values could be used with safe navigation operator flags each_with_object when transform_values could be used with inline block flags each_with_object when transform_values could be used with multiline block flags each_with_object when transform_values could be used RuboCop::Cop::Lint::UselessAccessModifier behaves like at the top of the body doesn't register an offense for `protected` registers an offense and corrects for `public` doesn't register an offense for `private` behaves like method defined on a singleton class outside a class registers an offense if no method is defined doesn't register an offense if a method is defined registers an offense if no method is defined after the modifier inside a class registers an offense even if a non-singleton-class method is defined doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined registers an offense if no method is defined behaves like def in new block registers an offense if no method is defined in ::Class.new doesn't register an offense if a method is defined in ::Class.new behaves like conditionally defined method doesn't register an offense for unless doesn't register an offense for if behaves like at the end of the body registers an offense for trailing `protected` behaves like def in new block doesn't register an offense if a method is defined in Class.new registers an offense if no method is defined in Class.new behaves like repeated visibility modifiers registers an offense when `public` is repeated behaves like conditionally defined method doesn't register an offense for unless doesn't register an offense for if behaves like method defined on a singleton class inside a class doesn't register an offense if a method is defined registers an offense if no method is defined after the modifier doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined registers an offense even if a non-singleton-class method is defined outside a class registers an offense if no method is defined registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined when using the class_methods method from ActiveSupport::Concern is aware that this creates a new scope behaves like def in new block doesn't register an offense if a method is defined in ::Struct.new registers an offense if no method is defined in ::Struct.new when multiple class definitions in file but only one has offense registers an offense and corrects behaves like at the end of the body registers an offense for trailing `private` behaves like at the end of the body registers an offense for trailing `public` behaves like method named by access modifier name registers an offense for `protected` behaves like repeated visibility modifiers registers an offense when `protected` is repeated behaves like def in new block doesn't register an offense if a method is defined in Class.new registers an offense if no method is defined in Class.new behaves like method defined using instance_eval registers an offense if no method is defined doesn't register an offense if a method is defined inside a class registers two offenses when a modifier is inside and outside the and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block behaves like methods defined in an iteration doesn't register an offense for each doesn't register an offense for map behaves like methods defined in an iteration doesn't register an offense for each doesn't register an offense for map behaves like method defined on a singleton class inside a class doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined registers an offense if no method is defined registers an offense even if a non-singleton-class method is defined outside a class registers an offense if no method is defined registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined behaves like nested modules doesn't register an offense for nested classs unused modifiers registers an offense when outside a nested class registers an offense when inside a nested class registers an offense with a nested class behaves like method named by access modifier name registers an offense for `private` when using ActiveSupport's `concerning` method still points out redundant uses within the block is aware that this creates a new scope behaves like non-repeated visibility modifiers doesn't register an offense when `protected` is not repeated registers an offense and corrects even when `public` is not repeated doesn't register an offense when `private` is not repeated behaves like method defined with define_method doesn't register an offense if a block is passed doesn't register an offense if a -> is passed doesn't register an offense if a lambda is passed doesn't register an offense if a proc is passed behaves like nested modules doesn't register an offense for nested modules unused modifiers registers an offense when inside a nested module registers an offense with a nested module registers an offense when outside a nested module behaves like conditionally defined method doesn't register an offense for if doesn't register an offense for unless behaves like method defined with define_method doesn't register an offense if a block is passed doesn't register an offense if a -> is passed doesn't register an offense if a proc is passed doesn't register an offense if a lambda is passed behaves like at the top of the body registers an offense and corrects for `public` doesn't register an offense for `protected` doesn't register an offense for `private` behaves like unused visibility modifiers registers an offense and corrects when visibility is immediately changed without any intervening defs behaves like method named by access modifier name registers an offense for `protected` behaves like method defined with define_method doesn't register an offense if a lambda is passed doesn't register an offense if a proc is passed doesn't register an offense if a block is passed doesn't register an offense if a -> is passed behaves like method defined using class_eval registers an offense if no method is defined doesn't register an offense if a method is defined inside a class registers two offenses when a modifier is inside and outside the block and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block behaves like at the end of the body registers an offense for trailing `public` behaves like def in new block doesn't register an offense if a method is defined in Module.new registers an offense if no method is defined in Module.new behaves like def in new block registers an offense if no method is defined in Struct.new doesn't register an offense if a method is defined in Struct.new when private_class_method is used with arguments does not register an offense behaves like nested in a begin..end block still flags repeated `private` doesn't flag an access modifier from surrounding scope behaves like def in new block doesn't register an offense if a method is defined in ::Module.new registers an offense if no method is defined in ::Module.new when using inline modifiers does not register an offense behaves like methods defined in an iteration doesn't register an offense for each doesn't register an offense for map behaves like nested in a begin..end block still flags repeated `public` behaves like def in new block doesn't register an offense if a method is defined in Module.new registers an offense if no method is defined in Module.new behaves like repeated visibility modifiers registers an offense when `public` is repeated behaves like nested modules doesn't register an offense for nested classs unused modifiers registers an offense with a nested class registers an offense when outside a nested class registers an offense when inside a nested class behaves like method named by access modifier name registers an offense for `public` behaves like method named by access modifier name registers an offense for `public` when an access modifier has no methods registers an offense and corrects when using ActiveSupport behavior when Rails is not eabled reports offenses and corrects behaves like at the end of the body registers an offense for trailing `private` when only a constant or local variable is defined after the modifier registers an offense and corrects registers an offense and corrects behaves like non-repeated visibility modifiers doesn't register an offense when `private` is not repeated doesn't register an offense when `protected` is not repeated registers an offense and corrects even when `public` is not repeated when there are consecutive access modifiers registers an offense and corrects behaves like methods defined in an iteration doesn't register an offense for map doesn't register an offense for each behaves like nested modules doesn't register an offense for nested modules unused modifiers registers an offense when outside a nested module registers an offense with a nested module registers an offense when inside a nested module behaves like def in new block doesn't register an offense if a method is defined in ::Module.new registers an offense if no method is defined in ::Module.new when an access modifier has no effect registers an offense and corrects behaves like method named by access modifier name registers an offense for `private` when passing method as symbol does not register an offense behaves like repeated visibility modifiers registers an offense when `private` is repeated when a def is an argument to a method call does not register an offense when private_class_method is used without arguments registers an offense and corrects behaves like method defined on a singleton class inside a class registers an offense even if a non-singleton-class method is defined doesn't register an offense if the modifier is the same as outside the meta-class registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined registers an offense if no method is defined outside a class registers an offense if no method is defined after the modifier doesn't register an offense if a method is defined registers an offense if no method is defined behaves like method defined using instance_eval doesn't register an offense if a method is defined registers an offense if no method is defined inside a class registers an offense when a modifier is ouside the block and a method is defined only inside the block registers two offenses when a modifier is inside and outside the and no method is defined when an access modifier is followed by attr_* does not register an offense behaves like def in new block registers an offense if no method is defined in ::Struct.new doesn't register an offense if a method is defined in ::Struct.new behaves like unused visibility modifiers registers an offense and corrects when visibility is immediately changed without any intervening defs behaves like nested in a begin..end block still flags repeated `protected` doesn't flag an access modifier from surrounding scope behaves like conditionally defined method doesn't register an offense for if doesn't register an offense for unless behaves like method defined with define_method doesn't register an offense if a block is passed doesn't register an offense if a -> is passed doesn't register an offense if a lambda is passed doesn't register an offense if a proc is passed when using a known method-creating method still points out redundant uses within the module is aware that this creates a new method when an access modifier is followed by a class method defined on constant registers an offense and corrects behaves like nested in a begin..end block still flags repeated `public` behaves like at the end of the body registers an offense for trailing `protected` behaves like method defined using class_eval doesn't register an offense if a method is defined registers an offense if no method is defined inside a class registers two offenses when a modifier is inside and outside the block and no method is defined registers an offense when a modifier is ouside the block and a method is defined only inside the block behaves like repeated visibility modifiers registers an offense when `private` is repeated behaves like def in new block registers an offense if no method is defined in Struct.new doesn't register an offense if a method is defined in Struct.new behaves like def in new block registers an offense if no method is defined in ::Class.new doesn't register an offense if a method is defined in ::Class.new behaves like nested in a begin..end block doesn't flag an access modifier from surrounding scope still flags repeated `private` behaves like repeated visibility modifiers registers an offense when `protected` is repeated when class is empty save modifier registers an offense and corrects behaves like nested in a begin..end block doesn't flag an access modifier from surrounding scope still flags repeated `protected` RuboCop::Formatter::ClangStyleFormatter #report_file displays text containing the offending source line when the source line is blank does not display offending source line when the offending source spans multiple lines displays the first line with ellipses when the offense is automatically corrected prints [Corrected] along with message when the offense is not corrected prints message as-is RuboCop::Cop::Style::TrailingMethodEndStatement register offense with trailing end on method with comment register offense with trailing end on 2 line method does not register on single line method does not register on single line no op register offense with trailing end on method with block auto-corrects all trailing ends for larger example register offense with trailing end on 3 line method register offense with trailing end inside class RuboCop::Cop::Layout::CaseIndentation with EnforcedStyle: end with IndentOneStep: false regarding assignment where the right hand side is a case accepts a correctly indented assignment registers an offense and corrects an assignment indented some other way with everything on a single line does not register an offense with IndentOneStep: true with everything on a single line does not register an offense regarding assignment where the right hand side is a case registers an offense and corrects an assignment indented as case accepts a correctly indented assignment registers an offense and corrects an assignment indented some other way when case is preceded by something else than whitespace registers an offense and does not correct with EnforcedStyle: case with IndentOneStep: false doesn't get confused by strings with case in them accepts a when clause that's equally indented with case accepts correctly indented whens in complex combinations doesn't get confused by symbols named case or when registers an offense and corrects a when clause that is indented deeper than case with everything on a single line does not register an offense regarding assignment where the right hand side is a case registers an offense and corrects assignment indented as end registers an offense and corrects correct + opposite style accepts a correctly indented assignment registers an offense and corrects assignment indented some other way with IndentOneStep: true registers an offense and corrects a when clause that is equally indented with case accepts a when clause that's 2 spaces deeper than case when indentation width is overridden for this cop only respects cop-specific IndentationWidth with everything on a single line does not register an offense regarding assignment where the right hand side is a case accepts a correctly indented assignment registers an offense and corrects an assignment indented some other way RuboCop::Formatter::JUnitFormatter #file_finished displays start of parsable text displays an offfense for `classname='test_1` in parsable text displays a non-offfense element in parsable text displays an offfense for `classname='test_2` in parsable text displays end of parsable text RuboCop::Cop::Style::InfiniteLoop registers an offense for a while loop with 2.0 as condition registers an offense for modifier until false if loop {} would not change semantics registers an offense for until false if loop {} would work because of previous assignment in a while loop registers an offense for a until loop with nil as condition accepts modifier while true if loop {} would change semantics accepts Kernel#loop accepts while true if loop {} would change semantics registers an offense for a while loop with [1] as condition registers an offense for until false if loop {} would work because the assigned variable is not used afterwards registers an offense for a while loop with {} as condition registers an offense for while true if loop {} would work because it is an instance variable being assigned registers an offense for a while loop with 1 as condition registers an offense for a until loop with false as condition registers an offense for while true or until false if loop {} would work because of an earlier assignment behaves like auto-corrector auto-corrects begin-end-while with one statement auto-corrects single line modifier while with and auto-corrects begin-end-while with two statements auto-corrects single line modifier while auto-corrects the usage of while without do auto-corrects the usage of while with do with non-default indentation width auto-corrects multi-line modifier while and indents correctly behaves like auto-corrector auto-corrects begin-end-until with one statement auto-corrects the usage of until without do auto-corrects single line modifier until with and auto-corrects the usage of until with do auto-corrects single line modifier until auto-corrects begin-end-until with two statements with non-default indentation width auto-corrects multi-line modifier until and indents correctly RuboCop::Cop::Style::LambdaCall when style is set to call registers an offense for x.() registers an offense for correct + opposite when style is set to braces auto-corrects x.call to x.() registers an offense for x.call() auto-corrects x.call asdf, x123 to x.(asdf, x123) accepts a call without receiver registers an offense for opposite + correct RuboCop::Cop::Style::CaseEquality when AllowOnConstant is true does not fail when the receiver is implicit registers an offense and corrects for === when the receiver is a regexp registers an offense and corrects for === when the receiver is a range does not register an offense for === when the receiver is a constant registers an offense and does not correct for === when receiver is of some other type when AllowOnConstant is false registers an offense and corrects for === when the receiver is a range does not fail when the receiver is implicit registers an offense and corrects for === when the receiver is a constant registers an offense and corrects for === when the receiver is a regexp registers an offense and does not correct for === when receiver is of some other type RuboCop::Cop::Style::CommandLiteral when PercentLiteralDelimiters is configured and a default exists ignores the default when auto-correcting when PercentLiteralDelimiters only has a default respects the configuration when auto-correcting when EnforcedStyle is set to percent_x a single-line %x string without backticks is accepted a multi-line %x string without backticks is accepted a multi-line ` string with backticks registers an offense without auto-correction a single-line %x string with backticks is accepted a multi-line %x string with backticks is accepted a multi-line ` string without backticks registers an offense and corrects to %x a single-line ` string with backticks registers an offense without auto-correction a single-line ` string without backticks registers an offense and corrects to %x %x commands with other delimiters than parentheses registers an offense when PercentLiteralDelimiters is configured with curly braces respects the configuration when auto-correcting when EnforcedStyle is set to backticks a multi-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction a multi-line ` string without backticks is accepted a single-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a single-line %x string without backticks registers an offense and corrects to backticks a single-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction a multi-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a multi-line %x string without backticks registers an offense and corrects to backticks a single-line ` string without backticks is accepted heredoc commands is ignored when EnforcedStyle is set to mixed a multi-line ` string with backticks registers an offense without auto-correction a single-line %x string without backticks registers an offense and corrects to backticks a single-line ` string without backticks is accepted a single-line ` string with backticks registers an offense without auto-correction when configured to allow inner backticks is accepted a multi-line ` string without backticks registers an offense and corrects to %x a multi-line %x string with backticks is accepted a multi-line %x string without backticks is accepted a single-line %x string with backticks is accepted when configured to allow inner backticks registers an offense without auto-correction RuboCop::Cop::Style::TrailingBodyOnClass registers an offense when body trails after class definition registers offense with multi-line class auto-corrects with comment after body accepts class inheritance accepts regular class when class is not on first line of processed_source auto-correct offense RuboCop::Cop::Layout::FirstArgumentIndentation when EnforcedStyle is consistent_relative_to_receiver when IndentationWidth:Width is 2 registers an offense and corrects an over-indented first argument accepts a first argument that is not preceded by a line break does not view []= as an outer method call registers an offense and corrects an under-indented first argument does not view chained call as an outer method call registers an offense and corrects lines affected by other offenses accepts operator calls accepts method calls with no arguments for assignment register an offense and corrects a correctly indented first argument and does not care about the second argument with line break registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when the receiver contains a line break accepts a correctly indented first argument registers an offense and corrects an over-indented 1st argument accepts a correctly indented first argument preceded by an empty line when preceded by a comment line registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when indentation width is overridden for this cop only accepts a correctly indented first argument registers an offense and corrects an over-indented first argument for method calls within method calls with outer parentheses registers an offense and corrects an over-indented 1st argument indents all relative to the receiver without outer parentheses indents all relative to the receiver accepts a first argument with special indentation when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when EnforcedStyle is consistent when indentation width is overridden for this cop only registers an offense and corrects an over-indented first argument accepts a correctly indented first argument for method calls within method calls registers an offense and corrects an over-indented first argument accepts first argument indented relative to previous line when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 2 accepts operator calls registers an offense and corrects an under-indented first argument accepts a first argument that is not preceded by a line break registers an offense and corrects lines affected by another offense does not view chained call as an outer method call does not view []= as an outer method call registers an offense and corrects an over-indented first argument accepts method calls with no arguments for assignment accepts a correctly indented first argument and does not care about the second argument with line break registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when the receiver contains a line break accepts a correctly indented first argument registers an offense and corrects an over-indented first argument accepts a correctly indented first argument preceded by an empty line when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when using safe navigation operator registers an offense and corrects an under-indented 1st argument when EnforcedStyle is special_for_inner_method_call when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument when indentation width is overridden for this cop only accepts a correctly indented first argument registers an offense and corrects an over-indented first argument when IndentationWidth:Width is 2 accepts a first argument that is not preceded by a line break registers an offense and corrects lines affected by another offense accepts operator calls registers an offense and corrects an over-indented first argument does not view []= as an outer method call registers an offense and corrects an under-indented first argument accepts method calls with no arguments does not view chained call as an outer method call for assignment accepts a correctly indented first argument and does not care about the second argument with line break accepts a correctly indented first argument registers an offense and corrects an under-indented first argument when using safe navigation operator registers an offense and corrects an under-indented 1st argument when the receiver contains a line break registers an offense and corrects an over-indented first argument accepts a correctly indented first argument preceded by an empty line accepts a correctly indented first argument when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument for method calls within method calls with outer parentheses registers an offense and corrects an over-indented first argument without outer parentheses accepts a first argument with special indentation when EnforcedStyle is special_for_inner_method_call_in_parentheses when IndentationWidth:Width is 2 does not view chained call as an outer method call registers an offense and corrects an under-indented first argument registers an offense and corrects lines affected by another offense accepts a first argument that is not preceded by a line break accepts method calls with no arguments registers an offense and corrects an over-indented first argument accepts operator calls does not view []= as an outer method call when the receiver contains a line break registers an offense and corrects an over-indented first argument accepts a correctly indented first argument accepts a correctly indented first argument preceded by an empty line when preceded by a comment line accepts a correctly indented first argument registers an offense and corrects an under-indented first argument for assignment accepts a correctly indented first argument and does not care about the second argument with line break registers an offense and corrects an under-indented first argument accepts a correctly indented first argument when using safe navigation operator registers an offense and corrects an under-indented 1st argument when indentation width is overridden for this cop only accepts a correctly indented first argument registers an offense and corrects an over-indented first argument for method calls within method calls with outer parentheses registers an offense and corrects an under-indented first argument accepts a correctly indented first argument in interpolation accepts a correctly indented first argument with fullwidth characters registers an offense and corrects an over-indented first argument without outer parentheses accepts a first argument with consistent style indentation when IndentationWidth:Width is 4 registers an offense and corrects an over-indented first argument RuboCop::Cop::Layout::EmptyLinesAroundBeginBody registers an offense for begin body starting in method registers an offense for rescue body ending registers an offense for else body ending registers many offenses with complex begin-end accepts begin block without empty line registers an offense for ensure body ending accepts begin block without empty line in a method registers an offense for begin body ending in method registers an offense for begin body starting with rescue registers an offense for begin body starting with a blank registers an offense for begin body ending with a blank RuboCop::Cop::Gemspec::OrderedDependencies When using a local variable in an argument of dependent gem does not register any offenses behaves like ordered dependency when add_runtime_dependency when gems are not alphabetically sorted registers an offense when each individual group of line is sorted does not register any offenses When gems are alphabetically sorted does not register any offenses when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: true accepts with TreatCommentsAsGroupSeparators: false registers an offense when different dependencies are consecutive does not register any offenses behaves like ordered dependency when add_dependency When gems are alphabetically sorted does not register any offenses when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: false registers an offense with TreatCommentsAsGroupSeparators: true accepts when each individual group of line is sorted does not register any offenses when gems are not alphabetically sorted registers an offense When using method call to gem names does not register any offenses behaves like ordered dependency when add_development_dependency when gems are not alphabetically sorted registers an offense when each individual group of line is sorted does not register any offenses when dependency is separated by multiline comment with TreatCommentsAsGroupSeparators: false registers an offense with TreatCommentsAsGroupSeparators: true accepts When gems are alphabetically sorted does not register any offenses RuboCop::Cop::Style::RescueModifier does not register an offense for nested normal rescue handles more complex expression with modifier rescue does not register an offense for normal rescue with ensure registers an offense for modifier rescue around parallel assignment handles modifier rescue in a method does not register an offense for normal rescue handles modifier rescue in normal rescue registers an offense for modifier rescue autocorrect corrects complex rescue modifier corrects doubled rescue modifiers excluded file processes excluded files with issue when a singleton method has implicit begin handles modifier rescue in body of implicit begin accepts normal rescue when an instance method has implicit begin handles modifier rescue in body of implicit begin accepts normal rescue RuboCop::Cop::Layout::LineLength accepts a line that's 80 characters wide accepts the first line if it is a shebang line highlights excessive characters registers an offense for long line before __END__ but not after registers an offense for a line that's 81 characters wide affecting by IndentationWidth from Layout\Tab with AllowURI option accepts a line that's including URI with text accepts a line that's including URI in quotes with text accepts a line that's including URI and exceeds by 1 char accepts a line that's including URI behaves like with tabs indentation accepts a line that's including 1 tab with size 2 and 28 other characters registers an offense for a line that's including 2 tab with size 2 and 28 other characters highlights excessive characters without AllowURI option behaves like with tabs indentation registers an offense for a line that's including 2 tab with size 2 and 28 other characters highlights excessive characters accepts a line that's including 1 tab with size 2 and 28 other characters when AllowURI option is disabled and all the excessive characters are part of a URL registers an offense for the line when IgnoreCopDirectives is disabled and the source is too long and has a trailing cop directive highlights the excess source and cop directive and the source is acceptable length with a trailing RuboCop directive highlights the excess directive registers an offense for the line with an inline comment highlights the excess comment when IgnoredPatterns option is set accepts long lines matching a pattern but not other long lines when line is indented with tabs registers an offense for a long line accepts a short line autocorrection no breakable collections adds an offense and does not autocorrect it HEREDOC when over limit with semicolon adds offense and does not autocorrect array when already on two lines does not add any offenses when two arrays on two lines allows outer to get broken first adds an offense only to inner and does not autocorrect it when over limit adds an offense and autocorrects it when has inside array adds an offense only to outer and autocorrects it when under limit does not add any offenses comments when over limit with semicolon adds offense and does not autocorrect long blocks lambda syntax when argument is enclosed in parentheses registers an offense and corrects when argument is not enclosed in parentheses registers an offense and corrects let block adds an offense and does correct it do/end adds an offense and does correct it braces adds an offense and does correct it no spaces adds an offense and does correct it semicolon when over limit and one semicolon at the end adds offense and does not autocorrectbefore the hash semicolon inside string literal adds offense and autocorrects elsewhere when over limit and many semicolons adds offense and autocorrects it by breaking the semicolonbefore the hash semicolons inside string literal adds offense and autocorrects elsewhere when under limit does not add any offenses when over limit and many spaces around semicolon adds offense and autocorrects it by breaking the semicolonbefore the hash when over limit and semicolon at end of line adds offense and autocorrects it by breaking the first semicolonbefore the hash when over limit adds offense and autocorrects it by breaking the semicolonbefore the hash when over limit and many semicolons at the end adds offense and does not autocorrectbefore the hash method call when two method calls adds an offense only to outer and autocorrects it when nested method calls allows outer to get broken up first adds offense and does not autocorrect when under limit does not add any offenses when two together does not add any offenses when call with hash on same line adds an offense only to outer and autocorrects it when over limit adds an offense and autocorrects it hash when over limit and keys already on multiple lines adds an offense and does not autocorrect when over limit rocket adds an offense and autocorrects it when over limit because of a comment adds an offense and does not autocorrect when over limit and already on multiple lines long key adds an offense and does not autocorrect when hash in method call adds an offense only to outer and autocorrects it when over limit adds an offense and autocorrects it when over limit rocket symbol adds an offense and autocorrects it when nested hashes on same line adds an offense only to outer and autocorrects it when under limit does not add any offenses when IgnoreCopDirectives is enabled and the source is too long highlights only the non-directive part registers an offense for the line and the source contains non-directive # as comment registers an offense for the line highlights only the non-directive part and the source contains non-directive #s as non-comment highlights only the non-directive part registers an offense for the line and the Rubocop directive is excessively long accepts the line and the Rubocop directive causes an excessive line length accepts the line and has explanatory text does not register an offense when AllowURI option is enabled and the excessive characters include part of a URL and another word registers an offense for the line and the excessive characters include a complete URL registers an offense for the line and the URL fits within the max allowed characters registers an offense for the line and all the excessive characters are part of a URL accepts the line and the URL is wrapped in single quotes accepts the line and the URL is wrapped in double quotes accepts the line and an error other than URI::InvalidURIError is raised while validating a URI-ish string does not crash and the URL does not have a http(s) scheme rejects the line and the scheme has been configured does not register an offense when AllowHeredoc option is enabled accepts long lines in heredocs when the source has no AST does not crash and only certain heredoc delimiters are permitted rejects long lines in heredocs with not permitted delimiters RuboCop::Cop::Style::OptionHash registers an offense when there are no arguments does not register an offense when the last argument is an options hash named something else does not register an offense when the argument name is in the list of suspicious names registers an offense when the last argument is a non-options-hash optional hash does not register an offense when passing options hash to super does not register an offense when code exists before call to super does not register an offense when call to super is in a nested block does not register an offense permitted list ignores if the method is permitted RuboCop::Cop::Style::RedundantSortBy autocorrects array.sort_by do |x| x end autocorrects array.sort_by { |x| x } autocorrects array.sort_by { |y| y } RuboCop::Cop::Style::IfUnlessModifier accepts if-end when used as LHS of binary arithmetic doesn't break if-end when used as RHS of instance var assignment accepts code with EOL comment since user might want to keep it adds parens in autocorrect when if-end used with `&&` operator accepts if/elsif doesn't break if-end when used as RHS of constant assignment doesn't break if-end when used as RHS of class var assignment doesn't break if-end when used as RHS of local var assignment accepts if-end followed by a chained call using `&.` adds parens in autocorrect when if-end used with `||` operator doesn't break if-end when used as RHS of binary arithmetic accepts if-else-end accepts if-end followed by a chained call using `.` when if-end condition has some code after the end keyword when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form modifier if that does not fit on one line, but is not the only statement on the line accepts when if-end condition has a first line comment when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form if-end is argument to a non-parenthesized method call adds parentheses so as not to change meaning multiline if that fits on one line registers an offense and has two statements separated by semicolon accepts behaves like condition modifier cop for a multiline 'if' accepts it if single line would not fit on one line accepts it if body spans more than one line corrects it when assignment is in body accepts it when condition has local variable assignment corrects it if result fits in one line accepts an empty body when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense behaves like condition modifier cop for a multiline 'unless' corrects it if result fits in one line accepts an empty body corrects it when assignment is in body accepts it if body spans more than one line accepts it when condition has local variable assignment accepts it if single line would not fit on one line when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense multiline unless that fits on one line registers an offense multiline if that fits on one line with comment near end accepts when if-end condition is assigned to a variable with variable being on the previous line when it is not short enough to fit on a single line accepts it in the multiline form when it is short enough to fit on a single line corrects it to the single-line form with variable being on the same line when it is short enough to fit on a single line corrects it to the single-line form when it is not short enough to fit on a single line accepts it in the multiline form multiline if that fits on one line with comment on first line registers an offense and preserves comment with implicit match conditional when a multiline if fits on one line registers an offense when a multiline if doesn't fit on one line accepts with a named regexp capture on the LHS does not register an offense if-end with conditional as body accepts when if-end condition is a value in a hash when it is short enough to fit on a single line corrects it to the single-line form when it is not short enough to fit on a single line accepts it in the multiline form if-end is argument to a parenthesized method call adds parentheses because otherwise it would cause SyntaxError short multiline if near an else etc registers an offense when if-end condition is an element of an array when short enough to fit on a single line corrects it to the single-line form when not short enough to fit on a single line accepts it in the multiline form when Layout/LineLength is disabled registers an offense even for a long modifier statement with tabs used for indentation with Layout/IndentationStyle: IndentationWidth config behaves like with tabs indentation it fits on one line registers an offense it doesn't fit on one line doesn't register an offense with Layout/IndentationWidth: Width config behaves like with tabs indentation it fits on one line registers an offense it doesn't fit on one line doesn't register an offense modifier if that does not fit on one line when Layout/LineLength is disabled with enable/disable comments accepts when Layout/LineLength is disabled with an EOL comment accepts when Layout/LineLength is disabled in configuration accepts when Layout/LineLength is enabled corrects it to normal form IgnoreCopDirectives and the long line is too long because IgnoreCopDirectives is false registers an offense and the long line is allowed because IgnoreCopDirectives is true accepts and the long line is allowed because AllowURI is true accepts and the long line is too long because AllowURI is false registers an offense unless-end with conditional as body accepts RuboCop::Cop::Style::UnlessElse unless without else does not register an offense unless with nested if-else registers an offense unless with else registers an offense RuboCop::Cop::Lint::UnreachableLoop handles inner loops with preceding continue statements does not register an offense when using `if-else` with all break branches does not register an offense when using `case-when-else` with all break branches does not register an offense when using `break` without preceding continue statements registers an offense when using `if-else` with all break branches does not register an offense when using `if` without `else` does not register an offense when using `case-when-else` and not all branches are breaking does not register an offense when using `case` without `else` registers an offense when using `break` registers an offense when using `case-when-else` with all break branches does not register an offense when using `if-elsif-else` and not all branches are breaking RuboCop::Cop::Layout::SpaceBeforeSemicolon registers an offense and corrects more than one space before a semicolon does not register an offense for no space before semicolons registers an offense and corrects space before semicolon inside block braces when EnforcedStyle for SpaceInsideBlockBraces is no_space registers an offense and corrects a space between an opening brace and a semicolon behaves like common behavior accepts no space between an opening brace and a semicolon when EnforcedStyle for SpaceInsideBlockBraces is space accepts a space between an opening brace and a semicolon behaves like common behavior accepts no space between an opening brace and a semicolon RuboCop::Cop::Style::MultilineTernaryOperator registers an offense and corrects when the false branch is on a separate line registers offense and corrects when the if branch and the else branch are on a separate line from the condition accepts a single line ternary operator expression registers an offense and corrects when everything is on a separate line RuboCop::Cop::Layout::SpaceInsideBlockBraces accepts left brace without outer space registers an offense and corrects left brace without inner space accepts braces surrounded by spaces registers an offense and corrects right brace without inner space register offenses and correct both braces without inner space with passed in parameters accepts new lambda syntax and space before block parameters not allowed accepts left brace without inner space accepts new lambda syntax registers an offense and corrects left brace with inner space for single-line blocks registers an offense and corrects left brace without inner space accepts left brace with inner space for multi-line blocks registers an offense and corrects left brace without inner space accepts left brace with inner space and BlockDelimiters cop enabled registers an offense and corrects for single-line blocks registers an offense and corrects multi-line blocks with space inside empty braces not allowed registers an offense and corrects empty braces with space inside accepts empty braces with line break inside accepts empty braces with no space inside accepts empty braces with comment and line break inside accepts braces that are not empty accepts braces with something inside accepts multiline braces with content configured with no_space accepts left brace without outer space registers an offense and corrects left brace with inner space registers an offense and corrects right brace with inner space accepts braces without spaces inside with passed in parameters and space before block parameters allowed accepts left brace with inner space accepts new lambda syntax registers an offense and corrects left brace without inner space and space before block parameters not allowed registers an offense and corrects left brace with inner space accepts when braces are aligned in multiline block registers an offense when braces are not aligned in multiline block accepts new lambda syntax with space inside empty braces allowed registers an offense and corrects empty braces with no space inside accepts empty braces with space inside with invalid value for EnforcedStyleForEmptyBraces fails with an error RuboCop::Cop::Style::ClassAndModuleChildren compact style registers a offense for modules with nested children accepts nesting for classes with an explicit superclass accepts nesting for classes/modules with more than one child registers a offense for classes with nested children accepts compact style for classes/modules accepts class/module with single method nested style registers an offense for not nested classes with explicit superclass registers an offense for not nested classes accepts nested children accepts :: in parent class on inheritance registers an offense for not nested modules RuboCop::Cop::Lint::ParenthesesAsGroupedExpression does not register an offesne when heredoc has a space between the same string as the method name and `(` registers an offense and corrects for predicate method call with space before the parenthesis registers an offense and corrects for method call with space before the parenthesis accepts a method call with arguments but no parentheses accepts a method call without arguments does not register an offense for math expression with `to_i` accepts a chain of method calls does not register an offense for math expression accepts method with parens as arg to method without accepts an operator call with argument in parentheses accepts a space inside opening paren followed by left paren does not register an offense for expression followed by chained expression does not register an offense for expression followed by an operator does not register an offense for a call with multiple arguments when using safe navigation operator registers an offense and corrects for method call with space before the parenthesis RuboCop::Cop::Layout::HeredocIndentation quoted by ` registers an offense for not indented, with `~` registers an offense for too deep indented registers an offense for first line minus-level indented, with `-` accepts for indented, but with `-` registers an offense for not indented accepts for indented, with `~` does not register an offense when not indented but with whitespace, with `-` registers an offense for too deep indented with whitespace line registers an offense for not indented, without `~` displays message to use `<<~` instead of `<<` registers an offense for not indented enough with whitespace line accepts for include empty lines registers an offense for too deep indented with empty line registers an offense for minus level indented accepts for indented, but without `~` accepts for not indented but with whitespace accepts for an empty line registers an offense for not indented enough with empty line displays message to use `<<~` instead of `<<-` when Layout/LineLength is configured accepts for long heredoc quoted by does not register an offense when not indented but with whitespace, with `-` registers an offense for too deep indented registers an offense for not indented, with `~` registers an offense for not indented, without `~` registers an offense for not indented enough with empty line registers an offense for too deep indented with empty line registers an offense for first line minus-level indented, with `-` registers an offense for minus level indented accepts for indented, but without `~` registers an offense for too deep indented with whitespace line displays message to use `<<~` instead of `<<-` accepts for include empty lines registers an offense for not indented registers an offense for not indented enough with whitespace line accepts for indented, but with `-` accepts for indented, with `~` displays message to use `<<~` instead of `<<` accepts for not indented but with whitespace accepts for an empty line when Layout/LineLength is configured accepts for long heredoc quoted by " registers an offense for too deep indented registers an offense for first line minus-level indented, with `-` does not register an offense when not indented but with whitespace, with `-` registers an offense for not indented, without `~` registers an offense for not indented accepts for not indented but with whitespace registers an offense for not indented enough with empty line accepts for indented, but without `~` registers an offense for minus level indented registers an offense for not indented enough with whitespace line accepts for an empty line displays message to use `<<~` instead of `<<` registers an offense for too deep indented with whitespace line accepts for indented, but with `-` accepts for indented, with `~` displays message to use `<<~` instead of `<<-` accepts for include empty lines registers an offense for not indented, with `~` registers an offense for too deep indented with empty line when Layout/LineLength is configured accepts for long heredoc quoted by ' registers an offense for too deep indented with empty line registers an offense for not indented enough with whitespace line accepts for indented, but with `-` accepts for include empty lines registers an offense for not indented, with `~` registers an offense for not indented, without `~` registers an offense for too deep indented with whitespace line registers an offense for too deep indented accepts for indented, but without `~` accepts for not indented but with whitespace registers an offense for minus level indented displays message to use `<<~` instead of `<<-` registers an offense for not indented enough with empty line accepts for an empty line does not register an offense when not indented but with whitespace, with `-` accepts for indented, with `~` registers an offense for first line minus-level indented, with `-` displays message to use `<<~` instead of `<<` registers an offense for not indented when Layout/LineLength is configured accepts for long heredoc RuboCop::Cop::Lint::EmptyWhen when `AllowComments: false` registers an offense for empty when body with a comment when a `when` body is missing registers an offense when case line has no expression registers an offense for missing when ... then body followed by else registers an offense for missing when body followed by else registers an offense for missing when ... then body registers an offense for missing when body with a comment registers an offense for a missing when body registers an offense for missing when body with a comment followed by else when `AllowComments: true` accepts an empty when body with a comment when a `when` body is present accepts case with when ... then statements and else clause accepts case with when bodies and else clause accepts case with when bodies accepts with no case line expression accepts case with when ... then statements RuboCop::Cop::Style::InverseMethods registers an offense for calling !.none? with a block registers an offense for !foo.blank? registers an offense for not (foo > bar) registers an offense for calling !.none? with a symbol proc allows comparing camel case constants on the left registers an offense for !foo.odd? registers an offense for not (foo =~ bar) allows an inverse method in a block with next registers an offense for not (foo !~ bar) allows an inverse method when double negation is used registers an offense for not (foo != bar) registers an offense for !(foo == bar) registers an offense for not (foo == bar) registers an offense for !(foo < bar) registers an offense for !(foo != bar) registers an offense for !foo.include? registers an offense for !foo.present? registers an offense for !(foo !~ bar) registers an offense for !foo.exclude? allows comparing camel case constants on the right allows a method call without a not registers an offense for comparing snake case constants on the right registers an offense for calling !.any? inside parens registers an offense for not (foo < bar) allows an inverse method with a block when double negation is used registers an offense for !(foo > bar) registers an offense for !(foo =~ bar) registers an offense for !foo.none? registers an offense for !foo.any? registers an offense for !foo.even? registers an offense for comparing snake case constants on the left behaves like all variable types registers an offense for calling not @foo.none? registers an offense for calling !@foo.none? behaves like all variable types registers an offense for calling !foo.bar.none? registers an offense for calling not foo.bar.none? behaves like all variable types registers an offense for calling !FOO.none? registers an offense for calling not FOO.none? behaves like all variable types registers an offense for calling not @@foo.none? registers an offense for calling !@@foo.none? behaves like all variable types registers an offense for calling not FOO::BAR.none? registers an offense for calling !FOO::BAR.none? inverse blocks corrects an inverted method call when using `BasicObject#!` corrects an inverted do end method call registers a single offense for nested inverse method calls registers a single offense for nested inverse method calls corrects an inverted method call when using `BasicObject#!` registers an offense for an inverted equality block corrects an inverted method call when using `BasicObject# !` registers a single offense for nested inverse method calls corrects an inverted method call when using `BasicObject# !` registers an offense for foo.select! { |e| !e } registers a single offense for nested inverse method calls registers an offense for a multiline inverted equality block registers an offense for a multiline inverted equality block corrects an inverted method call when using `BasicObject# !` corrects an inverted method call corrects an inverted method call corrects a complex inverted method call corrects an inverted method call corrects a complex inverted method call corrects an inverted method call registers an offense for a multiline method call where the last method is inverted corrects a complex inverted method call registers an offense for a multiline method call where the last method is inverted registers an offense for an inverted equality block corrects a complex inverted method call registers an offense for foo.reject { |e| !e } registers an offense for foo.reject! { |e| !e } corrects an inverted method call when using `BasicObject#!` corrects an inverted do end method call registers an offense for an inverted equality block registers an offense for a multiline inverted equality block registers an offense for a multiline method call where the last method is inverted corrects an inverted do end method call corrects an inverted do end method call corrects an inverted method call when using `BasicObject#!` corrects an inverted method call when using `BasicObject# !` registers an offense for foo.select { |e| !e } registers an offense for a multiline method call where the last method is inverted registers an offense for a multiline inverted equality block registers an offense for an inverted equality block behaves like all variable types registers an offense for calling !foo.none? registers an offense for calling not foo.none? behaves like all variable types registers an offense for calling not foo["bar"].none? registers an offense for calling !foo["bar"].none? behaves like all variable types registers an offense for calling !$foo.none? registers an offense for calling not $foo.none? RuboCop::Cop::Style::DoubleCopDisableDirective registers an offense for duplicate todo directives does not register an offense for cops with single cop directive registers an offense for duplicate disable directives RuboCop::Cop::Registry exposes the number of stored cops exposes a list of cop names exposes cop departments can filter down to all but one type exposes a mapping of cop names to cop classes can filter down to one type can be cloned #contains_cop_matching? can find cops matching a given name returns false for cops not included in the store when dismissing a cop class disallows it if done too late allows it if done rapidly allows re-listing #qualified_cop_name emits a warning when namespace is incorrect raises an error when a cop name is ambiguous gives back already properly qualified names qualifies names without a namespace returns the provided name if no namespace is found qualifies names with the correct namespace #cops exposes a list of cops #enabled selects cops which are enabled in the config selects only safe cops if :safe passed overrides config if :only includes the cop when new cops are introduced overrides config if :only includes the cop does not include them when specifying `NewCops: pending` option in .rubocop.yml does not include them when specifying `NewCops: disable` option in .rubocop.yml does not include them when specifying `--disable-pending-cops` command-line option does not include them when specifying `NewCops: enable` option in .rubocop.yml does not include them because command-line option takes precedence over .rubocop.yml when specifying `NewCops: enable` option in .rubocop.yml includes them when specifying `--enable-pending-cops` command-line option includes them when specifying `NewCops: disable` option in .rubocop.yml includes them because command-line option takes precedence over .rubocop.yml RuboCop::Cop::Style::EmptyCaseCondition given a case statement with an empty case with multiple when branches and an `else` with code comments behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when using `return` in `when` clause and assigning the return value of `case` does not register an offense when using `return` in `else` clause and assigning the return value of `case` does not register an offense with when branches using then behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with multiple when branches and no else behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects with a single when branch and no else behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with first when branch including comma-delimited alternatives behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with multiple when branches and an else behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when used as an argument of a method with comment behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case when using `return ... if` in `else` clause and assigning the return value of `case` does not register an offense when using `return ... if` in `when` clause and assigning the return value of `case` does not register an offense with a when branch including comma-delimited alternatives behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects when used as an argument of a method without comment behaves like detect/correct empty case, accept non-empty case registers an offense and autocorrects accepts the source with case with a single when branch and an else behaves like detect/correct empty case, accept non-empty case accepts the source with case registers an offense and autocorrects RuboCop::Formatter::JSONFormatter #hash_for_offense sets Offense#message value for :message key sets value of #hash_for_location for :location key sets Offense#cop_name value for :cop_name key sets Offense#correctable? value for :correctable key sets Offense#corrected? value for :corrected key sets Offense#severity value for :severity key #finished outputs #output_hash as JSON sets inspected file count in summary #file_finished adds value of #hash_for_file to #output_hash[:files] adds detected offense count in summary #started sets target file count in summary #hash_for_file sets an array of #hash_for_offense values for :offenses key sets relative file path for :path key #hash_for_location sets length value for :length key sets column value for :column key sets line value for :line key RuboCop::Cop::Style::ExpandPathArguments registers an offense when using `File.expand_path('../..', __FILE__)` registers an offense when using `::Pathname.new(__FILE__).parent.expand_path` registers an offense when using `::File.expand_path('./../..', __FILE__)` does not register an offense when using `File.expand_path('..', __dir__)` registers an offense when using `File.expand_path('..', __FILE__)` registers an offense when using `File.expand_path('../../..', __FILE__)` does not register an offense when using `File.expand_path(__FILE__)` registers an offense when using `File.expand_path('.', __FILE__)` registers an offense when using `File.expand_path('../../lib', __FILE__)` registers an offense when using `File.expand_path('./../..', __FILE__)` does not register an offense when using `File.expand_path(path, __FILE__)` does not register an offense when using `Pathname(__dir__).expand_path` does not register an offense when using `File.expand_path(__dir__)` registers an offense when using `Pathname.new(__FILE__).parent.expand_path` registers an offense when using `Pathname(__FILE__).parent.expand_path` does not register an offense when using `File.expand_path("#{path_to_file}.png", __FILE__)` RuboCop::Cop::Lint::RescueType accepts rescuing nothing accepts rescuing a single exception accepts rescuing nothing within a method definition accepts rescue modifier behaves like offenses begin rescue rescuing from nil after another exception registers an offense and auto-corrects rescuing from nil before another exception registers an offense and auto-corrects rescuing from nil registers an offense and auto-corrects def rescue ensure rescuing from nil registers an offense and auto-corrects def rescue rescuing from nil registers an offense and auto-corrects begin rescue ensure rescuing from nil registers an offense and auto-corrects behaves like offenses begin rescue rescuing from {} before another exception registers an offense and auto-corrects rescuing from {} registers an offense and auto-corrects rescuing from {} after another exception registers an offense and auto-corrects def rescue ensure rescuing from {} registers an offense and auto-corrects begin rescue ensure rescuing from {} registers an offense and auto-corrects def rescue rescuing from {} registers an offense and auto-corrects behaves like offenses begin rescue rescuing from :symbol before another exception registers an offense and auto-corrects rescuing from :symbol after another exception registers an offense and auto-corrects rescuing from :symbol registers an offense and auto-corrects begin rescue ensure rescuing from :symbol registers an offense and auto-corrects def rescue rescuing from :symbol registers an offense and auto-corrects def rescue ensure rescuing from :symbol registers an offense and auto-corrects behaves like offenses def rescue rescuing from 'string' registers an offense and auto-corrects begin rescue rescuing from 'string' before another exception registers an offense and auto-corrects rescuing from 'string' registers an offense and auto-corrects rescuing from 'string' after another exception registers an offense and auto-corrects def rescue ensure rescuing from 'string' registers an offense and auto-corrects begin rescue ensure rescuing from 'string' registers an offense and auto-corrects behaves like offenses begin rescue rescuing from "#{string}" registers an offense and auto-corrects rescuing from "#{string}" before another exception registers an offense and auto-corrects rescuing from "#{string}" after another exception registers an offense and auto-corrects def rescue ensure rescuing from "#{string}" registers an offense and auto-corrects begin rescue ensure rescuing from "#{string}" registers an offense and auto-corrects def rescue rescuing from "#{string}" registers an offense and auto-corrects behaves like offenses def rescue rescuing from 0 registers an offense and auto-corrects begin rescue ensure rescuing from 0 registers an offense and auto-corrects begin rescue rescuing from 0 after another exception registers an offense and auto-corrects rescuing from 0 before another exception registers an offense and auto-corrects rescuing from 0 registers an offense and auto-corrects def rescue ensure rescuing from 0 registers an offense and auto-corrects behaves like offenses def rescue rescuing from 0.0 registers an offense and auto-corrects begin rescue ensure rescuing from 0.0 registers an offense and auto-corrects begin rescue rescuing from 0.0 before another exception registers an offense and auto-corrects rescuing from 0.0 registers an offense and auto-corrects rescuing from 0.0 after another exception registers an offense and auto-corrects def rescue ensure rescuing from 0.0 registers an offense and auto-corrects behaves like offenses def rescue rescuing from [] registers an offense and auto-corrects begin rescue rescuing from [] before another exception registers an offense and auto-corrects rescuing from [] registers an offense and auto-corrects rescuing from [] after another exception registers an offense and auto-corrects def rescue ensure rescuing from [] registers an offense and auto-corrects begin rescue ensure rescuing from [] registers an offense and auto-corrects RuboCop::Formatter::PacmanFormatter #next_step when no offenses are detected calls the step function with a dot when a offense is detected in a file calls the step function with a dot #update_progress_line when total_files is greater than columns in the terminal updates the progress_line properly when need to change the line updates the progress_line properly when total_files less than columns in the terminal updates the progress_line properly #step character is ghost removes the first • and puts a ghosts character is a Pacdot leaves the progress_line as it is character is Pacman removes the first • and puts a ᗧ character is normal dot removes the first • and puts a . RuboCop::Cop::Lint::LiteralAsCondition registers an offense for literal {} in complex ! registers an offense for literal :"#{a}" in complex cond registers an offense for literal :"#{a}" in if registers an offense for literal 2.0 in post-loop until registers an offense for literal 2.0 in complex cond registers an offense for `!:sym` accepts literal [1] in non-toplevel and/or registers an offense for literal :sym in post-loop until registers an offense for literal :"#{a}" in ! registers an offense for literal 1 in while accepts literal 2.0 in a when of a case with something after case keyword accepts literal 2.0 if it's not an and/or operand registers an offense for `not :"#{a}"` registers an offense for literal 1 in if accepts literal {} in a when of a case with something after case keyword registers an offense for literal 1 in ! accepts literal {} if it's not an and/or operand registers an offense for literal :sym in a when of a case without anything after case keyword registers an offense for literal :sym in while registers an offense for literal {} in while registers an offense for literal {} in a when of a case without anything after case keyword accepts literal 1 in non-toplevel and/or accepts literal :"#{a}" if it's not an and/or operand registers an offense for `!1` registers an offense for literal :"#{a}" in post-loop while registers an offense for literal :sym in case registers an offense for `!2.0` registers an offense for literal 1 in post-loop until registers an offense for literal [1] in complex cond registers an offense for literal 1 in complex cond registers an offense for literal {} in complex cond accepts literal 2.0 in non-toplevel and/or registers an offense for literal :"#{a}" in case registers an offense for literal :"#{a}" in until accepts `true` literal in `while` registers an offense for literal :sym in complex ! registers an offense for literal 1 in complex ! accepts literal {} in non-toplevel and/or accepts literal :sym in a when of a case with something after case keyword registers an offense for literal 2.0 in && accepts literal :sym if it's not an and/or operand accepts literal :"#{a}" in non-toplevel and/or registers an offense for literal [1] in complex ! registers an offense for literal {} in ! accepts literal [1] in a when of a case with something after case keyword accepts `false` literal in post-loop `until` registers an offense for literal {} in if registers an offense for literal [1] in if registers an offense for literal :"#{a}" in while accepts literal :"#{a}" in a when of a case with something after case keyword registers an offense for literal :"#{a}" in a when of a case without anything after case keyword registers an offense for `![1]` registers an offense for literal 2.0 in while registers an offense for literal :sym in ! registers an offense for literal 2.0 in ! registers an offense for literal :sym in complex cond registers an offense for `!:"#{a}"` accepts `true` literal in post-loop `while` accepts literal [1] if it's not an and/or operand registers an offense for literal :sym in post-loop while registers an offense for literal 2.0 in a when of a case without anything after case keyword registers an offense for literal [1] in post-loop while registers an offense for literal :sym in if registers an offense for literal 1 in until accepts dstr literal in case registers an offense for literal {} in post-loop until registers an offense for literal :"#{a}" in && registers an offense for literal :"#{a}" in post-loop until registers an offense for literal {} in case accepts `false` literal in `until` registers an offense for `!{}` registers an offense for `not 1` registers an offense for `not {}` registers an offense for `not :sym` registers an offense for literal 1 in case registers an offense for literal {} in post-loop while accepts literal 1 in a when of a case with something after case keyword registers an offense for literal :sym in && registers an offense for literal [1] in ! accepts array literal in case, if it has nested non-literal element registers an offense for literal :sym in until registers an offense for literal :"#{a}" in complex ! registers an offense for literal [1] in a when of a case without anything after case keyword registers an offense for literal 2.0 in post-loop while registers an offense for literal 2.0 in case registers an offense for literal 2.0 in complex ! registers an offense for literal {} in until accepts array literal in case, if it has non-literal elements registers an offense for literal 1 in post-loop while registers an offense for literal [1] in && accepts literal :sym in non-toplevel and/or registers an offense for case with a primitive array condition registers an offense for literal 1 in a when of a case without anything after case keyword registers an offense for literal 1 in && registers an offense for literal [1] in while accepts literal 1 if it's not an and/or operand registers an offense for literal [1] in until registers an offense for literal 2.0 in until registers an offense for `not [1]` registers an offense for literal [1] in post-loop until registers an offense for `not 2.0` registers an offense for literal [1] in case registers an offense for literal 2.0 in if registers an offense for literal {} in && RuboCop::Cop::Layout::SpaceInsideArrayLiteralBrackets does not register offense for any kind of reference brackets with space inside empty brackets not allowed accepts empty brackets with no space inside registers an offense and corrects empty brackets with 1 space inside registers an offense and corrects multiline spaces registers an offense and corrects empty brackets with multiple spaces inside with space inside empty braces allowed registers an offense and corrects empty brackets with no space inside accepts empty brackets with space inside registers an offense and corrects empty brackets with more than one space inside when EnforcedStyle is no_space does not register offense for indented array when bottom bracket gets its own line & is misaligned registers an offense and corrects an array literal as an argument with trailing whitespace after a heredoc is started registers an offense and corrects multiline array on end bracket does not register offense for arrays with no spaces registers an offense and corrects array brackets with trailing whitespace accepts a multiline array with whitespace before end bracket does not register offense when bottom bracket gets its own line indented with tabs accepts square brackets called with method call syntax does not register offense for arrays using ref brackets does not register offense when 2 arrays on one line does not register offense for array when brackets get own line does not register offense for valid 2-dimensional array does not register offense when bottom bracket gets its own line & has trailing method registers an offense and corrects multiline array on end bracketwith trailing method accepts square brackets as method name registers an offense and corrects an array when two on one line does not register offense when contains an array literal as an argument after a heredoc is started accepts space inside array brackets if with comment does not register offense for valid multiline array registers an offense and corrects array brackets with leading whitespace registers an offense and corrects 2 arrays on one line when EnforcedStyle is compact registers an offense and corrects 3-dimensional array with extra spaces registers an offense and corrects space between 2 opening brackets does not register offense for valid 2-dimensional array registers an offense and corrects space between 2 closing brackets does not register offense for valid 4-dimensional array does not register offense for valid 3-dimensional array registers an offense and corrects 2-dimensional array with extra spaces accepts multiline array multiline array does not collapse any successive brackets registers an offense does not auto-corrects multiline array does not collapse successive right-brackets registers an offense and corrects multiline array does not collapse successive left-brackets registers an offense auto-corrects behaves like space inside arrays accepts square brackets called with method call syntax does not register offense for arrays using ref brackets does not register offense when bottom bracket gets its own line & has trailing method does not register offense for valid multiline array registers an offense and corrects multiline array on end bracket registers an offense and corrects an array missing whitespace when there is more than one array on a line registers an offense and corrects multiline array on end bracketwith trailing method does not register offense when 2 arrays on one line does not register offense for array when brackets get their own line registers an offense and corrects array brackets with no trailing whitespace does not register offense for arrays with spaces register an offense and corrects when 2 arrays are on one line does not register offense for indented array when bottom bracket gets its own line & is misaligned accepts square brackets as method name registers an offense and corrects array brackets with no leading whitespace accepts space inside array brackets with comment when EnforcedStyle is space does not register offense for valid 2-dimensional array behaves like space inside arrays does not register offense for array when brackets get their own line does not register offense for arrays using ref brackets does not register offense for indented array when bottom bracket gets its own line & is misaligned does not register offense for arrays with spaces does not register offense for valid multiline array registers an offense and corrects multiline array on end bracket registers an offense and corrects array brackets with no leading whitespace accepts square brackets called with method call syntax accepts square brackets as method name accepts space inside array brackets with comment does not register offense when bottom bracket gets its own line & has trailing method registers an offense and corrects array brackets with no trailing whitespace does not register offense when 2 arrays on one line registers an offense and corrects an array missing whitespace when there is more than one array on a line register an offense and corrects when 2 arrays are on one line registers an offense and corrects multiline array on end bracketwith trailing method RuboCop::Cop::Security::JSONLoad allows JSON.parse allows JSON.dump does not register an offense for JSON under another namespace registers an offense and corrects JSON.load registers an offense and corrects JSON.restore RuboCop::Cop::Layout::ParameterAlignment aligned with first parameter accepts a method definition without parameters doesn't get confused by splat accepts the first parameter being on a new row registers an offense and corrects parameters with single indent registers an offense and corrects parameters with double indent accepts parameter lists on a single line accepts proper indentation registers an offense and corrects alignment in simple case defining self.method registers an offense and corrects parameters with single indent accepts proper indentation aligned with fixed indentation accepts a method definition without parameters doesn't get confused by splat registers an offense and corrects parameters aligned to first param accepts proper indentation registers an offense and corrects parameters with double indent accepts the first parameter being on a new row accepts parameter lists on a single line defining self.method accepts proper indentation registers an offense and corrects parameters aligned to first param RuboCop::CLI --auto-gen-config overwrites an existing todo file can generate Exclude properties with a given limit does not include offense counts when --no-offense-counts is used includes --auto-gen-only-exclude in the command comment when given does not generate configuration for the Syntax cop generates Exclude instead of Max when --auto-gen-only-exclude is used can be called when there are no files to inspection does not include a timestamp when --no-auto-gen-timestamp is used generates a todo list that removes the reports honors rubocop:disable comments can generate a todo list when working in a subdirectory can generate a todo list when working with a cop who do not support auto-correction can generate a todo list when inheriting from a URL when there is a single entry can generate a todo list when there are multiple entries can generate a todo list when .rubocop.yml inherits only from .rubocop_todo.yml bases other cops' configuration on the code base's current maximum line length when --config is used can generate a todo list when .rubocop.yml inherits only from .rubocop_todo.yml in an array bases other cops' configuration on the code base's current maximum line length console output displays report summary but no offenses when .rubocop.yml does not exist bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from another file bases other cops' configuration on the code base's current maximum line length when different styles appear in different files disables cop if --exclude-limit is exceeded generates Exclude list if --exclude-limit is not exceeded when .rubocop.yml is empty bases other cops' configuration on the code base's current maximum line length when .rubocop.yml doesn't inherit bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from another file and .rubocop_todo.yml bases other cops' configuration on the code base's current maximum line length when .rubocop.yml inherits from two other files bases other cops' configuration on the code base's current maximum line length with Layout/LineLength:Max overridden when .rubocop.yml has Layout/LineLength:Max less than code base max bases other cops' configuration on the overridden LineLength:Max when .rubocop.yml has Layout/LineLength:Max more than code base max bases other cops' configuration on the overridden LineLength:Max when .rubocop.yml has Layout/LineLength disabled skips the cop from both phases of the run RuboCop::Cop::Style::PerlBackrefs registers an offense for $9 auto-corrects #$1 to #{Regexp.last_match(1)} registers an offense for $1 RuboCop::Cop::Lint::OutOfRangeRegexpRef only registers an offense when the regexp is matched as a literal does not register an offence Regexp containing non literal This library has only been tested up to Ruby 2.x, but you are running with Regexp::Syntax::V3_0_2 (feature set of V2_6_3) does not register offense to a regexp with valid references for a mix named and numbered captures registers an offense when the regexp is matched with `===` registers an offense when out of range references are used for mix of numbered and named captures handles `match` with no receiver registers an offense when out of range references are used for named captures only registers an offense for when clauses when the regexp is matched as a literal registers an offense when out of range references are used for numbered captures does not register an offense when in range references are used inside a when clause does not register offense to a regexp with valid references for named captures does not register offense to a regexp with valid references for numbered captures registers an offense when out of range references are used for non captures registers an offense when the regexp appears on the right hand side of `=~` registers an offense when references are used before any Regexp ignores calls to `match?` handles `match` with no arguments registers an offense when out of range references are used inside a when clause ignores regexp when clause conditions that contain interpolations uses the maximum number of captures for when clauses with multiple conditions registers an offense when the regexp is matched with `match` matching with start_with? does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with `[]` does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with match registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with rpartition registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with end_with? does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with slice only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used does not register an offense when in range references are used matching with index registers an offense when out of range references are used does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal matching with gsub! does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with partition registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with slice! does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with sub registers an offense when out of range references are used does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal matching with sub! registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with `grep` registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with scan does not register an offense when in range references are used only registers an offense when the regexp is matched as a literal registers an offense when out of range references are used matching with gsub registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used matching with rindex registers an offense when out of range references are used only registers an offense when the regexp is matched as a literal does not register an offense when in range references are used RuboCop::Cop::Style::NumericPredicate when there are ignored methods in block not ignored method registers an offense for checking if a number is positive registers an offense for checking if a number is negative ignored method allows checking if a number is positive allows checking if a number is negative in argument not ignored method registers an offense for checking if a number is positive registers an offense for checking if a number is negative ignored method allows checking if a number is positive allows checking if a number is negative simple method call `EnforcedStyle` is `predicate` allows checking if a number is zero `EnforcedStyle` is `comparison` allows checking if a number is zero when configured to enforce numeric predicate methods when checking if a number is zero registers an offense with a complex expression registers an offense allows comparing against a global variable when comparing against a method argument variable registers an offense with complex expression registers an offense with checking if a number is not zero allows comparing against a complex expression allows comparing against a variable allows comparing against a global variable when checking if a number is negative registers an offense registers an offense in yoda condition with a complex expression registers an offense in yoda condition registers an offense when checking if a number is positive registers an offense in yoda condition registers an offense with a complex expression registers an offense registers an offense in yoda condition when configured to enforce numeric comparison methods registers an offense for checking if a number is zero allows checking if a number is not zero registers an offense for checking if a number is negative registers an offense for checking if a number is positive RuboCop::Cop::Naming::BlockParameterName can register multiple offenses in one block registers offense when param contains uppercase characters does not register offense for valid parameter names registers offense when param ends in number does not register for block without parameters registers offense when param is less than minimum length does not register for brace block without parameters with AllowedNames accepts specified block param names registers unlisted offensive names with ForbiddenNames accepts param that uses a forbidden name's letters registers offense for param listed as forbidden with AllowNamesEndingInNumbers accept params that end in numbers RuboCop::Cop::Style::AccessorGrouping when EnforcedStyle is grouped registers an offense and corrects when using separated accessors within eigenclass does not register offense for accessors with comments registers an offense and corrects when using separated accessors with different access modifiers does not register an offense when using grouped accessors registers offense and corrects if atleast two separate accessors without comments registers an offense and corrects when using separated accessors when EnforcedStyle is separated does not register an offense for grouped accessors with comments registers an offense and corrects when using grouped accessors with different access modifiers registers an offense and corrects when using grouped accessors within eigenclass does not register an offense when using separated accessors registers an offense and corrects when using grouped accessors RuboCop::Cop::Style::MultilineIfModifier if guard clause registers an offense when indented registers an offense allows a multiline condition allows a one liner unless guard clause allows a one liner allows a multiline condition registers an offense registers an offense when indented RuboCop::Cop::Lint::SafeNavigationChain registers an offense for ordinary method chain exists after safe navigation method call with a block-pass accepts usages of ordinary method chain accepts usages of safe navigation with == operator registers an offense for safe navigation with []= operator registers an offense for safe navigation with < operator registers an offense for ordinary method chain exists after safe navigation method call with a block registers an offense for safe navigation with + operator accepts usages of safe navigation with `present?` method accepts usages of method chain with safe navigation only accepts usages of safe navigation at last only accepts usages of safe navigation with `to_d` method accepts usages of safe navigation with self assignment method accepts usages of safe navigation with `blank?` method registers an offense for ordinary method chain exists after safe navigation method call accepts usages of safe navigation at last only with argument accepts usages of safe navigation with || operator accepts usages of safe navigation with && operator accepts usages of method chain with safe navigation only with argument accepts usages of safe navigation with `try` method accepts usages of safe navigation with | operator accepts usages of safe navigation with assignment method accepts usages of ordinary method chain with argument accepts usages of safe navigation with & operator registers an offense for safe navigation with <= operator registers an offense for safe navigation with [] operator registers an offense for ordinary method chain exists after safe navigation method call with an argument registers an offense for ordinary method call exists after safe navigation method call with an argument registers an offense for safe navigation with >= operator registers an offense for safe navigation with > operator accepts usages of safe navigation with === operator registers an offense for ordinary method call exists after safe navigation method call accepts usages of safe navigation with `nil?` method proper highlighting when used with a modifier if when in a method when there are methods before when there are methods after when in a begin >= Ruby 2.7 registers an offense for ordinary method chain exists after safe navigation method call with a block using numbered parameter RuboCop::Cop::Style::DefWithParentheses reports an offense for class def with empty parens accepts def with arg and parens reports an offense for def with empty parens accepts empty parentheses in one liners RuboCop::Cop::Style::OneLineConditional parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator does not break when one of the branches contains a self keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator allows one line unless/then/end parenthesizes the expression if it is preceded by an operator does not parenthesize expressions when they contain unparenthesized operator method calls parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator allows one line if/then/end does not break when one of the branches contains a break keyword does not break when one of the branches contains `next` keyword parenthesizes the expression if it is preceded by an operator parenthesizes the expression if it is preceded by an operator does not break when one of the branches contains a retry keyword does not parenthesize expressions when they do not contain method calls with unparenthesized arguments parenthesizes the expression if it is preceded by an operator behaves like changed precedence adds parentheses around `not a` behaves like changed precedence adds parentheses around `yield a` behaves like changed precedence adds parentheses around `a and b` one line if/then/else/end when `then` branch has no body registers an offense behaves like changed precedence adds parentheses around `super b` behaves like changed precedence adds parentheses around `a or b` one line if/then/else/end allows empty else registers an offense behaves like changed precedence adds parentheses around `defined? :A` behaves like changed precedence adds parentheses around `a = b` one line unless/then/else/end registers an offense allows empty else behaves like changed precedence adds parentheses around `puts 1` behaves like changed precedence adds parentheses around `a ? b : c` RuboCop::Cop::Style::CommentedKeyword registers an offense when commenting on the same line as `def` registers an offense when commenting on the same line as `class` registers an offense for one-line cases does not register an offense if there are no comments after keywords registers an offense when commenting on indented keywords does not register an offense for certain comments registers an offense when commenting on the same line as `end` registers an offense when commenting on the same line as `begin` registers an offense when commenting after keyword with spaces registers an offense when commenting on the same line as `module` does not register an offense if AST contains # symbol accepts keyword letter sequences that are not keywords RuboCop::Cop::Style::SelfAssignment registers an offense for non-shorthand assignment + and x registers an offense for non-shorthand assignment || and x registers an offense for non-shorthand assignment && and @x registers an offense for non-shorthand assignment - and @x registers an offense for non-shorthand assignment - and x registers an offense for non-shorthand assignment | and @x registers an offense for non-shorthand assignment * and @x registers an offense for non-shorthand assignment && and x registers an offense for non-shorthand assignment ** and @x registers an offense for non-shorthand assignment || and @@x registers an offense for non-shorthand assignment / and @x registers an offense for non-shorthand assignment ** and @@x registers an offense for non-shorthand assignment || and @x registers an offense for non-shorthand assignment & and x registers an offense for non-shorthand assignment * and x registers an offense for non-shorthand assignment | and @@x registers an offense for non-shorthand assignment + and @@x registers an offense for non-shorthand assignment && and @@x registers an offense for non-shorthand assignment / and x registers an offense for non-shorthand assignment * and @@x registers an offense for non-shorthand assignment | and x registers an offense for non-shorthand assignment + and @x registers an offense for non-shorthand assignment & and @x registers an offense for non-shorthand assignment ** and x registers an offense for non-shorthand assignment & and @@x registers an offense for non-shorthand assignment / and @@x registers an offense for non-shorthand assignment - and @@x RuboCop::Cop::Utils::FormatString finds the correct number of fields #valid? returns true when there are only named formats returns true when there are only named with escaped `%` formats returns true when there are only numbered formats returns true when there are only unnumbered formats returns false when there are numbered and named formats returns false when there are unnumbered and numbered formats returns false when there are unnumbered and named formats #named_interpolation? behaves like named format sequence does not detect escaped named format sequence detects named format sequence behaves like named format sequence detects named format sequence does not detect escaped named format sequence behaves like named format sequence detects named format sequence does not detect escaped named format sequence behaves like named format sequence detects named format sequence does not detect escaped named format sequence RuboCop::Cop::Style::RedundantCapitalW registers no offense for normal arrays of strings with interpolation does not register an offense for array containing non-string registers no offense for %W with interpolation does not register an offense for array with empty strings registers no offense for arrays with character constants registers no offense for %w with interpolation-like syntax registers no offense for normal arrays of strings registers no offense for %w without interpolation does not register an offense for array of non-words registers an offense for misused %W registers an offense for misused %W with different bracket does not register an offense for array with one element registers no offense for %W with special characters RuboCop::Formatter::EmacsStyleFormatter #file_finished displays parsable text when the offense message contains a newline strips newlines out of the error message when the offense is automatically corrected prints [Corrected] along with message when the offense is marked as todo prints [Todo] along with message #finished does not report summary RuboCop::Cop::Layout::SpaceInsideArrayPercentLiteral accepts non array percent literals for i type and ["{", "}"] delimiters registers an offense for unnecessary spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces accepts multi-line literals accepts literals without additional spaces accepts literals with escaped spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces for W type and ["[", "]"] delimiters accepts literals without additional spaces registers an offense for unnecessary spaces accepts literals with escaped spaces accepts multi-line literals within a method accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals registers an offense for multiple spaces between items for W type and ["{", "}"] delimiters accepts multi-line literals accepts literals with escaped and additional spaces accepts literals without additional spaces registers an offense for unnecessary spaces accepts literals with escaped spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items for W type and ["!", "!"] delimiters accepts literals with escaped and additional spaces accepts multi-line literals within a method accepts multi-line literals accepts literals with escaped spaces accepts literals without additional spaces registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces registers an offense for unnecessary spaces for W type and ["(", ")"] delimiters accepts literals with escaped spaces accepts literals without additional spaces registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces accepts multi-line literals within a method registers an offense for unnecessary spaces accepts multi-line literals accepts literals with escaped and additional spaces for I type and ["[", "]"] delimiters registers an offense for multiple spaces between items accepts literals with escaped spaces accepts newlines and additional following alignment spaces accepts literals with escaped and additional spaces accepts multi-line literals accepts literals without additional spaces accepts multi-line literals within a method registers an offense for unnecessary spaces for i type and ["!", "!"] delimiters registers an offense for unnecessary spaces accepts literals with escaped spaces accepts multi-line literals accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals within a method registers an offense for multiple spaces between items accepts literals without additional spaces for w type and ["[", "]"] delimiters accepts multi-line literals accepts literals without additional spaces accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for multiple spaces between items accepts newlines and additional following alignment spaces accepts literals with escaped and additional spaces registers an offense for unnecessary spaces for i type and ["[", "]"] delimiters accepts multi-line literals within a method registers an offense for unnecessary spaces accepts multi-line literals accepts literals without additional spaces accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items accepts literals with escaped spaces accepts literals with escaped and additional spaces for i type and ["(", ")"] delimiters accepts literals without additional spaces accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items accepts multi-line literals accepts literals with escaped spaces accepts multi-line literals within a method registers an offense for unnecessary spaces for w type and ["(", ")"] delimiters accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items registers an offense for unnecessary spaces accepts literals without additional spaces accepts literals with escaped and additional spaces accepts multi-line literals accepts literals with escaped spaces accepts multi-line literals within a method for w type and ["{", "}"] delimiters accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals within a method accepts literals with escaped spaces accepts multi-line literals registers an offense for unnecessary spaces accepts literals without additional spaces registers an offense for multiple spaces between items for I type and ["!", "!"] delimiters accepts newlines and additional following alignment spaces accepts literals without additional spaces accepts multi-line literals accepts literals with escaped spaces accepts multi-line literals within a method accepts literals with escaped and additional spaces registers an offense for unnecessary spaces registers an offense for multiple spaces between items for I type and ["(", ")"] delimiters accepts literals without additional spaces accepts literals with escaped and additional spaces accepts multi-line literals within a method accepts literals with escaped spaces accepts multi-line literals accepts newlines and additional following alignment spaces registers an offense for multiple spaces between items registers an offense for unnecessary spaces for I type and ["{", "}"] delimiters accepts multi-line literals within a method accepts literals without additional spaces registers an offense for multiple spaces between items accepts literals with escaped and additional spaces accepts newlines and additional following alignment spaces accepts literals with escaped spaces registers an offense for unnecessary spaces accepts multi-line literals for w type and ["!", "!"] delimiters registers an offense for multiple spaces between items accepts multi-line literals accepts literals with escaped and additional spaces accepts literals without additional spaces accepts newlines and additional following alignment spaces accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for unnecessary spaces RuboCop::Cop::Metrics::PerceivedComplexity when Max is 2 counts stupid nested if and else blocks when Max is 1 counts known iterating block registers an offense for a rescue block registers an offense for or accepts an empty `define_method` accepts a method with no decision points accepts an empty method counts else in a case with no argument registers an offense for an unless modifier registers an offense for an until block registers an offense for elsif and else blocks accepts complex code outside of methods registers an offense for a case/when block registers an offense for || registers an offense for && registers an offense for an if modifier does not count unknown block calls counts only a single method registers an offense for a for block registers an offense for and registers an offense for a `define_method` registers an offense for a case/when block without an expression after case deals with nested if blocks containing && and || registers an offense for a while block registers an offense for a ternary operator when method is in list of ignored methods does not register an offense when using `define_method` does not register an offense when defining a class method does not register an offense when defining an instance method RuboCop::Cop::Style::MultilineMethodSignature when arguments span a single line when defining an class method when arguments span a single line registers an offense when closing paren is on the following line when method signature is on a single line does not register an offense for parameterized method does not register an offense for unparameterized method when defining an instance method registers an offense when closing paren is on the following line when method signature is on a single line does not register an offense for parameterized method does not register an offense for unparameterized method when arguments span multiple lines when defining an instance method registers an offense when `end` is on the same line registers an offense when `end` is on the following line when defining an class method registers an offense when `end` is on the following line registers an offense when `end` is on the same line when correction would not exceed maximum line length registers an offense when correction would exceed maximum line length does not register an offense RuboCop::Cop::Style::NegatedIf does not blow up for ternary ops does not blow up for empty unless condition does not blow up on a negated ternary operator does not blow up for empty if condition with “postfix” style does not register an offense for prefix registers an offense for postfix with “prefix” style registers an offense for prefix does not register an offense for postfix with “both” style accepts an if/else with negative condition registers an offense for if with exclamation point condition accepts an if where only part of the condition is negated registers an offense for if with "not" condition is not confused by negated elsif autocorrects by replacing parenthesized if not with unless accepts an if where the condition is doubly negated RuboCop::Cop::Style::StringHashKeys registers an offense when using strings as keys does not register an offense when not using strings as keys does not register an offense when string key is used in Open3.capture3 does not register an offense when string key is used in gsub! autocorrects strings as keys into symbols with the correct syntax registers an offense when using strings as keys mixed with other keys does not register an offense when string key is used in Open3.pipeline does not register an offense when string key is used in IO.popen does not register an offense when string key is used in gsub RuboCop::Cop::Lint::SafeNavigationConsistency registers an offense and corrects using safe navigation in conditions on the right hand side registers an offense and corrects using unsafe navigation with both && and || registers an offense and corrects using safe navigation inside of separated conditions allows || without safe navigation registers an offense and corrects assignment allows safe navigation when different variables are used registers an offense and corrects using unsafe navigation with grouped conditions registers an offense and corrects using safe navigation on the right of || registers an offense and corrects unsafe navigation that appears before safe navigation registers a single offense and corrects when safe navigation is used multiple times registers an offense and corrects using safe navigation on the right of && allows calls to methods that nil responds to registers an offense and corrects using safe navigation on the left of && registers an offense and corrects using safe navigation on the left of || registers and corrects multiple offenses registers an offense and corrects using unsafe navigation and the safe navigation appears in a group registers an offense and corrects when there is code before or after the condition registers an offense but does not correct non dot method calls allows && without safe navigation RuboCop::Cop::Layout::FirstArrayElementLineBreak ignores elements listed on a single line ignores properly formatted implicit arrays elements listed on the first line registers an offense autocorrects the offense send implicit arrays autocorrects the offense detects the offense word arrays autocorrects the offense detects the offense array nested in a method call registers ans offense autocorrects the offense masgn implicit arrays detects the offense autocorrects the offense RuboCop::Cop::Metrics::ParameterLists accepts a proc with more than 4 parameters accepts a lambda with more than 4 parameters accepts a method def with 4 parameters registers an offense for a method def with 5 parameters When CountKeywordArgs is false does not count keyword arguments without default values does not count keyword arguments When CountKeywordArgs is true counts keyword arguments as well RuboCop::Cop::Style::CharacterLiteral accepts literals like ?\C-\M-d accepts ? in a %w literal registers an offense for literals like \n auto-corrects ?' to "'" registers an offense for character literals RuboCop::Cop::Layout::MultilineHashBraceLayout ignores single-line hashes ignores empty hashes ignores implicit hashes behaves like multiline literal brace layout method argument when arguments to a method but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element behaves like multiline literal brace layout trailing comma symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element behaves like multiline literal brace layout same_line style opening brace on separate line from first element autocorrects closing brace on different line from last element allows closing brace on same line as last element detects closing brace on different line from last element allows closing brace on same line as last multiline element opening brace on same line as first element allows closing brace on same line as multi-line element autocorrects closing brace on different line as last element detects closing brace on different line from last element detects closing brace on different line from multiline element allows closing brace on same line from last element with a chained call on the closing brace and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace but no comment after the last element autocorrects the closing brace heredoc auto-corrects safe heredoc offenses detects heredoc structures that are safe to add to ignores heredocs that could share a last line symmetrical style opening brace on same line as first element allows closing brace on same line as last multiline element detects closing brace on different line from last element allows closing brace on same line as last element autocorrects closing brace on different line from last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element opening brace on separate line from first element detects closing brace on same line as last element allows closing brace on separate line from last multiline element autocorrects closing brace on same line from last element allows closing brace on separate line from last element new_line style opening brace on same line as first element detects closing brace on same line as last element allows closing brace on different line from multi-line element detects closing brace on same line as last multiline element autocorrects closing brace on same line as last element allows closing brace on different line from last element opening brace on separate line from first element allows closing brace on separate line from last multiline element detects closing brace on same line as last element allows closing brace on separate line from last element autocorrects closing brace on same line from last element RuboCop::Runner how formatter is invoked #finished when RuboCop finished inspecting all files normally sends all file paths the passed files paths is frozen when RuboCop is interrupted by user sends only processed file paths invocation order is called in the proper sequence #file_started sends file specific information hash sends a file path the passed path is frozen #started sends all file paths the passed files paths is frozen #file_finished sends a file path sends an array of detected offenses for the file the passed path is frozen RuboCop::Cop::Lint::SelfAssignment does not register an offense when using shorthand-or var assignment does not register an offense when using multiple var assignment through method call registers an offense when using shorthand-or var self-assignment registers an offense when using local var self-assignment does not register an offense when using global var assignment does not register an offense when using local var assignment does not register an offense when using shorthand-and var assignment does not register an offense when using multiple var assignment does not register an offense when using multiple var assignment through splat registers an offense when using global var self-assignment registers an offense when using shorthand-and var self-assignment does not register an offense when using constant var assignment for constant from another scope registers an offense when using multiple var self-assignment registers an offense when using class var self-assignment does not register an offense when using class var assignment registers an offense when using constant var self-assignment registers an offense when using instance var self-assignment does not register an offense when using instance var assignment does not register an offense when using constant var or-assignment for constant from another scope registers an offense when using multiple var self-assignment through array RuboCop::Cop::Style::HashEachMethods when node matches a keys#each or values#each when receiver is implicit does not register an offense for each_key does not register an offense for `values.each` does not register an offense for `keys.each` does not register an offense for each_value when receiver is a send does not register an offense for foo#each_key registers offense, auto-corrects foo#keys.each to foo#each_key does not register an offense for Hash#each_value registers offense, auto-corrects foo#values.each to foo#each_value when receiver is a hash literal registers offense, auto-corrects {}#values.each with {}#each_value registers offense, auto-corrects {}#keys.each with {}#each_key does not register an offense for {}#each_key does not register an offense for {}#each_value RuboCop::Cop::Style::DoubleNegation when `EnforcedStyle: allowed_in_returns` does not register an offense for `!!` when using `return` keyword does not register an offense for `not not` does not register an offense for `!!` when return location registers an offense for `!!` does not register an offense for `!!` when not a return location does not register an offense for ! when `EnforcedStyle: forbidden` registers an offense for `!!` when return location registers an offense for `!!` does not register an offense for `!!` when not a return location does not register an offense for ! does not register an offense for `!!` when using `return` keyword does not register an offense for `not not` RuboCop::Cop::Style::AndOr when style is always also warns on until (or) autocorrects "or" with an assignment on the right also warns on while (and) auto-corrects "or" with || and doesn't add extra parentheses registers an offense for "or" autocorrects "or" with an assignment on the left autocorrects "or" inside def registers an offense for "and" auto-corrects "or" with || in method calls also warns on until (and) warns on short-circuit (and) auto-corrects "and" with && in method calls (3) auto-corrects "or" with || in method calls (4) auto-corrects "or" with || and adds parentheses to expr auto-corrects "and" with && and doesn't add extra parentheses auto-corrects "or" with || in method calls (3) also warns on non short-circuit (or) (unless) autocorrects "and" with an Enumerable accessor on either side also warns on while (or) autocorrects "and" inside def auto-corrects "and" with && in method calls auto-corrects "or" with || in method calls (2) also warns on non short-circuit (and) auto-corrects "and" with && in method calls (4) also warns on non short-circuit (and) (unless) warns on short-circuit (or) auto-corrects "and" with && in method calls (2) auto-corrects "and" with && and adds parentheses to expr also warns on non short-circuit (or) with a file which contains __FILE__ autocorrects "or" with || with obj.method= arg on left autocorrects "and" with && and adds parens with obj.method = arg on left autocorrects "and" with && and adds parens with predicate method with arg without space on right autocorrects "and" with && and adds parens autocorrects "or" with || and adds parens with `not` expression on left autocorrects "and" with && and adds parens with !obj.method arg on left autocorrects "and" with && and adds parens within a nested begin node with one child only autocorrects "and" with && and adds parens with one predicate method without space on right and another method autocorrects "and" with && and adds parens autocorrects "or" with || and adds parens with `not` expression on right autocorrects "and" with && and adds parens with !variable on left doesn't crash and burn with !obj.method arg on right autocorrects "and" with && and adds parens when left hand side is a comparison method autocorrects "and" with && and adds parens within a nested begin node autocorrects "and" with && and adds parens with two predicate methods with args without spaces on right autocorrects "or" with || and adds parens autocorrects "and" with && and adds parens when style is conditionals accepts && outside of conditional registers an offense for "and" in post-until condition accepts "or" in post-until body registers an offense for "and" in post-while condition accepts "or" in if body accepts "or" in until body accepts && inside of conditional accepts || outside of conditional registers an offense for "or" in while condition registers an offense for "or" in until condition accepts "or" in post-while body registers an offense for "or" in post-until condition registers an offense for "and" in until condition accepts "and" in if body accepts "and" in post-until body accepts || inside of conditional registers an offense for "or" in post-while condition accepts "and" in while body accepts "and" in until body accepts "and" outside of conditional accepts "or" in while body registers an offense for "or" in if condition accepts "or" outside of conditional accepts "and" in post-while body registers an offense for "and" in while condition registers an offense for "and" in if condition RuboCop::Cop::Lint::UselessSetterCall handles exception assignments without exploding is not confused by operators ending with = when a lvar contains a local object instantiated with literal registers an offense for the setter call on the lvar when a lvar contains an object passed as argument by multiple-assignment at the end of the method accepts the setter call on the lvar with method ending with ivar assignment accepts when a lvar does not contain any object passed as argument with multiple-assignment at the end of the method registers an offense when a lvar contains an object passed as argument at the end of the method accepts the setter call on the lvar when a lvar possibly contains an object passed as argument by logical-operator-assignment at the end of the method accepts the setter call on the lvar with singleton method ending with setter call on local object registers an offense when a lvar declared as an argument is no longer the passed object at the end of the method registers an offense for the setter call on the lvar when a lvar does not contain any object passed as argument by binary-operator-assignment at the end of the method registers an offense with method ending with setter call on ivar accepts with method ending with setter call on local object registers an offense with method ending with setter call on argument accepts when a lvar contains a non-local object returned by a method accepts with method ending with square bracket setter on local object registers an offense RuboCop::Cop::Style::ColonMethodCall does not register an offense for Java package namespaces does not register an offense for Java static types registers an offense for class method call registers an offense for instance method call does not register an offense when for constructor methods does not register an offense for op methods does not register an offense for nested class registers an offense for class method call with arg registers an offense for instance method call with arg does not register an offense for constant access RuboCop::Cop::Style::BarePercentLiterals when EnforcedStyle is percent_q and strings are dynamic accepts regular expressions accepts "" string with interpolation accepts "" accepts %q accepts heredoc accepts %Q() registers an offense for %() accepts __FILE__ accepts '' and strings are static accepts '' accepts heredoc accepts __FILE__ accepts "" string with interpolation accepts %q registers an offense for %() accepts regular expressions accepts "" accepts %Q() when EnforcedStyle is bare_percent and strings are dynamic registers an offense for %Q() accepts '' accepts regular expressions accepts __FILE__ accepts %q accepts "" string with interpolation accepts %() accepts heredoc accepts "" and strings are static accepts regular expressions accepts heredoc accepts %() accepts __FILE__ registers an offense for %Q() accepts '' accepts "" accepts %q accepts "" string with interpolation RuboCop::Cop::Style::TrailingUnderscoreVariable configured to allow named underscore variables registers an offense for nested assignments with trailing underscores does not register an offense for multiple named underscores preceded by a splat variable does not register an offense for a named variable preceded by a names splat underscore variable does not register an offense for an underscore variable preceded by a named splat underscore variable does not register an offense when there are no underscores registers an offense for multiple underscore variables preceded by a splat underscore variable registers an offense for splat underscore as the last variable does not register an offense for a named splat underscore as the last variable does not register an offense for an underscore preceded by a splat variable and another underscore does not register an offense for nested assignments without trailing underscores registers an offense for an underscore as the last param when there is also an underscore as the first param does not register an offense for an underscore preceded by a splat variable does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain does not register an offense for named variables that start with an underscore registers an offense for complex nested assignments with trailing underscores registers an offense when multiple underscores are used as the last variables of parallel assignment does not register an offense for underscores at the beginning does not register an offense for a named underscore variable preceded by a splat variable does not register an offense for multiple underscore variables preceded by a named splat underscore variable registers an offense when underscore is the second to last variable and blank is the last variable does not register an offense for complex nested assignments without trailing underscores registers an offense when the last variable of parallel assignment is an underscore registers an offense when underscore is the only variable in parallel assignment does not register an offense for multiple underscores preceded by a splat variable autocorrect with parentheses removes assignment part when every assignment is to `_` leaves parentheses but removes trailing underscores removes assignment part when it is the only variable leaves parentheses but removes trailing underscores and commas configured to not allow named underscore variables registers an offense for splat underscore as the last variable does not register an offense for multiple named underscores preceded by a splat variable registers an offense when underscore is the second to last variable and blank is the last variable does not register an offense for nested assignments without trailing underscores does not register an offense for underscores at the beginning does not register an offense for an underscore preceded by a splat variable anywhere in the argument chain registers an offense for multiple underscore variables preceded by a named splat underscore variable registers an offense when underscore is the only variable in parallel assignment registers an offense when multiple underscores are used as the last variables of parallel assignment registers an offense for an underscore as the last param when there is also an underscore as the first param registers an offense for an underscore variable preceded by a named splat underscore variable does not register an offense when there are no underscores does not register an offense for an underscore preceded by a splat variable registers an offense for named variables that start with an underscore does not register an offense for a named underscore preceded by a splat variable registers an offense for complex nested assignments with trailing underscores registers an offense for nested assignments with trailing underscores registers an offense for multiple underscore variables preceded by a splat underscore variable does not register an offense for complex nested assignments without trailing underscores registers an offense when the last variable of parallel assignment is an underscore does not register an offense for a named variable preceded by a names splat underscore variable registers an offense for an underscore preceded by a named splat underscore does not register an offense for multiple underscores preceded by a splat variable does not register an offense for an underscore preceded by a splat variable and another underscore does not register an offense for a named underscore variable preceded by a splat variable registers an offense for a named splat underscore as the last variable autocorrect with parentheses leaves parentheses but removes trailing underscores removes assignment part when every assignment is to `_` leaves parentheses but removes trailing underscores and commas removes assignment part when it is the only variable RuboCop::Cop::Style::MultilineIfThen does not get confused by a then in a when registers an offense for then in multiline unless registers an offense for then in multiline elsif does not raise an error for an implicit match if does not get confused by a postfix unless does not get confused by empty elsif branch does not get confused by a commented-out then does not get confused by a nested postfix unless does not raise an error for an implicit match unless accepts table style if/then/elsif/ends registers an offense for then in multiline if RuboCop::Cop::Lint::EmptyEnsure does not register an offense for non-empty ensure registers an offense and corrects empty ensure RuboCop::Formatter::FuubarStyleFormatter #progressbar_color when a offense is detected in a file and auto-corrected is green when a convention offense is detected in a file is yellow when an error offense is detected in a file is red and then a convention offense is detected in the next file is still red initially is green when convention and error offenses are detected in a file is red when no offenses are detected in a file is still green #with_color when color is disabled outputs nothing when color is enabled outputs coloring sequence code at the beginning and the end RuboCop::Cop::Layout::SpaceBeforeFirstArg for method calls without parentheses registers an offense for method call with no spaces before the first arg registers an offense and corrects method call with two spaces before the first arg accepts multiple space containing line break accepts + operator accepts a method call with one space before the first arg accepts setter call auto-corrects missing space when a vertical argument positions are aligned registers an offense auto-corrects missing space when AllowForAlignment is true accepts method calls with aligned first arguments when AllowForAlignment is false registers an offense and corrects method calls with aligned first arguments when using safe navigation operator registers an offense and corrects method call with two spaces before the first arg for method calls with parentheses accepts a method call without space accepts a method call with space after the left parenthesis RuboCop::Cop::Metrics::Utils::AbcSizeCalculator #calculate with &&= is expected to eq "<2, 0, 1>" with a yield is expected to eq "<0, 1, 0>" with .foo = is expected to eq "<1, 2, 0>" elsif vs else if elsif is expected to eq "<0, 5, 3>" else if is expected to eq "<0, 5, 4>" same with extra condition is expected to eq "<2, 9, 5>" with unused assignments is expected to eq "<2, 1, 0>" with a block is expected to eq "<2, 3, 0>" method with arguments is expected to eq "<4, 0, 0>" assignment with ternary operator is expected to eq "<2, 6, 2>" multiple assignment is expected to eq "<3, 1, 0>" with a for is expected to eq "<2, 1, 1>" with ||= is expected to eq "<2, 0, 1>" with []= is expected to eq "<2, 1, 0>" with a known iterating block is expected to eq "<2, 4, 2>" if and arithmetic operations is expected to eq "<2, 8, 4>" multiple calls with return is expected to eq "<0, 3, 0>" with &.foo is expected to eq "<0, 4, 2>" with repeated lvar receivers is expected to eq "<3, 5, 3>" same but with 7 arguments is expected to eq "<9, 3, 0>" RuboCop::Cop::Style::ConstantVisibility does not register an offense in the top level scope does not register an offense when passing a string to the visibility declaration when defining a constant in a class with a multi-statement body registers an offense when there is no matching visibility declaration does not register an offense when using a visibility declaration registers an offense when not using a visibility declaration with a single-statement body registers an offense when not using a visibility declaration when defining a constant in a module registers an offense when not using a visibility declaration does not register an offense when using a visibility declaration RuboCop::Cop::Style::FrozenStringLiteralComment always_true accepts a source with no tokens registers an offense for arbitrary tokens below an encoding comment registers an offense for not having a frozen string literal comment under a shebang and an encoding comment registers an offense for a disabled frozen string literal below a shebang comment registers an offense for a disabled frozen string literal comment below an encoding comment and extra space registers an offense for a disabled frozen string literal above an empty line registers an offense for a disabled frozen string literal comment below shebang, an encoding comment, and extra space accepts an empty source registers an offense for not having a frozen string literal comment under shebang with no other code registers an offense for arbitrary tokens registers an offense for a disabled frozen string literal comment below shebang above an encoding comments accepts a frozen string literal on the top line registers an offense for not having a frozen string literal comment under an encoding comment and extra space accepts a frozen string literal comment under shebang with no other code registers an offense for arbitrary tokens below shebang above an encoding comments accepts a frozen string literal comment below shebang and encoding comments accepts an emacs style combined magic comment registers an offense for arbitrary tokens below shebang and encoding comments registers an offense for an extra first empty line registers an offense for arbitrary tokens below an encoding comment and extra space accepts a frozen string literal comment below shebang above an encoding comments registers an offense for arbitrary tokens above an empty line registers an offense for a disabled frozen string literal comment under shebang with no other code registers an offense for arbitrary tokens under shebang with no other code accepts a frozen string literal comment below shebang, an encoding comment, and extra space registers an offense for a disabled frozen string literal registers an offense for not having a frozen string literal comment on the top line registers an offense for a disabled frozen string literal on the top line registers an offense for having a frozen string literal comment under ruby code accepts a frozen string literal below an encoding comment accepts a frozen string literal comment after other comments registers an offense for arbitrary tokens below shebang, an encoding comment, and extra space accepts a frozen string literal comment below an encoding comment and extra space registers an offense for not having a frozen string literal comment under an encoding comment registers an offense for arbitrary tokens below a shebang comment registers an offense for a disabled frozen string literal comment below shebang and encoding comments registers an offense for not having a frozen string literal comment under a shebang, an encoding comment, and extra space registers an offense for a disabled frozen string literal below an encoding comment accepts a frozen string literal below a shebang comment registers an offense for a disabled frozen string literal comment after other comments never registers an offense for a disabled frozen string literal below an encoding comment registers an offense for a disabled frozen string literal comment below shebang above an encoding comments registers an offense for a disabled frozen string literal below a shebang comment accepts an empty source accepts a source with no tokens registers an offense for a disabled frozen string literal comment below shebang and encoding comments registers an offense for a disabled frozen string literal comment on the top line allows not having a frozen string literal comment under a shebang and an encoding comment accepts not having a frozen string literal comment on the top line accepts a frozen string literal comment under ruby code registers an offense for having a frozen string literal comment after other comments registers an offense for a frozen string literal comment below shebang and encoding comments allows not having a frozen string literal comment under an encoding comment registers an offense for a frozen string literal comment below a shebang comment registers an offense for a frozen string literal comment on the top line accepts not having not having a frozen string literal comment under a shebang registers an offense for a frozen string literal comment below shebang above an encoding comments registers an offense for a frozen string literal comment below an encoding comment always accepts a frozen string literal comment below shebang above an encoding comments registers an offense for not having a frozen string literal comment under a shebang and an encoding comment accepts a disabled frozen string literal below an encoding comment registers an offense for an extra first empty line accepts a source with no tokens accepts a frozen string literal comment after other comments accepts a frozen string literal below a shebang comment registers an offense for not having a frozen string literal comment under a shebang registers an offense for not having a frozen string literal comment under an encoding comment separated by a newline accepts a frozen string literal comment below shebang and encoding comments accepts a frozen string literal below an encoding comment registers an offense for arbitrary tokens registers an offense for not having a frozen string literal comment when there is only a shebang accepts a frozen string literal on the top line accepts a disabled frozen string literal comment below shebang and encoding comments accepts a frozen string literal comment below newline-separated magic comments accepts a disabled frozen string literal comment below shebang above an encoding comments accepts a disabled frozen string literal below a shebang comment registers an offense for not having a frozen string literal comment on the top line accepts a disabled frozen string literal on the top line accepts an emacs style combined magic comment registers an offense for not having a frozen string literal comment under an encoding comment registers an offense with an empty line between magic comments and the code accepts an empty source registers an offense for having a frozen string literal comment under ruby code RuboCop::Cop::Layout::CommentIndentation auto-corrects registers offenses and corrects before __END__ but not after near various kinds of brackets is unaffected by closing bracket that does not begin a line accepts correctly indented comments on outer level registers an offense and corrects an incorrectly indented (1) comment registers an offense for each incorrectly indented comment accepts a correctly indented comment registers an offense and corrects a documentation comment registers an offense and corrects an incorrectly indented (2) comment accepts a comment that follows code around program structure keywords accepts correctly indented comments with a blank line following the comment accepts a correctly indented comment RuboCop::Cop::Layout::SpaceInsideHashLiteralBraces can handle interpolation in a braceless hash literal accepts hash literals with no braces accepts hashes with spaces by default registers an offense for hashes with no spaces if so configured registers an offense for correct + opposite with space inside empty braces not allowed accepts empty braces with no space inside registers an offense for empty braces with space inside when EnforcedStyle is compact accepts multiline hash with comment registers an offense for nested hashes with spaces accepts multiline hash doesn't register an offense for non-nested hashes with spaces registers an offense for opposite + correct registers offenses for hashes with no spaces with space inside empty braces allowed registers an offense for empty braces with no space inside accepts empty braces with space inside on { key: "{" } does not register an offense on Hash[{ x: 1 } => [1]] does not register an offense when EnforcedStyle is no_space accepts multiline hash with comment registers an offense for opposite + correct accepts hashes with no spaces accepts multiline hash registers an offense for hashes with spaces RuboCop::Cop::VariableForce::Reference .new when non variable reference node is passed raises error RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective registers an offense for disabled cop within source code registers an offense for enabled cop within source code RuboCop::MagicComment returns nil for encoding when comment is # incoding: utf-8 returns nil for frozen_string_literal when comment is # encoding: ascii-8bit frozen_string_literal: true returns nil for frozen_string_literal when comment is # frozen_string_literal: true encoding: ascii-8bit returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # incoding: utf-8 returns true for frozen_string_literal when comment is # -*- frozen-string-literal: true -*- returns "utf-8" for encoding when comment is # coding: utf-8 returns "utf-8" for encoding when comment is # ENCODING: utf-8 returns nil for frozen_string_literal when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| returns "ascii-8bit" for encoding when comment is #vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # -*- coding: ASCII-8BIT; frozen_string_literal: true -*- returns true for frozen_string_literal when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for frozen_string_literal when comment is # vim: filetype=python, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # encoding: utf-8 returns nil for encoding when comment is CSV.generate(encoding: Encoding::UTF_8) do |csv| returns true for frozen_string_literal when comment is # frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # vim: filetype=python, fileencoding=ascii-8bit returns "ascii-8bit" for encoding when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns "utf-8" for encoding when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit returns "invalid" for frozen_string_literal when comment is # frozen_string_literal: invalid returns nil for encoding when comment is # returns nil for frozen_string_literal when comment is # -*- encoding : ascii-8bit -*- returns nil for encoding when comment is # frozen_string_literal: false returns true for frozen_string_literal when comment is # fRoZeN-sTrInG_lItErAl: true returns nil for frozen_string_literal when comment is # returns nil for frozen_string_literal when comment is # vim:fileencoding=utf-8 returns nil for frozen_string_literal when comment is #vim: filetype=ruby, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # eNcOdInG: utf-8 returns "stateless-iso-2022-jp-kddi" for encoding when comment is # encoding: stateless-iso-2022-jp-kddi returns nil for frozen_string_literal when comment is # encoding: stateless-iso-2022-jp-kddi returns true for frozen_string_literal when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for encoding when comment is # frozen_string_literal:true returns "ascii-8bit" for encoding when comment is # coding: utf-8 -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for encoding when comment is # frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # encoding: ascii-8bit frozen_string_literal: true returns nil for encoding when comment is # frozen_string_literal: true returns nil for frozen_string_literal when comment is # coding: utf-8 returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # coding: utf-8 returns false for frozen_string_literal when comment is # frozen_string_literal: false returns nil for encoding when comment is # -*- frozen-string-literal: true -*- returns true for frozen_string_literal when comment is # frozen_string_literal:true returns true for frozen_string_literal when comment is # FROZEN-STRING-LITERAL: true returns nil for encoding when comment is # frozen-string-literal: true returns "ascii-8bit" for encoding when comment is # frozen_string_literal: true encoding: ascii-8bit returns nil for encoding when comment is # vim:fileencoding=utf-8 returns true for frozen_string_literal when comment is # frozen-string-literal: true returns nil for frozen_string_literal when comment is # ENCODING: utf-8 returns "ascii-8bit" for encoding when comment is # -*- encoding : ascii-8bit -*- returns nil for encoding when comment is # FROZEN-STRING-LITERAL: true returns nil for frozen_string_literal when comment is # vim: filetype=ruby, fileencoding=ascii-8bit returns "utf-8" for encoding when comment is # coding: utf-8 returns nil for encoding when comment is # vim: filetype=ruby,fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # vim: filetype=ruby,fileencoding=ascii-8bit returns nil for frozen_string_literal when comment is # coding: utf-8 vim: filetype=ruby, fileencoding=ascii-8bit returns true for frozen_string_literal when comment is # frozen_string_literal: true returns "ascii-8bit" for encoding when comment is # -*- coding: ASCII-8BIT; frozen_string_literal: true -*- returns nil for encoding when comment is # fRoZeN-sTrInG_lItErAl: true returns "utf-8" for encoding when comment is # eNcOdInG: utf-8 returns "utf-8" for encoding when comment is # encoding: utf-8 returns nil for encoding when comment is # frozen_string_literal: invalid returns "ascii-8bit" for encoding when comment is # -*- encoding: ASCII-8BIT; frozen_string_literal: true -*- RuboCop::Cop::Style::TrailingBodyOnModule auto-corrects when there are multiple semicolons registers an offense when body trails after module definition registers offense when module definition uses semicolon registers offense with multi-line module auto-corrects with comment after body accepts regular module when module is not on first line of processed_source auto-corrects offense RuboCop::Cop::Layout::IndentationStyle when EnforcedStyle is spaces accepts a line which begins with tab in a multiline heredoc accepts a line with tab in a string auto-corrects a line with tab in a string indented with tab auto-corrects a line indented with multiple tabs does not auto-correct a line with tab other than indentation accepts a line which begins with tab in a string auto-corrects a line indented with mixed whitespace registers an offense for a line indented with mixed whitespace registers an offense for a line indented with multiple tabs registers offenses before __END__ but not after registers an offense for a line indented with tab accepts a line which begins with tab in a heredoc auto-corrects a line indented with tab accepts a line with a tab other than indentation accepts a line with a tab between string literals custom indentation width uses the configured number of spaces to replace a tab when EnforcedStyle is tabs auto-corrects a line indented with multiple spaces auto-corrects a line indented with mixed whitespace registers an offense for a line indented with multiple spaces accepts a line a tab other than indentation does not auto-corrects a line with tab other than indentation accepts a line which begins with tab in a string auto-corrects a line with tab in a string indented with space registers an offense for a line indented with space registers offenses before __END__ but not after accepts a line with tab in a string accepts a line with tabs between string literals accepts a line which begins with tab in a heredoc accepts a line which begins with tab in a multiline heredoc auto-corrects a line indented with space registers an offense for a line indented with mixed whitespace auto-corrects a line indented with fractional number ofindentation groups by rounding down custom indentation width uses the configured number of spaces to replace with a tab RuboCop::Formatter::DisabledConfigFormatter when any offenses are detected displays YAML configuration disabling all cops with offenses when exclude_limit option is omitted disables the cop with 15 offending files when there's .rubocop.yml merges in excludes from .rubocop.yml with auto-correct supported cop adds a comment about --auto-correct option when no files are inspected creates a .rubocop_todo.yml even in such case when exclude_limit option is passed respects the file exclusion list limit RuboCop::Cop::Style::EachForSimpleLoop does not register offense if range endpoint is not constant does not register offense for multiline block with parameters does not register offense if range startpoint is not constant does not register offense for character range does not register offense for inline block with parameters when using an inclusive end range does not register offense for range not starting with zero and using param autocorrects the source with inline block autocorrects the source with multiline block autocorrects the range not starting with zero when using an exclusive end range autocorrects the range not starting with zero autocorrects the source with multiline block does not register offense for range not starting with zero and using param autocorrects the source with inline block RuboCop::Cop::Style::WhileUntilModifier behaves like condition modifier cop for a multiline 'until' accepts it if single line would not fit on one line accepts it when condition has local variable assignment corrects it when assignment is in body accepts it if body spans more than one line accepts an empty body corrects it if result fits in one line when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense behaves like condition modifier cop for a multiline 'while' accepts it if body spans more than one line corrects it if result fits in one line accepts it when condition has local variable assignment accepts an empty body accepts it if single line would not fit on one line corrects it when assignment is in body when Layout/LineLength is disabled registers an offense even for a long modifier statement accepts multiline condition in modifier form registers an offense RuboCop::Cop::Lint::FloatOutOfRange does not register an offense for 0.0 does not register an offense for tiny little itty bitty floats does not register an offense for respectably sized floats on whopping big floats which tip the scales registers an offense on floats so close to zero that nobody can tell the difference registers an offense RuboCop::Cop::Lint::AmbiguousRegexpLiteral with a regexp literal in the first argument without parentheses registers an offense and corrects when single argument registers an offense and corrects when nesting registers an offense and corrects when using block argument registers an offense and corrects when multiple arguments with parentheses accepts RuboCop::Cop::Style::StringMethods registers an offense when using safe navigation operator registers an offense RuboCop::Cop::Style::HashAsLastArrayItem when EnforcedStyle is braces does not register an offense when hash with braces does not register an offense when hash is not inside array registers an offense and corrects when hash without braces when EnforcedStyle is no_braces registers an offense and corrects when hash with braces does not register an offense when hash without braces does not register an offense when hash is not inside array RuboCop::Cop::Layout::SpaceAfterNot registers an offense and corrects multiple spaces after ! accepts no space after ! registers an offense and corrects space after ! with the negated receiver wrapped in parentheses accepts space after not keyword registers an offense and corrects a single space after ! RuboCop::Cop::Migration::DepartmentName when a disable comment contains an unexpected character for department name accepts when a disable comment contains a plain comment accepts when an unexpected disable comment format does not register an offense when a disable comment has cop names with departments accepts when todo/enable comments have cop names without departments registers offenses and corrects registers offenses and corrects when using a legacy cop name registers offenses and corrects when there is space around `:` RuboCop::Cop::Style::ExponentialNotation EnforcedStyle is engineering registers an offense for a mantissa greater than -0.1 registers no offense for a regular float registers no offense for a large mantissa registers an offense for mantissa smaller than 0.1 registers no offense for a negative exponent registers no offense for a negative mantissa registers an offense for exponent equal to 4 registers an offense for mantissa smaller than -1000 registers no offense for a mantissa equal to 1 registers no offense for a float smaller than 1 registers an offense for exponent equal to -2 EnforcedStyle is scientific registers no offense for a negative mantissa registers no offense for a regular float registers no offense for a negative exponent registers no offense for a float smaller than 1 registers an offense for mantissa greater than 10 registers no offense for a mantissa equal to 1 registers an offense for mantissa equal to 10 registers an offense for mantissa smaller than 1 registers no offense for a mantissa between 1 and 10 EnforcedStyle is integral registers no offense for an integral mantissa registers no offense for negative exponent registers an offense for decimal mantissa registers no offense for a float smaller than 1 registers no offense for a regular float registers an offense for mantissa divisible by 10 registers no offense for negative mantissa RuboCop::Cop::Style::Semicolon registers an offense for several expressions registers an offense for semicolon at the end no matter what registers an offense for one line method with two statements accept semicolons inside strings accepts semicolon after params if so configured registers an offense for a semicolon at the beginning of a line registers an offense for a single expression accepts semicolon before end if so configured accepts one line method definitions accepts one line empty class definitions accepts one line empty method definitions accepts one line empty module definitions when AllowAsExpressionSeparator is true accepts several expressions accepts one line method with two statements with a multi-expression line without a semicolon does not register an offense RuboCop::Cop::Style::SlicingWithRange <= Ruby 2.5 reports no offense for array slicing with -1 >= Ruby 2.6 reports no offense for excluding end reports no offense for other methods reports no offense for array with range inside reports an offense for slicing from expression to ..-1 reports an offense for slicing to ..-1 >= Ruby 2.7 reports no offense for startless RuboCop::Cop::Style::StabbyLambdaParentheses require_parentheses registers an offense for a stabby lambda without parentheses does not register an offense for a stabby lambda with parentheses behaves like common does not check a stabby lambda without arguments does not check a method call named lambda does not check the old lambda syntax require_no_parentheses registers an offense for a stabby lambda with parentheses behaves like common does not check a method call named lambda does not check the old lambda syntax does not check a stabby lambda without arguments RuboCop::Cop::Lint::RedundantRequireStatement registers an offense and corrects when using `require 'enumerator'` RuboCop::Cop::Layout::MultilineArrayLineBreaks when nested arrays registers an offense and corrects when two elements on same line registers an offense and corrects when on same line, separate line from brackets does not add any offenses when on same line does not add any offenses RuboCop::Cop::VariableForce #process_node when processing an empty regex does not raise an error when processing a regexp with a line break at the start of capture parenthesis does not raise an error when processing lvar node when the variable is not yet declared does not raise error RuboCop::CommentConfig #cop_enabled_at_line? supports disabling cops on a comment line with an EOL comment supports enabling/disabling multiple cops in a single directive just ignores unpaired enabling directives supports disabling cops with numbers in their name supports enabling/disabling cops without a prefix supports enabling/disabling multiple cops along with a comment does not confuse a cop name including "all" with all cops supports disabling all lines after a directive supports disabling all cops except Lint/RedundantCopDisableDirective with keyword all does not confuse a comment directive embedded in a string literal with a real comment can handle double disable of one cop supports disabling cops with multiple uppercase letters supports disabling single line with a directive at end of line supports disabling multiple lines with a pair of directive handles indented single line RuboCop::Cop::Style::NonNilCheck when not allowing semantic changes does not register an offense if last expression in predicate registers an offense for != nil does not register an offense for !x.nil? does not register an offense if only expression in predicate does not report corrected when the code was not modified does not register an offense for != 0 does not register an offense for not x.nil? does not blow up when autocorrecting implicit receiver does not register an offense if only expression in class predicate does not register an offense if last expression in class predicate when allowing semantic changes does not register an offense for `!x` registers an offense for unless x.nil? corrects code that would not be modified if IncludeSemanticChanges were false registers an offense for `not x.nil?` autocorrects by changing `x != nil` to `x` does not blow up when autocorrecting implicit receiver does not blow up with ternary operators does not register an offense for `x.nil?` registers an offense for `!x.nil?` RuboCop::Cop::Style::PreferredHashMethods with enforced `short` style registers an offense for has_value? with one arg registers an offense for has_key? with one arg accepts has_value? with no args accepts has_key? with no args when using safe navigation operator registers an offense for has_value? with one arg with enforced `verbose` style registers an offense for key? with one arg accepts value? with no args accepts key? with no args registers an offense for value? with one arg RuboCop::Cop::Layout::EmptyLinesAroundExceptionHandlingKeywords accepts empty lines around begin body with complex method definition - registers many offenses with complex begin-end - registers many offenses registers an offense for rescue section ending for method definition a blank accepts empty begin registers an offense for rescue section ending with a blank accepts no empty line accepts empty method definition registers an offense for rescue section starting with a blank registers an offense for above rescue keyword with a blank RuboCop::Cop::Layout::AssignmentIndentation registers an offense for incorrectly indented rhs ignores comparison operators allows a properly indented rhs with fullwidth characters registers an offense for incorrectly indented rhs when multiple assignment registers an offense for multi-lhs allows a properly indented rhs allows assignments that do not start on a newline registers an offense for incorrectly indented rhs whenmultiple assignment with line breaks on each line when indentation width is overridden for this cop only allows a properly indented rhs auto-corrects indentation RuboCop::Cop::Layout::MultilineMethodDefinitionBraceLayout ignores implicit defs ignores defs without params ignores single-line defs heredoc detects heredoc structures that are safe to add to ignores heredocs that could share a last line auto-corrects safe heredoc offenses new_line style opening brace on separate line from first element allows closing brace on separate line from last multiline element detects closing brace on same line as last element allows closing brace on separate line from last element autocorrects closing brace on same line from last element opening brace on same line as first element detects closing brace on same line as last element detects closing brace on same line as last multiline element autocorrects closing brace on same line as last element allows closing brace on different line from last element allows closing brace on different line from multi-line element same_line style opening brace on same line as first element detects closing brace on different line from last element allows closing brace on same line as multi-line element detects closing brace on different line from multiline element allows closing brace on same line from last element autocorrects closing brace on different line as last element opening brace on separate line from first element allows closing brace on same line as last multiline element autocorrects closing brace on different line from last element allows closing brace on same line as last element detects closing brace on different line from last element symmetrical style opening brace on separate line from first element allows closing brace on separate line from last multiline element autocorrects closing brace on same line from last element detects closing brace on same line as last element allows closing brace on separate line from last element opening brace on same line as first element allows closing brace on same line as last element detects closing brace on different line from last element allows closing brace on same line as last multiline element autocorrects closing brace on different line from last element RuboCop::Cop::Style::ImplicitRuntimeError registers an offense for `raise` without error class registers an offense for `fail` without error class registers an offense for `fail` with a multiline string registers an offense for `raise` with a multiline string does not register an offense for `fail` with an error class does not register an offense for `raise` without arguments does not register an offense for `fail` without arguments does not register an offense for `raise` with an error class RuboCop::Formatter::FormatterSet responds to all formatter API methods #close_output_files does not close non file output closes all output files add_formatter adds a formatter with specified formatter type can add multiple formatters by being invoked multiple times adds a formatter to itself when output path is omitted adds a formatter outputs to $stdout when output path is specified adds a formatter outputs to the specified file when parent directories don't exist creates them formatter API method invokes the same method of all containing formatters #builtin_formatter_class returns class which matches single character alias name returns class which matches double character alias name returns class which matches passed alias name exactly #custom_formatter_class can handle namespaced constant name returns constant represented by the passed string can handle top level namespaced constant name when non-existent constant name is passed raises error RuboCop::Cop::Style::RedundantParentheses accepts parentheses around a constant passed to when accepts parentheses when they touch the following keyword registers an offense for parens around last expressions in block body registers an offense for parens around method body accepts parentheses when enclosed in parentheses at `until-post` registers an offense for parens around a literal in array and following newline accepts parentheses inside an erange registers an offense for parens around a block body accepts parentheses around a method call with unparenthesized arguments registers an offense for parens around a float exponentiation base accepts parentheses around an erange accepts parentheses around the error passed to rescue registers an offense when there is space around the parentheses registers an offense for parens around an integer exponentiation base accepts parentheses in super call with hash accepts parentheses around an irange registers an offense for parens around last expressions in method body registers an offense for parens around a literal hash value registers an offense for parens around constant ternary condition accepts parentheses inside an irange accepts parentheses when enclosed in parentheses at `while-post` registers an offense for parens around a negative exponent registers an offense for parens around a positive exponent registers an offense for parens around a variable after semicolon registers an offense for parens around a literal in array accepts parentheses when they touch the preceding keyword accepts parentheses in yield call with hash accepts parentheses around operator keywords registers an offense for parens around a literal hash value and following newline behaves like keyword with return value behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a variable behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a variable behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a constant behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around an unary operation behaves like keyword with arguments behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized when a non-parenthesized call has an arg and a block accepts parens around the arg behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like keyword with arguments behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized when the first argument in a method call begins with a hash literal registers an offense if the argument list is parenthesized accepts parentheses if the argument list is not parenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a variable behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like keyword with return value behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal when a hash literal is the second argument in a method call registers an offense behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around an unary operation behaves like redundant registers an offense for parentheses around a method call behaves like redundant registers an offense for parentheses around a literal behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a literal behaves like redundant registers an offense for parentheses around a keyword behaves like keyword with return value behaves like redundant registers an offense for parentheses around a keyword behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized behaves like redundant registers an offense for parentheses around a keyword behaves like plausible accepts parentheses when arguments are unparenthesized RuboCop::Cop::Lint::NonDeterministicRequireOrder when requiring files with direct block glob registers an offsense and autocorrects to add .sort.each with require block passed as parameter registers an offense and autocorrects to add sort with top-level ::Dir registers an offense and corrects to add .sort.each with sorted index does not register an offense with sorted glob does not register an offense with unsorted index registers an offsense with extra logic registers an offsense and autocorrects to add .sort with top-level ::Dir registers an offense and corrects to add .sort with require block passed as parameter registers an offense an autocorrects to add sort with unsorted glob registers an offsense and autocorrects to add .sort with top-level ::Dir registers an offense and corrects to add .sort with require block passed as parameter registers an offense an autocorrects to add sort when not requiring files does not register an offense RuboCop::Cop::Lint::EachWithObjectArgument registers an offense for bignum argument registers an offense for float argument accepts two arguments registers an offense for fixnum argument accepts a string argument accepts a variable argument when using safe navigation operator registers an offense for fixnum argument RuboCop::Cop::Lint::InheritException when class inherits from `Exception` with enforced style set to `standard_error` registers an offense and corrects when creating a subclass using Class.new registers an offense and corrects with enforced style set to `runtime_error` registers an offense and corrects when creating a subclass using Class.new registers an offense and corrects RuboCop::Cop::Style::SymbolLiteral accepts string syntax when symbols have special chars in them accepts string syntax when symbol start with a digit registers an offense for word-line symbols using string syntax accepts string syntax when symbols have whitespaces in them RuboCop::Cop::Offense does not blow up if a message contains % redefines == to compare offenses based on their contents is frozen overrides #to_s has a few required attributes #cop_name is frozen when unknown severity is passed raises error #message is frozen #location is frozen offenses that span multiple lines highlights the first line #<=> when receiver has {:line=>5, :col=>6} and other has {:line=>5, :col=>5} returns 1 when receiver has {} and other has {} returns 0 when receiver has {:col=>6, :cop=>"A"} and other has {:col=>5, :cop=>"B"} returns 1 when receiver has {:cop=>"B"} and other has {:cop=>"A"} returns 1 when receiver has {:line=>6, :cop=>"A"} and other has {:line=>5, :cop=>"B"} returns 1 when receiver has {:line=>6} and other has {:line=>5} returns 1 when receiver has {:line=>6, :col=>4} and other has {:line=>5, :col=>5} returns 1 #severity_level when severity is :refactor is 1 when severity is :fatal is 5 #severity is frozen offenses that span part of a line highlights the first line RuboCop::Cop::Style::IpAddresses does not register an offense on an empty string IPv4 does not register an offense for an address inside larger text registers an offense for a valid address does not register an offense for an invalid address with allowed addresses does not register an offense if the case differs does not register an offense for a allowed addresses IPv6 registers an offense for the loopback address registers an offense for an address with 0s collapsed registers an offense for a valid address does not register an offense for an invalid address registers an offense for a shortened address registers an offense for a very short address the unspecified address :: (shortform of 0:0:0:0:0:0:0:0) does not register an offense when it is removed from the allowed addresses registers an offense RuboCop::Cop::Layout::SpaceBeforeBlockBraces with invalid value for EnforcedStyleForEmptyBraces fails with an error with space before empty braces not allowed accepts empty braces without outer space registers an offense and corrects empty braces when EnforcedStyle is no_space registers an offense and corrects braces surrounded by spaces accepts left brace without outer space registers an offense and corrects correct + opposite style with `EnforcedStyle` of `Style/BlockDelimiters` accepts left brace without outer space when EnforcedStyle is space registers an offense and corrects multiline block where the left brace has no outer space registers an offense and corrects left brace without outer space accepts braces surrounded by spaces registers an offense and corrects opposite + correct style with space before empty braces allowed accepts empty braces with outer space registers an offense and corrects empty braces RuboCop::Cop::VariableForce::Scope #body_node when the scope is class returns the body node when the scope is instance method returns the body node when the scope is module returns the body node when the scope is singleton class returns the body node when the scope is block returns the body node when the scope is singleton method returns the body node when the scope is top level returns the body node #include? with child node the scope does not include is expected to equal false with child node the scope includes is expected to equal true with descendant node the scope does not include is expected to equal false with ancestor node the scope does not include is expected to equal false with node of the scope itself is expected to equal false #each_node outer scope boundary handling when the scope is top level yields the body nodes when the scope is class yields the body nodes when the scope is module yields the body nodes when the scope is singleton class yields the body nodes when the scope is instance method yields the argument and the body nodes when the scope is block yields the argument and the body nodes when the scope is singleton method yields the argument and the body nodes inner scope boundary handling when there's a method invocation with block yields only the block node and the child send node when there's a singleton method definition yields only the defs node and the method host node .new when lvasgn node is passed accepts that as top level scope when begin node is passed accepts that as top level scope #name when the scope is singleton method definition returns the method name when the scope is instance method definition returns the method name RuboCop::Cop::Style::MultilineMemoization EnforcedStyle: keyword with a single line memoization allows expression on the following line allows expression on first line with a multiline memoization without a `begin` and `end` block when the expression is wrapped in parentheses registers an offense with multiline expression registers an offense when expression starts on first line registers an offense when expression starts on following line with a multiline memoization without a `begin` and `end` block allows with a conditional on the first line allows with another block on the first line allows with a conditional on the following line allows with another block on the following line EnforcedStyle: braces with a multiline memoization without braces when the expression is wrapped in `begin` and `end` keywords registers an offense for begin...end block on following line registers an offense for begin...end block on first line with a multiline memoization without a `begin` and `end` block allows with a conditional on the following line allows with another block on the following line allows with another block on the first line allows with a conditional on the first line with a single line memoization allows expression on first line allows expression on the following line RuboCop::Cop::Lint::RequireParentheses registers an offense for missing parentheses around expression with || operator accepts missing parentheses when method is not a predicate accepts method call with parentheses in ternary accepts calls to methods that are setters accepts parentheses around expression with boolean operator accepts method calls without parentheses followed by keyword and/or registers an offense for missing parentheses around expression with && operator registers an offense for missing parentheses around expression in ternary accepts calls to methods that are operators accepts missing parentheses around expression with + operator accepts condition that is not a call accepts method calls that are all operations when using safe navigation operator registers an offense for missing parentheses around expression with && operator RuboCop::Cop::Style::FloatDivision EnforcedStyle is left_coerce does not register offense for left coerce registers offense for right coerce registers offense for right coerce with calculations registers offense for both coerce EnforcedStyle is right_coerce registers offense for left coerce registers offense for both coerce does not register offense for right coerce registers offense for left coerce with calculations EnforcedStyle is single_coerce does not register offense for right coerce only does not register offense for left coerce only registers offense for left coerce with calculations registers offense for both coerce EnforcedStyle is fdiv does not register offense on usage of fdiv registers offense for left coerce registers offense for both coerce registers offense for left coerce with calculations registers offense for right coerce RuboCop::Cop::Lint::ReturnInVoidContext with a class method called initialize containing a return accepts with a setter method containing a return without a value accepts with a non initialize method containing a return accepts with a setter method containing a return with a value registers an offense with an initialize method containing a return with a value registers an offense with an initialize method containing a return without a value accepts when return is in top scope accepts RuboCop::Cop::Style::RedundantFetchBlock with SafeForConstants: true registers an offense and corrects when using `#fetch` with Float in the block registers an offense and corrects when using `#fetch` with Integer in the block does not register an offense when using `#fetch` with interpolated Symbol in the block registers an offense and corrects when using `#fetch` with String in the block and strings are frozen does not register an offense when using `#fetch` with `Rails.cache` registers an offense and corrects when using `#fetch` with Rational in the block registers an offense and corrects when using `#fetch` with Symbol in the block does not register an offense when using `#fetch` with String in the block and strings are not frozen registers an offense and corrects when using `#fetch` with Complex in the block registers an offense and corrects when using `#fetch` with empty block registers an offense and corrects when using `#fetch` with constant in the block does not register an offense when using `#fetch` with an argument in the block does not register an offense when using `#fetch` with argument fallback with SafeForConstants: false does not register an offense when using `#fetch` with constant in the block RuboCop::CLI corrects `Layout/SpaceAroundOperators` and `Layout/ExtraSpacing` offenses when using `ForceEqualSignAlignment: true` corrects IndentationWidth and IndentationConsistency offenseswhen using `EnforcedStyle: outdent` and `EnforcedStyle: indented_internal_methods` corrects `EnforcedStyle: hash_rockets` of `Style/HashSyntax` with `Layout/HashAlignment` can correct SpaceAfterComma and HashSyntax offenses corrects LineEndConcatenation offenses leaving the RedundantInterpolation offense unchanged can correct single line methods plays nicely with default cops in complex ExtraSpacing scenarios can correct two empty lines at end of class body can correct a problems and the problem it creates can correct IndentHash offenses with separator style honors Exclude settings in individual cops can be disabled for any cop in configuration corrects SymbolProc and SpaceBeforeBlockBraces offenses corrects Style/Next and Style/SafeNavigation offenses corrects RedundantBegin offenses and fixes indentation etc does not correct ExtraSpacing in a hash that would be changed back does not hang SpaceAfterPunctuation and SpaceInsideArrayLiteralBrackets can correct indentation and another thing corrects Style/BlockDelimiters offenses when specifyingLayout/SpaceBeforeBlockBraces with `EnforcedStyle: no_space` together does not say [Corrected] if correction was avoided corrects Style/BlockDelimiters offenses when specifingLayout/SpaceInsideBlockBraces together corrects code with indentation problems can correct two problems with blocks does not hang SpaceAfterPunctuation and SpaceInsideParens can correct TrailingEmptyLines and TrailingWhitespace offenses corrects only IndentationWidth without crashing corrects Style/InverseMethods and Style/Not offenses handles different SpaceInsideBlockBraces and SpaceInsideHashLiteralBraces corrects InitialIndentation offenses corrects TrailingCommaIn(Array|Hash)Literal and Multiline(Array|Hash)BraceLayout offenses can correct empty line inside special form of nested modules can correct two problems in the same place can change block comments and indent them does not correct SpaceAroundOperators in a hash that would be changed back can correct MethodCallWithoutArgsParentheses and EmptyLiteral offenses corrects IndentationWidth, RedundantBegin, and RescueEnsureAlignment offenses corrects HeredocArgumentClosingParenthesis offenses and ignores TrailingCommaInArguments offense corrects IndentationWidth and IndentationConsistency offenses corrects Tab and IndentationConsistency offenses can correct MethodDefParentheses and other offense can correct HashSyntax when --only is used corrects RedundantCopDisableDirective offenses can correct WordArray and SpaceAfterComma offenses corrects `Lint/Lambda` and `Lint/UnusedBlockArgument` offenses can correct HashSyntax and SpaceAroundOperators offenses trailing comma cops when the style is `consistent_comma` corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma when the style is `comma` corrects TrailingCommaInLiteral and TrailingCommaInArguments without producing a double comma caching with an offense in the cache corrects offenses with no offenses in the cache doesn't correct offenses when BlockDelimiters has braces_for_chaining style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses space_inside_bracket cops when array style is space & reference style is no space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is compact & reference style is space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is compact & reference style is no_space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when array style is no_space & reference style is space corrects SpaceInsideArrayLiteralBrackets and SpaceInsideReferenceBrackets when BlockDelimiters has line_count_based style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses when BlockDelimiters has semantic style corrects SpaceBeforeBlockBraces, SpaceInsideBlockBraces offenses RuboCop::ConfigStore .for always uses config specified in command line when no config specified in command line gets config path and config from cache if available searches for config path if not available in cache when --force-default-config option is specified uses default config without searching for config path RuboCop::Cop::Layout::IndentationWidth with Width set to 4 for a file with byte order mark accepts correctly indented method definition #autocorrect corrects bad indentation with ignored patterns set accepts unindented lines for those keywords with if statement registers an offense for bad indentation of an if body with Width set to 2 with unless accepts an empty unless registers an offense for bad indentation of an unless body with while/until registers an offense for bad indentation of an until body accepts an empty while registers an offense for bad indentation of begin/end/while registers an offense for bad indentation of a while body with case accepts correctly indented case/when/else accepts indented when/else plus indented body registers an offense for bad indentation in a case/when body accepts aligned values in when clause accepts case/when/else laid out as a table registers an offense for bad indentation in a case/else body accepts case/when/else with then beginning a line with begin/rescue/else/ensure/end registers an offense for bad indentation of bodies with if statement registers an offense for bad indentation of an elsif body accepts a correctly aligned if/elsif/else/end as a method argument accepts `ensure` after an empty body registers an offense for bad indentation of an else body accepts an if/else branches with rescue clauses registers an offense for bad indentation of an if body accepts if/then/else/end laid out as another table accepts `rescue` after an empty body registers an offense for bad indentation of an else body when if and elsif body contains no code accepts a one line if statement registers offense for bad indentation of ternary inside else accepts indentation after if on new line after assignment accepts if/elsif/else/end laid out as a table registers offense for bad indentation of modifier if in else registers an offense for bad indentation of an else body when if body contains no code accepts a correctly aligned if/elsif/else/end does not raise any error with empty braces accepts an empty if #autocorrect leaves rescue ; end unchanged corrects bad indentation does not correct in scopes that contain block comments indents parenthesized expressions leaves block unchanged if block end is not on its own line does not indent heredoc strings handles lines with only whitespace with assignment when alignment style is variable and end is aligned randomly registers an offense for a while registers an offense for an if registers an offense for an until and end is aligned with variable accepts an if with end aligned with setter accepts an if/else with chaining after the end accepts an if with end aligned with element assignment accepts an if/else accepts an if with end aligned with variable accepts an if/else with chaining with a block after the end and end is aligned with keyword registers an offense for an if accepts an if/else in assignment on next line registers an offense for a while registers an offense for an if with element assignment registers an offense for an until registers an offense for an if with setter when alignment style is keyword and end is aligned with keyword accepts an if/else in assignment on next line accepts an if in assignment accepts an until in assignment accepts a while in assignment accepts an if/else in assignment and end is aligned with variable autocorrects bad indentation registers an offense for a while registers an offense for an if when alignment style is start_of_line and end is aligned randomly registers an offense for a while registers an offense for an if registers an offense for an until and end is aligned with keyword registers an offense for an until accepts an if/else in assignment on next line registers an offense for an if registers an offense for a while registers an offense for an if with element assignment registers an offense for an if with setter and end is aligned with variable accepts an if with end aligned with variable accepts an if/else with chaining after the end accepts an if/else accepts an if/else with chaining with a block after the end accepts an if with end aligned with setter accepts an if with end aligned with element assignment with module when consistency style is indented_internal_methods registers an offense for bad indentation of a module body accepts normal non-indented internal methods ofmodule functions when consistency style is normal registers an offense for bad indentation of a module body accepts an empty module body with for registers an offense for bad indentation of a for body accepts an empty for with def/rescue/end registers an offense for bad indentation of bodies registers an offense for bad indent of defs bodies with a modifier with class registers an offense for bad indentation of a class body accepts an empty class body when consistency style is outdent accepts access modifier is outdent when consistency style is indented_internal_methods registers an offense for normal non-indented internal methods indentation registers an offense for normal non-indented internal methods indentation when defined in a singleton class with access modifier registers an offense for bad indentation of sections registers an offense and corrects for bad modifier indentation before good method definition when consistency style is normal registers offenses for indented_internal_methods indentation accepts indented public, protected, and private with def/defs when end is aligned with start of line accepts an empty defs body registers an offense for bad indentation of a defs body accepts an empty def body with an assignment registers an offense for bad indentation of a def body when multiple modifiers and def are on the same line accepts a correctly aligned body registers an offense for bad indentation of a def body registers an offense for bad indentation of a defs body when multiple modifiers are used in a block anda method call is made at end of the block registers an offense for bad indentation of a def body registers an offense for bad indentation of a def accepts a correctly aligned body when modifier and def are on the same line accepts a correctly aligned body registers an offense for bad indentation of a defs body registers an offense for bad indentation of a def body when end is aligned with def accepts an empty defs body accepts an empty def body with an assignment registers an offense for bad indentation of a defs body registers an offense for bad indentation of a def body when modifier and def are on the same line registers an offense for bad indentation of a def body accepts a correctly aligned body registers an offense for bad indentation of a defs body with block registers an offense for bad indentation of a {} body accepts an empty block body accepts badly indented code if block end is not on separate line accepts a correctly indented block body registers an offense for bad indentation of a do/end body when consistency style is indented_internal_methods registers an offense for bad indentation in a do/end body when using safe navigation operator registers an offense for an if with setter registers an offense for bad indentation of a {} body RuboCop::Cop::Naming::FileName with snake_case file names ending in .rb reports an offense with acronym class name does not register an offense with snake_case file names with multiple extensions does not report an offense with include acronym name does not register an offense with snake_case file names with non-rb extension does not report an offense when ExpectMatchingDefinition is true on a file which uses Name::Spaced::Module syntax in a directory elsewhere which only matches the module name does not register an offense in a directory with multiple instances of test does not register an offense in a directory elsewhere which does not match the module name registers an offense in a non-matching directory under lib registers an offense in a matching directory under src does not register an offense in a matching directory under spec does not register an offense in a directory with multiple instances of lib does not register an offense in a matching directory under test does not register an offense in a non-matching directory under test registers an offense in a directory with multiple instances of src does not register an offense in a non-matching directory under src registers an offense in a directory with multiple instances of spec does not register an offense in a matching directory under lib does not register an offense in a non-matching directory under spec registers an offense on an empty file with a space in its filename registers an offense on a file which defines multiple classes in a directory with multiple instances of spec does not register an offense in a directory with multiple instances of lib does not register an offense in a non-matching directory under spec registers an offense in a directory elsewhere which only matches the module name does not register an offense in a non-matching directory under lib registers an offense in a directory with multiple instances of test does not register an offense in a directory elsewhere which does not match the module name registers an offense in a matching directory under spec does not register an offense in a matching directory under test does not register an offense in a directory with multiple instances of src does not register an offense in a matching directory under lib does not register an offense in a non-matching directory under test registers an offense in a non-matching directory under src registers an offense in a matching directory under src does not register an offense on a file which defines a nested class in a matching directory under lib does not register an offense in a matching directory under src does not register an offense in a directory with multiple instances of src does not register an offense in a non-matching directory under spec registers an offense in a non-matching directory under test registers an offense in a directory with multiple instances of test does not register an offense in a matching directory under test does not register an offense in a directory elsewhere which only matches the module name does not register an offense in a directory with multiple instances of spec does not register an offense in a matching directory under spec does not register an offense in a directory elsewhere which does not match the module name registers an offense in a non-matching directory under src registers an offense in a directory with multiple instances of lib does not register an offense in a non-matching directory under lib registers an offense on an empty file registers an offense on a file which defines a nested module in a matching directory under src does not register an offense in a directory with multiple instances of lib does not register an offense in a directory with multiple instances of spec does not register an offense in a non-matching directory under src registers an offense in a non-matching directory under spec registers an offense in a matching directory under lib does not register an offense in a directory with multiple instances of test does not register an offense in a non-matching directory under test registers an offense in a non-matching directory under lib registers an offense in a directory elsewhere which does not match the module name registers an offense in a matching directory under test does not register an offense in a directory with multiple instances of src does not register an offense in a directory elsewhere which only matches the module name does not register an offense in a matching directory under spec does not register an offense on a file which defines no class or module at all under some other random directory registers an offense under spec registers an offense under src registers an offense under lib registers an offense under test registers an offense when CheckDefinitionPathHierarchy is false on an empty file registers an offense on a file with a matching class does not register an offense with a matching module containing a non-matching class does not register an offense with a non-matching module containing a matching class does not register an offense on a file with a non-matching class registers an offense in a non-matching directory, but with a matching class does not register an offense with camelCase file names ending in .rb reports an offense when the file is specified in AllCops/Include with a non-snake_case file name does not report an offense with camelCase file names without file extension reports an offense with snake_case file names without file extension does not report an offense when Regex is set with a matching name does not register an offense with a non-matching name registers an offense with dotfiles does not report an offense with snake_case names which use + does not report an offense with snake_case names which use ? and ! does not report an offense with non-snake-case file names with a shebang does not report an offense when IgnoreExecutableScripts is disabled reports an offense with acronym namespace does not register an offense RuboCop::Cop::Style::ArrayJoin registers an offense for an array followed by string autocorrects '*' to 'join' when setting to a variable autocorrects '*' to 'join' when there are no spaces does not register an offense for numbers does not register an offense for ambiguous cases RuboCop::Cop::Lint::MixedRegexpCaptureTypes registers an offense when both of named and numbered captures are used does not register offense to a regexp with named capture and non-capturing group does not register offense to a regexp with named capture only does not register offense when using a Regexp cannot be processed by regexp_parser gem does not register offense to a regexp with numbered capture only when containing a non-regexp literal does not register an offence when containing a constant does not register an offence when containing a ivar does not register an offence when containing a gvar does not register an offence when containing a cvar does not register an offence when containing a method does not register an offence when containing a lvar RuboCop::Cop::Style::RandomWithOffset registers an offense when using offset - rand(erange) registers an offense when using offset - rand(irange) registers an offense when using rand(erange) + offset registers an offense when using Random.rand(int).succ registers an offense when using Kernel.rand registers an offense when using offset - ::Random.rand(int) registers an offense when using rand(int).next registers an offense when using ::Random.rand registers an offense when using Random.rand registers an offense when using rand(irange) + offset does not register an offense when using range with triple dots registers an offense when using ::Kernel.rand registers an offense when using rand(int).pred registers an offense when using rand(erange) - offset registers an offense when using ::Random.rand(int).pred registers an offense when using rand(irange) - offset registers an offense when using rand(erange).succ registers an offense when using rand(irange).succ does not register an offense when using range with double dots registers an offense when using offset - rand(int) registers an offense when using rand(int) - offset registers an offense when using rand(int).succ registers an offense when using offset + Random.rand(int) registers an offense when using offset + rand(int) registers an offense when using rand(int) + offset RuboCop::Cop::Badge compares by value exposes department name can be converted to a string with the Department/CopName format exposes cop name .for parses cop class name #qualified? says `CopName` is not qualified says `Department/CopName` is qualified .parse parses unqualified badge references parses Department/CopName syntax RuboCop::Cop::Layout::SpaceInsideParens when EnforcedStyle is no_space accepts parentheses with no spaces accepts parentheses in block parameter list registers an offense for spaces inside parens accepts parentheses with comment and line break accepts parentheses with line break when EnforcedStyle is space accepts parentheses with line break registers an offense in block parameter list with no spaces accepts parentheses with comment and line break accepts parentheses with spaces registers an offense for no spaces inside parens RuboCop::Cop::Style::AutoResourceCleanup does not register an offense for File.open with immediate close does not register an offense for File.open with block does not register an offense for File.open with block-pass registers an offense for File.open without block RuboCop::Cop::Layout::MultilineMethodCallBraceLayout ignores calls with a multiline empty brace ignores implicit calls ignores calls with an empty brace ignores single-line calls ignores calls without arguments behaves like multiline literal brace layout new_line style opening brace on same line as first element autocorrects closing brace on same line as last element allows closing brace on different line from last element detects closing brace on same line as last element allows closing brace on different line from multi-line element detects closing brace on same line as last multiline element opening brace on separate line from first element allows closing brace on separate line from last multiline element autocorrects closing brace on same line from last element allows closing brace on separate line from last element detects closing brace on same line as last element symmetrical style opening brace on separate line from first element detects closing brace on same line as last element autocorrects closing brace on same line from last element allows closing brace on separate line from last multiline element allows closing brace on separate line from last element opening brace on same line as first element allows closing brace on same line as last multiline element allows closing brace on same line as last element detects closing brace on different line from last element autocorrects closing brace on different line from last element with a chained call on the closing brace and a comment after the last element does not autocorrect the closing brace detects closing brace on separate line from last element but no comment after the last element autocorrects the closing brace heredoc auto-corrects safe heredoc offenses ignores heredocs that could share a last line detects heredoc structures that are safe to add to same_line style opening brace on same line as first element allows closing brace on same line from last element detects closing brace on different line from multiline element allows closing brace on same line as multi-line element detects closing brace on different line from last element autocorrects closing brace on different line as last element with a chained call on the closing brace but no comment after the last element autocorrects the closing brace and a comment after the last element detects closing brace on separate line from last element does not autocorrect the closing brace opening brace on separate line from first element allows closing brace on same line as last multiline element detects closing brace on different line from last element autocorrects closing brace on different line from last element allows closing brace on same line as last element when comment present before closing brace corrects closing brace without crashing when EnforcedStyle is new_line still ignores single-line calls ignores single-line calls with multi-line receiver with leading dot ignores single-line calls with multi-line receiver behaves like multiline literal brace layout trailing comma same_line style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line as last element symmetrical style opening brace on same line as first element last element has a trailing comma autocorrects closing brace on different line from last element RuboCop::Cop::Layout::SpaceInsideRangeLiteral accepts no space inside .. literal accepts multiline range literal with no space in it registers an offense for space inside .. literal registers an offense for space inside ... literal registers an offense in multiline range literal with space in it accepts no space inside ... literal accepts complex range literal with space in it RuboCop::Cop::Style::SpecialGlobalVars when style is use_english_names registers an offense for $" registers an offense for $: auto-corrects #{$!} to #{$ERROR_INFO} registers an offense for $$ does not register an offense for backrefs like $1 generates correct auto-config when Perl variable names are used registers an offense for $0 is clear about variables from the English library vs those not auto-corrects $/ to $INPUT_RECORD_SEPARATOR auto-corrects #$: to #{$LOAD_PATH} generates correct auto-config when mixed styles are used when style is use_perl_names auto-corrects $INPUT_RECORD_SEPARATOR to $/ does not register an offense for backrefs like $1 registers an offense for $LOAD_PATH registers an offense for $PROCESS_ID registers an offense for $PID registers an offense for $PROGRAM_NAME auto-corrects #{$LOAD_PATH} to #$: registers an offense for $LOADED_FEATURES RuboCop::Cop::Style::MethodCallWithoutArgsParentheses accepts parentheses for methods starting with an upcase letter registers an offense for `obj.method ||= func()` registers an offense for `obj.method += func()` auto-corrects calls that could be empty literals accepts special lambda call syntax accepts parens after not accepts parens in method call with args ignores method listed in IgnoredMethods registers an offense for `obj.method &&= func()` registers an offense for parens in method call without args assignment to a variable with the same name accepts parens in complex assignment accepts parens in local variable assignment accepts parens in parallel assignment accepts parens in shorthand assignment method call as argument registers an offense with empty parens accepts without parens registers an empty parens offense for multiple assignment RuboCop::Cop::Style::Sample behaves like accepts accepts shuffle[2..-3] behaves like offense registers an offense for shuffle.at(-1) behaves like accepts accepts shuffle.at(foo) behaves like accepts accepts shuffle[foo, 3] behaves like offense registers an offense for shuffle.first behaves like accepts accepts shuffle.slice(foo) behaves like accepts accepts shuffle[-4..-3] behaves like accepts accepts shuffle.slice(foo..bar) behaves like accepts accepts shuffle.slice(2..-3) behaves like accepts accepts shuffle.slice(foo..3) behaves like offense registers an offense for shuffle(random: foo).last(bar) behaves like accepts accepts sample behaves like offense registers an offense for shuffle.slice(0) behaves like offense registers an offense for shuffle.at(0) behaves like offense registers an offense for shuffle.slice(-1) behaves like accepts accepts shuffle behaves like accepts accepts shuffle(random: Random.new).find(&:odd?) behaves like offense registers an offense for shuffle.slice(0..3) behaves like accepts accepts shuffle[3, 3] behaves like accepts accepts shuffle[foo..bar] behaves like accepts accepts shuffle.slice(3, 3) behaves like accepts accepts shuffle(random: Random.new)[2, 3] behaves like accepts accepts shuffle[foo..3] behaves like offense registers an offense for shuffle[0, 3] behaves like accepts accepts shuffle(random: Random.new)[2] behaves like offense registers an offense for shuffle[0] behaves like offense registers an offense for shuffle.slice(0...3) behaves like accepts accepts shuffle[2..3] behaves like accepts accepts shuffle(random: Random.new) behaves like offense registers an offense for shuffle[0...3] behaves like offense registers an offense for shuffle(random: Random.new).first(2) behaves like offense registers an offense for shuffle.slice(0, 3) behaves like accepts accepts shuffle[foo, bar] behaves like accepts accepts shuffle.slice(foo, bar) behaves like offense registers an offense for shuffle.first(foo) behaves like offense registers an offense for shuffle(random: Random.new).first behaves like offense registers an offense for shuffle[-1] behaves like accepts accepts shuffle.at(2) behaves like offense registers an offense for shuffle.last(bar) behaves like accepts accepts shuffle.slice(2) behaves like accepts accepts shuffle.join([5, 6, 7]) behaves like offense registers an offense for shuffle.last(3) behaves like accepts accepts shuffle.map { |e| e } behaves like accepts accepts shuffle.slice(foo, 3) behaves like offense registers an offense for shuffle.first(2) behaves like offense registers an offense for shuffle[0..3] behaves like offense registers an offense for shuffle.last behaves like offense registers an offense for shuffle(random: Random.new)[0..3] behaves like accepts accepts shuffle.slice(-4..-3) behaves like accepts accepts shuffle[foo] behaves like accepts accepts shuffle[2] behaves like accepts accepts shuffle.slice(2..3) RuboCop::Cop::Style::RedundantPercentQ accepts %Q at the beginning of a double quoted string with interpolation accepts %Q at the beginning of a section of a double quoted string with interpolation accepts %q containing string interpolation accepts %q at the beginning of a double quoted string with interpolation accepts %q at the beginning of a section of a double quoted string with interpolation accepts a heredoc string that contains %q with %q strings accepts a string with single quotes and double quotes accepts a string with escaped non-backslash characters accepts regular expressions starting with %q registers an offense for no quotes auto-corrects for strings that are concatenated with backslash registers an offfense for a string containing escaped backslashes registers an offense for only single quotes accepts a string with escaped backslash and non-backslash characters registers an offense for only double quotes with %Q strings accepts a string with double quotes and an escaped normal character auto-corrects for strings that are concatenated with backslash registers an offense for static string with only double quotes accepts a string with single quotes and double quotes accepts a string with double quotes and an escaped special character registers an offense for dynamic string without quotes accepts regular expressions starting with %Q accepts a dynamic %Q string with double quotes registers an offense for static string without quotes RuboCop::Cop::Lint::MissingSuper callbacks registers an offense for class level `method_missing?` with no `super` call does not register an offense when callback has a `super` call registers an offense when class callback within `self << class` and without `super` call registers no offense when module callback without `super` call registers an offense when method callback is without `super` call does not register an offense when `method_missing?` contains `super` call registers an offense when class callback without `super` call registers an offense for instance level `method_missing?` with no `super` call constructor does not register an offense for the constructor-like method defined outside of a class does not register an offense when there is a `super` call registers an offense when no `super` call does not register an offense for the class with stateless parent class does not register an offense for the class without parent class RuboCop::Cop::Style::For when each is the enforced style registers an offense for opposite + correct style accepts multiline each accepts :for accepts def for registers an offense for for auto-correct changes for that does not have do or semicolon to each corrects a tuple of items with range changes for to each changes for that does not have do or semicolon to each without parentheses changes for to each changes for that does not have do or semicolon to each when for is the enforced style registers an offense for correct + opposite style accepts for registers an offense for a tuple of items registers an offense for each without an item and uses _ as the item accepts single line each registers an offense for multiline each when using safe navigation operator does not break RuboCop::Cop::Style::BeginBlock reports an offense for a BEGIN block RuboCop::Cop::InternalAffairs::OffenseLocationKeyword does not register an offense when the `loc` is on a different node does not register an offense when the `loc` is on a child node when `node.loc.selector` is passed registers an offense if message argument is passed registers an offense RuboCop::Cop::Style::RedundantCondition when regular condition (if) accepts elsif accepts different when the condition does not match the branch when condition and if_branch are same accepts complex else branches registers an offense and corrects complex one liners auto-corrects when using `<<` method higher precedence than `||` operator registers an offense and corrects when a method without argument parentheses in `else` registers an offense and corrects multiline nodes registers an offense and corrects when the else branch contains an irange registers an offense and corrects modifier nodes offense accepts when using ternary if in `else` branch accepts an elsif branch registers an offense and corrects registers an offense and corrects when `if` condition and `then` branch are the same and it has no `else` branch registers an offense and corrects when `raise` without argument parentheses in `else` registers an offense and corrects when using modifier if when inverted condition (unless) registers no offense when condition and else branch are same accepts complex unless branches registers an offense ternary expression (?:) accepts expressions when the condition and if branch do not match when condition and if_branch are same registers an offense and corrects when the else branch contains `and` registers an offense and corrects registers an offense and corrects when the else branch contains `rescue` registers an offense and corrects functions registers an offense and corrects when the else branch contains an irange registers an offense and corrects when the else branch contains an erange registers an offense and corrects class vars registers an offense and corrects nested vars RuboCop::Formatter::ProgressFormatter #finished calls #report_summary when any offenses are detected reports all detected offenses for all failed files when no offenses are detected does not report offenses #report_file_as_mark when a refactor severity offense is detected prints "R" when a refactor convention offense is detected prints "C" when different severity offenses are detected prints highest level mark when no offenses are detected prints "." #file_finished when no offenses are detected calls #report_as_with_mark when any offenses are detected calls #report_as_with_mark RuboCop::Cop::Style::InlineComment does not register an offense for a standalone comment registers an offense for a trailing inline comment does not register an offense for special rubocop inline comments RuboCop::Cop::InternalAffairs::RedundantMessageArgument does not register an offense when formatted `MSG` is passed does not register an offense when `#message` with another node is passed when `#message` is passed registers an offense when `#message` with offending node is passed when there are others keyword arguments registers an offense when message is the only keyword argument registers an offense when `MSG` is passed registers an offense RuboCop::Cop::Layout::MultilineAssignmentLayout same_line style allows multi-line assignments on the same line registers an offense when the rhs is a different line in setters registers an offense when the rhs is a different line registers an offense when the rhs is a different line in []= ignores arrays registers an offense for masgn with multi-line lhs configured supported types allows supported types to be configured when supported types is block allows when multi-line assignments using block definition is on the same line allows multi-line assignments when using shovel operator registers an offense when multi-line assignments using block definition on separate lines allows multi-line block defines on separate lines new_line style registers an offense when the rhs is on the same line registers an offense when the rhs is on the same line in setters allows multi-line assignments on separate lines registers an offense for masgn with multi-line lhs ignores arrays registers an offense when the rhs is on the same line in []= configured supported types allows supported types to be configured when supported types is block allows multi-line assignments when using shovel operator allows multi-line assignments when using block definition on separate lines registers an offense when multi-line assignments using block definition is on the same line allows multi-line block defines on separate lines RuboCop::Cop::Style::CaseLikeIf registers an offense and corrects when using `=~` registers an offense and corrects when target is a method call does not register an offense when using modifier `if` registers an offense and corrects when using `==` with literal does not register an offense when using `unless` registers an offense and corrects when using `match?` with non regexp in other branches except first registers an offense and corrects when using `===` does not register an offense when using `match?` with non regexp does not register an offense when using `==` with class reference does not register an offense when only `if-else` does not register an offense when using `==` with constant containing 1 letter in name does not register an offense when using `=~` in first branch with non regexp registers an offense and corrects when using nested conditions with `||` does not register an offense when only single `if` does not register an offense when using ternary operator does not register an offense when not all conditions contain target does not register an offense when using `match?` in first branch with non regexp does not register an offense when using `equal?` without a receiver does not register an offense when one of `||` subconditions is not convertible registers an offense and corrects when using `==` with constant registers an offense and corrects when using `match?` with regexp does not register an offense when using `==` with method call with arguments registers an offense and corrects when using `include?` with range does not register an offense when using `match?` without a receiver registers an offense and corrects when using `||` within conditions registers an offense and corrects when using `is_a?` RuboCop::Cop::Team #autocorrect? when { auto_correct: true } is passed to .new is expected to be truthy when the option argument of .new is omitted is expected to be falsey when incompatible cops are correcting together auto corrects without SyntaxError .new accepts cops directly classes calls mobilize when passed classes #external_dependency_checksum does not error with no cops when a cop joins returns string when cop with different checksum joins has a different checksum for the whole team when multiple cops join returns string #inspect_file returns offenses when Parser reports non-fatal warning for the file returns offenses from cops returns Parser warning offenses when a cop has no interest in the file returns all offenses except the ones of the cop when Cop#on_* raises an error records Team#errors when a correction raises an error records Team#errors when autocorrection is enabled still returns offenses does autocorrection when done twice allows cops to get ready #debug? when the option argument of .new is omitted is expected to be falsey when { debug: true } is passed to .new is expected to be truthy #forces returns force instances when a cop joined a force returns the force when no cops joined force returns nothing when multiple cops joined a same force returns only one force instance #cops returns cop instances when some classes are disabled with config does not return instances of the classes when only some cop classes are passed to .new returns only instances of the classes RuboCop::Cop::Lint::RedundantCopEnableDirective registers multiple offenses and corrects the same comment registers an offense and corrects when the first cop is unnecessarily enabled registers correct offense when combined with necessary enable registers offense and corrects unnecessary enable registers offense and corrects redundant enabling of same cop all switch registers offense and corrects unnecessary enable all when at least one cop was disabled does not register offense when last cop is unnecessarily enabled registers an offense and corrects when there is no space between the cops and the comma registers an offense and corrects when middle cop is unnecessarily enabled registers an offense and corrects registers an offense and corrects when there is extra white space RuboCop::Cop::Lint::PercentSymbolArray detecting colons or commas in a %i/%I string registers an offense and corrects when there are no colons but one comma accepts likely false positive $, registers an offense and corrects when symbols contain colons and are comma separated accepts tokens without colons or commas registers an offense and corrects when symbols contain colons and are comma separated accepts tokens without colons or commas registers an offense and corrects when one symbol has a colon but there are no commas registers an offense and corrects when there are no colons but one comma accepts likely false positive $, registers an offense and corrects when one symbol has a colon but there are no commas with binary encoded source accepts if tokens contain no quotes registers an offense and corrects when tokens contain quotes RuboCop::Cop::InternalAffairs::NodeTypePredicate does not register an offense for a predicate node type check comparison node type check registers an offense and auto-corrects RuboCop::Cop::Layout::HashAlignment register no offense for superclass call without args accepts single line hash register no offense for yield without args accepts several pairs per line accepts pairs that don't start a line ignore explicit last argument hash registers an offense and corrects misaligned keys in implicit hash accepts misaligned keys in explicit hash for yield registers an offense and corrects misaligned keys in implicit hash for super accepts misaligned keys in explicit hash for super registers an offense and corrects misaligned keys in implicit hash for yield accepts misaligned keys in explicit hash with default configuration registers an offense and corrects alignment when using double splat in an explicit hash registers an offense and corrects misaligned hash keys does not register an offense when value starts on next line registers an offense and corrects separator alignment registers an offense and corrects alignment when using double splat in braces registers an offense and corrects multiline value starts in wrong place accepts left-aligned hash keys with single spaces registers an offense and corrects zero or multiple spaces registers an offense and corrects misaligned mixed multiline hash keys registers an offense and corrects mixed hash styles registers an offense and corrects table alignment with implicit hash as last argument accepts aligned hash keys registers an offense and corrects misaligned hash keys registers an offense and corrects right alignment of keys accepts an empty hash with different settings for => and : registers offenses and correct misaligned entries accepts aligned entries ignore implicit last argument hash accepts misaligned keys in implicit hash for yield accepts misaligned keys in implicit hash registers an offense and corrects misaligned keys in explicit hash accepts misaligned keys in implicit hash for super registers an offense and corrects misaligned keys in explicit hash for super registers an offense and corrects misaligned keys in explicit hash for yield always ignore last argument hash accepts misaligned keys in implicit hash for yield accepts misaligned keys in explicit hash for super accepts misaligned keys in explicit hash for yield accepts misaligned keys in explicit hash accepts misaligned keys in implicit hash accepts misaligned keys in implicit hash for super with invalid configuration fails with separator alignment configuration accepts hashes with different separators registers an offense and corrects misaligned hash rockets registers an offense and corrects misaligned hash values registers an offense and corrects mixed indentation and spacing accepts several pairs per line accepts pairs that don't start a line accepts aligned hash keys accepts single line hash doesn't break code by moving long keys too far left accepts an empty hash always inspect last argument hash registers an offense and corrects misaligned keys in implicit hash for yield registers offense and corrects misaligned keys in explicit hash registers offense and corrects misaligned keys in implicit hash registers an offense and corrects misaligned keys in explicit hash for yield registers an offense and corrects misaligned keys in explicit hash for super registers an offense and corrects misaligned keys in implicit hash for super with multiple preferred(key and table) alignment configuration accepts aligned hash keys, by table registers an offense and corrects misaligned hash values registers an offense and corrects misaligned hash values, works separate for each hash registers an offense and corrects misaligned hash keys with mixed hash style accepts aligned hash keys, by both registers an offense and corrects misaligned hash values, prefer table when least offenses registers an offense and corrects misaligned hash values, prefer key when least offenses accepts aligned hash keys with mixed hash style accepts aligned hash keys, by keys accepts an empty hash table and key config registers an offense and corrects misaligned hash values, prefer table because it is specified first with table alignment configuration accepts a symbol only hash followed by a keyword splat accepts a keyword splat only hash registers an offense and corrects for misaligned hash keys accepts pairs that don't start a line accepts hashes that use different separators and double splats accepts several pairs per line accepts hashes that use different separators registers an offense and corrects misaligned hash rockets accepts an empty hash registers an offense for misaligned hash values accepts single line hash accepts aligned hash keys and values accepts a multiline array of single line hashes with table+separator alignment configuration accepts a single method argument entry with colon RuboCop::Cop::Layout::TrailingWhitespace registers an offense for a line ending with space registers offenses before __END__ but not after registers an offense for a blank line with space registers an offense for a line ending with tab accepts a line without trailing whitespace is not fooled by __END__ within a documentation comment auto-corrects unwanted space registers an offense for trailing whitespace in a heredoc string is not fooled by heredoc containing __END__ is not fooled by heredoc containing __END__ within a doc comment when `AllowInHeredoc` is set to true registers an offense for trailing whitespace at the heredoc begin accepts trailing whitespace in a heredoc string RuboCop::Cop::Style::RedundantRegexpEscape with a single-line %r!! regexp with escaped delimiters outside a character-class does not register an offense with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with escaped delimiters and regexp options does not register an offense with a single-line %r~~ regexp with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters inside a character-class does not register an offense without escapes does not register an offense with a single-line %r// regexp with escaped slashes does not register an offense without escapes does not register an offense with a multi-line %r// regexp with escaped slashes does not register an offense without escapes does not register an offense with a multi-line %r{} regexp with redundantly-escaped slashes registers an offense and corrects with a redundant escape after a line with comment registers an offense and corrects without escapes does not register an offense with a single-line %r<> regexp with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense without escapes does not register an offense with escaped delimiters inside a character-class does not register an offense with a single-line %r() regexp without escapes does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters inside a character-class does not register an offense with a single-line %r^^ regexp without escapes does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters inside a character-class does not register an offense with escaped delimiters outside a character-class does not register an offense with a single-line %r__ regexp without escapes does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters inside a character-class does not register an offense with escaped delimiters and regexp options does not register an offense with a single-line %r{} regexp with an escaped { or } inside a character class does not register an offense with an escaped { or } outside a character class does not register an offense with redundantly-escaped slashes registers an offense and corrects without escapes does not register an offense with a single-line %r@@ regexp without escapes does not register an offense with escaped delimiters and regexp options does not register an offense with escaped delimiters outside a character-class does not register an offense with escaped delimiters inside a character-class does not register an offense with a single-line `//` regexp with a backreference does not register an offense with an escaped 'r' inside a character class does not register an offense with an escaped 'h' inside a character class does not register an offense with an escaped 'Y' inside a character class does not register an offense with an escaped '}' outside a character class does not register an offense with an escaped . inside a character class beginning with : registers an offense and corrects with an escaped 't' inside a character class does not register an offense with an escaped 'v' inside a character class does not register an offense with an escaped 'i' inside a character class does not register an offense with an escaped ']' outside a character class does not register an offense with multiple escaped metachars inside a character class registers offenses and corrects with an escaped 'z' inside a character class does not register an offense with an escaped '(' outside a character class does not register an offense with an escaped '$' inside a character class registers an offense and corrects with an escaped 'b' outside a character class does not register an offense with an escaped 'C-c' outside a character class does not register an offense with an escaped ']' inside a character class does not register an offense with an escaped 'x41' outside a character class does not register an offense with an escaped '|' outside a character class does not register an offense with an escaped character class and following escaped char does not register an offense with an escaped 'A' inside a character class does not register an offense with an escaped ')' inside a character class registers an offense and corrects with an escaped 'P{alpha}' outside a character class does not register an offense with an escaped '(' inside a character class registers an offense and corrects with an escaped 'R' outside a character class does not register an offense with an escaped 'M-a' inside a character class does not register an offense with regexp options and a redundant escape registers offenses and corrects with an escaped interpolation outside a character class does not register an offense with an escaped '|' inside a character class registers an offense and corrects with an escaped 'p{alpha}' outside a character class does not register an offense with an escaped 'G' inside a character class does not register an offense with an escaped 'B' outside a character class does not register an offense with an escaped 'p{alpha}' inside a character class does not register an offense with an escaped 'j' inside a character class does not register an offense with an escaped 'x41' inside a character class does not register an offense with an escaped 'u0041' outside a character class does not register an offense with an escaped 'V' outside a character class does not register an offense with an escaped 'O' inside a character class does not register an offense with an escaped '-' inside a character class does not register an offense with an escaped 'w' inside a character class does not register an offense with an escaped 'e' inside a character class does not register an offense with an escaped '#' outside a character class does not register an offense with an escaped 'a' outside a character class does not register an offense with an escaped '}' inside a character class registers an offense and corrects with an escaped '\' inside a character class does not register an offense with an escaped 'K' inside a character class does not register an offense with an escaped '^' outside a character class does not register an offense with an escaped 'g' outside a character class does not register an offense with an escaped 'P{alpha}' inside a character class does not register an offense with an escaped 'E' inside a character class does not register an offense with an escaped 'X' outside a character class does not register an offense with an escaped ' ' inside a character class does not register an offense with an escaped 'U' outside a character class does not register an offense with a free-spaced mode regex with a commented [ and ] does not register an offense with redundant escape preceded by an escaped comment registers offenses and corrects with a commented redundant escape does not register an offense with a commented redundant escape on a single line does not register an offense with an escaped 'T' inside a character class does not register an offense with an escaped 'q' outside a character class does not register an offense with an escaped 't' outside a character class does not register an offense with an escaped 'g' inside a character class does not register an offense with an escaped 'h' outside a character class does not register an offense with an escape inside an interpolated string does not register an offense with an escaped 's' outside a character class does not register an offense with an escaped '{' outside a character class does not register an offense with an escaped 'z' outside a character class does not register an offense with an escaped '\' outside a character class does not register an offense with an escaped '.' outside a character class does not register an offense with a POSIX character class then disallowed escape inside a character class registers an offense and corrects with an escaped 'd' outside a character class does not register an offense with an escaped ')' outside a character class does not register an offense with an escaped 'V' inside a character class does not register an offense with an escaped '-' outside a character class registers an offense and corrects with an escaped 'L' outside a character class does not register an offense with an escaped 'a' inside a character class does not register an offense with an escaped '{' inside a character class registers an offense and corrects with an escaped 'M-a' outside a character class does not register an offense with an escaped '.' inside a character class registers an offense and corrects with an escaped 'u{0041}' outside a character class does not register an offense with an escaped '^' inside a character class does not register an offense with an escaped 'y' outside a character class does not register an offense with an escaped 'u0041' inside a character class does not register an offense with an escaped 'E' outside a character class does not register an offense with an escaped 'k' inside a character class does not register an offense with an escaped '?' outside a character class does not register an offense with a POSIX character class then allowed escape inside a character class does not register an offense with an escaped 's' inside a character class does not register an offense with an escaped '[' inside a character class does not register an offense with an escaped 'N' inside a character class does not register an offense with an escaped '*' inside a character class registers an offense and corrects with an escaped 'X' inside a character class does not register an offense with an escaped 'n101' inside a character class does not register an offense with an escaped 'W' outside a character class does not register an offense with an escaped 'U' inside a character class does not register an offense with an escaped 'K' outside a character class does not register an offense with an escaped '+' inside a character class registers an offense and corrects with an escaped 'J' inside a character class does not register an offense with an escaped '#' inside a character class does not register an offense with an escaped 'm' outside a character class does not register an offense with an escaped 'Q' outside a character class does not register an offense with an escaped '?' inside a character class registers an offense and corrects with an escaped 'J' outside a character class does not register an offense with an escaped 'Z' outside a character class does not register an offense with an escaped 'F' outside a character class does not register an offense with an escaped 'H' inside a character class does not register an offense with an escaped '*' outside a character class does not register an offense with an escaped 'L' inside a character class does not register an offense with an escaped 'e' outside a character class does not register an offense with an escaped 'S' inside a character class does not register an offense with an escaped 'd' inside a character class does not register an offense with a nested character class containing redundant escape registers an offense and corrects with an escaped 'W' inside a character class does not register an offense without escapes does not register an offense with an escaped ' ' outside a character class does not register an offense with an escaped 'cc' inside a character class does not register an offense with an escaped 'q' inside a character class does not register an offense with an escaped 'Y' outside a character class does not register an offense with an escaped 'Q' inside a character class does not register an offense with an escaped 'Z' inside a character class does not register an offense with an escaped 'i' outside a character class does not register an offense with an escaped 'B' inside a character class does not register an offense with a character class and following escaped char does not register an offense with an escaped 'm' inside a character class does not register an offense with an escaped '$' outside a character class does not register an offense with an uppercase metacharacter inside a character class does not register an offense with an uppercase metacharacter outside a character class does not register an offense with an escaped 'l' inside a character class does not register an offense with a nested character class then allowed escape does not register an offense with an escaped 'D' inside a character class does not register an offense with an escaped 'j' outside a character class does not register an offense with an escaped '[' outside a character class does not register an offense with an escaped 'y' inside a character class does not register an offense with an escaped 'F' inside a character class does not register an offense with an escaped 'r' outside a character class does not register an offense with an interpolated unnecessary-escape regexp registers an offense and corrects with an escaped 'n101' outside a character class does not register an offense with an escaped interpolation inside a character class does not register an offense with an escaped 'A' outside a character class does not register an offense with an escaped '+' outside a character class does not register an offense with an escaped 'I' outside a character class does not register an offense with an escaped 'cc' outside a character class does not register an offense with an escaped 'D' outside a character class does not register an offense with an escaped 'f' outside a character class does not register an offense with an escaped 'T' outside a character class does not register an offense with an escaped 'N' outside a character class does not register an offense with an escaped 'o' outside a character class does not register an offense with an escaped 'H' outside a character class does not register an offense with an escaped 'b' inside a character class does not register an offense with an escaped 'v' outside a character class does not register an offense with an escaped 'C-c' inside a character class does not register an offense with an escaped 'o' inside a character class does not register an offense with an escaped 'O' outside a character class does not register an offense with escaped slashes does not register an offense with an escaped 'f' inside a character class does not register an offense with an escaped 'u{0041}' inside a character class does not register an offense with an escaped 'S' outside a character class does not register an offense with an escaped 'R' inside a character class does not register an offense with an escaped 'G' outside a character class does not register an offense with an escaped 'l' outside a character class does not register an offense with an escaped 'I' inside a character class does not register an offense with an escaped 'k' outside a character class does not register an offense with an interpolation followed by redundant escapes registers offenses and corrects with an escaped 'w' outside a character class does not register an offense RuboCop::Cop::Lint::AssignmentInCondition registers an offense for constant assignment in condition does not blow up for empty if condition registers an offense for assignment after ||= in condition registers an offense for lvar assignment in condition registers an offense for assignment methods accepts ||= in condition accepts = in a block that is called in a condition does not blow up for empty unless condition registers an offense for clvar assignment in condition registers an offense for assignment after == in condition registers an offense for lvar assignment in while condition registers an offense for gvar assignment in condition registers an offense for ivar assignment in condition registers an offense for lvar assignment in until condition registers an offense for collection element assignment in condition accepts == in condition accepts = in a block followed by method call safe assignment is allowed accepts = in condition surrounded with braces accepts []= in condition surrounded with braces safe assignment is not allowed does not accept []= in condition surrounded with braces does not accept = in condition surrounded with braces RuboCop::Cop::Style::ArrayCoercion does not register an offense when splat is not in array registers an offense and corrects when splatting variable into array registers an offense and corrects when converting variable into array with check does not register an offense when splatting multiple variables into array does not register an offense when converting variable into other named array variable with check RuboCop::Cop::Layout::SpaceInsidePercentLiteralDelimiters accepts execute-string literals accepts other percent literals for W type and ["[", "]"] delimiters accepts literals with escaped spaces accepts multi-line literals within a method accepts multi-line literals registers an offense for spaces after first delimiter accepts literals without additional spaces registers an offense for unnecessary spaces registers an offense for literals with escaped and other spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts newlines and additional following alignment spaces for W type and ["!", "!"] delimiters registers an offense for unnecessary spaces registers an offense for spaces before final delimiter accepts multi-line literals within a method accepts literals without additional spaces registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces accepts multi-line literals accepts newlines and additional following alignment spaces accepts literals with escaped spaces accepts spaces between entries for W type and ["{", "}"] delimiters registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts multi-line literals accepts literals with escaped spaces registers an offense for spaces after first delimiter accepts multi-line literals within a method accepts spaces between entries registers an offense for literals with escaped and other spaces accepts literals without additional spaces for w type and ["!", "!"] delimiters accepts literals without additional spaces registers an offense for literals with escaped and other spaces accepts multi-line literals within a method accepts literals with escaped spaces registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces accepts multi-line literals registers an offense for spaces after first delimiter accepts spaces between entries registers an offense for spaces before final delimiter for x type and ["{", "}"] delimiters registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts multi-line literals accepts newlines and additional following alignment spaces accepts literals with escaped spaces registers an offense for unnecessary spaces registers an offense for spaces before final delimiter accepts multi-line literals within a method accepts spaces between entries for I type and ["!", "!"] delimiters registers an offense for unnecessary spaces accepts multi-line literals registers an offense for literals with escaped and other spaces accepts multi-line literals within a method registers an offense for spaces before final delimiter accepts literals with escaped spaces accepts newlines and additional following alignment spaces accepts literals without additional spaces registers an offense for spaces after first delimiter accepts spaces between entries for w type and ["(", ")"] delimiters accepts spaces between entries accepts literals with escaped spaces accepts newlines and additional following alignment spaces accepts literals without additional spaces registers an offense for unnecessary spaces accepts multi-line literals within a method registers an offense for spaces before final delimiter registers an offense for literals with escaped and other spaces registers an offense for spaces after first delimiter accepts multi-line literals for I type and ["(", ")"] delimiters registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts multi-line literals accepts literals with escaped spaces registers an offense for spaces after first delimiter accepts spaces between entries registers an offense for unnecessary spaces accepts multi-line literals within a method accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter for i type and ["{", "}"] delimiters accepts literals with escaped spaces registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces accepts multi-line literals registers an offense for literals with escaped and other spaces accepts multi-line literals within a method accepts literals without additional spaces registers an offense for unnecessary spaces accepts spaces between entries for w type and ["[", "]"] delimiters accepts newlines and additional following alignment spaces accepts literals with escaped spaces registers an offense for unnecessary spaces accepts multi-line literals within a method registers an offense for literals with escaped and other spaces accepts spaces between entries registers an offense for spaces after first delimiter accepts multi-line literals accepts literals without additional spaces registers an offense for spaces before final delimiter for I type and ["[", "]"] delimiters registers an offense for literals with escaped and other spaces accepts literals with escaped spaces accepts literals without additional spaces registers an offense for spaces after first delimiter accepts multi-line literals accepts multi-line literals within a method registers an offense for unnecessary spaces accepts spaces between entries registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces for x type and ["!", "!"] delimiters registers an offense for unnecessary spaces accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts literals with escaped spaces accepts literals without additional spaces accepts multi-line literals within a method accepts multi-line literals registers an offense for spaces after first delimiter accepts spaces between entries registers an offense for literals with escaped and other spaces for I type and ["{", "}"] delimiters accepts multi-line literals within a method registers an offense for unnecessary spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts multi-line literals accepts literals with escaped spaces accepts literals without additional spaces registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces accepts newlines and additional following alignment spaces for i type and ["!", "!"] delimiters accepts multi-line literals accepts literals without additional spaces registers an offense for spaces after first delimiter accepts spaces between entries accepts newlines and additional following alignment spaces accepts multi-line literals within a method registers an offense for literals with escaped and other spaces registers an offense for unnecessary spaces accepts literals with escaped spaces registers an offense for spaces before final delimiter for W type and ["(", ")"] delimiters accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts multi-line literals within a method accepts literals with escaped spaces accepts multi-line literals registers an offense for unnecessary spaces registers an offense for spaces after first delimiter accepts literals without additional spaces registers an offense for literals with escaped and other spaces for w type and ["{", "}"] delimiters registers an offense for literals with escaped and other spaces registers an offense for spaces before final delimiter accepts multi-line literals accepts newlines and additional following alignment spaces registers an offense for spaces after first delimiter accepts multi-line literals within a method accepts spaces between entries accepts literals with escaped spaces accepts literals without additional spaces registers an offense for unnecessary spaces for i type and ["(", ")"] delimiters registers an offense for spaces after first delimiter registers an offense for unnecessary spaces accepts multi-line literals accepts literals without additional spaces registers an offense for spaces before final delimiter accepts newlines and additional following alignment spaces registers an offense for literals with escaped and other spaces accepts multi-line literals within a method accepts spaces between entries accepts literals with escaped spaces for i type and ["[", "]"] delimiters registers an offense for literals with escaped and other spaces accepts multi-line literals within a method registers an offense for unnecessary spaces accepts literals without additional spaces accepts newlines and additional following alignment spaces accepts spaces between entries registers an offense for spaces after first delimiter accepts multi-line literals accepts literals with escaped spaces registers an offense for spaces before final delimiter for x type and ["(", ")"] delimiters accepts literals with escaped spaces registers an offense for spaces after first delimiter registers an offense for literals with escaped and other spaces accepts literals without additional spaces accepts newlines and additional following alignment spaces registers an offense for spaces before final delimiter accepts spaces between entries accepts multi-line literals registers an offense for unnecessary spaces accepts multi-line literals within a method for x type and ["[", "]"] delimiters accepts multi-line literals registers an offense for literals with escaped and other spaces accepts literals without additional spaces registers an offense for spaces after first delimiter registers an offense for spaces before final delimiter accepts spaces between entries accepts multi-line literals within a method accepts literals with escaped spaces accepts newlines and additional following alignment spaces registers an offense for unnecessary spaces RuboCop::Cop::Style::HashLikeCase MinBranchesCount: 2 does not register an offense when using `case-when` with literal bodies of different types does not register an offense when `case` has an `else` branch registers an offense when using `case-when` with string conditions and literal bodies of the same type does not register an offense when using `case-when` with non-literal bodies does not register an offense when using `case-when` with non-literals in conditions does not register an offense when using `case-when` with literals of different types as conditions registers an offense when using `case-when` with symbol conditions and literal bodies of the same type MinBranchesCount: 3 does not register an offense when branches count is less than required RuboCop::Cop::Style::EmptyElse configured to warn on empty else given an unless-statement with an else-clause containing only the literal nil doesn't register an offense with a completely empty else-clause behaves like auto-correct MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction with an else-clause with side-effects doesn't register an offense with no else-clause doesn't register an offense given an if-statement with an else-clause containing only the literal nil doesn't register an offense with an else-clause with side-effects doesn't register an offense with an empty comment behaves like auto-correct MissingElse is both does not auto-correct MissingElse is if does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction with a completely empty else-clause not using semicolons behaves like auto-correct MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction using semicolons behaves like auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is if does not auto-correct in an if-statement behaves like auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is if does not auto-correct with no else-clause doesn't register an offense given a case statement with no else-clause doesn't register an offense with a completely empty else-clause behaves like auto-correct MissingElse is case does not auto-correct MissingElse is both does not auto-correct MissingElse is if does auto-correction MissingElse is disabled does auto-correction with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil doesn't register an offense configured to warn on nil in else given an if-statement with no else-clause doesn't register an offense with a completely empty else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with an else-clause containing only the literal nil when standalone behaves like auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction MissingElse is if does not auto-correct when the result is assigned to a variable behaves like auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with an else-clause containing only the literal nil using semicolons with multiple elsifs behaves like auto-correct MissingElse is case does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with one elsif behaves like auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction given an unless-statement with an else-clause containing only the literal nil behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction with no else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense with a completely empty else-clause doesn't register an offense given a case statement with a completely empty else-clause doesn't register an offense with no else-clause doesn't register an offense with an else-clause containing only the literal nil when the result is assigned to a variable behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is case does not auto-correct MissingElse is if does auto-correction MissingElse is both does not auto-correct using semicolons behaves like auto-correct MissingElse is if does auto-correction MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is case does not auto-correct with an else-clause with side-effects doesn't register an offense with nested if and case statement behaves like auto-correct MissingElse is case does not auto-correct MissingElse is both does not auto-correct MissingElse is if does auto-correction MissingElse is disabled does auto-correction configured to warn on empty else and nil in else given an unless-statement with a completely empty else-clause behaves like auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with an else-clause containing only the literal nil behaves like auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is case does auto-correction MissingElse is if does not auto-correct with an else-clause with side-effects doesn't register an offense with no else-clause doesn't register an offense given a case statement with an else-clause containing only the literal nil behaves like auto-correct MissingElse is both does not auto-correct MissingElse is disabled does auto-correction MissingElse is if does auto-correction MissingElse is case does not auto-correct with a completely empty else-clause behaves like auto-correct MissingElse is case does not auto-correct MissingElse is if does auto-correction MissingElse is both does not auto-correct MissingElse is disabled does auto-correction with no else-clause doesn't register an offense with an else-clause with side-effects doesn't register an offense given an if-statement with no else-clause doesn't register an offense with an else-clause containing only the literal nil with multiple elsifs behaves like auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction MissingElse is disabled does auto-correction MissingElse is if does not auto-correct with one elsif behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is both does not auto-correct MissingElse is if does not auto-correct MissingElse is case does auto-correction with a completely empty else-clause behaves like auto-correct MissingElse is disabled does auto-correction MissingElse is if does not auto-correct MissingElse is both does not auto-correct MissingElse is case does auto-correction with an else-clause with side-effects doesn't register an offense RuboCop::Cop::Layout::InitialIndentation accepts empty file registers an offense for indented method definition accepts unindented method definition registers an offense and corrects indented assignment disregarding comment accepts unindented comment + assignment for a file with byte order mark accepts unindented method call registers an offense and corrects indented method call registers an offense and corrects indented method call after comment RuboCop::Cop::Style::ZeroLengthPredicate with arrays registers an offense for `1 > array.size` registers an offense for `0 != array.size` registers an offense for `0 != array.length` registers an offense for `array.length != 0` registers an offense for `array.length > 0` registers an offense for `0 < array.size` registers an offense for `array.length == 0` registers an offense for `array.size < 1` registers an offense for `array.size == 0` registers an offense for `array.length < 1` registers an offense for `0 == array.size` registers an offense for `0 == array.length` registers an offense for `array.size != 0` registers an offense for `0 < array.length registers an offense for `1 > array.length` registers an offense for `array.size > 0` when inspecting a Tempfile object does not register an offense with top-level ::Tempfile does not register an offense with hashes registers an offense for `0 == hash.size registers an offense for `hash.size != 0` registers an offense for `hash.size == 0` registers an offense for `0 != hash.size` when inspecting a StringIO object when initialized with a string does not register an offense does not register an offense with top-level ::StringIO when initialized without arguments does not register an offense does not register an offense with top-level ::StringIO with strings registers an offense for `0 != string.size` registers an offense for `string.size != 0` registers an offense for `string.size == 0` registers an offense for `0 == string.size` with collection variables registers an offense for `0 != collection.size` registers an offense for `collection.size == 0` registers an offense for `collection.size != 0` registers an offense for `0 == collection.size` when inspecting a File::Stat object does not register an offense does not register an offense with ::File when name of the variable is `size` or `length` accepts comparison accepts inequality check accepts equality check RuboCop::Cop::VariableForce::Assignment #operator when it is += operator assignment returns += when it is multiple assignment returns = when it is ||= operator assignment returns ||= when it is normal assignment returns = when it is &&= operator assignment returns &&= #meta_assignment_node when it is += operator assignment returns op_asgn node when it is ||= operator assignment returns or_asgn node when it is multiple assignment returns masgn node when it is &&= operator assignment returns and_asgn node .new when an assignment node is passed does not raise error when any other type node is passed raises error when an argument declaration node is passed raises error #name returns the variable name RuboCop::Cop::Layout::BlockAlignment registers an offense for mismatched block end with a mass assignment registers an offense for mismatched block end with an op-asgn (+=, -=) registers an offense for mismatched block end with a constant registers an offense for mismatched end not aligned with the block that is an argument registers an offense for mismatched block end with a global variable does not raise an error for nested block in a method call accepts end aligned with a class variable accepts end aligned with a method call registers an offense for mismatched block end with an instance variable accepts end aligned with a variable accepts end aligned with an and-asgn (&&=) accepts end aligned with a call chain left hand side registers an offense for mismatched block end with a variable accepts end aligned with an or-asgn (||=) accepts end aligned with the block when the block is a method argument accepts a block end that does not begin its line accepts end aligned with a constant accepts end aligned with a mass assignment accepts end aligned with an instance variable accepts end aligned with an op-asgn (+=, -=) accepts end aligned with a method call with arguments registers an offense for mismatched end with a method call with arguments registers an offense for mismatched block end with an or-asgn (||=) accepts end aligned with a global variable registers an offense for mismatched block end with a class variable registers an offense for mismatched block end with an and-asgn (&&=) registers an offense for mismatched block end with a method call when there is an assignment chain accepts end aligned with the first variable registers an offense for an end aligned with the 2nd variable when configured to align with do allows when do aligned errors when start_of_line aligned when the method part is a call chain that spans several lines accepts two kinds of end alignment accepts end indented as the start of the block registers offenses for misaligned ends accepts pretty alignment style when the block has arguments registers an offense for mismatched block end on a logically negated method call registers an offense and corrects aligns end with the ! operator on a splatted method call aligns end with the splat operator registers an offense and corrects misaligned end braces when the block has no arguments registers an offense for mismatched block end when the block is defined on the next line accepts end aligned with the block expression registers an offenses for mismatched end alignment on an arithmetically negated method call aligns end with the - operator registers an offense and corrects when configured to align with start_of_line errors when do aligned allows when start_of_line aligned when variables of a mass assignment spans several lines accepts end aligned with the variables registers an offense for end aligned with the block when multiple similar-looking blocks have misaligned ends registers an offense for each of them when the block is a logical operand accepts a correctly aligned block end and the block is an operand accepts end aligned with a variable on a bit-flipped method call registers an offense and corrects misaligned end brace aligns end with the ~ operator when the block is terminated by } mentions } (not end) in the message RuboCop::Cop::Lint::AmbiguousOperator with a splat operator in the first argument with parentheses around the splatted argument does not register an offense without parentheses with a whitespace on the right of the operator does not register an offense without whitespaces on the right of the operator registers an offense and corrects with `+` unary operator in the first argument with parentheses around the operator does not register an offense without parentheses without whitespaces on the right of the operator registers an offense and corrects without whitespaces on the right of the operator when a method with no arguments is used in advance registers an offense and corrects with a whitespace on the right of the operator does not register an offense with `-` unary operator in the first argument with parentheses around the operator does not register an offense without parentheses without whitespaces on the right of the operator registers an offense and corrects with a whitespace on the right of the operator does not register an offense with a block ampersand in the first argument without parentheses with a whitespace on the right of the operator does not register an offense without whitespaces on the right of the operator registers an offense and corrects with parentheses around the block argument does not register an offense with a keyword splat operator in the first argument without parentheses with a whitespace on the right of the operator does not register an offense without whitespaces on the right of the operator registers an offense and corrects with parentheses around the keyword splat operator does not register an offense RuboCop::Cop::Style::SingleLineBlockParams allows calls with proper argument names does not report when destructuring is used ignores :reduce symbols does not report if no block arguments are present finds wrong argument names in calls with different syntax ignores do..end blocks finds incorrectly named parameters with leading underscores allows an unused parameter to have a leading underscore RuboCop::Cop::Style::IfWithSemicolon accepts without `else` branch registers an offense and corrects for one line if/;/end can handle modifier conditionals RuboCop::Cop::Lint::RedundantWithObject registers an offense and corrects when using ary.each_with_object([]) do-end block registers an offense and corrects when using ary.each_with_object do-end block without parentheses an object is used as a block argument registers an offense and corrects when using `ary.each_with_object { |v| v }` registers an offense and corrects when using `ary.each.with_object([]) { |v| v }` when missing argument to `each_with_object` does not register an offense when block has 1 argument does not register an offense when block has 2 arguments RuboCop::Cop::Lint::RedundantStringCoercion registers an offense and corrects `to_s` in interpolation accepts #to_s with arguments in an interpolation accepts interpolation without #to_s registers an offense and corrects an implicit receiver registers an offense and corrects `to_s` in an interpolation with several expressions does not explode on empty interpolation RuboCop::Formatter::AutoGenConfigFormatter #report_file_as_mark when a refactor convention offense is detected prints "C" when no offenses are detected prints "." when a refactor severity offense is detected prints "R" when different severity offenses are detected prints highest level mark #finished calls #report_summary when no offenses are detected does not report offenses when any offenses are detected outputs report summary does not report offenses RuboCop::Cop::Style::RedundantSelf reports an offense a self receiver of .call accepts a self receiver used to distinguish from argument of block does not report an offense when receiver and lvalue have the same name accepts a self receiver with the double less-than operator reports an offense a self receiver on an rvalue does not report an offense when self receiver in a method argument and multiple assigned lvalue have the same name accepts a self receiver for methods named like ruby keywords accepts a self receiver of .() accepts a self receiver on an lvalue of a parallel assignment accepts a self receiver with the square bracket operator does not report an offense when receiver and multiple assigned lvalue have the same name accepts a self receiver on an lvalue of an assignment accepts a self receiver on an lvalue of a plus-assignment accepts a self receiver on an lvalue of an and-assignment accepts a self receiver on an lvalue of an or-assignment does not report an offense when self receiver in a method argument and lvalue have the same name accepts a self receiver used to distinguish from constant accepts a self receiver of methods also defined on `Kernel` class methods accepts a self receiver used to distinguish from local variable accepts a self receiver used to distinguish from argument accepts a self receiver used to distinguish from blockarg accepts a self receiver used to distinguish from optional argument instance methods accepts a self receiver used to distinguish from an argument when an inner method is defined accepts a self receiver used to distinguish from an argument accepts a self receiver used to distinguish from argument accepts a self receiver used to distinguish from optional argument accepts a self receiver used to distinguish from blockarg accepts a self receiver used to distinguish from local variable RuboCop::Cop::Style::SafeNavigation allows chained method calls during arithmetic operations safe guarded by an object check allows a method call safeguarded when using `unless nil?` allows an object check before a long chain with a block allows method call that is used in a regex comparison safe guarded by an object check allows an object check before a method call that is used in a regex comparison allows an object check before a blank check allows a method call as a parameter when the parameter is safe guarded with an object check allows an object check before a negated predicate allows method calls that do not get called using . safe guarded by an object check allows an object check before a nil check on a long chain allows calls to methods not safeguarded by respond_to allows a method call safeguarded with a negative check for the object when using `if` allows object checks in the condition of an elsif statement and a method call on that object in the body allows calls using safe navigation allows method call that is used in a comparison safe guarded by an object check allows an object check before a method call that is used in a negated regex comparison allows method call that is used in a negated regex comparison safe guarded by an object check allows an object check before a method call that is used in a spaceship comparison allows for empty if blocks with comments allows an object check before a nil check on a short chain allows chained method calls during assignment safe guardedby an object check allows calls on nil allows an object check before a method chain longer than 2 methods allows an object check before a method call that is used in a comparison allows a method call safeguarded with a negative check for the object when using `unless` allows an object check before a method chain that is used in a comparison allows an object check before hash access allows a method chain that is used in a comparison safe guarded by an object check allows method call that is used in a spaceship comparison safe guarded by an object check allows an object check before a negated predicate method chain behaves like all variable types modifier if registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with params safeguarded with a check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check object check before method call allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params allows a non object check followed by a method call with a block allows a nil object check followed by a method call with params allows a non object check followed by a method call ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call with a block allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call registers an offense for an object check followed by a method call allows a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block method chaining corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call with a block ConvertCodeThatCanStartToReturnNil true corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks if expression registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with a block inside of an unless negative check for the object only moves comments that fall within the expression registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object does not lose comments within if expression registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call inside of an unless nil check for the object ternary expression allows ternary expression behaves like all variable types modifier if registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call safeguarded with a check for the object behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check object check before method call allows a non object check followed by a method call with params allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call with a block allows a nil object check followed by a method call with a block allows a nil object check followed by a method call with params allows a non object check followed by a method call allows a nil object check followed by a method call allows a non object check followed by a method call with params and a block ConvertCodeThatCanStartToReturnNil true registers an offense for an object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with params and a block corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with params registers an offense for a non-nil object check followed by a method call registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method calls that nil responds to allows a non-nil object check followed by a method call with params and a block allows a non-nil object check followed by a method call with params allows a non-nil object check followed by a method call allows a non-nil object check followed by a method call with a block method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a symbol proc if expression registers an offense for a single method call with a block inside of a non-nil check for the object allows a single method call inside of a check for the object with an else only moves comments that fall within the expression registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with a block inside of a check for the object does not lose comments within if expression registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with a block inside of an unless negative check for the object ternary expression allows ternary expression behaves like all variable types object check before method call allows a nil object check followed by a method call with params allows a non object check followed by a method call with params and a block allows a non object check followed by a method call with a block allows a nil object check followed by a method call allows a non object check followed by a method call allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call with params allows a nil object check followed by a method call with a block ConvertCodeThatCanStartToReturnNil true registers an offense for an object check followed by a method call with params registers an offense for a non-nil object check followed by a method call registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with a block corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for a non-nil object check followed by a method call with a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false allows a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params and a block allows a non-nil object check followed by a method call registers an offense for an object check followed by a method call with a block allows a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call with params method chaining corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with a symbol proc corrects an object check followed by a chained method call modifier if registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check if expression registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call inside of an unless negative check for the object only moves comments that fall within the expression registers an offense for a single method call inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object allows a single method call inside of a check for the object with an else does not lose comments within if expression registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object ternary expression allows ternary expression respond_to? allows method calls safeguarded by a respond_to check on adifferent variable but the same method allows method calls safeguarded by a respond_to check allows method calls safeguarded by a respond_to check on adifferent variable and method allows enumerable accessor method calls safeguarded by a respond_to check allows method calls safeguarded by a respond_to check to a different method behaves like all variable types if expression registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call inside of a check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call inside of an unless negative check for the object only moves comments that fall within the expression registers an offense for a single method call with a block inside of a non-nil check for the object allows a single method call inside of a check for the object with an else does not lose comments within if expression registers an offense for a single method call with a block inside of an unless negative check for the object ternary expression allows ternary expression object check before method call allows a non object check followed by a method call with a block allows a nil object check followed by a method call with params allows a nil object check followed by a method call allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params and a block allows a nil object check followed by a method call with params and a block allows a non object check followed by a method call with params allows a non object check followed by a method call ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method call with params allows a non-nil object check followed by a method call allows a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method calls that nil responds to allows a non-nil object check followed by a method call with params method chaining corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a symbol proc ConvertCodeThatCanStartToReturnNil true registers an offense for a non-nil object check followed by a method call registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call registers an offense for a non-nil object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call with params and a block corrects an object check followed by a method call and another check method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks modifier if registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for an object check followed by a method call with a comment at EOL behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like all variable types object check before method call allows a non object check followed by a method call with params allows a non object check followed by a method call allows a nil object check followed by a method call allows a nil object check followed by a method call with params allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with a block allows a non object check followed by a method call with params and a block allows a non object check followed by a method call with a block ConvertCodeThatCanStartToReturnNil true registers an offense for a non-nil object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call registers an offense for an object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call with a block registers an offense for a non-nil object check followed by a method call with params registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params and a block corrects an object check followed by a method call and another check method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call with params registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params and a block registers an offense for an object check followed by a method call allows a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params method chaining corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a symbol proc modifier if registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params safeguarded with a nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check if expression registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call inside of a check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call with a block inside of a check for the object only moves comments that fall within the expression registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object registers an offense for a single method call inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless negative check for the object does not lose comments within if expression registers an offense for a single method call inside of an unless nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object ternary expression allows ternary expression behaves like all variable types if expression registers an offense for a single method call inside of a non-nil check for the object only moves comments that fall within the expression registers an offense for a single method call with params inside of a non-nil check for the object registers an offense for a single method call with params and a block inside of a check for the object registers an offense for a single method call inside of a check for the object allows a single method call inside of a check for the object with an else registers an offense for a single method call with a block inside of a non-nil check for the object registers an offense for a single method call with a block inside of an unless nil check for the object registers an offense for a single method call with params inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of an unless negative check for the object registers an offense for a single method call with params inside of an unless negative check for the object registers an offense for a single method call inside of an unless negative check for the object registers an offense for a single method call with a block inside of a check for the object registers an offense for a single method call with params and a block inside of an unless nil check for the object registers an offense for a single method call with params and a block inside of a non-nil check for the object does not lose comments within if expression registers an offense for a single method call with a block inside of an unless negative check for the object registers an offense for a single method call with params inside of a check for the object registers an offense for a single method call inside of an unless nil check for the object ternary expression allows ternary expression object check before method call allows a nil object check followed by a method call with params allows a nil object check followed by a method call allows a non object check followed by a method call with params allows a nil object check followed by a method call with params and a block allows a nil object check followed by a method call with a block allows a non object check followed by a method call with a block allows a non object check followed by a method call allows a non object check followed by a method call with params and a block ConvertCodeThatCanStartToReturnNil false registers an offense for an object check followed by a method call with a block registers an offense for an object check followed by a method calls that nil responds to registers an offense for an object check followed by a method call with params and a block allows a non-nil object check followed by a method call registers an offense for an object check followed by a method call with params registers an offense for a check for the object followed by a method call in the condition for an if expression allows a non-nil object check followed by a method call with params and a block registers an offense for an object check followed by a method call allows a non-nil object check followed by a method call with a block allows a non-nil object check followed by a method call with params method chaining corrects an object check followed by a chained method call corrects an object check followed by a chained method call with a block corrects an object check followed by a chained method call with params corrects an object check followed by a chained method call with a symbol proc ConvertCodeThatCanStartToReturnNil true registers an offense for an object check followed by a method call with params and a block registers an offense for a non-nil object check followed by a method call with a block registers an offense for an object check followed by a method call registers an offense for an object check followed by a method call with params corrects an object check followed by a method call and another check registers an offense for a non-nil object check followed by a method call with params and a block registers an offense for a check for the object followed by a method call in the condition for an if expression registers an offense for a non-nil object check followed by a method call with params registers an offense for a non-nil object check followed by a method call registers an offense for an object check followed by a method call with a block method chaining registers an offense for an object check followed by chained method calls with blocks with Lint/SafeNavigationChain disabled allows an object check followed by chained method calls allows an object check followed by chained method calls with blocks modifier if registers an offense for a method call safeguarded with a check for the object registers an offense for a method call safeguarded with a nil check for the object registers an offense for a method call with params and a block safeguarded with a negative check for the object registers an offense for a method call on an accessor safeguarded by a check for the accessed variable registers an offense for a method call with a block safeguarded with a negative check for the object registers an offense for an object check followed by a method call with a comment at EOL registers an offense for a method call that nil responds to safe guarded by an object check registers an offense for a method call with params and a block safeguarded with a nil check for the object registers an offense for a method call with a block safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a nil check for the object registers an offense for a chained method call safeguarded with a check for the object registers an offense for a method call with a block safeguarded with a nil check for the object registers an offense for a method call with params safeguarded with a negative nil check for the object registers an offense for a method call safeguarded with a negative nil check for the object registers an offense for a chained method call safeguarded with a negative nil check for the object registers an offense for a method call with params safeguarded with a check for the object registers an offense for a method call safeguarded with a negative check for the object registers an offense for a chained method call safeguarded with an unless nil check for the object registers an offense for a method call with params safeguarded with a negative check for the object registers an offense for a method call with params and a block safeguarded with a check for the object registers an offense for a method call with params and a block safeguarded with a negative nil check for the object behaves like safe guarding logical break keywords allows a method call being passed to raise safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to yield safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to next safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to fail safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to return safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to throw safe guarded by an object check behaves like safe guarding logical break keywords allows a method call being passed to break safe guarded by an object check RuboCop::Cop::Commissioner #investigate traverses the AST and invoke cops specific callbacks stores all errors raised by the cops when given a force passes the input params to all cops/forces that implement their own #investigate method when a cop reports offenses returns all offenses found by the cops when passed :raise_error option re-raises the exception received while processing when given a source with parsing errors only calls on_other_file RuboCop::RemoteConfig .file downloads the file if the file does not exist downloads the file if cache lifetime has been reached does not download the file if cache lifetime has not been reached when the remote URL responds with redirect follows the redirect and downloads the file when the remote URL responds with 500 raises error when the network is inaccessible reuses the existing cached file when the remote URL responds with not modified reuses the existing cached file RuboCop::Cop::Lint::UnderscorePrefixedVariableName in a method calling `binding` without arguments when an underscore-prefixed argument is not used explicitly does not register an offense when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed keyword block argument is used registers an offense when AllowKeywordBlockArguments is set does not register an offense in a method calling `super` without arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used explicitly does not register an offense when an underscore-prefixed block argument is used registers an offense registers an offense when an underscore-prefixed method argument is used registers an offense when an underscore-prefixed variable in top-level scope is used registers an offense when an underscore-prefixed variable is captured by a block accepts when an underscore-prefixed variable is reassigned does not register an offense when an underscore-prefixed named capture variable is used registers an offense in a method calling `binding` with arguments when an underscore-prefixed argument is used explicitly registers an offense when an underscore-prefixed argument is not used does not register an offense when non-underscore-prefixed variable is used does not register an offense when an underscore-prefixed variable is used registers an offense in a method calling `super` with arguments when an underscore-prefixed argument is not used does not register an offense when an underscore-prefixed argument is used explicitly registers an offense RuboCop::Cop::Layout::FirstHashElementLineBreak registers an offense and corrects elements listed on the first line ignores implicit hashes in method calls with parens ignores implicit hashes in method calls that are improperly formatted ignores elements listed on a single line ignores implicit hashes in method calls without parens registers an offense and corrects hash nested in a method call isolated environment is not affected by a config file above the work directory Pending: (Failures listed here are expected and do not affect your suite's status) 1) RuboCop::Cop::Layout::AccessModifierIndentation when EnforcedStyle is set to indent registers an offense and corrects access modifiers in arbitrary blocks # Failing in Debian - needs investigation # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/layout/access_modifier_indentation_spec.rb:175 2) RuboCop::Cop::Generator compliance with rubocop generates a cop file that has no offense # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/generator_spec.rb:340 3) RuboCop::Cop::Generator compliance with rubocop generates a spec file that has no offense # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/generator_spec.rb:345 4) RuboCop::Cop::Cop.qualified_cop_name raises an error if the cop name is in more than one namespace # Temporarily skipped with xit # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/cop_spec.rb:45 5) 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 # Requires an advanced logic that checks whether the return value of an operator assignment is used or not. Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -5,7 +5,6 @@ while total < 100 total += 1 foo += 1 - ^^^ Useless assignment to variable - `foo`. end total # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/useless_assignment_spec.rb:349:in `block (3 levels) in ' 6) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:398 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 7) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:396 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 8) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:397 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 9) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:400 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' 10) RuboCop::Cop::Lint::DuplicateMethods registers an offense when class << exp is used # No reason given Failure/Error: expect(actual_annotations).to eq(expected_annotations), '' Diff: @@ -4,7 +4,6 @@ implement 1 end def some_method - ^^^^^^^^^^^^^^^ Method `A#some_method` is defined at both test.rb:3 and test.rb:6. implement 2 end end Shared Example Group: "in scope" called from /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:399 # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/lib/rubocop/rspec/expect_offense.rb:137:in `expect_offense' # /build/rubocop-X6PyPL/rubocop-0.89.1+dfsg/spec/rubocop/cop/lint/duplicate_methods_spec.rb:243:in `block (3 levels) in ' Finished in 2 minutes 4 seconds (files took 5.25 seconds to load) 13647 examples, 0 failures, 10 pending Randomized with seed 32560 ┌──────────────────────────────────────────────────────────────────────────────┐ │ dh_ruby --install finished │ └──────────────────────────────────────────────────────────────────────────────┘ dh_install -i -O--buildsystem=ruby dh_installdocs -i -O--buildsystem=ruby dh_ruby_fixdocs -i -O--buildsystem=ruby dh_installchangelogs -i -O--buildsystem=ruby dh_installsystemduser -i -O--buildsystem=ruby dh_perl -i -O--buildsystem=ruby dh_link -i -O--buildsystem=ruby dh_strip_nondeterminism -i -O--buildsystem=ruby dh_compress -X.rb -i -O--buildsystem=ruby dh_fixperms -i -O--buildsystem=ruby dh_missing -i -O--buildsystem=ruby dh_ruby_fixdepends -i -O--buildsystem=ruby dh_installdeb -i -O--buildsystem=ruby debian/rules override_dh_gencontrol make[1]: Entering directory '/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg' # rexml is provided by the ruby interpreter already, we don't need a # dependency on ruby-rexml. sed -i -e 's/ruby-rexml//' debian/*.substvars dh_gencontrol dpkg-gencontrol: warning: Depends field of package rubocop: substitution variable ${shlibs:Depends} used, but is not defined make[1]: Leaving directory '/build/rubocop-X6PyPL/rubocop-0.89.1+dfsg' dh_md5sums -i -O--buildsystem=ruby dh_builddeb -i -O--buildsystem=ruby dpkg-deb: building package 'rubocop' in '../rubocop_0.89.1+dfsg-2_all.deb'. dpkg-genbuildinfo --build=all dpkg-genchanges --build=all >../rubocop_0.89.1+dfsg-2_all.changes dpkg-genchanges: info: binary-only arch-indep upload (source code and arch-specific packages not included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) I: running special hook: sync-out /build/rubocop-X6PyPL /tmp/rubocop-0.89.1+dfsg-2opzbjt18 I: cleaning package lists and apt cache... W: deleting files in /tmp: example.rb I: creating tarball... I: done I: removing tempdir /tmp/mmdebstrap.QIZB2Z0Tlf... I: success in 3942.2795 seconds md5: rubocop_0.89.1+dfsg-2_all.deb: OK sha1: rubocop_0.89.1+dfsg-2_all.deb: OK sha256: rubocop_0.89.1+dfsg-2_all.deb: OK Checksums: OK