Skip to content
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

Errors not detected in rakelib tasks #45

Open
pboling opened this issue Mar 23, 2023 · 0 comments
Open

Errors not detected in rakelib tasks #45

pboling opened this issue Mar 23, 2023 · 0 comments

Comments

@pboling
Copy link

pboling commented Mar 23, 2023

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

  1. Within my_gem RuboCop violations in my rakelib are not detected (see above "rakelib").
  2. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant