Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4124

Add migration check for "empty string is true"

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: PUP 3.8.0, PUP 4.1.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-04-01

      Description

      Add a method to the MigrationChecker API and implementation in the module created in PUP-4149 that reports that a given empty string evaluates to true as the result of a evaluating a given AST instruction.

      Add an issue called MIGRATE4_EMPTY_STRING_TRUE with the text "Empty string evaluated to true (3.x evaluates to false)".

      The runtime3_support method is_true? should be modified to take a semantic object o and all calls to is_true? should be modified to pass the semantic object resulting in the object being checked if it is true.

      The is_true? method should check if there is a MigrationChecker and if so call its report_empty_string_true(value, o) which reports the issue if it the value is a String and it is empty.

      We do it this way to have minimal clutter in the evaluation logic since all migration support will be reverted in 4.x. and the actual implementation is in the module created in PUP-4149.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                henrik.lindberg Henrik Lindberg
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support