All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.2.0] - 2026-05-27

Removed

  • LexCredo.Check.Warning.NoPipeIntoCase — superseded by the built-in Credo.Check.Readability.BlockPipe, which covers |> into any block expression, not just case. Enable BlockPipe in .credo.exs instead.
  • LexCredo.Check.Warning.NoTaggedWithClauses — superseded by the built-in Credo.Check.Readability.WithCustomTaggedTuple, which is broader (catches any same-tag pattern, not only :ok/:error wrappers). Enable WithCustomTaggedTuple in .credo.exs instead.

Added

  • LexCredo.Check.Warning.NonBooleanWithStrictOperator — flags and/or/not when any operand is clearly non-boolean (struct field access without ? suffix, non-boolean literal, nil, etc.); suggests &&/||/! to avoid a runtime ArgumentError or misleading truthy/falsy semantics. Complements PreferBooleanOperators.
  • LexCredo.Check.Warning.StructMatchInFunctionHead — flags %Struct{} = param at the top level of a function body when param is a plain-variable argument. Moving the struct match to the function head makes the type visible in the signature and enables Elixir's type checker to infer the parameter type. Only top-level body statements are checked; matches nested inside case, if, with, etc. are left alone.
  • LexCredo.Check.Warning.PreferIsNil — flags == nil, != nil, === nil, and !== nil comparisons (both operand orders); suggests is_nil(x) and not is_nil(x) for consistency with the is_* guard family. Note: conflicts with the built-in Credo.Check.Refactor.NegatedIsNil; disable one.

[0.1.0] - 2026-05-22

Initial release.

Added

Checks – Design

Checks – Readability

Checks – Refactor

Checks – Warning

General

  • exclude_test_files boolean parameter on all checks — set to true to skip files under test/; defaults to true for NoNestedModules, false for all others.
  • GitHub Actions CI workflow: format check → compile (warnings-as-errors) → credo --strict → ExCoveralls; reads Elixir/OTP versions from .tool-versions.
  • ExCoveralls configured with an 80 % minimum line-coverage threshold.
  • ExDoc configured with main: "readme", check modules grouped by category, and README / CHANGELOG / LICENSE included as extras.
  • MIT license.

Fixed

  • PreferBooleanOperators: boolean_like?/1 is now recursive for &&/|| — they are only considered boolean-like when their own operands are boolean-like. This eliminates false positives on truthy/falsy short-circuit idioms such as (user && user.name) || "default".
  • UsePositiveTypeGuards: extended pattern matching to cover not is_*(x) for all standard type-guard functions, not just is_nil.