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-inCredo.Check.Readability.BlockPipe, which covers|>into any block expression, not justcase. EnableBlockPipein.credo.exsinstead.LexCredo.Check.Warning.NoTaggedWithClauses— superseded by the built-inCredo.Check.Readability.WithCustomTaggedTuple, which is broader (catches any same-tag pattern, not only:ok/:errorwrappers). EnableWithCustomTaggedTuplein.credo.exsinstead.
Added
LexCredo.Check.Warning.NonBooleanWithStrictOperator— flagsand/or/notwhen any operand is clearly non-boolean (struct field access without?suffix, non-boolean literal,nil, etc.); suggests&&/||/!to avoid a runtimeArgumentErroror misleading truthy/falsy semantics. ComplementsPreferBooleanOperators.LexCredo.Check.Warning.StructMatchInFunctionHead— flags%Struct{} = paramat the top level of a function body whenparamis 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 insidecase,if,with, etc. are left alone.LexCredo.Check.Warning.PreferIsNil— flags== nil,!= nil,=== nil, and!== nilcomparisons (both operand orders); suggestsis_nil(x)andnot is_nil(x)for consistency with theis_*guard family. Note: conflicts with the built-inCredo.Check.Refactor.NegatedIsNil; disable one.
[0.1.0] - 2026-05-22
Initial release.
Added
Checks – Design
LexCredo.Check.Design.NoNestedModules— flags module definitions nested inside another module; skips test files by default (exclude_test_files: true).
Checks – Readability
LexCredo.Check.Readability.DocExamplesSection— flags public functions whose@docstring contains code blocks but no## Examplesheading.
Checks – Refactor
LexCredo.Check.Refactor.NoEnumWrapperFunctions— flags single-function bodies that do nothing but delegate toEnum/Stream(map,flat_map,each,map_reduce,flat_map_reduce,scan).
Checks – Warning
LexCredo.Check.Warning.NoComplexWithElse— flagswithexpressions whoseelseblock exceedsmax_else_clauses(default:1).LexCredo.Check.Warning.NoEnumAllAssert— flagsassert Enum.all?/2in test files; suggests per-element assertions for clearer failure messages.LexCredo.Check.Warning.NoPipeIntoCase— flags|> case dopatterns; suggests binding the intermediate value to a named variable first.LexCredo.Check.Warning.NoProcessSleepInTests— flagsProcess.sleep/1andProcess.alive?/1in test files; suggestsProcess.monitor/1+assert_receivefor deterministic synchronisation.LexCredo.Check.Warning.NoTaggedWithClauses— flags the{:tag, {:ok, _}} <- {:tag, expr}workaround used to identify whichwithclause failed in theelseblock.LexCredo.Check.Warning.PreferBooleanOperators— flags&&,||, and!when at least one operand is a boolean-typed expression; suggestsand,or, andnot. Does not flag truthy/falsy short-circuit patterns such asuser && user.name.LexCredo.Check.Warning.UsePositiveTypeGuards— flags negated type guards in function heads (not is_nil(x),x != nil, etc.); suggests a specific positive guard that accurately constrains the clause.LexCredo.Check.Warning.UseStartSupervised— flags directstart_link/startcalls toGenServer,Agent,Task,Supervisor, andDynamicSupervisorin test files; suggestsstart_supervised!/1.
General
exclude_test_filesboolean parameter on all checks — set totrueto skip files undertest/; defaults totrueforNoNestedModules,falsefor 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?/1is 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 covernot is_*(x)for all standard type-guard functions, not justis_nil.