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


##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -1775,8 +1826,13 @@ object VerifyTestCase {
         expectedDiag.messages.foreach { expectedMsg =>
           {
             val wasFound = actualDiags.exists { actualDiag =>
+              val actualDiagMsg = if 
(avoidFalsePositiveMatchesWithLocationInfo) {
+                stripLocationInformation(actualDiag.getMessage())

Review Comment:
   Sorry for the delayed comment, I was on vacation.
   
   I wonder if having to strip out location information suggests we need 
improvements to the diagnostics API? Maybe we need a way for a user to get just 
the diagnostic message with other things like diagnostic level (e.g. 
warn/error) or location information not included?
   
   This would probably be useful for things like the VS Code debugger. E.g. it 
could use an icon instead of text for error vs warning. And it could show 
location information in some easier to use GUI way.
   
   Maybe `Diagnostic.toString()` wants to return what it currently does, but 
`Diagnostic.getMessage()` wants to return only the actual message and not the 
other stuff?
   
   Should we open a new issue for that enhancement or something similar?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to