Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Pedantic Elixir Builds

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Pedantic Elixir Builds

Setting up pedantic Elixir builds in 2019

Andrew Summers

January 23, 2019

Transcript

15 slides
  1. Who? • Backend Software Engineer at albert.io • Wrote Dialyzer

    pretty printer • Maintainer of Dialyxir, Erlex, elixir-lsp packages • Contributor to many others!
  2. What? • Set up CI with pedantic builds • Recipe

    for contributing to open source • Improve code quality at work using tools
  3. How? • Turn on all current tooling to maximum pedantry

    • Add extra checks according to your team's conventions • Set up continuous integration every build using e.g. Travis, Circle CI, Jenkins • Reject pull requests that do not satisfy all checks
  4. • Travis (Continuous Integration) • Compiler (warnings as errors) •

    Formatter • Credo (linter) • ExUnit (tests) • Dialyzer (type checker) • Sobelow (security)
  5. • Good first PR to fix warnings and prevent them

    in future • Surprising how many open source projects have errors! mix compile --warnings-as-errors
  6. • Elixir linter • Turn on as many optional rules

    as you can handle • Add your own rules to e.g. enforce defp type specs mix credo list --strict
  7. • Erlang type checker, sometimes lies • Full PLT analysis

    cache rebuild on Elixir, Erlang version change, partial rebuild on dependency changes mix dialyzer --halt-exit-status
  8. Other tools • coveralls, via ExCoveralls for coverage analysis •

    dependabot for keeping dependencies up to date • inch for documentation analysis

More Decks by Andrew Summers

Other Decks in Technology