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

puppet parser validate should be configurable to fail on warnings

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Compiler, Language
    • Labels:
      None
    • Template:
    • QA Risk Assessment:
      Needs Assessment

      Description

      Puppet Version: 6.0.10
      Puppet Server Version: 6.0.5
      OS Name/Version: RHEL 7.7 and Windows 10

      We use the "puppet parser validate" command to automatically check all manifests before git check-in for correct syntax.

      Lately I see a lot of errors in our puppetserver logs because code with bad escaped double quoted strings has been checked in:

      Puppet Unrecognized escape sequence '\1' (...)

      The "Puppet Unrecognized escape sequence" is only a warning and does not make the validator fail.

      Desired Behavior:

      I would like to be able to configure the validator to return an error code when the validations throws warnings. That way I can refuse the check-in of code that throws parser warnings.

      Actual Behavior:

      The parser prints the warning but the command exits with an exit code of zero to signal that the syntax of the manifest file is fine.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            Raskil Benjamin Fischer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Zendesk Support