{"action":"created","comment":{"url":"https://api.github.com/repos/endlessm/difflint/pulls/comments/40608155","id":40608155,"diff_hunk":"@@ -0,0 +1,52 @@\n+# Difflint #\n+\n+Do you have a codebase with inconsistent code style, and you want to\n+start checking your commits with a linter; but you don't want to rewrite\n+the entire repository, since it will mess up your history and the\n+ability to `git bisect`?\n+\n+**Difflint** will check only the changes that you make in each commit.\n+It's suitable for using as a Git pre-commit hook.\n+\n+## Linters supported ##\n+\n+- [JSCS](http://jscs.info) (JavaScript)\n+- [JSHint](http://jshint.com/docs) (JavaScript)\n+\n+## Requirements ##\n+\n+- Python 3.3 or later\n+- JSCS\n+- JSHint\n+- NPM for installing JSCS and JSHint\n+\n+## Installation ##\n+\n+- Clone this repository, and run `python3 setup.py install`.\n+- Install Difflint as a pre-commit hook by adding a line saying\n+  `difflint` to `.git/hooks/pre-commit` in the project that you want to\n+  lint. (Create the `.git/hooks/pre-commit` file if it doesn't exist.)\n+- Install JSCS and JSHint with `npm install -g jscs` and `npm install -g jshint`.\n+- If you don't want JSCS and JSHint's default settings, create `.jscsrc`\n+  and `.jshintrc` files where JSCS and JSHint can find them.\n+  We've created example ones in this repository, named `example.jscsrc`\n+  and `example.jshintrc` that you can rename and customize.\n+  See [JSCS documentation](http://jscs.info/overview) and [JSHint\n+  documentation](http://jshint.com/docs/) for more information.\n+\n+## Usage ##\n+\n+Use `difflint -c` to make sure that Difflint can find all the linting\n+tools it needs.\n+\n+Whenever you make a commit in a Git repository where you've installed\n+Difflint as a pre-commit hook, Difflint will check the lines you're\n+about to commit and warn you if you've added any new errors that weren't\n+already there.\n+\n+You can check without committing by staging the files you wish to check\n+(with `git add`) and running `difflint` without any arguments.\n+\n+## Report Bugs ##","path":"README.md","position":50,"original_position":50,"commit_id":"65e7de989d38dac127e4599659545223f2278933","original_commit_id":"65e7de989d38dac127e4599659545223f2278933","user":{"login":"Kurt-von-Laven","id":974910,"avatar_url":"https://avatars.githubusercontent.com/u/974910?v=3","gravatar_id":"","url":"https://api.github.com/users/Kurt-von-Laven","html_url":"https://github.com/Kurt-von-Laven","followers_url":"https://api.github.com/users/Kurt-von-Laven/followers","following_url":"https://api.github.com/users/Kurt-von-Laven/following{/other_user}","gists_url":"https://api.github.com/users/Kurt-von-Laven/gists{/gist_id}","starred_url":"https://api.github.com/users/Kurt-von-Laven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kurt-von-Laven/subscriptions","organizations_url":"https://api.github.com/users/Kurt-von-Laven/orgs","repos_url":"https://api.github.com/users/Kurt-von-Laven/repos","events_url":"https://api.github.com/users/Kurt-von-Laven/events{/privacy}","received_events_url":"https://api.github.com/users/Kurt-von-Laven/received_events","type":"User","site_admin":false},"body":"nit: Consider \"Report Bugs\" --> \"Bug Reporting\" for consistency with other section headers.","created_at":"2015-09-28T21:30:12Z","updated_at":"2015-09-28T21:30:12Z","html_url":"https://github.com/endlessm/difflint/pull/4#discussion_r40608155","pull_request_url":"https://api.github.com/repos/endlessm/difflint/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/comments/40608155"},"html":{"href":"https://github.com/endlessm/difflint/pull/4#discussion_r40608155"},"pull_request":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/endlessm/difflint/pulls/4","id":46186591,"html_url":"https://github.com/endlessm/difflint/pull/4","diff_url":"https://github.com/endlessm/difflint/pull/4.diff","patch_url":"https://github.com/endlessm/difflint/pull/4.patch","issue_url":"https://api.github.com/repos/endlessm/difflint/issues/4","number":4,"state":"open","locked":false,"title":"Generalize configuration files","user":{"login":"ptomato","id":459371,"avatar_url":"https://avatars.githubusercontent.com/u/459371?v=3","gravatar_id":"","url":"https://api.github.com/users/ptomato","html_url":"https://github.com/ptomato","followers_url":"https://api.github.com/users/ptomato/followers","following_url":"https://api.github.com/users/ptomato/following{/other_user}","gists_url":"https://api.github.com/users/ptomato/gists{/gist_id}","starred_url":"https://api.github.com/users/ptomato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptomato/subscriptions","organizations_url":"https://api.github.com/users/ptomato/orgs","repos_url":"https://api.github.com/users/ptomato/repos","events_url":"https://api.github.com/users/ptomato/events{/privacy}","received_events_url":"https://api.github.com/users/ptomato/received_events","type":"User","site_admin":false},"body":"Rationale for this pull request: An internal issue requesting example linter configuration files in the difflint tool and removing the Endless-specific configuration files, in order to make the tool more general and more useful for external users.\r\n\r\nI think the best solution would be to rely on JSCS and JSHint's default search behaviour for configuration files (from [JSHint documentation](http://jshint.com/docs/)):\r\n\r\n> use a special file `.jshintrc` or put your config into your project's `package.json` file under the `jshintConfig` property. In case of `.jshintrc`, JSHint will start looking for this file in the same directory as the file that's being linted. If not found, it will move one level up the directory tree all the way up to the filesystem root.\r\n\r\nThat would mean removing the web and nodejs \"modes\", which currently don't work correctly anyway. Instead, Difflint users should just commit their desired jscs and jshint configuration files to their projects, or put them in their home directories. I believe that's the way those tools were meant to be used, so that's likely how any new users of Difflint would expect it to work.","created_at":"2015-09-28T17:49:06Z","updated_at":"2015-09-28T21:30:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"71183953b9df966bd6bd736270bc161d2e2f834b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/endlessm/difflint/pulls/4/commits","review_comments_url":"https://api.github.com/repos/endlessm/difflint/pulls/4/comments","review_comment_url":"https://api.github.com/repos/endlessm/difflint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/endlessm/difflint/issues/4/comments","statuses_url":"https://api.github.com/repos/endlessm/difflint/statuses/65e7de989d38dac127e4599659545223f2278933","head":{"label":"endlessm:generalize-configuration-files","ref":"generalize-configuration-files","sha":"65e7de989d38dac127e4599659545223f2278933","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":41323345,"name":"difflint","full_name":"endlessm/difflint","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/difflint","description":"Linter that will examine only new changes as you commit them","fork":false,"url":"https://api.github.com/repos/endlessm/difflint","forks_url":"https://api.github.com/repos/endlessm/difflint/forks","keys_url":"https://api.github.com/repos/endlessm/difflint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/difflint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/difflint/teams","hooks_url":"https://api.github.com/repos/endlessm/difflint/hooks","issue_events_url":"https://api.github.com/repos/endlessm/difflint/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/difflint/events","assignees_url":"https://api.github.com/repos/endlessm/difflint/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/difflint/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/difflint/tags","blobs_url":"https://api.github.com/repos/endlessm/difflint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/difflint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/difflint/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/difflint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/difflint/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/difflint/languages","stargazers_url":"https://api.github.com/repos/endlessm/difflint/stargazers","contributors_url":"https://api.github.com/repos/endlessm/difflint/contributors","subscribers_url":"https://api.github.com/repos/endlessm/difflint/subscribers","subscription_url":"https://api.github.com/repos/endlessm/difflint/subscription","commits_url":"https://api.github.com/repos/endlessm/difflint/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/difflint/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/difflint/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/difflint/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/difflint/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/difflint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/difflint/merges","archive_url":"https://api.github.com/repos/endlessm/difflint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/difflint/downloads","issues_url":"https://api.github.com/repos/endlessm/difflint/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/difflint/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/difflint/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/difflint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/difflint/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/difflint/releases{/id}","created_at":"2015-08-24T19:41:51Z","updated_at":"2015-08-31T19:54:35Z","pushed_at":"2015-09-28T17:49:07Z","git_url":"git://github.com/endlessm/difflint.git","ssh_url":"git@github.com:endlessm/difflint.git","clone_url":"https://github.com/endlessm/difflint.git","svn_url":"https://github.com/endlessm/difflint","homepage":"","size":220,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"endlessm:master","ref":"master","sha":"cc5aa23f2fe74eb2de9408c1471a78ef41213013","user":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"repo":{"id":41323345,"name":"difflint","full_name":"endlessm/difflint","owner":{"login":"endlessm","id":1930958,"avatar_url":"https://avatars.githubusercontent.com/u/1930958?v=3","gravatar_id":"","url":"https://api.github.com/users/endlessm","html_url":"https://github.com/endlessm","followers_url":"https://api.github.com/users/endlessm/followers","following_url":"https://api.github.com/users/endlessm/following{/other_user}","gists_url":"https://api.github.com/users/endlessm/gists{/gist_id}","starred_url":"https://api.github.com/users/endlessm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endlessm/subscriptions","organizations_url":"https://api.github.com/users/endlessm/orgs","repos_url":"https://api.github.com/users/endlessm/repos","events_url":"https://api.github.com/users/endlessm/events{/privacy}","received_events_url":"https://api.github.com/users/endlessm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/endlessm/difflint","description":"Linter that will examine only new changes as you commit them","fork":false,"url":"https://api.github.com/repos/endlessm/difflint","forks_url":"https://api.github.com/repos/endlessm/difflint/forks","keys_url":"https://api.github.com/repos/endlessm/difflint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/endlessm/difflint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/endlessm/difflint/teams","hooks_url":"https://api.github.com/repos/endlessm/difflint/hooks","issue_events_url":"https://api.github.com/repos/endlessm/difflint/issues/events{/number}","events_url":"https://api.github.com/repos/endlessm/difflint/events","assignees_url":"https://api.github.com/repos/endlessm/difflint/assignees{/user}","branches_url":"https://api.github.com/repos/endlessm/difflint/branches{/branch}","tags_url":"https://api.github.com/repos/endlessm/difflint/tags","blobs_url":"https://api.github.com/repos/endlessm/difflint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/endlessm/difflint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/endlessm/difflint/git/refs{/sha}","trees_url":"https://api.github.com/repos/endlessm/difflint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/endlessm/difflint/statuses/{sha}","languages_url":"https://api.github.com/repos/endlessm/difflint/languages","stargazers_url":"https://api.github.com/repos/endlessm/difflint/stargazers","contributors_url":"https://api.github.com/repos/endlessm/difflint/contributors","subscribers_url":"https://api.github.com/repos/endlessm/difflint/subscribers","subscription_url":"https://api.github.com/repos/endlessm/difflint/subscription","commits_url":"https://api.github.com/repos/endlessm/difflint/commits{/sha}","git_commits_url":"https://api.github.com/repos/endlessm/difflint/git/commits{/sha}","comments_url":"https://api.github.com/repos/endlessm/difflint/comments{/number}","issue_comment_url":"https://api.github.com/repos/endlessm/difflint/issues/comments{/number}","contents_url":"https://api.github.com/repos/endlessm/difflint/contents/{+path}","compare_url":"https://api.github.com/repos/endlessm/difflint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/endlessm/difflint/merges","archive_url":"https://api.github.com/repos/endlessm/difflint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/endlessm/difflint/downloads","issues_url":"https://api.github.com/repos/endlessm/difflint/issues{/number}","pulls_url":"https://api.github.com/repos/endlessm/difflint/pulls{/number}","milestones_url":"https://api.github.com/repos/endlessm/difflint/milestones{/number}","notifications_url":"https://api.github.com/repos/endlessm/difflint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/endlessm/difflint/labels{/name}","releases_url":"https://api.github.com/repos/endlessm/difflint/releases{/id}","created_at":"2015-08-24T19:41:51Z","updated_at":"2015-08-31T19:54:35Z","pushed_at":"2015-09-28T17:49:07Z","git_url":"git://github.com/endlessm/difflint.git","ssh_url":"git@github.com:endlessm/difflint.git","clone_url":"https://github.com/endlessm/difflint.git","svn_url":"https://github.com/endlessm/difflint","homepage":"","size":220,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/4"},"html":{"href":"https://github.com/endlessm/difflint/pull/4"},"issue":{"href":"https://api.github.com/repos/endlessm/difflint/issues/4"},"comments":{"href":"https://api.github.com/repos/endlessm/difflint/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/endlessm/difflint/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/endlessm/difflint/statuses/65e7de989d38dac127e4599659545223f2278933"}}}}