Skip to content

Commit

Permalink
Merge branch 'no-init-lists' of https://github.com/bormilan/elvis_core
Browse files Browse the repository at this point in the history
…into no-init-lists
  • Loading branch information
bormilan committed Oct 10, 2024
2 parents 70874c3 + 68c8945 commit 0db27a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RULES.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ identified with `(since ...)` for convenience purposes.
- [State Record and Type](doc_rules/elvis_style/state_record_and_type.md)
- [Used Ignored Variable](doc_rules/elvis_style/used_ignored_variable.md)
- [Variable Naming Convention](doc_rules/elvis_style/variable_naming_convention.md)
- [Not Use List In Init Functions](doc_rules/elvis_style/no_init_lists.md)
- [No Init Lists](doc_rules/elvis_style/no_init_lists.md)
- [Prefer Unquoted Atoms](doc_rules/elvis_text_style/prefer_unquoted_atoms.md)

## `.gitignore` rules
Expand Down
3 changes: 1 addition & 2 deletions doc_rules/elvis_style/no_init_lists.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Do not use a list as the parameter for the `init/1` callback when implementing `gen_*` behaviours. It's semantically clearer to use a tuple or a map. [More info](https://erlangforums.com/t/args-in-gen-init-1/3169/5)

Check failure on line 3 in doc_rules/elvis_style/no_init_lists.md

View workflow job for this annotation

GitHub Actions / md_and_yml

Line length

doc_rules/elvis_style/no_init_lists.md:3:101 MD013/line-length Line length [Expected: 100; Actual: 215] https://github.com/DavidAnson/markdownlint/blob/v0.35.0/doc/md013.md

> Works on `.beam` file? Not really! (it consumes results Ok, but these might be unexpected, since
the files are pre-processed)
> Works on `.beam` files? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion src/elvis_style.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
-hank([{unnecessary_function_arguments, [{no_init_lists, 3}]}]).

-define(NO_INIT_LISTS_MSG,
"Don't use a list as a parameter in 'init' function at position ~p.").
"Do not use a list as the parameter for the 'init' callback at position ~p.").
-define(INVALID_MACRO_NAME_REGEX_MSG,
"The macro named ~p on line ~p does not respect the format "
"defined by the regular expression '~p'.").
Expand Down

0 comments on commit 0db27a1

Please sign in to comment.