diff --git a/env.ps1 b/env.ps1 index 506a7f7..8b94a1d 100644 --- a/env.ps1 +++ b/env.ps1 @@ -30,12 +30,16 @@ If (Test-Path -Path venv\.stamp) { Activate } Else { Setup } +# NOTE: PowerShell functions always return success even if the commands inside +# failed. This makes it infeasible to do proper error checking. +# See https://github.com/PowerShell/PowerShell/issues/12218 + Function Global:dotidy { black src tests build.py } Function Global:dolint { flake8 src tests build.py } Function Global:dotest { pytest -q -n auto -x -l --sw --hypothesis-profile=dev $args } Function Global:dotest_ci { pytest -q -n auto --hypothesis-profile=ci } Function Global:dotest_long { pytest -q -n auto --hypothesis-profile=long } -Function Global:docheck { dotidy && dolint && dotest } +Function Global:docheck { dotidy; dolint; dotest } Function Global:_envps1_domut { mutmut run --paths-to-mutate "src/token.py,src/tokenize.py,src/parse.py" $args } Function Global:domut { _envps1_domut } Function Global:domut_ci { _envps1_domut --no-progress || mutmut results }