Skip to content

Fix deprecated Naming/PredicateName cop - rename to Naming/PredicatePrefix #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 9, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ test/tmp
test/version_tmp
tmp
bin/
vendor/

# YARD artifacts
.yardoc
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rubocop-github (0.25.0)
rubocop (>= 1.72)
rubocop (>= 1.76)
rubocop-performance (>= 1.24)
rubocop-rails (>= 2.23)

Expand Down Expand Up @@ -74,18 +74,18 @@ GEM
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.10.0)
rubocop (1.75.7)
rubocop (1.76.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-ast (>= 1.45.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.44.1)
rubocop-ast (1.45.0)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-performance (1.25.0)
Expand Down
2 changes: 1 addition & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ Naming/MethodName:
Naming/MethodParameterName:
Enabled: false

Naming/PredicateName:
Naming/PredicatePrefix:
Enabled: false

Naming/RescuedExceptionsVariableName:
Expand Down
2 changes: 1 addition & 1 deletion rubocop-github.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 3.1.0"

s.add_dependency "rubocop", ">= 1.72"
s.add_dependency "rubocop", ">= 1.76"
s.add_dependency "rubocop-performance", ">= 1.24"
s.add_dependency "rubocop-rails", ">= 2.23"

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.1.9/ext/bigdecimal
/usr/bin/ruby3.2 -I/usr/lib/ruby/vendor_ruby extconf.rb
checking for __builtin_clz()... yes
checking for __builtin_clzl()... yes
checking for __builtin_clzll()... yes
checking for float.h... yes
checking for math.h... yes
checking for stdbool.h... yes
checking for stdlib.h... yes
checking for x86intrin.h... yes
checking for _lzcnt_u32() in x86intrin.h... no
checking for _lzcnt_u64() in x86intrin.h... no
checking for intrin.h... no
checking for labs() in stdlib.h... yes
checking for llabs() in stdlib.h... yes
checking for finite() in math.h... yes
checking for isfinite() in math.h... no
checking for ruby/atomic.h... yes
checking for ruby/internal/has/builtin.h... yes
checking for ruby/internal/static_assert.h... yes
checking for rb_rational_num() in ruby.h... yes
checking for rb_rational_den() in ruby.h... yes
checking for rb_complex_real() in ruby.h... yes
checking for rb_complex_imag() in ruby.h... yes
checking for rb_opts_exception_p() in ruby.h... yes
checking for rb_category_warn() in ruby.h... yes
checking for RB_WARN_CATEGORY_DEPRECATED in ruby.h... yes
creating Makefile

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.1.9/ext/bigdecimal
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-hdvnh5 sitelibdir\=./.gem.20250605-3371-hdvnh5 clean

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.1.9/ext/bigdecimal
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-hdvnh5 sitelibdir\=./.gem.20250605-3371-hdvnh5
compiling bigdecimal.c
compiling missing.c
linking shared-object bigdecimal.so

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.1.9/ext/bigdecimal
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-hdvnh5 sitelibdir\=./.gem.20250605-3371-hdvnh5 install
/usr/bin/install -c -m 0755 bigdecimal.so ./.gem.20250605-3371-hdvnh5

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/bigdecimal-3.1.9/ext/bigdecimal
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-hdvnh5 sitelibdir\=./.gem.20250605-3371-hdvnh5 clean

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/json-2.12.2/ext/json/ext/parser
/usr/bin/ruby3.2 -I/usr/lib/ruby/vendor_ruby extconf.rb
checking for rb_enc_interned_str() in ruby.h... yes
checking for rb_hash_new_capa() in ruby.h... yes
checking for rb_hash_bulk_insert() in ruby.h... yes
checking for strnlen() in string.h... yes
checking for whether -std=c99 is accepted as CFLAGS... yes
creating Makefile

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/json-2.12.2/ext/json/ext/parser
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-n20h6k sitelibdir\=./.gem.20250605-3371-n20h6k clean

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/json-2.12.2/ext/json/ext/parser
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-n20h6k sitelibdir\=./.gem.20250605-3371-n20h6k
compiling parser.c
linking shared-object json/ext/parser.so

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/json-2.12.2/ext/json/ext/parser
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-n20h6k sitelibdir\=./.gem.20250605-3371-n20h6k install
/usr/bin/install -c -m 0755 parser.so ./.gem.20250605-3371-n20h6k/json/ext

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/json-2.12.2/ext/json/ext/parser
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-n20h6k sitelibdir\=./.gem.20250605-3371-n20h6k clean
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
have_func: checking for rb_enc_interned_str() in ruby.h... -------------------- yes

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
conftest.c: In function ‘t’:
conftest.c:16:57: error: ‘rb_enc_interned_str’ undeclared (first use in this function); did you mean ‘rb_interned_str’?
16 | int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
| ^~~~~~~~~~~~~~~~~~~
| rb_interned_str
conftest.c:16:57: note: each undeclared identifier is reported only once for each function it appears in
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_enc_interned_str; return !p; }
/* end */

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: extern void rb_enc_interned_str();
17: int t(void) { rb_enc_interned_str(); return 0; }
/* end */

