MetaCredo.Analysis.Purity.Result (MetaCredo v0.4.0)

View Source

Result structure for purity analysis.

Summary

Types

confidence()

@type confidence() :: :high | :medium | :low

effect()

@type effect() ::
  :io
  | :mutation
  | :random
  | :time
  | :network
  | :database
  | :exception
  | :unknown

location()

@type location() :: {:line, non_neg_integer(), effect()}

t()

@type t() :: %MetaCredo.Analysis.Purity.Result{
  confidence: confidence(),
  effects: [effect()],
  impure_locations: [location()],
  pure?: boolean(),
  summary: String.t(),
  unknown_calls: [String.t()]
}

Functions

impure(effects, locations)

@spec impure([effect()], [location()]) :: t()

merge(results)

@spec merge([t()]) :: t()

pure()

@spec pure() :: t()

unknown(calls)

@spec unknown([String.t()]) :: t()