File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1
1
require :
2
2
- ./tool/rubocop-truffleruby/cop/replace_with_primitive_nil.rb
3
- - ./tool/rubocop-truffleruby/cop/replace_with_primitive_object_class .rb
4
- - ./tool/rubocop-truffleruby/cop/replace_with_primitive_object_equal .rb
5
- - ./tool/rubocop-truffleruby/cop/replace_with_primitive_object_kind_of .rb
3
+ - ./tool/rubocop-truffleruby/cop/replace_with_primitive_class .rb
4
+ - ./tool/rubocop-truffleruby/cop/replace_with_primitive_equal .rb
5
+ - ./tool/rubocop-truffleruby/cop/replace_with_primitive_is_a .rb
6
6
- ./tool/rubocop-truffleruby/cop/replace_with_primitive_true_and_false_predicates.rb
7
7
8
8
AllCops :
@@ -407,21 +407,21 @@ TruffleRuby/ReplaceWithPrimitiveNil:
407
407
- src/main/ruby/**/*.rb
408
408
409
409
# Supports --auto-correct
410
- TruffleRuby/ReplaceWithPrimitiveObjectClass :
410
+ TruffleRuby/ReplaceWithPrimitiveClass :
411
411
Enabled : true
412
412
Include : # inspect *only* these files
413
413
- lib/truffle/**/*.rb
414
414
- src/main/ruby/**/*.rb
415
415
416
416
# Supports --auto-correct
417
- TruffleRuby/ReplaceWithPrimitiveObjectEqual :
417
+ TruffleRuby/ReplaceWithPrimitiveEqual :
418
418
Enabled : true
419
419
Include : # inspect *only* these files
420
420
- lib/truffle/**/*.rb
421
421
- src/main/ruby/**/*.rb
422
422
423
423
# Supports --auto-correct
424
- TruffleRuby/ReplaceWithPrimitiveObjectKindOf :
424
+ TruffleRuby/ReplaceWithPrimitiveIsA :
425
425
Enabled : true
426
426
Include : # inspect *only* these files
427
427
- lib/truffle/**/*.rb
Original file line number Diff line number Diff line change @@ -20,4 +20,9 @@ if [ ! "$(ls $SOURCE_DIR)" ]; then
20
20
echo " FAILURE: git clone failed"
21
21
fi
22
22
fi
23
+
24
+ # handle a case when a source cop file was renamed/deleted
25
+ rm -r $TARGET_DIR /cop
26
+ mkdir $TARGET_DIR /cop
27
+
23
28
cp $SOURCE_DIR /$SOURCE_PATH /* $TARGET_DIR /cop/
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ module TruffleRuby
13
13
# # good
14
14
# Primitive.class(object)
15
15
#
16
- class ReplaceWithPrimitiveObjectClass < Base
16
+ class ReplaceWithPrimitiveClass < Base
17
17
extend AutoCorrector
18
18
19
19
MSG = 'Use `Primitive.class` instead of `Object#class`'
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ module TruffleRuby
14
14
# # good
15
15
# Primitive.equal?(foo, bar)
16
16
#
17
- class ReplaceWithPrimitiveObjectEqual < Base
17
+ class ReplaceWithPrimitiveEqual < Base
18
18
extend AutoCorrector
19
19
20
20
MSG = 'Use `Primitive.equal?` instead of `#equal?`'
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ module TruffleRuby
23
23
# # good
24
24
# Primitive.is_a?(a, String)
25
25
#
26
- class ReplaceWithPrimitiveObjectKindOf < Base
26
+ class ReplaceWithPrimitiveIsA < Base
27
27
extend AutoCorrector
28
28
29
29
MSG = 'Use `Primitive.is_a?` instead of `#kind_of?` or `#is_a?`'
You can’t perform that action at this time.
0 commit comments