--------------------

have_func: checking for rb_hash_new_capa() in ruby.h... -------------------- yes

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_hash_new_capa; return !p; }
/* end */

--------------------

have_func: checking for rb_hash_bulk_insert() in ruby.h... -------------------- yes

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <ruby.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_hash_bulk_insert; return !p; }
/* end */

--------------------

have_func: checking for strnlen() in string.h... -------------------- yes

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed -lruby-3.2 -lm -lpthread -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <string.h>
4:
5: /*top*/
6: extern int t(void);
7: int main(int argc, char **argv)
8: {
9: if (argc > 1000000) {
10: int (* volatile tp)(void)=(int (*)(void))&t;
11: printf("%d", (*tp)());
12: }
13:
14: return !!argv[argc];
15: }
16: int t(void) { void ((*volatile p)()); p = (void ((*)()))strnlen; return !p; }
/* end */

--------------------

block in append_cflags: checking for whether -std=c99 is accepted as CFLAGS... -------------------- yes

LD_LIBRARY_PATH=.:/usr/lib/x86_64-linux-gnu "x86_64-linux-gnu-gcc -I/usr/include/x86_64-linux-gnu/ruby-3.2.0 -I/usr/include/ruby-3.2.0/ruby/backward -I/usr/include/ruby-3.2.0 -I. -Wdate-time -D_FORTIFY_SOURCE=3 -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC -std=c99 -Werror -c conftest.c"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return !!argv[argc];
6: }
/* end */

--------------------

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext/prism
/usr/bin/ruby3.2 -I/usr/lib/ruby/vendor_ruby extconf.rb
checking for prism.h in /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/include... yes
checking for prism/extension.h in /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext... yes
checking for whether -fvisibility=hidden is accepted as CFLAGS... yes
creating Makefile

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext/prism
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-dlj79q sitelibdir\=./.gem.20250605-3371-dlj79q clean

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext/prism
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-dlj79q sitelibdir\=./.gem.20250605-3371-dlj79q
compiling api_node.c
compiling api_pack.c
compiling ./../../src/diagnostic.c
compiling ./../../src/encoding.c
compiling extension.c
compiling ./../../src/node.c
compiling ./../../src/options.c
compiling ./../../src/pack.c
compiling ./../../src/util/pm_buffer.c
compiling ./../../src/util/pm_char.c
compiling ./../../src/util/pm_constant_pool.c
compiling ./../../src/util/pm_integer.c
compiling ./../../src/util/pm_list.c
compiling ./../../src/util/pm_memchr.c
compiling ./../../src/util/pm_newline_list.c
compiling ./../../src/util/pm_string.c
compiling ./../../src/util/pm_strncasecmp.c
compiling ./../../src/util/pm_strpbrk.c
compiling ./../../src/prettyprint.c
compiling ./../../src/prism.c
compiling ./../../src/regexp.c
compiling ./../../src/serialize.c
compiling ./../../src/static_literals.c
compiling ./../../src/token_type.c
linking shared-object prism/prism.so

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext/prism
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-dlj79q sitelibdir\=./.gem.20250605-3371-dlj79q install
/usr/bin/install -c -m 0755 prism.so ./.gem.20250605-3371-dlj79q/prism

current directory: /home/runner/work/rubocop-github/rubocop-github/vendor/bundle/ruby/3.2.0/gems/prism-1.4.0/ext/prism
make DESTDIR\= sitearchdir\=./.gem.20250605-3371-dlj79q sitelibdir\=./.gem.20250605-3371-dlj79q clean
Loading
Loading