mix_test_interactive
mix_test_interactive copied to clipboard
Config-less operation
Some of mix_test_interactive's behavior can be modified using application configuration. For example, the clear
, exclude
, and task
options can only be configured in app config.
Projects generated with mix new
no longer include a config by default (for good reasons), which makes it harder to customize mix_test_interactive.
Ideally, there would be a way to customize mix_task_interactive without using application configuration. The most obvious answer to this would be to also support command-line arguments for configuring these settings.
In order to do this, there are some problems to solve:
- Conflicts between mix_test_interactive's command-line arguments and
mix test
's arguments. For example,mix test
already takes an--exclude
argument that would conflict with mix_test_interactive's config setting. We might want to use a prefix for our own arguments likemti-
or_
or similar. - Specifying complex argument values, like the array needed by
exclude
or thecommand
setting proposed in #63. We could attempt to parse an Elixir array from those arguments, but would have to find a way to do that in a secure way that didn't allow for malicious code.
The exclude
option can simply be repeatable, so if you need to pass multiple regexes, do you --exlude 'db_migration\/.*' --exclude 'useless_.*\.exs'
.
The command
option could be a string that is split by spaces. The problem is if there is an argument that has spaces and needs quotes.
Done in #108 and releases in v4.0.0