Skip to content

Commit

Permalink
A few minor tweaks around doc. rules (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira authored Oct 2, 2024
1 parent d1f2eaf commit 5732971
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 19 deletions.
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/always_shortcircuit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Use short-circuiting operators instead of the regular ones.

> Works on `.beam` file? Yes.
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/behaviour_spelling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Use a consistent spelling for behaviour attributes in modules.

> Works on `.beam` file? Yes.
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/consistent_generic_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Use `term()` or `any()` consistently for types in specs.

> Works on `.beam` file? Yes.
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/export_used_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Exporting a function without exporting the types it depends on can result in
reimplementing the types in every module that uses those functions. To avoid
this, when a function is exported, its types should be too.

> "Works on `.beam` file? Yes!"
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/god_modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There shouldn't be any modules that export a number of functions greater than th
## Options

- `limit :: non_neg_integer().`
- `limit :: non_neg_integer()`
- default: `25`

## Example
Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/nesting_level.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ There shouldn't be any nested expressions that exceed the specified level.
## Options

- `level :: pos_integer().`
- `level :: pos_integer()`
- default: `4` (prior to [0.7.0](https://github.com/inaka/elvis_core/releases/tag/0.7.0) was `3`)

## Example
Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/no_behavior_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Don't use attributes `behavior_info` or `behaviour_info`; use `callback` instead.

> Works on `.beam` file? No.
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/no_block_expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Block expressions should be avoided.

> Works on `.beam` file? Yes.
> Works on `.beam` file? Yes!
## Options

Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/no_dollar_space.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Do not use <code>&&nbsp;</code>, use `$\s` instead.

> Works on `.beam` file? No.
> Works on `.beam` file? Not really! (it consumes results Ok, but these might be unexpected)
## Options

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 @@ -9,7 +9,7 @@ can be any string.
## Options

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

## Example
Expand Down
3 changes: 2 additions & 1 deletion doc_rules/elvis_style/numeric_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ By default, all numbers are valid. The goal of the rule is to allow developers t
presence of numbers like `1_23_456_7890` and require them to be written either as `1_234_567_890` or
`1234567890`, instead.

> Works on `.beam` file? No. (numbers there are just numbers; they can't be formatted)
> Works on `.beam` file? Not really! (it consumes results Ok, but these might be unexpected, since
numbers there are just numbers; they can't be formatted)

## Options

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

- `rules :: [{right | left, string()}].`
- `rules :: [{right | left, string()}]`
- default:
- before [1.5.0](https://github.com/inaka/elvis_core/releases/tag/1.5.0): `[{right, ","},
{right, "++"}, {left, "++"}]`
Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_style/private_data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ for defining their own internal data types. If these are needed outside the
modules, they should be made
[opaque](https://www.erlang.org/doc/reference_manual/opaques.html).

> "Works on `.beam` file? Yes!"
> Works on `.beam` file? Yes!
## Options

Expand Down
6 changes: 3 additions & 3 deletions doc_rules/elvis_text_style/line_length.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

No line should be longer than a given limit. Comments can be skipped.

> Works on `.beam` file? No!
> Works on `.beam` file? No.
## Options

- `limit :: pos_integer().`
- `limit :: pos_integer()`
- default: `100`
- `skip_comments :: false | any | whole_line.`
- `skip_comments :: false | any | whole_line`
- default: `false`, means _emit a warning for every line that goes over `Limit`_
- `any` means _don't emit a warning if the part of the line that goes over `Limit` belongs to a
comment_
Expand Down
5 changes: 3 additions & 2 deletions doc_rules/elvis_text_style/no_trailing_whitespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

There should be no lines that end with whitespace characters.

> Works on `.beam` file? No.
> Works on `.beam` file? Not really! (it consumes results Ok, but these might be unexpected, since
there's no notion of "whitespace" in BEAM files)

## Options

- `ignore_empty_lines :: boolean().`
- `ignore_empty_lines :: boolean()`
- default: `false`

## Example
Expand Down
2 changes: 1 addition & 1 deletion doc_rules/elvis_text_style/prefer_unquoted_atoms.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Do not use quotes on atoms that don't need to be quoted.

> Works on `.beam` file? No.
> Works on `.beam` file? Not really! (it consumes results Ok, but these might be unexpected)
## Options

Expand Down

0 comments on commit 5732971

Please sign in to comment.