VBT.Credo.Check.Consistency.ModuleLayout (vbt v0.1.0) View Source

This check has a base priority of high and works with any version of Elixir.

Explanation

Module parts should appear in the following order:

  1. @shortdoc
  2. @moduledoc
  3. @behaviour
  4. use
  5. import
  6. alias
  7. require
  8. custom module attributes
  9. defstruct
  10. @opaque
  11. @type
  12. @typep
  13. @callback
  14. @macrocallback
  15. @optional_callbacks
  16. public guards
  17. public macros
  18. public functions
  19. behaviour callbacks
  20. private functions

This order has been adapted from https://github.com/christopheradams/elixir_style_guide#module-attribute-ordering.

Configuration parameters

There are no specific parameters for this check.

Like with all checks, general params can be applied.

Parameters can be configured via the .credo.exs config file.