Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke Tasks - ensure all linters run #58

Open
calebcartwright opened this issue Jan 7, 2021 · 0 comments
Open

Invoke Tasks - ensure all linters run #58

calebcartwright opened this issue Jan 7, 2021 · 0 comments

Comments

@calebcartwright
Copy link
Member

Tasks that have defined pre-tasks will automatically run said pre-tasks when invoked. However, it will bail on the first non-zero exit, so if a task defines 2 pre-tasks (e.g. @task(aliases=["l"], pre=[lint_python, lint_yaml])), the second one will not be invoked if the first one fails.

pre-tasks are great for doing certain setup things (cleaning up test files before a run, or generating coverage before opening a cov report) but not as an aggregator intended to run multiple things.

There may be better ways to run multiple tasks, but I've found the approach we've been using in our dotfiles to work pretty well

https://github.com/swellaby/dotfiles/blob/8356cf7c4a27aeb306432b18430c810cab925bf7/tasks.py#L105-L119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant