Skip to content

Commit

Permalink
omit () for dsl methods (ShiftLeftSecurity#1109)
Browse files Browse the repository at this point in the history
violation of the general rule 'use parens if it has side effects' is
overriden by 'beautify your dsl' rule
  • Loading branch information
mpollmeier authored Feb 5, 2021
1 parent f286e2a commit 1db0ac6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Steps[A](val traversal: Traversal[A]) extends AnyVal {
/**
Shorthand for `toBuffer`
*/
def b(): mutable.Buffer[A] = toBuffer()
def b: mutable.Buffer[A] = toBuffer()

/**
Alias for `toList`
Expand All @@ -43,13 +43,13 @@ class Steps[A](val traversal: Traversal[A]) extends AnyVal {
/**
Alias for `toStream`
*/
def s(): LazyList[A] = toStream()
def s: LazyList[A] = toStream()

/**
Execute the traversal and convert it into a Java list (as opposed
to the Scala list obtained via `toList`)
*/
def jl(): JList[A] = b().asJava
def jl: JList[A] = b.asJava

/**
* Print help/documentation based on the current elementType `A`.
Expand Down

0 comments on commit 1db0ac6

Please sign in to comment.