Skip to content

Commit

Permalink
Update documentation and migration instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira committed Sep 16, 2024
1 parent fd12068 commit 6ceddad
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
default: true
MD013:
line_length: 100
MD024:
siblings_only: true
21 changes: 21 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ since these are incremental.
This file's format is influenced by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
[Make a README](https://www.makeareadme.com/).

## Going from `3.x` to `4.x`

### Update

- your `atom_naming_convention`'s options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/atom_naming_convention.md#options>
- your `macro_names`' options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/macro_names.md#options>
- your `operator_spaces` options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/operator_spaces.md#options>
- your `no_space` options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/no_space.md#options>
- your `function_naming_convention` options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/function_naming_convention.md#options>
- your `module_naming_convention` options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/module_naming_convention.md#options>
- your `no_debug_call` options to be the ones defined at
<https://github.com/inaka/elvis_core/blob/3.2.5/doc_rules/elvis_style/no_debug_call.md#options>

On the other hand you may choose to not implement those changes and merely adapt your code.

## Going from `0.x` to `1.x`

### Update
Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/function_naming_convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All functions should be named according to the regular expression provided.
## Options

- `regex :: string()`.
- default: `"^([a-z][a-z0-9]*_?)*(_SUITE)?$"`.
- default: `"^[a-z](_?[a-z0-9]+)*$"`.

## Example

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/macro_names.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Macro names should only contain upper-case alphanumeric characters.
## Options

- `regex :: string()`. (since [1.0.0](https://github.com/inaka/elvis_core/releases/tag/1.0.0))
- default: `"^([A-Z][A-Z_0-9]+)$"`.
- default: `"^[A-Z](_?[A-Z0-9]+)*$"`.

## Example

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/module_naming_convention.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ All modules should be named according to the regular expression provided.
## Options

- `regex :: string()`.
- default: `"^([a-z][a-z0-9]*_?)*(_SUITE)?$"`.
- default: `"^[a-z](_?[a-z0-9]+)*(_SUITE)?$"`.

## Example

Expand Down
3 changes: 2 additions & 1 deletion doc_rules/elvis_style/no_debug_call.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Don't leave debugging function calls such as `io:format` or `ct:pal` in your sou
## Options

- `debug_functions :: [{module(), function(), arity()} | {module(), function()}]`.
- default: `[{ct, pal}, {ct, print}, {io, format, 1}, {io, format, 2}, {erlang, display, 1}]`
- default: `[{ct, pal}, {ct, print}, {io, format, 1}, {io, format, 2}, {erlang, display, 1},
{io, put_chars, 1}, {io, put_chars, 2}]`
(`{erlang, display, 1}` is only included since
[1.5.0](https://github.com/inaka/elvis_core/releases/tag/1.5.0)).

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/no_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ can be any string.
## Options

- `rules :: [{right | left, string()}].`
- default: `[{right, "("}, {left, ")"}, {left, ","}]`
- default: `[{right, "("}, {left, ")"}, {left, ","}, {right, "#"}, {right, "?"}]`

## Example

Expand Down
3 changes: 2 additions & 1 deletion doc_rules/elvis_style/operator_spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ operator can be any string.
{right, "/="}, {left, "/="}, {right, "=/="}, {left, "=/="}, {right, "--"}, {left, "--"},
{right, "=>"}, {left, "=>"}, {right, ":="}, {left, ":="}, {right, "<-"}, {left, "<-"},
{right, "<="}, {left, "<="}, {right, "||"}, {left, "||"}, {right, "|"}, {left, "|"},
{right, "::"}, {left, "::"}, {right, "->"}, {left, "->"}, {right, ","}]
{right, "::"}, {left, "::"}, {right, "->"}, {left, "->"}, {right, ","}, {left, "!"},
{right, "!"}]
```

## Example
Expand Down

0 comments on commit 6ceddad

Please sign in to comment.