Skip to content

Commit

Permalink
Add a list of quantifiers to the README
Browse files Browse the repository at this point in the history
  • Loading branch information
Serchinastico committed Dec 20, 2018
1 parent 3bb9e74 commit 6424e10
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,17 @@ fun noMoreThanOneGsonInstance() = detector(
file { callExpression(moreThan(1)) { suchThat { it.isGsonConstructor } } }
)
)
```

The list of available quantifiers is:

```kotlin
val any // The default quantifier, if a rule matches any number of times then it's reported
val all // It should appear in every single appearance of the node
fun times(times: Int) // Match the rule an exact number of "times"
fun atMost(times: Int) // matches <= "times"
fun atLeast(times: Int) // matches >= "times"
fun lessThan(times: Int) // matches < "times"
fun moreThan(times: Int) // matches > "times"
val none // No matches
```

0 comments on commit 6424e10

Please sign in to comment.