Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-443

EOL config in generated .gitattributes file leads to Ruby validation fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDK 1.0.0
    • Fix Version/s: PDK 1.1.0
    • Component/s: None
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      The module template now configures ruby style checking with rubocop to match end-of-line behaviour with the recommended gitattribute configuration, always requiring LF line ends.
    • QA Risk Assessment:
      Needs Assessment

      Description

      Reported through Github: https://github.com/puppetlabs/pdk/issues/267

      When generating a module via pdk it creates a .gitattributes with the following contents.

      *.rb eol=lf
      *.erb eol=lf
      *.pp eol=lf
      *.sh eol=lf

      But when attempting to use the inbuilt validation on a repo thats been pushed through git at least once (pdk validate ruby -a) it fails complaining the Carriage Return is missing as the files have been made LF instead of CRLF.

      PS C:\cygwin64\git\Puppet4Work\pdktest> pdk validate ruby -a
      [X] Checking Ruby code style (/.rb)
      convention: rubocop: spec/spec_helper.rb:1:1: Carriage return character missing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bryan.jen Bryan Jen
                Reporter:
                james.stocks James Stocks
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support