{"action":"created","comment":{"url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/comments/59158456","id":59158456,"diff_hunk":"@@ -0,0 +1,65 @@\n+# This Makefile is supposed to run on the Travis CI server and also locally\n+# it assumes the nodejs package managaer npm is installed\n+\n+# make magic not needed\n+MAKEFLAGS += --no-builtin-rules\n+.SUFFIXES:\n+\n+BUILD_DIR=build\n+SOURCEFILE = CppCoreGuidelines.md\n+SOURCEPATH = ../$(SOURCEFILE)\n+\n+.PHONY: default\n+default: all\n+\n+.PHONY: all\n+all: \\\n+check-markdown \\\n+check-references\n+\n+\n+$(BUILD_DIR):\n+\tmkdir -p $(BUILD_DIR)\n+\n+#### clean: remove all files generated by the productive rules\n+.PHONY: clean\n+clean:\n+\trm -rf $(BUILD_DIR)\n+\n+#### distclean: remove all helper executables that may be downloaded by the Makefile\n+.PHONY: distclean\n+distclean:\n+\trm -rf ./nodejs/node_modules\n+\n+\n+#### check markdown\n+\n+## run remark markdown checker based on configuration in .remarkrc\n+.PHONY: check-markdown\n+check-markdown: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BUILD_DIR) Makefile\n+## run remark, paste output to temporary file\n+\tcd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed --frail\n+\n+## show a diff with changes remark suggests\n+.PHONY: show-diff\n+show-diff: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BUILD_DIR) Makefile\n+\tcd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed\n+## compare temporary file to original, error and fail with message if differences exist\n+\tdiff $(SOURCEPATH) $(BUILD_DIR)/$(SOURCEFILE).fixed -u3 || \\\n+\t(echo \"Error: remark found bad markdown syntax, see output above\" && false)\n+\n+\n+.PHONY: check-references\n+check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile\n+## check references unique\n+\trm $(BUILD_DIR)/$(SOURCEFILE).uniq\n+\tgrep -oP '(?<=<a name=\")[^\\\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq\n+## check if output has data\n+\tif [ -s \"build/CppCoreGuidelines.md.uniq\" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi","path":"scripts/Makefile","position":58,"original_position":58,"commit_id":"d53c17b9ee165885cbc517ad68bde42793a31697","original_commit_id":"d53c17b9ee165885cbc517ad68bde42793a31697","user":{"login":"tkruse","id":1525116,"avatar_url":"https://avatars.githubusercontent.com/u/1525116?v=3","gravatar_id":"","url":"https://api.github.com/users/tkruse","html_url":"https://github.com/tkruse","followers_url":"https://api.github.com/users/tkruse/followers","following_url":"https://api.github.com/users/tkruse/following{/other_user}","gists_url":"https://api.github.com/users/tkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/tkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkruse/subscriptions","organizations_url":"https://api.github.com/users/tkruse/orgs","repos_url":"https://api.github.com/users/tkruse/repos","events_url":"https://api.github.com/users/tkruse/events{/privacy}","received_events_url":"https://api.github.com/users/tkruse/received_events","type":"User","site_admin":false},"body":"using -s here to check that file is empty, it may get created by the previous command. Not sure if a -f check is required before...","created_at":"2016-04-11T06:26:32Z","updated_at":"2016-04-11T06:26:32Z","html_url":"https://github.com/isocpp/CppCoreGuidelines/pull/191#discussion_r59158456","pull_request_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191","_links":{"self":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/comments/59158456"},"html":{"href":"https://github.com/isocpp/CppCoreGuidelines/pull/191#discussion_r59158456"},"pull_request":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191"}}},"pull_request":{"url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191","id":46163986,"html_url":"https://github.com/isocpp/CppCoreGuidelines/pull/191","diff_url":"https://github.com/isocpp/CppCoreGuidelines/pull/191.diff","patch_url":"https://github.com/isocpp/CppCoreGuidelines/pull/191.patch","issue_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/191","number":191,"state":"open","locked":false,"title":"travis configuration","user":{"login":"tkruse","id":1525116,"avatar_url":"https://avatars.githubusercontent.com/u/1525116?v=3","gravatar_id":"","url":"https://api.github.com/users/tkruse","html_url":"https://github.com/tkruse","followers_url":"https://api.github.com/users/tkruse/followers","following_url":"https://api.github.com/users/tkruse/following{/other_user}","gists_url":"https://api.github.com/users/tkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/tkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkruse/subscriptions","organizations_url":"https://api.github.com/users/tkruse/orgs","repos_url":"https://api.github.com/users/tkruse/repos","events_url":"https://api.github.com/users/tkruse/events{/privacy}","received_events_url":"https://api.github.com/users/tkruse/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nso my general idea here is to have automated quality checks for each pull request. This uses the free CI service Travic CI (https://travis-ci.org) that is well established in the open-source / github community.\r\n\r\nTo enable this, after merging this PR, an admin of this github repo has to create a free travis account, and add the CppCoreGuidelines repo to the repos that travis will monitor.\r\n\r\nAfter that, all pull requests will automatically trigger a run of the shell commands in the ```.travis.yml``` file. This will automatically show build status in the pull requests. As an example, I did this for my clone, and here is an example pull request that fails the build:\r\n\r\nhttps://github.com/tkruse/CppCoreGuidelines/pulls\r\nhttps://github.com/tkruse/CppCoreGuidelines/pull/1\r\n\r\nAs you can see, both the overview and the PR itself show that a build has failed, and it is possible to navigate to Travis to see the cause of the failure.\r\n\r\nThis PR provides an initial check using mdast (https://github.com/wooorm/mdast), which reformats markdown. Thanks to my previous PRs (and the effort of all other contributors), the markdown seems compliant except for the code blocks indents, which need to be fixed anyway. mdast can be used to fix them automatically.\r\n\r\nThe scripts used here are based on Gnu `make` and npm (nodejs package manager https://www.npmjs.com/) which are ubiquitous enough to be provided by default on travis. The idea is that any contributor can quickly see on github that their PR has issues, and can also locally run `make` to check locally before fixing their PR. This allows the other reviewers to focus on other things in the reviews than puny markdown mistakes, it saves everybody's time.\r\n\r\nThere are many way to add the files, I tried to hide them away in a ```scripts``` folder to be unobstrusive, but still this requires a toplevel .travis.yml file and a .gitignore (to prevent junk in the PRs).\r\n\r\nI have further ideas of including spell checking, and running compilers / c++ linters on all code examples to make sure they compile and suffice some minimal consensus of pretty code.","created_at":"2015-09-28T14:34:21Z","updated_at":"2016-04-11T06:26:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f41195792edf9c51f8bfba3ecf1b66cb3a27db15","assignee":{"login":"AndrewPardoe","id":9937771,"avatar_url":"https://avatars.githubusercontent.com/u/9937771?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewPardoe","html_url":"https://github.com/AndrewPardoe","followers_url":"https://api.github.com/users/AndrewPardoe/followers","following_url":"https://api.github.com/users/AndrewPardoe/following{/other_user}","gists_url":"https://api.github.com/users/AndrewPardoe/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewPardoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewPardoe/subscriptions","organizations_url":"https://api.github.com/users/AndrewPardoe/orgs","repos_url":"https://api.github.com/users/AndrewPardoe/repos","events_url":"https://api.github.com/users/AndrewPardoe/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewPardoe/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191/commits","review_comments_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191/comments","review_comment_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/comments{/number}","comments_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/191/comments","statuses_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/statuses/d53c17b9ee165885cbc517ad68bde42793a31697","head":{"label":"tkruse:travis","ref":"travis","sha":"d53c17b9ee165885cbc517ad68bde42793a31697","user":{"login":"tkruse","id":1525116,"avatar_url":"https://avatars.githubusercontent.com/u/1525116?v=3","gravatar_id":"","url":"https://api.github.com/users/tkruse","html_url":"https://github.com/tkruse","followers_url":"https://api.github.com/users/tkruse/followers","following_url":"https://api.github.com/users/tkruse/following{/other_user}","gists_url":"https://api.github.com/users/tkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/tkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkruse/subscriptions","organizations_url":"https://api.github.com/users/tkruse/orgs","repos_url":"https://api.github.com/users/tkruse/repos","events_url":"https://api.github.com/users/tkruse/events{/privacy}","received_events_url":"https://api.github.com/users/tkruse/received_events","type":"User","site_admin":false},"repo":{"id":43162160,"name":"CppCoreGuidelines","full_name":"tkruse/CppCoreGuidelines","owner":{"login":"tkruse","id":1525116,"avatar_url":"https://avatars.githubusercontent.com/u/1525116?v=3","gravatar_id":"","url":"https://api.github.com/users/tkruse","html_url":"https://github.com/tkruse","followers_url":"https://api.github.com/users/tkruse/followers","following_url":"https://api.github.com/users/tkruse/following{/other_user}","gists_url":"https://api.github.com/users/tkruse/gists{/gist_id}","starred_url":"https://api.github.com/users/tkruse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkruse/subscriptions","organizations_url":"https://api.github.com/users/tkruse/orgs","repos_url":"https://api.github.com/users/tkruse/repos","events_url":"https://api.github.com/users/tkruse/events{/privacy}","received_events_url":"https://api.github.com/users/tkruse/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tkruse/CppCoreGuidelines","description":"The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++","fork":true,"url":"https://api.github.com/repos/tkruse/CppCoreGuidelines","forks_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/forks","keys_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/teams","hooks_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/hooks","issue_events_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/issues/events{/number}","events_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/events","assignees_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/assignees{/user}","branches_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/branches{/branch}","tags_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/tags","blobs_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/git/refs{/sha}","trees_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/statuses/{sha}","languages_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/languages","stargazers_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/stargazers","contributors_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/contributors","subscribers_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/subscribers","subscription_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/subscription","commits_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/commits{/sha}","git_commits_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/git/commits{/sha}","comments_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/comments{/number}","issue_comment_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/issues/comments{/number}","contents_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/contents/{+path}","compare_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/merges","archive_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/downloads","issues_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/issues{/number}","pulls_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/pulls{/number}","milestones_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/milestones{/number}","notifications_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/labels{/name}","releases_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/releases{/id}","deployments_url":"https://api.github.com/repos/tkruse/CppCoreGuidelines/deployments","created_at":"2015-09-25T16:58:00Z","updated_at":"2015-09-25T16:56:00Z","pushed_at":"2016-04-09T09:40:18Z","git_url":"git://github.com/tkruse/CppCoreGuidelines.git","ssh_url":"git@github.com:tkruse/CppCoreGuidelines.git","clone_url":"https://github.com/tkruse/CppCoreGuidelines.git","svn_url":"https://github.com/tkruse/CppCoreGuidelines","homepage":null,"size":15752,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"isocpp:master","ref":"master","sha":"033918b998d09cef326db1e81d6d3413449a0c2c","user":{"login":"isocpp","id":13841574,"avatar_url":"https://avatars.githubusercontent.com/u/13841574?v=3","gravatar_id":"","url":"https://api.github.com/users/isocpp","html_url":"https://github.com/isocpp","followers_url":"https://api.github.com/users/isocpp/followers","following_url":"https://api.github.com/users/isocpp/following{/other_user}","gists_url":"https://api.github.com/users/isocpp/gists{/gist_id}","starred_url":"https://api.github.com/users/isocpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isocpp/subscriptions","organizations_url":"https://api.github.com/users/isocpp/orgs","repos_url":"https://api.github.com/users/isocpp/repos","events_url":"https://api.github.com/users/isocpp/events{/privacy}","received_events_url":"https://api.github.com/users/isocpp/received_events","type":"Organization","site_admin":false},"repo":{"id":41058054,"name":"CppCoreGuidelines","full_name":"isocpp/CppCoreGuidelines","owner":{"login":"isocpp","id":13841574,"avatar_url":"https://avatars.githubusercontent.com/u/13841574?v=3","gravatar_id":"","url":"https://api.github.com/users/isocpp","html_url":"https://github.com/isocpp","followers_url":"https://api.github.com/users/isocpp/followers","following_url":"https://api.github.com/users/isocpp/following{/other_user}","gists_url":"https://api.github.com/users/isocpp/gists{/gist_id}","starred_url":"https://api.github.com/users/isocpp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isocpp/subscriptions","organizations_url":"https://api.github.com/users/isocpp/orgs","repos_url":"https://api.github.com/users/isocpp/repos","events_url":"https://api.github.com/users/isocpp/events{/privacy}","received_events_url":"https://api.github.com/users/isocpp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/isocpp/CppCoreGuidelines","description":"The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++","fork":false,"url":"https://api.github.com/repos/isocpp/CppCoreGuidelines","forks_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/forks","keys_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/keys{/key_id}","collaborators_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/teams","hooks_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/hooks","issue_events_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/events{/number}","events_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/events","assignees_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/assignees{/user}","branches_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/branches{/branch}","tags_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/tags","blobs_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/git/refs{/sha}","trees_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/git/trees{/sha}","statuses_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/statuses/{sha}","languages_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/languages","stargazers_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/stargazers","contributors_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/contributors","subscribers_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/subscribers","subscription_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/subscription","commits_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/commits{/sha}","git_commits_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/git/commits{/sha}","comments_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/comments{/number}","issue_comment_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/comments{/number}","contents_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/contents/{+path}","compare_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/compare/{base}...{head}","merges_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/merges","archive_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/downloads","issues_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues{/number}","pulls_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls{/number}","milestones_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/milestones{/number}","notifications_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/labels{/name}","releases_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/releases{/id}","deployments_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/deployments","created_at":"2015-08-19T20:22:52Z","updated_at":"2016-04-10T21:38:33Z","pushed_at":"2016-04-10T19:38:32Z","git_url":"git://github.com/isocpp/CppCoreGuidelines.git","ssh_url":"git@github.com:isocpp/CppCoreGuidelines.git","clone_url":"https://github.com/isocpp/CppCoreGuidelines.git","svn_url":"https://github.com/isocpp/CppCoreGuidelines","homepage":null,"size":18171,"stargazers_count":10043,"watchers_count":10043,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1065,"mirror_url":null,"open_issues_count":70,"forks":1065,"open_issues":70,"watchers":10043,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191"},"html":{"href":"https://github.com/isocpp/CppCoreGuidelines/pull/191"},"issue":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/191"},"comments":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/191/comments"},"review_comments":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191/comments"},"review_comment":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/pulls/191/commits"},"statuses":{"href":"https://api.github.com/repos/isocpp/CppCoreGuidelines/statuses/d53c17b9ee165885cbc517ad68bde42793a31697"}}}}