Reputation: 1568
I have some cucumber stepDef steps which are more than more than 120 characters in length, I want to exclude all stepDef files from Scala style warning.
Is there a way to to exclude a specific files/directories, using xml tag only for FileLineLengthChecker
condition?
Upvotes: 1
Views: 1448
Reputation: 11
scalastyle must Paired use
// scalastyle:off line.size.limit
_FUNC_(str, regexp) - Searches a string for a regular expression and returns an integer that indicates the beginning position of the matched substring. Positions are 1-based, not 0-based. If no match is found, returns 0.
// scalastyle:on line.size.limit
Upvotes: 0
Reputation: 48400
Wrapping the entire file in the following comment filter in effect excludes the file from FileLineLengthChecker
rule:
// scalastyle:off line.size.limit
val foobar = 134
// scalastyle:on line.size.limit
line.size.limit
is the ID of FileLineLengthChecker
rule.
Multiple rules can be switched off simultaneously like so
// scalastyle:off line.size.limit
// scalastyle:off line.contains.tab
// ...
Upvotes: 2