Skip to content

Commit

Permalink
Merge pull request #2032 from bjaglin/redundantsyntax-conf
Browse files Browse the repository at this point in the history
docs: show default configuration for RedundantSyntax
  • Loading branch information
bjaglin authored Aug 13, 2024
2 parents d33af59 + 101b701 commit c02ef92
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions docs/rules/RedundantSyntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,24 @@ title: RedundantSyntax

This rule removes redundant syntax.

## `final` keyword on an `object`
## Configuration

By default, this rule rewrites any syntax known as redundant.

```scala mdoc:passthrough
import scalafix.internal.rule._
import scalafix.website._
```

```scala mdoc:passthrough
println(
defaults("RedundantSyntax", flat(RedundantSyntaxConfig.default))
)
```

## Features

### `final` keyword on an `object`

```diff
- final object foo
Expand All @@ -16,7 +33,7 @@ This rule removes redundant syntax.
Note: in Scala 2.12 and earlier removing the `final` modifier will slightly change the resulting bytecode -
see [this bug ticket](https://github.com/scala/bug/issues/11094) for further information.

## String interpolators
### String interpolators

`RedundantSyntax` removes unnecessary [string interpolators](https://docs.scala-lang.org/overviews/core/string-interpolation.html).
Only out-of-the-box interpolators (`s`, `f` and `raw`) are supported.
Expand Down

0 comments on commit c02ef92

Please sign in to comment.