There is a violation of SpaceAfterOpeningBrace at the line switch (request) {. It says the opening brace of the closure is not followed by a space or whitespace. The class looks like the following:
trait MyTrait {
String constructDateRange( Context context ) {
def request = context.request
switch ( request ) {
case DateRangeRequest -> constructReportDate( request.isoStartDate, request.isoStopDate, context.dateFormat )
case SingleDateRequest -> constructReportDate( request.isoReportDate, context.dateFormat )
default -> null
}
}
// ... constructReportDate methods
}
SpaceInsideParentheses is turned off.
JDK 17
Groovy 4.0.12
CodeNarc 3.2.0-groovy-4.0
Gradle 7.6
There is a violation of SpaceAfterOpeningBrace at the line
switch (request) {. It says the opening brace of the closure is not followed by a space or whitespace. The class looks like the following:SpaceInsideParentheses is turned off.
JDK 17
Groovy 4.0.12
CodeNarc 3.2.0-groovy-4.0
Gradle 7.6