rubocop-rake
rubocop-rake copied to clipboard
Enhancement: Rake/DuplicateTask to work across multiple files
What would it take for the Rake/DuplicateTask cop to work across all rake files?
The use case I'm facing is the following:
- task_a.rake defines :task_a
- task_b.rake defines :task_a
This of course will theoretically run all occurrences of :task_a.
However in my case the two definitions of :task_a have different parameters. The second definition overrides the parameters defined in the first place and finally the first fails because it can't get a proper value for its parameters, which prevents Rake to proceed with the second task and thus there's no obvious hint of the problem.
Ending up in such situation is obviously not intended, and that's why it would be most useful to detect such issues. use_case_rake_duplicate_task_across_files.zip