2

I'm using dialyxir which appends a dialyzer task to Mix. But it doesn't seem to have any --watch option that would rerun the type checking on file changes.

Is there a CLI way to achieve that?

Ivan Gabriele
  • 5,018
  • 3
  • 31
  • 52

1 Answers1

3

Why do you expect the static code analysis tool to be watching the filesystem? There is an explicit tool for that, named fswatch.

You might execute whatever you want, including mix dialyzer as shown in usage section.

Aleksei Matiushkin
  • 105,980
  • 9
  • 87
  • 132
  • I want that maybe because I come from the JS world where it's common to run a FS watcher running the unit tests / linter / type checking while we develop. It is more efficient than using an IDE with heavy plugins doing the same job. I will use fswatch then, it seems like a perfect fit. – Ivan Gabriele Jan 24 '19 at 07:37
  • 2
    Eh. [`node-watch`](https://www.npmjs.com/package/node-watch) and all other watchers are wrappers for `fswatch` FWIW. – Aleksei Matiushkin Jan 24 '19 at 07:40
  • 1
    Could you share a full command you use with fswatch and mix dialyzer? – Szymon Wygnański Oct 13 '19 at 15:56