我有一些黄瓜stepDef步骤,长度超过120个字符,我想从Scala风格警告中排除所有stepDef文件。
有没有一种方法可以排除特定的文件/目录,仅使用 xml 标签来满足
FileLineLengthChecker
条件?
将整个文件包含在以下注释过滤器中实际上会将该文件从
FileLineLengthChecker
规则中排除:
// scalastyle:off line.size.limit
val foobar = 134
// scalastyle:on line.size.limit
line.size.limit
是 FileLineLengthChecker
规则的 ID。
可以像这样同时关闭多个规则
// scalastyle:off line.size.limit
// scalastyle:off line.contains.tab
// ...
scalastyle必须配对使用
// 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