Skip to content

Errors not detected in rakelib tasks #45

@pboling

Description

@pboling

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions