Custom cop for Spinel, warns on Ruby code that is not (yet) supported by Spinel.
Installation
# add to Gemfile
gem "rubocop_spinel"# add to rubocop.yml
plugins:
- rubocop_spinelExample Errors
class Example
class << self
def bad
42
end
end
end
Thread.new { puts Example.bad }sample.rb:2:3: C: Spinel/Unsupported: Spinel does not support singleton classes.
class << self ...
^^^^^^^^^^^^^
sample.rb:9:1: C: Spinel/Unsupported: Spinel does not support threads or mutexes.
Thread.new { puts Example.bad }
^^^^^^
Changelog
0.2.0 (May '26)
- allow
recv.instance_eval { ... }(Spinel #15) - allow
def m(&block); instance_eval(&block); end(Spinel #124) - allow static
define_method(:name) { ... }(Spinel 26e6aae) - allow no-argument
module_functionin module bodies (Spinel #295) - allow module singleton accessors (Spinel #126)
0.1.0 (Apr '26)
- first release