You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason we don't use GroovyShell now is stated at #48 (comment):
I am impossible to change the working directory of the invoker. There are many relative path used in the script, and we would have problems when invoking it outside its parent folder. Even in CLI, we are not able to run it outside.
Taken from #48 (comment)
We are now using CLI way to invoke
diff.groovy
and it is better to do this by a Groovy invoker library, likeGroovyShell
.An example of
GroovyShell
: https://github.com/Luolc/regression-tool/blob/dd02aa9019a7c02bafb028dcf7ec85e635256aa2/src/main/java/com/github/checkstyle/regression/report/ReportGenerator.java#L49.More information about invoking Groovy script: http://groovy-lang.org/integrating.html
The reason we don't use
GroovyShell
now is stated at #48 (comment):Example of relative path in
diff.groovy
: https://github.com/checkstyle/contribution/blob/master/checkstyle-tester/diff.groovy#L183The way to get the path of the script: https://stackoverflow.com/questions/1163093/how-do-you-get-the-path-of-the-running-script-in-groovy?answertab=votes#tab-top
We need to update
diff.groovy
if we want to useGroovyShell
way.The text was updated successfully, but these errors were encountered: