Skip to content

Files

Latest commit

 

History

History
29 lines (21 loc) · 528 Bytes

Rake-DuplicateTask.md

File metadata and controls

29 lines (21 loc) · 528 Bytes

Pattern: Duplicate task

Issue: -

Description

If tasks are defined with the same name, Rake executes the both tasks in definition order. It is misleading sometimes. You should squash them into one definition.

Examples

# bad
task :foo do
  p 'foo 1'
end
task :foo do
  p 'foo 2'
end

# good
task :foo do
  p 'foo 1'
  p 'foo 2'
end

Further Reading