Skip to content

Invoke Tasks - ensure all linters run #58

@calebcartwright

Description

@calebcartwright

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions