Skip to content

Enhancement: Document and add a command line option to show all implicit rules #540

@apatniv

Description

@apatniv

We can easily verify that a file task is synthesized whenever rake finds that user provided task doesn't match any defined tasks and there is file with that name.

How to reproduce

# create an empty rakefile 
(ins)-> touch rakefile

# Try to execute hello_world task
ins)-> rake hello_world
rake aborted!
Don't know how to build task 'hello_world' (See the list of available tasks with `rake --tasks`)

(See full trace by running task with --trace)

# create a file by name hello_world and task which failed previously will succeed now. 
(ins)-> touch hello_world
(ins)-> rake hello_world

I feel this behavior should be documented and possibly a new command line option can be added. This new option will list all implicit rules just like how make does it.

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