{"action":"created","comment":{"url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/comments/237632856","pull_request_review_id":179980041,"id":237632856,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzYzMjg1Ng==","diff_hunk":"@@ -73,14 +75,37 @@ export function decoratorValidator(decAst: CallExpression): AnyValidator | null\n   const decoratorName = decAst.callee.name;\n   if (decoratorName === Decorator.Enum) {\n     const args = callParamsAstToSet(decAst);\n-    return (expr: Expression): boolean =>\n-      expr.type === Syntax.Literal && expr.value != null && args.has(expr.value.toString());\n+    return (expr: Expression): DiagnosticError[] => {\n+      if (expr.type !== Syntax.Literal) {\n+        return [createError('Type must be Literal')];\n+      }\n+      if (expr.value === null) {\n+        return [createError('Type must not be null')];\n+      }\n+      if (expr.value === undefined) {\n+        return [createError('Type must not be undefined')];\n+      }\n+      if (expr.type === Syntax.Literal && expr.value != null && !args.has(expr.value.toString())) {","path":"src/service/decorators.ts","position":25,"original_position":25,"commit_id":"2d9b237eb953ed4ff73b615f4c314540a2e76241","original_commit_id":"2d9b237eb953ed4ff73b615f4c314540a2e76241","user":{"login":"lundibundi","id":9109612,"node_id":"MDQ6VXNlcjkxMDk2MTI=","avatar_url":"https://avatars0.githubusercontent.com/u/9109612?v=4","gravatar_id":"","url":"https://api.github.com/users/lundibundi","html_url":"https://github.com/lundibundi","followers_url":"https://api.github.com/users/lundibundi/followers","following_url":"https://api.github.com/users/lundibundi/following{/other_user}","gists_url":"https://api.github.com/users/lundibundi/gists{/gist_id}","starred_url":"https://api.github.com/users/lundibundi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lundibundi/subscriptions","organizations_url":"https://api.github.com/users/lundibundi/orgs","repos_url":"https://api.github.com/users/lundibundi/repos","events_url":"https://api.github.com/users/lundibundi/events{/privacy}","received_events_url":"https://api.github.com/users/lundibundi/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n      if (!args.has(expr.value.toString())) {\r\n```","created_at":"2018-11-29T19:44:43Z","updated_at":"2018-11-29T19:53:44Z","html_url":"https://github.com/metarhia/metaschema-langserver/pull/2#discussion_r237632856","pull_request_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/comments/237632856"},"html":{"href":"https://github.com/metarhia/metaschema-langserver/pull/2#discussion_r237632856"},"pull_request":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2","id":233562901,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNTYyOTAx","html_url":"https://github.com/metarhia/metaschema-langserver/pull/2","diff_url":"https://github.com/metarhia/metaschema-langserver/pull/2.diff","patch_url":"https://github.com/metarhia/metaschema-langserver/pull/2.patch","issue_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/2","number":2,"state":"open","locked":false,"title":"Fix build","user":{"login":"SemenchenkoVitaliy","id":17744818,"node_id":"MDQ6VXNlcjE3NzQ0ODE4","avatar_url":"https://avatars0.githubusercontent.com/u/17744818?v=4","gravatar_id":"","url":"https://api.github.com/users/SemenchenkoVitaliy","html_url":"https://github.com/SemenchenkoVitaliy","followers_url":"https://api.github.com/users/SemenchenkoVitaliy/followers","following_url":"https://api.github.com/users/SemenchenkoVitaliy/following{/other_user}","gists_url":"https://api.github.com/users/SemenchenkoVitaliy/gists{/gist_id}","starred_url":"https://api.github.com/users/SemenchenkoVitaliy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SemenchenkoVitaliy/subscriptions","organizations_url":"https://api.github.com/users/SemenchenkoVitaliy/orgs","repos_url":"https://api.github.com/users/SemenchenkoVitaliy/repos","events_url":"https://api.github.com/users/SemenchenkoVitaliy/events{/privacy}","received_events_url":"https://api.github.com/users/SemenchenkoVitaliy/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-26T13:45:42Z","updated_at":"2018-11-29T19:53:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3044369cfc09ea32675440d122b02b305fdbc248","assignee":{"login":"SemenchenkoVitaliy","id":17744818,"node_id":"MDQ6VXNlcjE3NzQ0ODE4","avatar_url":"https://avatars0.githubusercontent.com/u/17744818?v=4","gravatar_id":"","url":"https://api.github.com/users/SemenchenkoVitaliy","html_url":"https://github.com/SemenchenkoVitaliy","followers_url":"https://api.github.com/users/SemenchenkoVitaliy/followers","following_url":"https://api.github.com/users/SemenchenkoVitaliy/following{/other_user}","gists_url":"https://api.github.com/users/SemenchenkoVitaliy/gists{/gist_id}","starred_url":"https://api.github.com/users/SemenchenkoVitaliy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SemenchenkoVitaliy/subscriptions","organizations_url":"https://api.github.com/users/SemenchenkoVitaliy/orgs","repos_url":"https://api.github.com/users/SemenchenkoVitaliy/repos","events_url":"https://api.github.com/users/SemenchenkoVitaliy/events{/privacy}","received_events_url":"https://api.github.com/users/SemenchenkoVitaliy/received_events","type":"User","site_admin":false},"assignees":[{"login":"SemenchenkoVitaliy","id":17744818,"node_id":"MDQ6VXNlcjE3NzQ0ODE4","avatar_url":"https://avatars0.githubusercontent.com/u/17744818?v=4","gravatar_id":"","url":"https://api.github.com/users/SemenchenkoVitaliy","html_url":"https://github.com/SemenchenkoVitaliy","followers_url":"https://api.github.com/users/SemenchenkoVitaliy/followers","following_url":"https://api.github.com/users/SemenchenkoVitaliy/following{/other_user}","gists_url":"https://api.github.com/users/SemenchenkoVitaliy/gists{/gist_id}","starred_url":"https://api.github.com/users/SemenchenkoVitaliy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SemenchenkoVitaliy/subscriptions","organizations_url":"https://api.github.com/users/SemenchenkoVitaliy/orgs","repos_url":"https://api.github.com/users/SemenchenkoVitaliy/repos","events_url":"https://api.github.com/users/SemenchenkoVitaliy/events{/privacy}","received_events_url":"https://api.github.com/users/SemenchenkoVitaliy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2/commits","review_comments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2/comments","review_comment_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/2/comments","statuses_url":"https://api.github.com/repos/metarhia/metaschema-langserver/statuses/2d9b237eb953ed4ff73b615f4c314540a2e76241","head":{"label":"metarhia:fix-build","ref":"fix-build","sha":"2d9b237eb953ed4ff73b615f4c314540a2e76241","user":{"login":"metarhia","id":18060695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MDYwNjk1","avatar_url":"https://avatars2.githubusercontent.com/u/18060695?v=4","gravatar_id":"","url":"https://api.github.com/users/metarhia","html_url":"https://github.com/metarhia","followers_url":"https://api.github.com/users/metarhia/followers","following_url":"https://api.github.com/users/metarhia/following{/other_user}","gists_url":"https://api.github.com/users/metarhia/gists{/gist_id}","starred_url":"https://api.github.com/users/metarhia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metarhia/subscriptions","organizations_url":"https://api.github.com/users/metarhia/orgs","repos_url":"https://api.github.com/users/metarhia/repos","events_url":"https://api.github.com/users/metarhia/events{/privacy}","received_events_url":"https://api.github.com/users/metarhia/received_events","type":"Organization","site_admin":false},"repo":{"id":143101840,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMxMDE4NDA=","name":"metaschema-langserver","full_name":"metarhia/metaschema-langserver","private":false,"owner":{"login":"metarhia","id":18060695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MDYwNjk1","avatar_url":"https://avatars2.githubusercontent.com/u/18060695?v=4","gravatar_id":"","url":"https://api.github.com/users/metarhia","html_url":"https://github.com/metarhia","followers_url":"https://api.github.com/users/metarhia/followers","following_url":"https://api.github.com/users/metarhia/following{/other_user}","gists_url":"https://api.github.com/users/metarhia/gists{/gist_id}","starred_url":"https://api.github.com/users/metarhia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metarhia/subscriptions","organizations_url":"https://api.github.com/users/metarhia/orgs","repos_url":"https://api.github.com/users/metarhia/repos","events_url":"https://api.github.com/users/metarhia/events{/privacy}","received_events_url":"https://api.github.com/users/metarhia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/metarhia/metaschema-langserver","description":"Metaschema Language Server Protocol","fork":false,"url":"https://api.github.com/repos/metarhia/metaschema-langserver","forks_url":"https://api.github.com/repos/metarhia/metaschema-langserver/forks","keys_url":"https://api.github.com/repos/metarhia/metaschema-langserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metarhia/metaschema-langserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metarhia/metaschema-langserver/teams","hooks_url":"https://api.github.com/repos/metarhia/metaschema-langserver/hooks","issue_events_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/events{/number}","events_url":"https://api.github.com/repos/metarhia/metaschema-langserver/events","assignees_url":"https://api.github.com/repos/metarhia/metaschema-langserver/assignees{/user}","branches_url":"https://api.github.com/repos/metarhia/metaschema-langserver/branches{/branch}","tags_url":"https://api.github.com/repos/metarhia/metaschema-langserver/tags","blobs_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metarhia/metaschema-langserver/statuses/{sha}","languages_url":"https://api.github.com/repos/metarhia/metaschema-langserver/languages","stargazers_url":"https://api.github.com/repos/metarhia/metaschema-langserver/stargazers","contributors_url":"https://api.github.com/repos/metarhia/metaschema-langserver/contributors","subscribers_url":"https://api.github.com/repos/metarhia/metaschema-langserver/subscribers","subscription_url":"https://api.github.com/repos/metarhia/metaschema-langserver/subscription","commits_url":"https://api.github.com/repos/metarhia/metaschema-langserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/metarhia/metaschema-langserver/contents/{+path}","compare_url":"https://api.github.com/repos/metarhia/metaschema-langserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metarhia/metaschema-langserver/merges","archive_url":"https://api.github.com/repos/metarhia/metaschema-langserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metarhia/metaschema-langserver/downloads","issues_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues{/number}","pulls_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls{/number}","milestones_url":"https://api.github.com/repos/metarhia/metaschema-langserver/milestones{/number}","notifications_url":"https://api.github.com/repos/metarhia/metaschema-langserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metarhia/metaschema-langserver/labels{/name}","releases_url":"https://api.github.com/repos/metarhia/metaschema-langserver/releases{/id}","deployments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/deployments","created_at":"2018-08-01T03:59:26Z","updated_at":"2018-09-26T15:14:37Z","pushed_at":"2018-11-26T13:45:43Z","git_url":"git://github.com/metarhia/metaschema-langserver.git","ssh_url":"git@github.com:metarhia/metaschema-langserver.git","clone_url":"https://github.com/metarhia/metaschema-langserver.git","svn_url":"https://github.com/metarhia/metaschema-langserver","homepage":null,"size":59,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"metarhia:initial-implementation","ref":"initial-implementation","sha":"eaa0e623e5f8c2e252891891ca011e3e840e7024","user":{"login":"metarhia","id":18060695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MDYwNjk1","avatar_url":"https://avatars2.githubusercontent.com/u/18060695?v=4","gravatar_id":"","url":"https://api.github.com/users/metarhia","html_url":"https://github.com/metarhia","followers_url":"https://api.github.com/users/metarhia/followers","following_url":"https://api.github.com/users/metarhia/following{/other_user}","gists_url":"https://api.github.com/users/metarhia/gists{/gist_id}","starred_url":"https://api.github.com/users/metarhia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metarhia/subscriptions","organizations_url":"https://api.github.com/users/metarhia/orgs","repos_url":"https://api.github.com/users/metarhia/repos","events_url":"https://api.github.com/users/metarhia/events{/privacy}","received_events_url":"https://api.github.com/users/metarhia/received_events","type":"Organization","site_admin":false},"repo":{"id":143101840,"node_id":"MDEwOlJlcG9zaXRvcnkxNDMxMDE4NDA=","name":"metaschema-langserver","full_name":"metarhia/metaschema-langserver","private":false,"owner":{"login":"metarhia","id":18060695,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MDYwNjk1","avatar_url":"https://avatars2.githubusercontent.com/u/18060695?v=4","gravatar_id":"","url":"https://api.github.com/users/metarhia","html_url":"https://github.com/metarhia","followers_url":"https://api.github.com/users/metarhia/followers","following_url":"https://api.github.com/users/metarhia/following{/other_user}","gists_url":"https://api.github.com/users/metarhia/gists{/gist_id}","starred_url":"https://api.github.com/users/metarhia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metarhia/subscriptions","organizations_url":"https://api.github.com/users/metarhia/orgs","repos_url":"https://api.github.com/users/metarhia/repos","events_url":"https://api.github.com/users/metarhia/events{/privacy}","received_events_url":"https://api.github.com/users/metarhia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/metarhia/metaschema-langserver","description":"Metaschema Language Server Protocol","fork":false,"url":"https://api.github.com/repos/metarhia/metaschema-langserver","forks_url":"https://api.github.com/repos/metarhia/metaschema-langserver/forks","keys_url":"https://api.github.com/repos/metarhia/metaschema-langserver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metarhia/metaschema-langserver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metarhia/metaschema-langserver/teams","hooks_url":"https://api.github.com/repos/metarhia/metaschema-langserver/hooks","issue_events_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/events{/number}","events_url":"https://api.github.com/repos/metarhia/metaschema-langserver/events","assignees_url":"https://api.github.com/repos/metarhia/metaschema-langserver/assignees{/user}","branches_url":"https://api.github.com/repos/metarhia/metaschema-langserver/branches{/branch}","tags_url":"https://api.github.com/repos/metarhia/metaschema-langserver/tags","blobs_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/refs{/sha}","trees_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metarhia/metaschema-langserver/statuses/{sha}","languages_url":"https://api.github.com/repos/metarhia/metaschema-langserver/languages","stargazers_url":"https://api.github.com/repos/metarhia/metaschema-langserver/stargazers","contributors_url":"https://api.github.com/repos/metarhia/metaschema-langserver/contributors","subscribers_url":"https://api.github.com/repos/metarhia/metaschema-langserver/subscribers","subscription_url":"https://api.github.com/repos/metarhia/metaschema-langserver/subscription","commits_url":"https://api.github.com/repos/metarhia/metaschema-langserver/commits{/sha}","git_commits_url":"https://api.github.com/repos/metarhia/metaschema-langserver/git/commits{/sha}","comments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/comments{/number}","issue_comment_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/comments{/number}","contents_url":"https://api.github.com/repos/metarhia/metaschema-langserver/contents/{+path}","compare_url":"https://api.github.com/repos/metarhia/metaschema-langserver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metarhia/metaschema-langserver/merges","archive_url":"https://api.github.com/repos/metarhia/metaschema-langserver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metarhia/metaschema-langserver/downloads","issues_url":"https://api.github.com/repos/metarhia/metaschema-langserver/issues{/number}","pulls_url":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls{/number}","milestones_url":"https://api.github.com/repos/metarhia/metaschema-langserver/milestones{/number}","notifications_url":"https://api.github.com/repos/metarhia/metaschema-langserver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metarhia/metaschema-langserver/labels{/name}","releases_url":"https://api.github.com/repos/metarhia/metaschema-langserver/releases{/id}","deployments_url":"https://api.github.com/repos/metarhia/metaschema-langserver/deployments","created_at":"2018-08-01T03:59:26Z","updated_at":"2018-09-26T15:14:37Z","pushed_at":"2018-11-26T13:45:43Z","git_url":"git://github.com/metarhia/metaschema-langserver.git","ssh_url":"git@github.com:metarhia/metaschema-langserver.git","clone_url":"https://github.com/metarhia/metaschema-langserver.git","svn_url":"https://github.com/metarhia/metaschema-langserver","homepage":null,"size":59,"stargazers_count":2,"watchers_count":2,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2"},"html":{"href":"https://github.com/metarhia/metaschema-langserver/pull/2"},"issue":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/2"},"comments":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/metarhia/metaschema-langserver/statuses/2d9b237eb953ed4ff73b615f4c314540a2e76241"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lundibundi"}}