{"action":"created","comment":{"url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments/90859394","pull_request_review_id":11367451,"id":90859394,"diff_hunk":"@@ -0,0 +1,679 @@\n+# Coding style guidelines for the JerryScript project\n+\n+This text is a brief overview of JerryScript coding style.\n+Each rule starts with a short description followed\n+by several examples. We believe examples are better than\n+long explanations. Please follow these guidelines when\n+you submit a patch for review.\n+\n+## General rules\n+\n+* Indentation is two spaces.\n+* Tab characters are not allowed.\n+* Maximum line length is 120 characters long (excluding newline).\n+* No trailing white spaces are allowed.\n+* Run `tools/run-tests.py --check-vera` to check majority of the style rules.\n+\n+## Comments\n+\n+Only `/* */` comments are allowed in JerryScript. Comments should\n+be complete sentences, except for return value, field and\n+argument descriptions (see these excpetions later). The text\n+part of a comment should focus on explaing *why* rather than\n+*what*.\n+\n+```diff\n++++ Good +++\n+```\n+\n+```c\n+  /* A perfect comment. */\n+\n+  /* A perfect multiline\n+   * comment. Each line should\n+   * start with an asterisk. */\n+```\n+\n+```diff\n+--- Bad ---\n+```\n+\n+```c\n+  // Double slash comments are not allowed.\n+\n+  /* not a complete sentence */\n+\n+  /* A bad mulitiline\n+     comment. */\n+```\n+\n+All types, constants, and functions require a description in\n+JerryScript. These comments should start with `/**`. The starting\n+`/**` and ending `*/` must be in separate line.\n+\n+```diff\n++++ Good +++\n+```\n+\n+```c\n+/**\n+ * A correct description.\n+ */\n+```\n+\n+```diff\n+--- Bad ---\n+```\n+\n+```c\n+/** An incorrect description. */\n+```\n+\n+## Preprocessor defines\n+\n+The name of a preprocessor macro must be an uppercase string\n+and these macros must be preceeded by a description.\n+Abbreviations are allowed but not preferred in new code.\n+\n+```diff\n++++ Good +++\n+```\n+\n+```c\n+/**\n+ * Short description about the constant.\n+ */\n+#define JERRY_VALUE_SEVEN 7\n+\n+/**\n+ * Short description about the macro function.\n+ */\n+#define JERRY_ADD_TWO_NUMBERS(arg1, arg2) \\\n+  ((arg1) + (arg2))\n+\n+/**\n+ * Although this is correct, a reviewer might request\n+ * to change NUMS to NUMBERS. Hence it is recommended\n+ * to use NUMBERS in the first place.\n+ */\n+#define JERRY_ADD_TWO_NUMS(arg1, arg2) \\\n+  ((arg1) + (arg2))\n+```\n+\n+```diff\n+--- Bad ---\n+```\n+\n+```c\n+#define JERRY_CONSTANT_WITHOUT_DESCRIPTION 5\n+\n+#define JeRrY_mIxEd_CaSe_NaMe \"str\"\n+```\n+\n+## Conditional preprocessor directives\n+\n+A comment is required after `#else` and `#endif` in JerryScript.\n+The defined keyword should be omitted from these comments.\n+\n+```diff\n++++ Good +++\n+```\n+\n+```c\n+#ifdef JERRY_A\n+\n+#else /* !JERRY_A */\n+\n+#endif /* JERRY_A */\n+\n+#ifdef JERRY_A\n+#if defined JERRY_B && defined JERRY_C && (JERRY_C > 6)\n+\n+#else /* !(JERRY_B && JERRY_C && (JERRY_C > 6)) */\n+\n+#endif /* JERRY_B && JERRY_C && (JERRY_C > 6) */\n+#endif /* JERRY_A */\n+```\n+\n+```diff\n+--- Bad ---\n+```\n+\n+```c\n+#ifdef JERRY_A\n+\n+#endif\n+\n+#ifdef JERRY_A\n+\n+#endif /* defined JERRY_A */\n+\n+#ifdef JERRY_B\n+  /* Missing comment after else. */\n+#else\n+\n+#endif /* JERRY_B */\n+```\n+\n+## Code blocks\n+\n+Each code block must be enclosed in braces even if\n+it is a single line statement. These braces must be\n+in separate lines. There must be a space before the\n+open bracket of if/while/switch keywords and nothing","path":"docs/07.CODING-GUIDELINES.md","position":163,"original_position":163,"commit_id":"551b005d6d7345dc834665b00041ed5c2319fa97","original_commit_id":"551b005d6d7345dc834665b00041ed5c2319fa97","user":{"login":"tilmannOSG","id":12459561,"avatar_url":"https://avatars.githubusercontent.com/u/12459561?v=3","gravatar_id":"","url":"https://api.github.com/users/tilmannOSG","html_url":"https://github.com/tilmannOSG","followers_url":"https://api.github.com/users/tilmannOSG/followers","following_url":"https://api.github.com/users/tilmannOSG/following{/other_user}","gists_url":"https://api.github.com/users/tilmannOSG/gists{/gist_id}","starred_url":"https://api.github.com/users/tilmannOSG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tilmannOSG/subscriptions","organizations_url":"https://api.github.com/users/tilmannOSG/orgs","repos_url":"https://api.github.com/users/tilmannOSG/repos","events_url":"https://api.github.com/users/tilmannOSG/events{/privacy}","received_events_url":"https://api.github.com/users/tilmannOSG/received_events","type":"User","site_admin":false},"body":"open bracket of if/while/switch keywords -> opening parenthesis of the expression after if/while/switch keywords","created_at":"2016-12-05T13:00:55Z","updated_at":"2016-12-05T13:00:55Z","html_url":"https://github.com/jerryscript-project/jerryscript/pull/1459#discussion_r90859394","pull_request_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459","_links":{"self":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments/90859394"},"html":{"href":"https://github.com/jerryscript-project/jerryscript/pull/1459#discussion_r90859394"},"pull_request":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459"}}},"pull_request":{"url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459","id":95661144,"html_url":"https://github.com/jerryscript-project/jerryscript/pull/1459","diff_url":"https://github.com/jerryscript-project/jerryscript/pull/1459.diff","patch_url":"https://github.com/jerryscript-project/jerryscript/pull/1459.patch","issue_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1459","number":1459,"state":"open","locked":false,"title":"Add documentation about the Coding Guidelines","user":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-29T10:09:53Z","updated_at":"2016-12-05T13:44:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaf42a4b69201e78d9b0725da775a0ff9b516ba9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459/commits","review_comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459/comments","review_comment_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1459/comments","statuses_url":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/551b005d6d7345dc834665b00041ed5c2319fa97","head":{"label":"zherczeg:coding_guidelines","ref":"coding_guidelines","sha":"551b005d6d7345dc834665b00041ed5c2319fa97","user":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"repo":{"id":52445090,"name":"jerryscript","full_name":"zherczeg/jerryscript","owner":{"login":"zherczeg","id":2270193,"avatar_url":"https://avatars.githubusercontent.com/u/2270193?v=3","gravatar_id":"","url":"https://api.github.com/users/zherczeg","html_url":"https://github.com/zherczeg","followers_url":"https://api.github.com/users/zherczeg/followers","following_url":"https://api.github.com/users/zherczeg/following{/other_user}","gists_url":"https://api.github.com/users/zherczeg/gists{/gist_id}","starred_url":"https://api.github.com/users/zherczeg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zherczeg/subscriptions","organizations_url":"https://api.github.com/users/zherczeg/orgs","repos_url":"https://api.github.com/users/zherczeg/repos","events_url":"https://api.github.com/users/zherczeg/events{/privacy}","received_events_url":"https://api.github.com/users/zherczeg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zherczeg/jerryscript","description":"Ultra-lightweight JavaScript engine for Internet of Things. http://www.jerryscript.net","fork":true,"url":"https://api.github.com/repos/zherczeg/jerryscript","forks_url":"https://api.github.com/repos/zherczeg/jerryscript/forks","keys_url":"https://api.github.com/repos/zherczeg/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zherczeg/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zherczeg/jerryscript/teams","hooks_url":"https://api.github.com/repos/zherczeg/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/zherczeg/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/zherczeg/jerryscript/events","assignees_url":"https://api.github.com/repos/zherczeg/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/zherczeg/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/zherczeg/jerryscript/tags","blobs_url":"https://api.github.com/repos/zherczeg/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zherczeg/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zherczeg/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/zherczeg/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zherczeg/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/zherczeg/jerryscript/languages","stargazers_url":"https://api.github.com/repos/zherczeg/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/zherczeg/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/zherczeg/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/zherczeg/jerryscript/subscription","commits_url":"https://api.github.com/repos/zherczeg/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/zherczeg/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/zherczeg/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/zherczeg/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/zherczeg/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/zherczeg/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zherczeg/jerryscript/merges","archive_url":"https://api.github.com/repos/zherczeg/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zherczeg/jerryscript/downloads","issues_url":"https://api.github.com/repos/zherczeg/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/zherczeg/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/zherczeg/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/zherczeg/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zherczeg/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/zherczeg/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/zherczeg/jerryscript/deployments","created_at":"2016-02-24T13:39:06Z","updated_at":"2016-02-24T13:39:10Z","pushed_at":"2016-12-05T08:59:29Z","git_url":"git://github.com/zherczeg/jerryscript.git","ssh_url":"git@github.com:zherczeg/jerryscript.git","clone_url":"https://github.com/zherczeg/jerryscript.git","svn_url":"https://github.com/zherczeg/jerryscript","homepage":"","size":10371,"stargazers_count":0,"watchers_count":0,"language":"C","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":"jerryscript-project:master","ref":"master","sha":"bed094f74f0f922b1061e0e80c301c330e242ffd","user":{"login":"jerryscript-project","id":23194380,"avatar_url":"https://avatars.githubusercontent.com/u/23194380?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryscript-project","html_url":"https://github.com/jerryscript-project","followers_url":"https://api.github.com/users/jerryscript-project/followers","following_url":"https://api.github.com/users/jerryscript-project/following{/other_user}","gists_url":"https://api.github.com/users/jerryscript-project/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryscript-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryscript-project/subscriptions","organizations_url":"https://api.github.com/users/jerryscript-project/orgs","repos_url":"https://api.github.com/users/jerryscript-project/repos","events_url":"https://api.github.com/users/jerryscript-project/events{/privacy}","received_events_url":"https://api.github.com/users/jerryscript-project/received_events","type":"Organization","site_admin":false},"repo":{"id":33339660,"name":"jerryscript","full_name":"jerryscript-project/jerryscript","owner":{"login":"jerryscript-project","id":23194380,"avatar_url":"https://avatars.githubusercontent.com/u/23194380?v=3","gravatar_id":"","url":"https://api.github.com/users/jerryscript-project","html_url":"https://github.com/jerryscript-project","followers_url":"https://api.github.com/users/jerryscript-project/followers","following_url":"https://api.github.com/users/jerryscript-project/following{/other_user}","gists_url":"https://api.github.com/users/jerryscript-project/gists{/gist_id}","starred_url":"https://api.github.com/users/jerryscript-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerryscript-project/subscriptions","organizations_url":"https://api.github.com/users/jerryscript-project/orgs","repos_url":"https://api.github.com/users/jerryscript-project/repos","events_url":"https://api.github.com/users/jerryscript-project/events{/privacy}","received_events_url":"https://api.github.com/users/jerryscript-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jerryscript-project/jerryscript","description":"Ultra-lightweight JavaScript engine for the Internet of Things.","fork":false,"url":"https://api.github.com/repos/jerryscript-project/jerryscript","forks_url":"https://api.github.com/repos/jerryscript-project/jerryscript/forks","keys_url":"https://api.github.com/repos/jerryscript-project/jerryscript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerryscript-project/jerryscript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerryscript-project/jerryscript/teams","hooks_url":"https://api.github.com/repos/jerryscript-project/jerryscript/hooks","issue_events_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/events{/number}","events_url":"https://api.github.com/repos/jerryscript-project/jerryscript/events","assignees_url":"https://api.github.com/repos/jerryscript-project/jerryscript/assignees{/user}","branches_url":"https://api.github.com/repos/jerryscript-project/jerryscript/branches{/branch}","tags_url":"https://api.github.com/repos/jerryscript-project/jerryscript/tags","blobs_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/{sha}","languages_url":"https://api.github.com/repos/jerryscript-project/jerryscript/languages","stargazers_url":"https://api.github.com/repos/jerryscript-project/jerryscript/stargazers","contributors_url":"https://api.github.com/repos/jerryscript-project/jerryscript/contributors","subscribers_url":"https://api.github.com/repos/jerryscript-project/jerryscript/subscribers","subscription_url":"https://api.github.com/repos/jerryscript-project/jerryscript/subscription","commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerryscript-project/jerryscript/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/comments{/number}","contents_url":"https://api.github.com/repos/jerryscript-project/jerryscript/contents/{+path}","compare_url":"https://api.github.com/repos/jerryscript-project/jerryscript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerryscript-project/jerryscript/merges","archive_url":"https://api.github.com/repos/jerryscript-project/jerryscript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerryscript-project/jerryscript/downloads","issues_url":"https://api.github.com/repos/jerryscript-project/jerryscript/issues{/number}","pulls_url":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls{/number}","milestones_url":"https://api.github.com/repos/jerryscript-project/jerryscript/milestones{/number}","notifications_url":"https://api.github.com/repos/jerryscript-project/jerryscript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerryscript-project/jerryscript/labels{/name}","releases_url":"https://api.github.com/repos/jerryscript-project/jerryscript/releases{/id}","deployments_url":"https://api.github.com/repos/jerryscript-project/jerryscript/deployments","created_at":"2015-04-03T01:10:31Z","updated_at":"2016-12-05T04:04:56Z","pushed_at":"2016-12-05T12:42:48Z","git_url":"git://github.com/jerryscript-project/jerryscript.git","ssh_url":"git@github.com:jerryscript-project/jerryscript.git","clone_url":"https://github.com/jerryscript-project/jerryscript.git","svn_url":"https://github.com/jerryscript-project/jerryscript","homepage":"http://jerryscript.net","size":28800,"stargazers_count":2033,"watchers_count":2033,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":218,"mirror_url":null,"open_issues_count":38,"forks":218,"open_issues":38,"watchers":2033,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459"},"html":{"href":"https://github.com/jerryscript-project/jerryscript/pull/1459"},"issue":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1459"},"comments":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/issues/1459/comments"},"review_comments":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459/comments"},"review_comment":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/pulls/1459/commits"},"statuses":{"href":"https://api.github.com/repos/jerryscript-project/jerryscript/statuses/551b005d6d7345dc834665b00041ed5c2319fa97"}}}}
{"actor":{"display_login":"tilmannOSG"}}