{"action":"created","comment":{"url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/comments/121278195","pull_request_review_id":43316462,"id":121278195,"diff_hunk":"@@ -192,47 +129,41 @@ module.exports.checkFixture = function checkFixture(fixture, usedShortNames=[])\n       }\n \n       if ('capabilities' in channel) {\n-        for (let i=0; i<channel.capabilities.length; i++) {\n-          const cap = channel.capabilities[i];\n+        for (let i = 1; i <= channel.capabilities.length; i++) {\n+          const cap = channel.capabilities[i-1];\n \n+          // range valid / no overlapping\n           if (cap.range[1] >= dmxMaxBound) {\n             result.errors.push({\n               description: `range values must be strictly less than ${dmxMaxBound} in capability #${i} in channel '${ch}'.`,\n               error: null\n             });\n-            break;\n           }\n-\n-          if (cap.range[0] > cap.range[1]) {\n+          else if (cap.range[0] > cap.range[1]) {\n             result.errors.push({\n               description: `range invalid in capability #${i} in channel '${ch}'.`,\n               error: null\n             });\n-            break;\n           }\n-\n-          if (i > 0 && cap.range[0] <= channel.capabilities[i-1].range[1]) {\n+          else if (i > 1 && cap.range[0] <= channel.capabilities[i-2].range[1]) {\n             result.errors.push({\n               description: `ranges overlapping in capabilities #${i-1} and #${i} in channel '${ch}'.`,\n               error: null\n             });\n-            break;\n           }\n-\n-          if (i > 0 && testFineChannelOverlapping) {\n-            const lastRangeEnd = Math.floor(channel.capabilities[i-1].range[1] / Math.pow(256, channel.fineChannelAliases.length));\n+          else if (i > 1 && testFineChannelOverlapping) {\n+            const lastRangeEnd = Math.floor(channel.capabilities[i-2].range[1] / Math.pow(256, channel.fineChannelAliases.length));\n             const rangeStart = Math.floor(cap.range[0] / Math.pow(256, channel.fineChannelAliases.length));\n \n             if (rangeStart <= lastRangeEnd) {\n               result.errors.push({\n                 description: `ranges overlapping when used in coarse channel only mode in capabilities #${i-1} and #${i} in channel '${ch}'.`,\n                 error: null\n               });\n-              break;","path":"tests/fixture_valid.js","position":204,"original_position":204,"commit_id":"e0405aa148d836f87e3fc95fa4d5a960555ec336","original_commit_id":"e0405aa148d836f87e3fc95fa4d5a960555ec336","user":{"login":"FloEdelmann","id":202916,"avatar_url":"https://avatars2.githubusercontent.com/u/202916?v=3","gravatar_id":"","url":"https://api.github.com/users/FloEdelmann","html_url":"https://github.com/FloEdelmann","followers_url":"https://api.github.com/users/FloEdelmann/followers","following_url":"https://api.github.com/users/FloEdelmann/following{/other_user}","gists_url":"https://api.github.com/users/FloEdelmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FloEdelmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloEdelmann/subscriptions","organizations_url":"https://api.github.com/users/FloEdelmann/orgs","repos_url":"https://api.github.com/users/FloEdelmann/repos","events_url":"https://api.github.com/users/FloEdelmann/events{/privacy}","received_events_url":"https://api.github.com/users/FloEdelmann/received_events","type":"User","site_admin":false},"body":"Again","created_at":"2017-06-11T10:48:44Z","updated_at":"2017-06-11T10:57:15Z","html_url":"https://github.com/FloEdelmann/open-fixture-library/pull/110#discussion_r121278195","pull_request_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/comments/121278195"},"html":{"href":"https://github.com/FloEdelmann/open-fixture-library/pull/110#discussion_r121278195"},"pull_request":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110","id":118558497,"html_url":"https://github.com/FloEdelmann/open-fixture-library/pull/110","diff_url":"https://github.com/FloEdelmann/open-fixture-library/pull/110.diff","patch_url":"https://github.com/FloEdelmann/open-fixture-library/pull/110.patch","issue_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/110","number":110,"state":"open","locked":false,"title":"Switching channels","user":{"login":"fxedel","id":7782229,"avatar_url":"https://avatars0.githubusercontent.com/u/7782229?v=3","gravatar_id":"","url":"https://api.github.com/users/fxedel","html_url":"https://github.com/fxedel","followers_url":"https://api.github.com/users/fxedel/followers","following_url":"https://api.github.com/users/fxedel/following{/other_user}","gists_url":"https://api.github.com/users/fxedel/gists{/gist_id}","starred_url":"https://api.github.com/users/fxedel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fxedel/subscriptions","organizations_url":"https://api.github.com/users/fxedel/orgs","repos_url":"https://api.github.com/users/fxedel/repos","events_url":"https://api.github.com/users/fxedel/events{/privacy}","received_events_url":"https://api.github.com/users/fxedel/received_events","type":"User","site_admin":false},"body":"See #108.","created_at":"2017-05-02T13:45:38Z","updated_at":"2017-06-11T10:57:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"829a1f64edd06cc171440155e01242b9758ea0a4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110/commits","review_comments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110/comments","review_comment_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/110/comments","statuses_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/statuses/e0405aa148d836f87e3fc95fa4d5a960555ec336","head":{"label":"FloEdelmann:switching-channels","ref":"switching-channels","sha":"e0405aa148d836f87e3fc95fa4d5a960555ec336","user":{"login":"FloEdelmann","id":202916,"avatar_url":"https://avatars2.githubusercontent.com/u/202916?v=3","gravatar_id":"","url":"https://api.github.com/users/FloEdelmann","html_url":"https://github.com/FloEdelmann","followers_url":"https://api.github.com/users/FloEdelmann/followers","following_url":"https://api.github.com/users/FloEdelmann/following{/other_user}","gists_url":"https://api.github.com/users/FloEdelmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FloEdelmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloEdelmann/subscriptions","organizations_url":"https://api.github.com/users/FloEdelmann/orgs","repos_url":"https://api.github.com/users/FloEdelmann/repos","events_url":"https://api.github.com/users/FloEdelmann/events{/privacy}","received_events_url":"https://api.github.com/users/FloEdelmann/received_events","type":"User","site_admin":false},"repo":{"id":82906506,"name":"open-fixture-library","full_name":"FloEdelmann/open-fixture-library","owner":{"login":"FloEdelmann","id":202916,"avatar_url":"https://avatars2.githubusercontent.com/u/202916?v=3","gravatar_id":"","url":"https://api.github.com/users/FloEdelmann","html_url":"https://github.com/FloEdelmann","followers_url":"https://api.github.com/users/FloEdelmann/followers","following_url":"https://api.github.com/users/FloEdelmann/following{/other_user}","gists_url":"https://api.github.com/users/FloEdelmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FloEdelmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloEdelmann/subscriptions","organizations_url":"https://api.github.com/users/FloEdelmann/orgs","repos_url":"https://api.github.com/users/FloEdelmann/repos","events_url":"https://api.github.com/users/FloEdelmann/events{/privacy}","received_events_url":"https://api.github.com/users/FloEdelmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FloEdelmann/open-fixture-library","description":"An open source library for lighting technology's fixture definition files.","fork":false,"url":"https://api.github.com/repos/FloEdelmann/open-fixture-library","forks_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/forks","keys_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/teams","hooks_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/hooks","issue_events_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/events{/number}","events_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/events","assignees_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/assignees{/user}","branches_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/branches{/branch}","tags_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/tags","blobs_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/statuses/{sha}","languages_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/languages","stargazers_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/stargazers","contributors_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/contributors","subscribers_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/subscribers","subscription_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/subscription","commits_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/contents/{+path}","compare_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/merges","archive_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/downloads","issues_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues{/number}","pulls_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls{/number}","milestones_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/milestones{/number}","notifications_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/labels{/name}","releases_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/releases{/id}","deployments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/deployments","created_at":"2017-02-23T08:55:02Z","updated_at":"2017-03-18T08:30:03Z","pushed_at":"2017-06-10T21:08:41Z","git_url":"git://github.com/FloEdelmann/open-fixture-library.git","ssh_url":"git@github.com:FloEdelmann/open-fixture-library.git","clone_url":"https://github.com/FloEdelmann/open-fixture-library.git","svn_url":"https://github.com/FloEdelmann/open-fixture-library","homepage":"https://open-fixture-library.herokuapp.com/","size":1252,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":30,"forks":0,"open_issues":30,"watchers":3,"default_branch":"master"}},"base":{"label":"FloEdelmann:master","ref":"master","sha":"dba5fbb9772534c6a2f0fce3eae652974d41414a","user":{"login":"FloEdelmann","id":202916,"avatar_url":"https://avatars2.githubusercontent.com/u/202916?v=3","gravatar_id":"","url":"https://api.github.com/users/FloEdelmann","html_url":"https://github.com/FloEdelmann","followers_url":"https://api.github.com/users/FloEdelmann/followers","following_url":"https://api.github.com/users/FloEdelmann/following{/other_user}","gists_url":"https://api.github.com/users/FloEdelmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FloEdelmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloEdelmann/subscriptions","organizations_url":"https://api.github.com/users/FloEdelmann/orgs","repos_url":"https://api.github.com/users/FloEdelmann/repos","events_url":"https://api.github.com/users/FloEdelmann/events{/privacy}","received_events_url":"https://api.github.com/users/FloEdelmann/received_events","type":"User","site_admin":false},"repo":{"id":82906506,"name":"open-fixture-library","full_name":"FloEdelmann/open-fixture-library","owner":{"login":"FloEdelmann","id":202916,"avatar_url":"https://avatars2.githubusercontent.com/u/202916?v=3","gravatar_id":"","url":"https://api.github.com/users/FloEdelmann","html_url":"https://github.com/FloEdelmann","followers_url":"https://api.github.com/users/FloEdelmann/followers","following_url":"https://api.github.com/users/FloEdelmann/following{/other_user}","gists_url":"https://api.github.com/users/FloEdelmann/gists{/gist_id}","starred_url":"https://api.github.com/users/FloEdelmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FloEdelmann/subscriptions","organizations_url":"https://api.github.com/users/FloEdelmann/orgs","repos_url":"https://api.github.com/users/FloEdelmann/repos","events_url":"https://api.github.com/users/FloEdelmann/events{/privacy}","received_events_url":"https://api.github.com/users/FloEdelmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FloEdelmann/open-fixture-library","description":"An open source library for lighting technology's fixture definition files.","fork":false,"url":"https://api.github.com/repos/FloEdelmann/open-fixture-library","forks_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/forks","keys_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/teams","hooks_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/hooks","issue_events_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/events{/number}","events_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/events","assignees_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/assignees{/user}","branches_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/branches{/branch}","tags_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/tags","blobs_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/refs{/sha}","trees_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/statuses/{sha}","languages_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/languages","stargazers_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/stargazers","contributors_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/contributors","subscribers_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/subscribers","subscription_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/subscription","commits_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/commits{/sha}","git_commits_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/git/commits{/sha}","comments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/comments{/number}","issue_comment_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/comments{/number}","contents_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/contents/{+path}","compare_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/merges","archive_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/downloads","issues_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues{/number}","pulls_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls{/number}","milestones_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/milestones{/number}","notifications_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/labels{/name}","releases_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/releases{/id}","deployments_url":"https://api.github.com/repos/FloEdelmann/open-fixture-library/deployments","created_at":"2017-02-23T08:55:02Z","updated_at":"2017-03-18T08:30:03Z","pushed_at":"2017-06-10T21:08:41Z","git_url":"git://github.com/FloEdelmann/open-fixture-library.git","ssh_url":"git@github.com:FloEdelmann/open-fixture-library.git","clone_url":"https://github.com/FloEdelmann/open-fixture-library.git","svn_url":"https://github.com/FloEdelmann/open-fixture-library","homepage":"https://open-fixture-library.herokuapp.com/","size":1252,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":30,"forks":0,"open_issues":30,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110"},"html":{"href":"https://github.com/FloEdelmann/open-fixture-library/pull/110"},"issue":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/110"},"comments":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/FloEdelmann/open-fixture-library/statuses/e0405aa148d836f87e3fc95fa4d5a960555ec336"}}}}
{"actor":{"display_login":"FloEdelmann"}}