code-corps / code-corps-api

Elixir/Phoenix API for Code Corps.
https://www.codecorps.org
MIT License
235 stars 86 forks source link

Make TDD more test-driven by adding our linter and documentation #644

Open arubis opened 7 years ago

arubis commented 7 years ago

Problem

mix test.watch allows you to add tasks beyond test to run. It would be helpful to also run our linter, credo. Because TDD is awesome.

Subtasks

securingsincity commented 7 years ago

@arubis I was looking at this issue, but I'm running into a slight issue. the --stale flag and credo do not play well together. Passing the --stale flag into mix test.watch results in the stale flag being passed to credo which causes the whole thing to die.

Which of these options do you think make the most sense :

  1. Have credo but not support --stale
  2. Don't have credo but document the use of --stale
  3. Force --stale by passing it into the configuration
if Mix.env == :dev do
  config :mix_test_watch,
    tasks: [
      "test --stale",
      "credo",
    ]
end

The problem with the third option is that you are forced to use --stale which might not be what you want.