dweiss commented on code in PR #992:
URL: https://github.com/apache/solr/pull/992#discussion_r960013840


##########
gradle/validation/rat-sources.gradle:
##########
@@ -274,8 +274,16 @@ class RatTask extends DefaultTask {
             }
         }
         if (errors) {
-            throw new GradleException("Found " + errors.size() + " file(s) 
with errors:\n" +
-                    errors.collect{ msg -> "  - ${msg}" }.join("\n"))
+            def checkProp = "validation.rat.failOnError"
+            def shouldFail = 
Boolean.valueOf(project.propertyOrDefault(checkProp, true))
+            def message = "Found " + errors.size() + " file(s) with errors: " +
+                    (shouldFail ? "(skip with -P${checkProp}=false)\n" : "\n") 
+
+                    errors.collect{ msg -> "  - ${msg}" }.join("\n")
+            if (shouldFail) {
+                throw new GradleException(message)
+            } else {
+                logger.lifecycle("NOTE: ${message}")

Review Comment:
   there's a logger.warning (or warn?) method you could use here instead. 
otherwise lgtm.



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to