credo icon indicating copy to clipboard operation
credo copied to clipboard

A static code analysis tool for the Elixir language with a focus on code consistency and teaching.

Results 87 credo issues
Sort by recently updated
recently updated
newest added

Closes https://github.com/rrrene/credo-proposals/issues/81 This PR is introducing a new `:ignore` param on `Credo.Check.Readability.AliasAs`, to allow users to configure a list of modules that should be ignored by this check. For example:...

Related to #956 I want to check in early to make sure I'm on the right path. When a module is passed as an argument to a function, it should...

This PR is for #944. It's really just a spike at this point, but it works for the single check I've implemented autocorrect for! At the moment the UI is...

Discussion

### Precheck * Proposals for new features should be submitted via: https://github.com/rrrene/credo-proposals * For bugs, please do a quick search and make sure the bug has not yet been reported...

### Environment ``` 1.6.4-ref.deletion.8140e31+uncommittedchanges ``` ### What were you trying to do? ```elixir x = 1 p = path(x / x) ``` where `path` is a macro ### Expected outcome...

Kind: Bug
Level: Advanced

Some style guide proposes: ```elixir # not preferred 1 |> Integer.to_string() |> String.to_integer() # preferred 1 |> Integer.to_string() |> String.to_integer() ``` This PR provides a check for that. -- Credits...

### Environment * Credo version (`mix credo -v`): 1.6.4 * Erlang/Elixir version (`elixir -v`): Elixir 1.13.4 (compiled with Erlang/OTP 24) * Operating system: macOS 12.13 ### What were you trying...

### Environment * Credo version (`mix credo -v`): 1.6.1 * Erlang/Elixir version (`elixir -v`): Erlang/OTP 23 - Elixir 1.11.2 (compiled with Erlang/OTP 21) * Operating system: macOS Monterey ### What...

Hi @rrrene! First off, thanks for Credo! ### Precheck Current master/main. ### Expected outcome Warn when modules are not aliased. More details below. ### Actual outcome It doesn't warn. ###...

This PR adds a check named `Credo.Check.Readability.CondCatchallTrue` that checks for `cond`s that end in a catchall clause that use a literal value other than `true`. I created this check to...