{"action":"created","comment":{"url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/comments/24156525","id":24156525,"diff_hunk":"@@ -10,50 +10,85 @@\n \n   it 'should return nothing from a valid file' do\n     files = fixture_manifests('pass.pp')\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n \n-    expect(res).to eq([])\n+    expect(output).to eq([])\n+    expect(has_errors).to eq(false)\n   end\n \n   it 'should return an error from an invalid file' do\n     files = fixture_manifests('fail_error.pp')\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n \n-    expect(res.size).to eq(1)\n-    expect(res[0]).to match(/Syntax error at .*:3$/)\n+    expect(output.size).to eq(1)\n+    expect(output[0]).to match(/Syntax error at .*:3$/)\n+    expect(has_errors).to eq(true)\n   end\n \n   it 'should return a warning from an invalid file' do\n     files = fixture_manifests('fail_warning.pp')\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n \n-    expect(res.size).to eq(2)\n-    expect(res[0]).to match(/Unrecognised escape sequence '\\\\\\[' .* at line 3$/)\n-    expect(res[1]).to match(/Unrecognised escape sequence '\\\\\\]' .* at line 3$/)\n+    expect(output.size).to eq(2)\n+    expect(output[0]).to match(/Unrecognised escape sequence '\\\\\\[' .* at line 3$/)\n+    expect(output[1]).to match(/Unrecognised escape sequence '\\\\\\]' .* at line 3$/)\n+    expect(has_errors).to eq(true)\n   end\n \n   it 'should ignore warnings about storeconfigs' do\n     files = fixture_manifests('pass_storeconfigs.pp')\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n+\n+    expect(output).to eq([])\n+    expect(has_errors).to eq(false)\n \n-    expect(res).to eq([])\n   end\n \n   it 'should read more than one valid file' do\n     files = fixture_manifests(['pass.pp', 'pass_storeconfigs.pp'])\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n \n-    expect(res).to eq([])\n+    expect(output).to eq([])\n+    expect(has_errors).to eq(false)\n   end\n \n   it 'should continue after finding an error in the first file' do\n     files = fixture_manifests(['fail_error.pp', 'fail_warning.pp'])\n-    res = subject.check(files)\n+    output, has_errors = subject.check(files)\n+\n+    expect(output.size).to eq(3)\n+    expect(output[0]).to match(/Syntax error at '\\}' .*:3$/)\n+    expect(output[1]).to match(/Unrecognised escape sequence '\\\\\\[' .* at line 3$/)\n+    expect(output[2]).to match(/Unrecognised escape sequence '\\\\\\]' .* at line 3$/)\n+    expect(has_errors).to eq(true)\n+  end\n \n-    expect(res.size).to eq(3)\n-    expect(res[0]).to match(/Syntax error at '\\}' .*:3$/)\n-    expect(res[1]).to match(/Unrecognised escape sequence '\\\\\\[' .* at line 3$/)\n-    expect(res[2]).to match(/Unrecognised escape sequence '\\\\\\]' .* at line 3$/)\n+  describe 'deprecation notices' do\n+    # These tests should fail in Puppet 4, but we need to wait for the release\n+    # before we'll know exactly how to test it.\n+    if Puppet::Util::Package.versioncmp(Puppet.version, '3.7') >= 0\n+      context 'on puppet >= 3.7' do\n+        it 'should return deprecation notices as warnings' do\n+          files = fixture_manifests('deprecation_notice.pp')\n+          output, has_errors = subject.check(files)\n+\n+          expect(has_errors).to eq(false)\n+          expect(output.size).to eq(2)\n+          expect(output[0]).to match(/The use of 'import' is deprecated/)\n+          expect(output[1]).to match(/Deprecation notice:/)\n+        end\n+      end\n+    elsif Puppet::Util::Package.versioncmp(Puppet.version, '3.5') < 0","path":"spec/puppet-syntax/manifests_spec.rb","position":90,"original_position":90,"commit_id":"5f580d48168c570c95218e142e587a9e45efcea5","original_commit_id":"5f580d48168c570c95218e142e587a9e45efcea5","user":{"login":"mattbostock","id":4348848,"avatar_url":"https://avatars.githubusercontent.com/u/4348848?v=3","gravatar_id":"","url":"https://api.github.com/users/mattbostock","html_url":"https://github.com/mattbostock","followers_url":"https://api.github.com/users/mattbostock/followers","following_url":"https://api.github.com/users/mattbostock/following{/other_user}","gists_url":"https://api.github.com/users/mattbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbostock/subscriptions","organizations_url":"https://api.github.com/users/mattbostock/orgs","repos_url":"https://api.github.com/users/mattbostock/repos","events_url":"https://api.github.com/users/mattbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mattbostock/received_events","type":"User","site_admin":false},"body":"The tests here don't included Puppet 3.6; can you please expand these tests or add new tests to verify that behaviour?","created_at":"2015-02-05T11:11:19Z","updated_at":"2015-02-05T11:11:19Z","html_url":"https://github.com/gds-operations/puppet-syntax/pull/28#discussion_r24156525","pull_request_url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/comments/24156525"},"html":{"href":"https://github.com/gds-operations/puppet-syntax/pull/28#discussion_r24156525"},"pull_request":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28","id":25676568,"html_url":"https://github.com/gds-operations/puppet-syntax/pull/28","diff_url":"https://github.com/gds-operations/puppet-syntax/pull/28.diff","patch_url":"https://github.com/gds-operations/puppet-syntax/pull/28.patch","issue_url":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/28","number":28,"state":"open","locked":false,"title":"Print, but don't fail on deprecation notice","user":{"login":"pcfens","id":580770,"avatar_url":"https://avatars.githubusercontent.com/u/580770?v=3","gravatar_id":"","url":"https://api.github.com/users/pcfens","html_url":"https://github.com/pcfens","followers_url":"https://api.github.com/users/pcfens/followers","following_url":"https://api.github.com/users/pcfens/following{/other_user}","gists_url":"https://api.github.com/users/pcfens/gists{/gist_id}","starred_url":"https://api.github.com/users/pcfens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcfens/subscriptions","organizations_url":"https://api.github.com/users/pcfens/orgs","repos_url":"https://api.github.com/users/pcfens/repos","events_url":"https://api.github.com/users/pcfens/events{/privacy}","received_events_url":"https://api.github.com/users/pcfens/received_events","type":"User","site_admin":false},"body":"A simple change so that deprecation notices are printed, but don't cause test failures. A possible fix for issue #27.","created_at":"2014-12-08T16:12:44Z","updated_at":"2015-02-05T11:11:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74e006386997c8d994e3a920cb2ffc3ce0b79cc4","assignee":{"login":"mattbostock","id":4348848,"avatar_url":"https://avatars.githubusercontent.com/u/4348848?v=3","gravatar_id":"","url":"https://api.github.com/users/mattbostock","html_url":"https://github.com/mattbostock","followers_url":"https://api.github.com/users/mattbostock/followers","following_url":"https://api.github.com/users/mattbostock/following{/other_user}","gists_url":"https://api.github.com/users/mattbostock/gists{/gist_id}","starred_url":"https://api.github.com/users/mattbostock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattbostock/subscriptions","organizations_url":"https://api.github.com/users/mattbostock/orgs","repos_url":"https://api.github.com/users/mattbostock/repos","events_url":"https://api.github.com/users/mattbostock/events{/privacy}","received_events_url":"https://api.github.com/users/mattbostock/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28/commits","review_comments_url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28/comments","review_comment_url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/comments/{number}","comments_url":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/28/comments","statuses_url":"https://api.github.com/repos/gds-operations/puppet-syntax/statuses/5f580d48168c570c95218e142e587a9e45efcea5","head":{"label":"pcfens:no_fail_on_deprecation","ref":"no_fail_on_deprecation","sha":"5f580d48168c570c95218e142e587a9e45efcea5","user":{"login":"pcfens","id":580770,"avatar_url":"https://avatars.githubusercontent.com/u/580770?v=3","gravatar_id":"","url":"https://api.github.com/users/pcfens","html_url":"https://github.com/pcfens","followers_url":"https://api.github.com/users/pcfens/followers","following_url":"https://api.github.com/users/pcfens/following{/other_user}","gists_url":"https://api.github.com/users/pcfens/gists{/gist_id}","starred_url":"https://api.github.com/users/pcfens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcfens/subscriptions","organizations_url":"https://api.github.com/users/pcfens/orgs","repos_url":"https://api.github.com/users/pcfens/repos","events_url":"https://api.github.com/users/pcfens/events{/privacy}","received_events_url":"https://api.github.com/users/pcfens/received_events","type":"User","site_admin":false},"repo":{"id":27606131,"name":"puppet-syntax","full_name":"pcfens/puppet-syntax","owner":{"login":"pcfens","id":580770,"avatar_url":"https://avatars.githubusercontent.com/u/580770?v=3","gravatar_id":"","url":"https://api.github.com/users/pcfens","html_url":"https://github.com/pcfens","followers_url":"https://api.github.com/users/pcfens/followers","following_url":"https://api.github.com/users/pcfens/following{/other_user}","gists_url":"https://api.github.com/users/pcfens/gists{/gist_id}","starred_url":"https://api.github.com/users/pcfens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcfens/subscriptions","organizations_url":"https://api.github.com/users/pcfens/orgs","repos_url":"https://api.github.com/users/pcfens/repos","events_url":"https://api.github.com/users/pcfens/events{/privacy}","received_events_url":"https://api.github.com/users/pcfens/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pcfens/puppet-syntax","description":"Syntax checks for Puppet manifests and templates","fork":true,"url":"https://api.github.com/repos/pcfens/puppet-syntax","forks_url":"https://api.github.com/repos/pcfens/puppet-syntax/forks","keys_url":"https://api.github.com/repos/pcfens/puppet-syntax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcfens/puppet-syntax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcfens/puppet-syntax/teams","hooks_url":"https://api.github.com/repos/pcfens/puppet-syntax/hooks","issue_events_url":"https://api.github.com/repos/pcfens/puppet-syntax/issues/events{/number}","events_url":"https://api.github.com/repos/pcfens/puppet-syntax/events","assignees_url":"https://api.github.com/repos/pcfens/puppet-syntax/assignees{/user}","branches_url":"https://api.github.com/repos/pcfens/puppet-syntax/branches{/branch}","tags_url":"https://api.github.com/repos/pcfens/puppet-syntax/tags","blobs_url":"https://api.github.com/repos/pcfens/puppet-syntax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcfens/puppet-syntax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcfens/puppet-syntax/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcfens/puppet-syntax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcfens/puppet-syntax/statuses/{sha}","languages_url":"https://api.github.com/repos/pcfens/puppet-syntax/languages","stargazers_url":"https://api.github.com/repos/pcfens/puppet-syntax/stargazers","contributors_url":"https://api.github.com/repos/pcfens/puppet-syntax/contributors","subscribers_url":"https://api.github.com/repos/pcfens/puppet-syntax/subscribers","subscription_url":"https://api.github.com/repos/pcfens/puppet-syntax/subscription","commits_url":"https://api.github.com/repos/pcfens/puppet-syntax/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcfens/puppet-syntax/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcfens/puppet-syntax/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcfens/puppet-syntax/issues/comments/{number}","contents_url":"https://api.github.com/repos/pcfens/puppet-syntax/contents/{+path}","compare_url":"https://api.github.com/repos/pcfens/puppet-syntax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcfens/puppet-syntax/merges","archive_url":"https://api.github.com/repos/pcfens/puppet-syntax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcfens/puppet-syntax/downloads","issues_url":"https://api.github.com/repos/pcfens/puppet-syntax/issues{/number}","pulls_url":"https://api.github.com/repos/pcfens/puppet-syntax/pulls{/number}","milestones_url":"https://api.github.com/repos/pcfens/puppet-syntax/milestones{/number}","notifications_url":"https://api.github.com/repos/pcfens/puppet-syntax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcfens/puppet-syntax/labels{/name}","releases_url":"https://api.github.com/repos/pcfens/puppet-syntax/releases{/id}","created_at":"2014-12-05T19:14:01Z","updated_at":"2014-12-18T14:30:08Z","pushed_at":"2015-01-08T15:06:19Z","git_url":"git://github.com/pcfens/puppet-syntax.git","ssh_url":"git@github.com:pcfens/puppet-syntax.git","clone_url":"https://github.com/pcfens/puppet-syntax.git","svn_url":"https://github.com/pcfens/puppet-syntax","homepage":null,"size":222,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gds-operations:master","ref":"master","sha":"38e7e057a055d63fdfd2b9939176c0dc4137c113","user":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?v=3","gravatar_id":"","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"repo":{"id":10603074,"name":"puppet-syntax","full_name":"gds-operations/puppet-syntax","owner":{"login":"gds-operations","id":4703760,"avatar_url":"https://avatars.githubusercontent.com/u/4703760?v=3","gravatar_id":"","url":"https://api.github.com/users/gds-operations","html_url":"https://github.com/gds-operations","followers_url":"https://api.github.com/users/gds-operations/followers","following_url":"https://api.github.com/users/gds-operations/following{/other_user}","gists_url":"https://api.github.com/users/gds-operations/gists{/gist_id}","starred_url":"https://api.github.com/users/gds-operations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gds-operations/subscriptions","organizations_url":"https://api.github.com/users/gds-operations/orgs","repos_url":"https://api.github.com/users/gds-operations/repos","events_url":"https://api.github.com/users/gds-operations/events{/privacy}","received_events_url":"https://api.github.com/users/gds-operations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gds-operations/puppet-syntax","description":"Syntax checks for Puppet manifests and templates","fork":false,"url":"https://api.github.com/repos/gds-operations/puppet-syntax","forks_url":"https://api.github.com/repos/gds-operations/puppet-syntax/forks","keys_url":"https://api.github.com/repos/gds-operations/puppet-syntax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gds-operations/puppet-syntax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gds-operations/puppet-syntax/teams","hooks_url":"https://api.github.com/repos/gds-operations/puppet-syntax/hooks","issue_events_url":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/events{/number}","events_url":"https://api.github.com/repos/gds-operations/puppet-syntax/events","assignees_url":"https://api.github.com/repos/gds-operations/puppet-syntax/assignees{/user}","branches_url":"https://api.github.com/repos/gds-operations/puppet-syntax/branches{/branch}","tags_url":"https://api.github.com/repos/gds-operations/puppet-syntax/tags","blobs_url":"https://api.github.com/repos/gds-operations/puppet-syntax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gds-operations/puppet-syntax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gds-operations/puppet-syntax/git/refs{/sha}","trees_url":"https://api.github.com/repos/gds-operations/puppet-syntax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gds-operations/puppet-syntax/statuses/{sha}","languages_url":"https://api.github.com/repos/gds-operations/puppet-syntax/languages","stargazers_url":"https://api.github.com/repos/gds-operations/puppet-syntax/stargazers","contributors_url":"https://api.github.com/repos/gds-operations/puppet-syntax/contributors","subscribers_url":"https://api.github.com/repos/gds-operations/puppet-syntax/subscribers","subscription_url":"https://api.github.com/repos/gds-operations/puppet-syntax/subscription","commits_url":"https://api.github.com/repos/gds-operations/puppet-syntax/commits{/sha}","git_commits_url":"https://api.github.com/repos/gds-operations/puppet-syntax/git/commits{/sha}","comments_url":"https://api.github.com/repos/gds-operations/puppet-syntax/comments{/number}","issue_comment_url":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/comments/{number}","contents_url":"https://api.github.com/repos/gds-operations/puppet-syntax/contents/{+path}","compare_url":"https://api.github.com/repos/gds-operations/puppet-syntax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gds-operations/puppet-syntax/merges","archive_url":"https://api.github.com/repos/gds-operations/puppet-syntax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gds-operations/puppet-syntax/downloads","issues_url":"https://api.github.com/repos/gds-operations/puppet-syntax/issues{/number}","pulls_url":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls{/number}","milestones_url":"https://api.github.com/repos/gds-operations/puppet-syntax/milestones{/number}","notifications_url":"https://api.github.com/repos/gds-operations/puppet-syntax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gds-operations/puppet-syntax/labels{/name}","releases_url":"https://api.github.com/repos/gds-operations/puppet-syntax/releases{/id}","created_at":"2013-06-10T15:17:51Z","updated_at":"2015-01-29T21:30:39Z","pushed_at":"2015-01-26T10:06:23Z","git_url":"git://github.com/gds-operations/puppet-syntax.git","ssh_url":"git@github.com:gds-operations/puppet-syntax.git","clone_url":"https://github.com/gds-operations/puppet-syntax.git","svn_url":"https://github.com/gds-operations/puppet-syntax","homepage":null,"size":641,"stargazers_count":37,"watchers_count":37,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":3,"forks":16,"open_issues":3,"watchers":37,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28"},"html":{"href":"https://github.com/gds-operations/puppet-syntax/pull/28"},"issue":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/28"},"comments":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/gds-operations/puppet-syntax/statuses/5f580d48168c570c95218e142e587a9e45efcea5"}}}}