You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2020/09/14 20:48:06 UTC

[GitHub] [incubator-daffodil] stevedlawrence commented on a change in pull request #418: Add warnings for properties which look like expressions

stevedlawrence commented on a change in pull request #418:
URL: https://github.com/apache/incubator-daffodil/pull/418#discussion_r488210588



##########
File path: daffodil-lib/src/main/scala/org/apache/daffodil/schema/annotation/props/PropertyScoping.scala
##########
@@ -131,6 +138,22 @@ trait FindPropertyMixin extends PropTypes {
           lr
         }
       }
+    /* if this looks like it could be an epression, issue a warning */
+    /* only if isForExpression is false*/
+    /* for runtime mixins, need to supply true, other places, no change*/
+    if( ! isForExpression ) {
+      propRes match{ 
+        case Found( v, _, _, _ ) => {
+
+          if( v.startsWith( "{")) {
+            SDW( WarnID.NonExpressionPropertyValueLooksLikeExpression, "Property %s that looks like an expression cannot be an expression: %s", pname, v )

Review comment:
       I'm definitely in favor of enabling scalariform. [DAFFODIL-2133](https://issues.apache.org/jira/browse/DAFFODIL-2133) is the issue for that. I'd like to enable the check on pull requests so it fails an PR's that don't follow the Daffodil style guidelines. The problem is I'm sure a lot of our code doesn't currently match the style guides, so we'd need to fix that first. Probably not a small task.




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

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