fidian / git-started

A good starting point for projects. Sets up lint checking, pretty printing. Easily extensible.
Other
6 stars 4 forks source link

Add a "fail" option for pretty printers and linters #16

Closed fidian closed 10 years ago

fidian commented 10 years ago

By adding a "fail" script to _common, we can specify a set of required pretty printers and then fail if they don't run.

PRETTY_JS="jsbeautify fail"

Normally, when things fail, it will try the next pretty printer. In this case, if jsbeautify is not on the system then git-started would fall back to the "fail" script. We want "fail" to say it can be ran and it must always stop the pretty printing or lint checking.

fidian commented 10 years ago

Resolved.

Now you can have automatic pretty printers fail if your primary pretty printer or linter fails.

PRETTY_JS="prettyjs fail"
LINT_JS="jsl fail"