Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
a-khakimov committed Dec 20, 2023
1 parent 0515710 commit 36f5e0c
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ error: [NoGeneralException] Exception is not allowed
*/
```

#### Configuration

- `NoGeneralException.forbidden` - list of forbidden exception types (default `Exception` and `Throwable`)

---

### NoOptionGet

This rule prohibits the use of the `get` method on `Option` to avoid a `NoSuchElementException`.

```scala
val value = myOption.get
/*
[error] ... error: [NoOptionGet] Option.get is not allowed
[error] val value = myOption.get
[error] ^^^^^^^^^^^^
*/
```

---

### NoHead
Expand Down Expand Up @@ -55,21 +74,6 @@ map(1)

---

### NoOptionGet

This rule prohibits the use of the `get` method on `Option` to avoid a `NoSuchElementException`.

```scala
val value = myOption.get
/*
[error] ... error: [NoOptionGet] Option.get is not allowed
[error] val value = myOption.get
[error] ^^^^^^^^^^^^
*/
```

---

### NoUnnamedArgs

This rule requires specifying arguments names when calling a function. It makes the code more readable.
Expand Down

0 comments on commit 36f5e0c

Please sign in to comment.