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

puppet parser validate should be configurable to fail on warnings

    XMLWordPrintable

Details

    • Improvement
    • Status: Accepted
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • Compiler, Language
    • None
    • 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

            Unassigned Unassigned
            Raskil Benjamin Fischer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support