{"action":"created","comment":{"url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/comments/40199137","id":40199137,"diff_hunk":"@@ -171,6 +191,12 @@ function Rules(logger, options) {\n       return full;\n     }, {});\n \n+  if (options) {\n+    this.rules = Object.keys(options)\n+      .filter(function isDefaultSection(section) { return section in defaults; })","path":"src/rules.js","position":33,"original_position":33,"commit_id":"a4f8eac52a5be139a4801e4df5fd9929decb89dd","original_commit_id":"a4f8eac52a5be139a4801e4df5fd9929decb89dd","user":{"login":"kalisjoshua","id":122826,"avatar_url":"https://avatars.githubusercontent.com/u/122826?v=3","gravatar_id":"","url":"https://api.github.com/users/kalisjoshua","html_url":"https://github.com/kalisjoshua","followers_url":"https://api.github.com/users/kalisjoshua/followers","following_url":"https://api.github.com/users/kalisjoshua/following{/other_user}","gists_url":"https://api.github.com/users/kalisjoshua/gists{/gist_id}","starred_url":"https://api.github.com/users/kalisjoshua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalisjoshua/subscriptions","organizations_url":"https://api.github.com/users/kalisjoshua/orgs","repos_url":"https://api.github.com/users/kalisjoshua/repos","events_url":"https://api.github.com/users/kalisjoshua/events{/privacy}","received_events_url":"https://api.github.com/users/kalisjoshua/received_events","type":"User","site_admin":false},"body":"Some coding conventions of the library are broken in this line:\r\n  * Functions should not be defined in a single line\r\n  * Functions should not be defined in blocks\r\n\r\nWhat is the benefit of using `in` instead of \"square-bracket\" notation?\r\n\r\nSorry for the delayed response and for the vague-ness of the standards not followed as noted above. To explain a little further the convention followed in this library is typically - maybe not everywhere - functions, that will be passed as callbacks, should be defined at a higher scope and simply referenced in the position of the callback.","created_at":"2015-09-23T12:54:51Z","updated_at":"2015-09-23T12:54:51Z","html_url":"https://github.com/QuickenLoans/ramllint/pull/40#discussion_r40199137","pull_request_url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/comments/40199137"},"html":{"href":"https://github.com/QuickenLoans/ramllint/pull/40#discussion_r40199137"},"pull_request":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40","id":43244196,"html_url":"https://github.com/QuickenLoans/ramllint/pull/40","diff_url":"https://github.com/QuickenLoans/ramllint/pull/40.diff","patch_url":"https://github.com/QuickenLoans/ramllint/pull/40.patch","issue_url":"https://api.github.com/repos/QuickenLoans/ramllint/issues/40","number":40,"state":"open","locked":false,"title":"Added ability to add rules when creating linter","user":{"login":"mmorga","id":9483,"avatar_url":"https://avatars.githubusercontent.com/u/9483?v=3","gravatar_id":"","url":"https://api.github.com/users/mmorga","html_url":"https://github.com/mmorga","followers_url":"https://api.github.com/users/mmorga/followers","following_url":"https://api.github.com/users/mmorga/following{/other_user}","gists_url":"https://api.github.com/users/mmorga/gists{/gist_id}","starred_url":"https://api.github.com/users/mmorga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmorga/subscriptions","organizations_url":"https://api.github.com/users/mmorga/orgs","repos_url":"https://api.github.com/users/mmorga/repos","events_url":"https://api.github.com/users/mmorga/events{/privacy}","received_events_url":"https://api.github.com/users/mmorga/received_events","type":"User","site_admin":false},"body":"New rules can be added following the:\r\n```js\r\nvar Linter = require('ramllint'),\r\n  ramllint = new Linter({\r\n    resource: {\r\n      hint: '/income-tax-documents (good)\\n/incomeTaxDocuments (bad)\\n/Income_Tax_Documents (bad)',\r\n      id: 'url_format',\r\n      prop: 'relativeUri',\r\n      test: '^\\\\/([a-z]+(-[a-z]+)*|{[a-z]+([A-Z][a-z]+)*})$',\r\n      text: 'RAML section ({section}) {property} violates: only lowercase letters and dashes allowed. URI Params must be camel cased.'\r\n    }\r\n  }); \r\n```\r\n\r\nUpdated release tag to 1.2.3\r\n\r\nAdding a rule in the same section with a default rule with a matching id replaces\r\nthe default rule.","created_at":"2015-08-25T02:41:24Z","updated_at":"2015-09-23T12:54:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"acee7708da5f4dc4f7508a81ba13b641475f30d4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40/commits","review_comments_url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40/comments","review_comment_url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QuickenLoans/ramllint/issues/40/comments","statuses_url":"https://api.github.com/repos/QuickenLoans/ramllint/statuses/a4f8eac52a5be139a4801e4df5fd9929decb89dd","head":{"label":"mmorga:add-replace-rules","ref":"add-replace-rules","sha":"a4f8eac52a5be139a4801e4df5fd9929decb89dd","user":{"login":"mmorga","id":9483,"avatar_url":"https://avatars.githubusercontent.com/u/9483?v=3","gravatar_id":"","url":"https://api.github.com/users/mmorga","html_url":"https://github.com/mmorga","followers_url":"https://api.github.com/users/mmorga/followers","following_url":"https://api.github.com/users/mmorga/following{/other_user}","gists_url":"https://api.github.com/users/mmorga/gists{/gist_id}","starred_url":"https://api.github.com/users/mmorga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmorga/subscriptions","organizations_url":"https://api.github.com/users/mmorga/orgs","repos_url":"https://api.github.com/users/mmorga/repos","events_url":"https://api.github.com/users/mmorga/events{/privacy}","received_events_url":"https://api.github.com/users/mmorga/received_events","type":"User","site_admin":false},"repo":{"id":40945056,"name":"ramllint","full_name":"mmorga/ramllint","owner":{"login":"mmorga","id":9483,"avatar_url":"https://avatars.githubusercontent.com/u/9483?v=3","gravatar_id":"","url":"https://api.github.com/users/mmorga","html_url":"https://github.com/mmorga","followers_url":"https://api.github.com/users/mmorga/followers","following_url":"https://api.github.com/users/mmorga/following{/other_user}","gists_url":"https://api.github.com/users/mmorga/gists{/gist_id}","starred_url":"https://api.github.com/users/mmorga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmorga/subscriptions","organizations_url":"https://api.github.com/users/mmorga/orgs","repos_url":"https://api.github.com/users/mmorga/repos","events_url":"https://api.github.com/users/mmorga/events{/privacy}","received_events_url":"https://api.github.com/users/mmorga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmorga/ramllint","description":"RAML Linter","fork":true,"url":"https://api.github.com/repos/mmorga/ramllint","forks_url":"https://api.github.com/repos/mmorga/ramllint/forks","keys_url":"https://api.github.com/repos/mmorga/ramllint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmorga/ramllint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmorga/ramllint/teams","hooks_url":"https://api.github.com/repos/mmorga/ramllint/hooks","issue_events_url":"https://api.github.com/repos/mmorga/ramllint/issues/events{/number}","events_url":"https://api.github.com/repos/mmorga/ramllint/events","assignees_url":"https://api.github.com/repos/mmorga/ramllint/assignees{/user}","branches_url":"https://api.github.com/repos/mmorga/ramllint/branches{/branch}","tags_url":"https://api.github.com/repos/mmorga/ramllint/tags","blobs_url":"https://api.github.com/repos/mmorga/ramllint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmorga/ramllint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmorga/ramllint/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmorga/ramllint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmorga/ramllint/statuses/{sha}","languages_url":"https://api.github.com/repos/mmorga/ramllint/languages","stargazers_url":"https://api.github.com/repos/mmorga/ramllint/stargazers","contributors_url":"https://api.github.com/repos/mmorga/ramllint/contributors","subscribers_url":"https://api.github.com/repos/mmorga/ramllint/subscribers","subscription_url":"https://api.github.com/repos/mmorga/ramllint/subscription","commits_url":"https://api.github.com/repos/mmorga/ramllint/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmorga/ramllint/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmorga/ramllint/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmorga/ramllint/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmorga/ramllint/contents/{+path}","compare_url":"https://api.github.com/repos/mmorga/ramllint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmorga/ramllint/merges","archive_url":"https://api.github.com/repos/mmorga/ramllint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmorga/ramllint/downloads","issues_url":"https://api.github.com/repos/mmorga/ramllint/issues{/number}","pulls_url":"https://api.github.com/repos/mmorga/ramllint/pulls{/number}","milestones_url":"https://api.github.com/repos/mmorga/ramllint/milestones{/number}","notifications_url":"https://api.github.com/repos/mmorga/ramllint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmorga/ramllint/labels{/name}","releases_url":"https://api.github.com/repos/mmorga/ramllint/releases{/id}","created_at":"2015-08-18T02:01:10Z","updated_at":"2015-08-18T02:01:11Z","pushed_at":"2015-08-25T02:40:21Z","git_url":"git://github.com/mmorga/ramllint.git","ssh_url":"git@github.com:mmorga/ramllint.git","clone_url":"https://github.com/mmorga/ramllint.git","svn_url":"https://github.com/mmorga/ramllint","homepage":"http://quickenloans.github.io/ramllint/","size":1152,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"QuickenLoans:master","ref":"master","sha":"ac760bb8e4f66b2a85114516d3999f5f68748b13","user":{"login":"QuickenLoans","id":1609849,"avatar_url":"https://avatars.githubusercontent.com/u/1609849?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickenLoans","html_url":"https://github.com/QuickenLoans","followers_url":"https://api.github.com/users/QuickenLoans/followers","following_url":"https://api.github.com/users/QuickenLoans/following{/other_user}","gists_url":"https://api.github.com/users/QuickenLoans/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickenLoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickenLoans/subscriptions","organizations_url":"https://api.github.com/users/QuickenLoans/orgs","repos_url":"https://api.github.com/users/QuickenLoans/repos","events_url":"https://api.github.com/users/QuickenLoans/events{/privacy}","received_events_url":"https://api.github.com/users/QuickenLoans/received_events","type":"Organization","site_admin":false},"repo":{"id":35832994,"name":"ramllint","full_name":"QuickenLoans/ramllint","owner":{"login":"QuickenLoans","id":1609849,"avatar_url":"https://avatars.githubusercontent.com/u/1609849?v=3","gravatar_id":"","url":"https://api.github.com/users/QuickenLoans","html_url":"https://github.com/QuickenLoans","followers_url":"https://api.github.com/users/QuickenLoans/followers","following_url":"https://api.github.com/users/QuickenLoans/following{/other_user}","gists_url":"https://api.github.com/users/QuickenLoans/gists{/gist_id}","starred_url":"https://api.github.com/users/QuickenLoans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuickenLoans/subscriptions","organizations_url":"https://api.github.com/users/QuickenLoans/orgs","repos_url":"https://api.github.com/users/QuickenLoans/repos","events_url":"https://api.github.com/users/QuickenLoans/events{/privacy}","received_events_url":"https://api.github.com/users/QuickenLoans/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/QuickenLoans/ramllint","description":"RAML Linter","fork":false,"url":"https://api.github.com/repos/QuickenLoans/ramllint","forks_url":"https://api.github.com/repos/QuickenLoans/ramllint/forks","keys_url":"https://api.github.com/repos/QuickenLoans/ramllint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuickenLoans/ramllint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuickenLoans/ramllint/teams","hooks_url":"https://api.github.com/repos/QuickenLoans/ramllint/hooks","issue_events_url":"https://api.github.com/repos/QuickenLoans/ramllint/issues/events{/number}","events_url":"https://api.github.com/repos/QuickenLoans/ramllint/events","assignees_url":"https://api.github.com/repos/QuickenLoans/ramllint/assignees{/user}","branches_url":"https://api.github.com/repos/QuickenLoans/ramllint/branches{/branch}","tags_url":"https://api.github.com/repos/QuickenLoans/ramllint/tags","blobs_url":"https://api.github.com/repos/QuickenLoans/ramllint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuickenLoans/ramllint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuickenLoans/ramllint/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuickenLoans/ramllint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuickenLoans/ramllint/statuses/{sha}","languages_url":"https://api.github.com/repos/QuickenLoans/ramllint/languages","stargazers_url":"https://api.github.com/repos/QuickenLoans/ramllint/stargazers","contributors_url":"https://api.github.com/repos/QuickenLoans/ramllint/contributors","subscribers_url":"https://api.github.com/repos/QuickenLoans/ramllint/subscribers","subscription_url":"https://api.github.com/repos/QuickenLoans/ramllint/subscription","commits_url":"https://api.github.com/repos/QuickenLoans/ramllint/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuickenLoans/ramllint/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuickenLoans/ramllint/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuickenLoans/ramllint/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuickenLoans/ramllint/contents/{+path}","compare_url":"https://api.github.com/repos/QuickenLoans/ramllint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuickenLoans/ramllint/merges","archive_url":"https://api.github.com/repos/QuickenLoans/ramllint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuickenLoans/ramllint/downloads","issues_url":"https://api.github.com/repos/QuickenLoans/ramllint/issues{/number}","pulls_url":"https://api.github.com/repos/QuickenLoans/ramllint/pulls{/number}","milestones_url":"https://api.github.com/repos/QuickenLoans/ramllint/milestones{/number}","notifications_url":"https://api.github.com/repos/QuickenLoans/ramllint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuickenLoans/ramllint/labels{/name}","releases_url":"https://api.github.com/repos/QuickenLoans/ramllint/releases{/id}","created_at":"2015-05-18T17:46:06Z","updated_at":"2015-08-19T21:37:01Z","pushed_at":"2015-09-23T12:47:37Z","git_url":"git://github.com/QuickenLoans/ramllint.git","ssh_url":"git@github.com:QuickenLoans/ramllint.git","clone_url":"https://github.com/QuickenLoans/ramllint.git","svn_url":"https://github.com/QuickenLoans/ramllint","homepage":"http://quickenloans.github.io/ramllint/","size":1456,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"open_issues_count":22,"forks":5,"open_issues":22,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40"},"html":{"href":"https://github.com/QuickenLoans/ramllint/pull/40"},"issue":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/issues/40"},"comments":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/QuickenLoans/ramllint/statuses/a4f8eac52a5be139a4801e4df5fd9929decb89dd"}}}}