credo v1.4.0-rc.1 Release Notes

Release Date: 2020-04-02 // about 4 years ago
    • ๐Ÿš€ Credo's schema for pre-release names changes: There is now a . after the rc like in many other Elixir projects.

    • โž• Add support for explaining checks (in addition to issues), i.e.

      $ mix credo explain Credo.Check.Design.AliasUsage

    • โž• Add support for tags on checks

    Checks can now declare tags via the __using__ macro, i.e.

      defmodule MyCheck do
        use Credo.Check, tags: [:foo]
    
        def run(source_file, params) do
          #
        end
      end
    

    Tags can be used via the CLI switch --checks-with[out]-tag:

      # Only run checks tagged `:foo` during analysis
      $ mix credo --checks-with-tag foo
    
      # Exclude all checks tagged `:foo` from analysis
      $ mix credo --checks-without-tag foo
    
    • โž• Add validation of check params in config

    If a param is not found, Credo checks for mispellings and suggests corrections:

      $ mix credo
      ** (config) Credo.Check.Design.AliasUsage: unknown param `fi_called_more_often_than`. Did you mean `if_called_more_often_than`?
    
    • โž• Add auto-generated check docs
    • โž• Add new documentation on Hex with extra guides and CHANGELOG