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

[GitHub] [daffodil] mbeckerle commented on a diff in pull request #1053: Restrict what TDML Runner Searches

mbeckerle commented on code in PR #1053:
URL: https://github.com/apache/daffodil/pull/1053#discussion_r1263873378


##########
daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd:
##########
@@ -184,6 +184,7 @@
     <attribute name="unsupported" type="xs:boolean" use="optional" default="false"/>
     <attribute name="validation" type="tns:validationType" use="optional"/>
     <attribute name="implementations" type="tns:implementationsType" use="optional"/>
+    <attribute name="diagnosticsStripLocationInfo" type="xs:boolean" use="optional" default="true"/>

Review Comment:
   We need to start putting documentation into this XSD. 
   
   Please add an annotation documentation element to this attribute declaration explaining what diagnosticsStripLocationInfo has as its purpose. Not what it does, but why it does it, which is the point about avoiding false positive matches.  See another comment for the points to make. Also explain that only a few TDML tests that actually care about the specific location info will need the non-default value for this attribute. 



##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -1745,10 +1779,11 @@ object VerifyTestCase {
     actualDiags: Seq[Diagnostic],
     expectedDiags: Option[ErrorWarningBase],
     implString: Option[String],
+    diagnosticStripFileInfo: Boolean = true,

Review Comment:
   Add scaladoc that explains the diagnosticStripFileInfo that the point of stripping the file info from the diagnostics is to prevent false positive matches against  the test case's error and warning strings coming from file/dir names. 
   
   But there are tests that look for correct file/dir names, so some tests need to NOT strip them. 
   
   And of course this is only for purposes of comparing error/warning strings to the diagnostic messages. Users would always see, displayed, the full diagnostic messages. 



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