Brujo Benavides

Results 120 issues of Brujo Benavides

## Avoid Comparison to Boolean ### Brief Description A rule that disallows comparison to booleans. ### Should be on by default? **YES** ### Reasoning This is because these expressions evaluate...

rule

## Avoid Duplicate Keys in Maps ### Brief Description The idea is to emit a warning in situations like the following ones (notice the duplication of keys everywhere): ```erlang Map...

rule

## Consistent Variable Naming ### Brief Description This is a more sophisticated version of #266, but it's also more _heuristic_ (thus the possibility of emitting false positives). The idea is...

rule

## Strict Module Layout ### Brief Description Provide module parts in the required order. ```erlang -module(…). -include[_lib](…). -dialyzer(…). -elvis(…). -format #{…}. -hank(…). -mixin(…). … -type(…). -type(…). … -export_type(…). -export(…). exported_function_1(…)...

rule

Ref: WhatsApp/erlfmt#91 * Omit `()` in macro names only if they represent constants ```erlang %% Bad -define(NOT_CONSTANT, application:get_env(myapp, key)). -define(CONSTANT(), 100). ``` ```erlang %% Good -define(NOT_CONSTANT(), application:get_env(myapp, key)). -define(CONSTANT, 100).

enhancement
rule

Inspired by https://hexdocs.pm/credo/Credo.Check.Refactor.ABCSize.html Read the comments below to find more possible rules :)

rule

When possible, add code suggestions to the warnings. As an example, Instead of… > - macro_names > - Invalid macro name the_macro on line 11. Use UPPER_CASE. …say… > -...

enhancement

Currently, our naming convention rules only allow for a single regex that identifies what is _permitted_/_valid_. It would be nice to add an additional _forbidden_ regex to identify things that...

enhancement