puppetlabs / puppetlabs/puppet-strings

spec markdown lint tests fail with mdl >= 0.12

Open
#386 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
90
Forks
90
PR merge metrics
No merged PRs in 30d

Description

Describe the Bug

When using mdl >= 0.12, the spec tests in spec/unit/puppet-strings/markdown_spec.rb fail as follows:

Failures:                                                                                                                                             
                                                                                                                                                      
  1) PuppetStrings::Markdown rendering fixtures does not generate markdown lint errors from the rendered markdown                                     
     Failure/Error: expect(output).to have_no_markdown_lint_errors                                                                                    
       expected that "# Reference\n\n<!-- DO NOT EDIT: This document was generated by Puppet Strings -->"... would have no markdown lint errors but go
t 593: MD012 Multiple consecutive blank lines:                                                                                                        
     Shared Example Group: "markdown lint checker" called from ./spec/unit/puppet-strings/markdown_spec.rb:56                                         
     # ./spec/unit/puppet-strings/markdown_spec.rb:48:in `block (4 levels) in <top (required)>'                                                       
                                                                                                                                                      
  2) PuppetStrings::Markdown rendering fixtures with Puppet Plans does not generate markdown lint errors from the rendered markdown                   
     Failure/Error: expect(output).to have_no_markdown_lint_errors                                                                                    
       expected that "# Reference\n\n<!-- DO NOT EDIT: This document was generated by Puppet Strings -->"... would have no markdown lint errors but go
t 631: MD012 Multiple consecutive blank lines:                                                                                                        
     Shared Example Group: "markdown lint checker" called from ./spec/unit/puppet-strings/markdown_spec.rb:105                                        
     # ./spec/unit/puppet-strings/markdown_spec.rb:48:in `block (4 levels) in <top (required)>'                                                       
                                                                                                                                                      
  3) PuppetStrings::Markdown rendering fixtures with Puppet Data Types does not generate markdown lint errors from the rendered markdown
     Failure/Error: expect(output).to have_no_markdown_lint_errors      
       expected that "# Reference\n\n<!-- DO NOT EDIT: This document was generated by Puppet Strings -->"... would have no markdown lint errors but go
t 669: MD012 Multiple consecutive blank lines: 
     Shared Example Group: "markdown lint checker" called from ./spec/unit/puppet-strings/markdown_spec.rb:119
     # ./spec/unit/puppet-strings/markdown_spec.rb:48:in `block (4 levels) in <top (required)>'

This is due to mdl changing the default indentation from 2 spaces to 3 spaces for the rule MD007. See https://github.com/markdownlint/markdownlint/commit/67f8312aae3390df77f82c8054560bc0e8e27169

Expected Behavior

The rspec tests should pass.

Steps to Reproduce

  1. Clone puppet-strings 4.2.1
  2. Update the Gemfile temporarily to install mdl 0.12 or newer
  3. Update installed gems in bundle
  4. Use bundle to run the spec tests

Environment

  • Version: 4.2.1
  • OS: Debian sid

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the temporary mdl version change in the Gemfile and the failing examples in spec/unit/puppet-strings/markdown_spec.rb. Run the markdown rendering specs with mdl 0.12 or newer, then verify that the rendered fixtures produce no lint errors and the RSpec tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.