Skip to content

Commit e114e2c

Browse files
author
Roman Janusz
committed
updated analyzer doc
1 parent 2a98bf6 commit e114e2c

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

docs/Analyzer.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,31 @@ and [silencer](https://github.com/ghik/silencer) plugin for warning suppression.
1616

1717
Here's a list of currently supported rules:
1818

19-
| Name | Default level | Description |
20-
| --- | --- | --- |
21-
| `importJavaUtil` | warning | Rejects direct imports of `java.util` package. |
19+
| Name | Default level | Description |
20+
|----------------------------| --- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
21+
| `importJavaUtil` | warning | Rejects direct imports of `java.util` package. |
2222
| `valueEnumExhaustiveMatch` | warning | Enables (limited) exhaustive pattern match checking for [`ValueEnum`s](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/misc/ValueEnum.scala). |
23-
| `any2stringadd` | off | Disables `any2stringadd` (concatenating arbitrary values with strings using `+`). |
24-
| `bincompat` | warning | Enables [`@bincompat`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/bincompat.scala) checking |
25-
| `showAst` | error | Handles [`@showAst`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/showAst.scala). |
26-
| `findUsages` | warning | Issues a message for every occurrence of any of the symbols listed in the argument of this rule |
27-
| `varargsAtLeast` | warning | Enables [`@atLeast`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/atLeast.scala) checking |
28-
| `macroPrivate` | warning | Enables [`@macroPrivate`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/macroPrivate.scala) checking |
29-
| `explicitGenerics` | warning | Enables [`@explicitGenerics`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/explicitGenerics.scala) checking |
23+
| `any2stringadd` | off | Disables `any2stringadd` (concatenating arbitrary values with strings using `+`). |
24+
| `bincompat` | warning | Enables [`@bincompat`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/bincompat.scala) checking |
25+
| `showAst` | error | Handles [`@showAst`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/showAst.scala). |
26+
| `findUsages` | warning | Issues a message for every occurrence of any of the symbols listed in the argument of this rule |
27+
| `varargsAtLeast` | warning | Enables [`@atLeast`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/atLeast.scala) checking |
28+
| `macroPrivate` | warning | Enables [`@macroPrivate`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/macroPrivate.scala) checking |
29+
| `explicitGenerics` | warning | Enables [`@explicitGenerics`](https://github.com/AVSystem/scala-commons/blob/master/commons-core/src/main/scala/com/avsystem/commons/annotation/explicitGenerics.scala) checking |
30+
| `discardedMonixTask` | warning | Makes sure that expressions evaluating to Monix `Task`s are not accidentally discarded by conversion to `Unit` |
31+
| `throwableObjects` | warning | Makes sure that objects are never used as `Throwable`s (unless they have stack traces disabled) |
32+
| `constantDeclarations` | warning | Checks if constants are always declared as `final val`s with `UpperCamelCase` and no explicit type annotation for literal values |
3033

3134
Rules may be enabled and disabled in `build.sbt` with Scala compiler options:
3235

3336
```scala
3437
scalacOptions += "-P:AVSystemAnalyzer:<level><ruleName>,<level><ruleName>,..."
3538
```
39+
3640
`<name>` must be one of the rule names listed above or `_` to apply to all rules.
3741

3842
`<level>` may be one of:
43+
3944
* `-` to disable rule
4045
* `*` for "info" level
4146
* _empty_ for "warning" level

0 commit comments

Comments
 (0)