bmarwell commented on a change in pull request #36: URL: https://github.com/apache/maven-checkstyle-plugin/pull/36#discussion_r563040248
########## File path: src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java ########## @@ -584,6 +584,20 @@ private Properties getOverridingProperties( CheckstyleExecutorRequest request ) } } + //${config_loc} for the origin dir of the configLocation, just like eclipsecs + // so we config such as `${config_loc}/checkstyle-suppressions.xml` + final String configLocation = request.getConfigLocation(); + final int idx = configLocation.lastIndexOf( '/' ); + final String configLoc; + if ( idx == -1 ) + { + configLoc = ""; + } + else + { + configLoc = configLocation.substring( 0, idx ); + } + p.setProperty( "config_loc", configLoc ); Review comment: Why set `config_loc` anyway if `idx == -1`? ########## File path: src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java ########## @@ -584,6 +584,20 @@ private Properties getOverridingProperties( CheckstyleExecutorRequest request ) } } + //${config_loc} for the origin dir of the configLocation, just like eclipsecs + // so we config such as `${config_loc}/checkstyle-suppressions.xml` + final String configLocation = request.getConfigLocation(); + final int idx = configLocation.lastIndexOf( '/' ); + final String configLoc; + if ( idx == -1 ) + { + configLoc = ""; + } + else + { + configLoc = configLocation.substring( 0, idx ); + } + p.setProperty( "config_loc", configLoc ); Review comment: Please add a test case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org