You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "mike-mcgann (via GitHub)" <gi...@apache.org> on 2023/03/03 15:14:39 UTC

[GitHub] [daffodil] mike-mcgann commented on a diff in pull request #977: Add WarnID to Schema Definition Warning messages

mike-mcgann commented on code in PR #977:
URL: https://github.com/apache/daffodil/pull/977#discussion_r1124596041


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/dsom/SDE.scala:
##########
@@ -120,10 +121,19 @@ class SchemaDefinitionWarning(
   ) {
 
   def this(sc: SchemaFileLocation, kind: String, args: Any*) =
-    this(Some(sc), None, kind, args: _*)
+    this(None, Some(sc), None, kind, args: _*)
 
   override def isError = false
   def modeName = "Schema Definition"
+
+  override def toString = warnID match {
+    case Some(id) =>
+      super.toString + "\n" +
+        s"To suppress this warning, add '${id}' to the " +
+        "daf:suppressSchemaDefinitionWarnings element of a Daffodil defineConfig " +
+        "used when processing"

Review Comment:
   I implemented the second suggestion. It seemed too difficult to add the identifier inline. 



-- 
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: commits-unsubscribe@daffodil.apache.org

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