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

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

Explanation

File location should follow the namespace hierarchy of the module it defines.

Examples:

- `lib/my_system.ex` should define the `MySystem` module
- `lib/my_system/accounts.ex` should define the `MySystem.Accounts` module

Configuration parameters

Use the following parameters to configure this check:

  • ignore_folder_namespace: A map listing the folders which will be ignored. For example, to ignore the folders channels, controllers, and views under lib/my_system_web and test/my_system_web, you can provide the following value:

    %{
      "lib/my_system_web" => ~w/channels controllers views/,
      "test/my_system_web" => ~w/channels controllers views/
    }

    Defaults to %{}

Like with all checks, general params can be applied.

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