-
-
Notifications
You must be signed in to change notification settings - Fork 18
Description
Background
rakelib
The rakelib
directory is the default location for Rake apps that are split across multiple files.
The location/name of the rakelib
directory can be customized with:
spec = Gem::Specification.find_by_name "my_gem"
rakelib = "#{spec.gem_dir}/lib/my_gem/rakelib"
Rake.add_rakelib(rakelib)
* Note that customization via add_rakelib
is not fully documented in the RDocs related to rakelib
. rakelib
does not have to be at the root alongside the main Rakefile
.
Inside my rakelib
I have a bunch of namespaced folders and *.rake
files.
shared rake task
Gems with shared rake tasks generally place them in lib/my_gem/tasks.rake
or similar, and instruct users to integrate with their Rakefile as require "my_gem/tasks.rake"
.
Expected
Any file in any subdirectory of RuboCop's working directory that matches Rakefile
or *.rake
, or any of the other standard Rake file names (rakefile.rb
, etc) should be processed by this RuboCop extension.
Bug
- Within
my_gem
RuboCop violations in myrakelib
are not detected (see above "rakelib"). - Within
my_gem
RuboCop violations in my shared rake task are not detected (see above "shared rake task").
The only issues that are detected in my_gem
are in the root Rakefile
.