Open
Description
We've seen this issue pop up a bunch of times in the contrib plugins. Some people want a failing task to warn, so that following tasks continue to run. Other people want a failing task to error, so that following tasks don't run.
Currently, the only way to allow the user control over this is to have failing fail, causing any following tasks to not run, which can then be overridden globally with the --force
CLI option. Is this how we're currently handling this in contrib?
This seems to be the ideal behavior:
- A task should fail on anything that prevents it from accomplishing its primary task.
- A task should warn on anything that doesn't prevent it from accomplishing its primary task.
- By default, a failing task prevents any further tasks from being run.
- A flag should be able to be set in each location the user might specify the task that signifies that it should be exempt from rule 3.
Examples:
- A linting plugin should fail if there are linting errors. Anything else "bad" is a warning.
- A compiling plugin should fail if it can't actually compile files (due to a syntax error or file permission error). Anything else "bad" is a warning.
- A file copying plugin should fail if it can't actually copy files. Anything else "bad" is a warning.
I'd like to discuss these two questions:
- How can we settle this once-and-for-all and improve grunt-contrib plugins RIGHT NOW?
- How should this problem be solved in the future?