Scry.Config (scry v0.1.22)

Copy Markdown View Source

The scry: project configuration, validated loudly.

def project do
  [
    compilers: Mix.compilers() ++ [:scry],
    scry: [
      analyses: [:supervision, :unsafe_task],
      severity: [unsafe_task: :error],
      ignore: [modules: [~r/^MyApp\.Gen/], files: ["lib/legacy/**"]],
      include_deps: false,
      fail_on: :error,
      souffle: :warn
    ]
  ]
end

Every key is optional. analyses defaults to the shared layer's curated quiet set (Scry.Analysis.default_analyses/0); analysis names are validated against the argus registry so a typo aborts the compile instead of silently analyzing nothing.

Summary

Functions

Loads and validates the current project's scry: keyword.

Validates a raw scry: keyword list into a config.

Types

t()

@type t() :: %Scry.Config{
  analyses: [atom()],
  fail_on: :error | :warning,
  ignore_files: [String.t()],
  ignore_modules: [Regex.t() | module()],
  include_deps: boolean(),
  severity: %{optional(atom()) => :error | :warning | :info},
  souffle: :warn | :require
}

Functions

load()

@spec load() :: t()

Loads and validates the current project's scry: keyword.

load(raw)

@spec load(keyword()) :: t()

Validates a raw scry: keyword list into a config.