Credence (credence v0.3.1)

Copy Markdown

Credence (Semantic Linter for Elixir) Main entry point for analyzing Elixir code.

Summary

Functions

Analyzes an Elixir code string and returns a deterministic pass/fail result.

Auto-fixes all fixable issues in the given code string.

Functions

analyze(code_string, opts \\ [])

@spec analyze(
  String.t(),
  keyword()
) :: %{valid: boolean(), issues: [Credence.Issue.t()]}

Analyzes an Elixir code string and returns a deterministic pass/fail result.

fix(code_string, opts \\ [])

@spec fix(
  String.t(),
  keyword()
) :: %{code: String.t(), issues: [Credence.Issue.t()]}

Auto-fixes all fixable issues in the given code string.

Pipes the source through each fixable rule's fix/2 in sequence, then re-analyzes to report any remaining (unfixable) issues.