{"action":"created","comment":{"url":"https://api.github.com/repos/troessner/reek/pulls/comments/34956130","id":34956130,"diff_hunk":"@@ -0,0 +1,171 @@\n+Feature: Directory directives","path":"features/configuration_files/directory_specific_directives.feature","position":1,"original_position":1,"commit_id":"fbb2b955899356625ce210f762aafd3be682816f","original_commit_id":"fbb2b955899356625ce210f762aafd3be682816f","user":{"login":"mvz","id":10898,"avatar_url":"https://avatars.githubusercontent.com/u/10898?v=3","gravatar_id":"","url":"https://api.github.com/users/mvz","html_url":"https://github.com/mvz","followers_url":"https://api.github.com/users/mvz/followers","following_url":"https://api.github.com/users/mvz/following{/other_user}","gists_url":"https://api.github.com/users/mvz/gists{/gist_id}","starred_url":"https://api.github.com/users/mvz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvz/subscriptions","organizations_url":"https://api.github.com/users/mvz/orgs","repos_url":"https://api.github.com/users/mvz/repos","events_url":"https://api.github.com/users/mvz/events{/privacy}","received_events_url":"https://api.github.com/users/mvz/received_events","type":"User","site_admin":false},"body":"Given our recent discussion about Cucumber, I think this should end up being the only configuration scenario, because it is the most complex example.","created_at":"2015-07-19T08:20:12Z","updated_at":"2015-07-19T08:20:12Z","html_url":"https://github.com/troessner/reek/pull/593#discussion_r34956130","pull_request_url":"https://api.github.com/repos/troessner/reek/pulls/593","_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments/34956130"},"html":{"href":"https://github.com/troessner/reek/pull/593#discussion_r34956130"},"pull_request":{"href":"https://api.github.com/repos/troessner/reek/pulls/593"}}},"pull_request":{"url":"https://api.github.com/repos/troessner/reek/pulls/593","id":39745420,"html_url":"https://github.com/troessner/reek/pull/593","diff_url":"https://github.com/troessner/reek/pull/593.diff","patch_url":"https://github.com/troessner/reek/pull/593.patch","issue_url":"https://api.github.com/repos/troessner/reek/issues/593","number":593,"state":"open","locked":false,"title":"Make smells configurable on a directory base.","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"body":"Ready for review! Pinging  @mvz && @chastell \r\n\r\nThis PR implements directory specific smell configuration like this:\r\n\r\n```Yaml\r\n\"web_app/app/controllers\":\r\n  NestedIterators:\r\n    enabled: false\r\n\"web_app/app/helpers\":\r\n  UtilityFunction:\r\n    enabled: false\r\n```\r\n\r\nPlease see the updated README and the file features/configuration_files/directory_specific_directives.feature (in this PR) for an overview.\r\n\r\nAs part of this, I'd like to introduce some new terminology into reek, the \"directive\", which is a specific configuration. \r\nEither for a given directory or for \"everything else\" which would be the \"default directive\" (so basically the global smell configuration from before this PR).\r\n\r\nThis PR furthermore:\r\n\r\n* fixes #594\r\n* implements the rails friendly mode (#529) as a side effect since this mode is just a set of directory specific configurations\r\n* is the precondition for the codeclimate engine (#548) since a lot (most?) of codeclimates ruby projects are rails projects and \r\n  most people would disable reek quickly when they got spammed by NestedIterators (controllers) and UtilityFunction (helpers)\r\n\r\nRegarding the specs, @mvz suggested something like\r\n\r\n```Ruby\r\nexpect('class Foo; end').to reek_of(:DataClump).with_config(...)\r\n```\r\n\r\nbut I couldn't find any \"proper\" documentation about it. I mean, if you search for \"rspec custom settings\" and so on there are a few hits for sure, but none of them seems to be a stable, solid way of doing this. \r\n\r\nWe could implement this anyways for sure, but I'd rather go with the solution in this pull request since it's obvious and straight-forward what's going on.","created_at":"2015-07-11T12:42:23Z","updated_at":"2015-07-19T08:20:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c72999c38dd45c7d27b2b3d06dc2362b7e2f517c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/troessner/reek/pulls/593/commits","review_comments_url":"https://api.github.com/repos/troessner/reek/pulls/593/comments","review_comment_url":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}","comments_url":"https://api.github.com/repos/troessner/reek/issues/593/comments","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/fbb2b955899356625ce210f762aafd3be682816f","head":{"label":"troessner:make-smells-configurable-on-a-directory-base","ref":"make-smells-configurable-on-a-directory-base","sha":"fbb2b955899356625ce210f762aafd3be682816f","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","created_at":"2008-09-05T10:48:33Z","updated_at":"2015-07-18T17:01:23Z","pushed_at":"2015-07-18T23:14:39Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":7766,"stargazers_count":1446,"watchers_count":1446,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":27,"forks":96,"open_issues":27,"watchers":1446,"default_branch":"master"}},"base":{"label":"troessner:master","ref":"master","sha":"23874382d524aeb8d133fa53e53d1ff075aff3ce","user":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"repo":{"id":49515,"name":"reek","full_name":"troessner/reek","owner":{"login":"troessner","id":271109,"avatar_url":"https://avatars.githubusercontent.com/u/271109?v=3","gravatar_id":"","url":"https://api.github.com/users/troessner","html_url":"https://github.com/troessner","followers_url":"https://api.github.com/users/troessner/followers","following_url":"https://api.github.com/users/troessner/following{/other_user}","gists_url":"https://api.github.com/users/troessner/gists{/gist_id}","starred_url":"https://api.github.com/users/troessner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troessner/subscriptions","organizations_url":"https://api.github.com/users/troessner/orgs","repos_url":"https://api.github.com/users/troessner/repos","events_url":"https://api.github.com/users/troessner/events{/privacy}","received_events_url":"https://api.github.com/users/troessner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troessner/reek","description":"Code smell detector for Ruby","fork":false,"url":"https://api.github.com/repos/troessner/reek","forks_url":"https://api.github.com/repos/troessner/reek/forks","keys_url":"https://api.github.com/repos/troessner/reek/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troessner/reek/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troessner/reek/teams","hooks_url":"https://api.github.com/repos/troessner/reek/hooks","issue_events_url":"https://api.github.com/repos/troessner/reek/issues/events{/number}","events_url":"https://api.github.com/repos/troessner/reek/events","assignees_url":"https://api.github.com/repos/troessner/reek/assignees{/user}","branches_url":"https://api.github.com/repos/troessner/reek/branches{/branch}","tags_url":"https://api.github.com/repos/troessner/reek/tags","blobs_url":"https://api.github.com/repos/troessner/reek/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troessner/reek/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troessner/reek/git/refs{/sha}","trees_url":"https://api.github.com/repos/troessner/reek/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troessner/reek/statuses/{sha}","languages_url":"https://api.github.com/repos/troessner/reek/languages","stargazers_url":"https://api.github.com/repos/troessner/reek/stargazers","contributors_url":"https://api.github.com/repos/troessner/reek/contributors","subscribers_url":"https://api.github.com/repos/troessner/reek/subscribers","subscription_url":"https://api.github.com/repos/troessner/reek/subscription","commits_url":"https://api.github.com/repos/troessner/reek/commits{/sha}","git_commits_url":"https://api.github.com/repos/troessner/reek/git/commits{/sha}","comments_url":"https://api.github.com/repos/troessner/reek/comments{/number}","issue_comment_url":"https://api.github.com/repos/troessner/reek/issues/comments{/number}","contents_url":"https://api.github.com/repos/troessner/reek/contents/{+path}","compare_url":"https://api.github.com/repos/troessner/reek/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troessner/reek/merges","archive_url":"https://api.github.com/repos/troessner/reek/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troessner/reek/downloads","issues_url":"https://api.github.com/repos/troessner/reek/issues{/number}","pulls_url":"https://api.github.com/repos/troessner/reek/pulls{/number}","milestones_url":"https://api.github.com/repos/troessner/reek/milestones{/number}","notifications_url":"https://api.github.com/repos/troessner/reek/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troessner/reek/labels{/name}","releases_url":"https://api.github.com/repos/troessner/reek/releases{/id}","created_at":"2008-09-05T10:48:33Z","updated_at":"2015-07-18T17:01:23Z","pushed_at":"2015-07-18T23:14:39Z","git_url":"git://github.com/troessner/reek.git","ssh_url":"git@github.com:troessner/reek.git","clone_url":"https://github.com/troessner/reek.git","svn_url":"https://github.com/troessner/reek","homepage":"https://github.com/troessner/reek/wiki","size":7766,"stargazers_count":1446,"watchers_count":1446,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":96,"mirror_url":null,"open_issues_count":27,"forks":96,"open_issues":27,"watchers":1446,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/troessner/reek/pulls/593"},"html":{"href":"https://github.com/troessner/reek/pull/593"},"issue":{"href":"https://api.github.com/repos/troessner/reek/issues/593"},"comments":{"href":"https://api.github.com/repos/troessner/reek/issues/593/comments"},"review_comments":{"href":"https://api.github.com/repos/troessner/reek/pulls/593/comments"},"review_comment":{"href":"https://api.github.com/repos/troessner/reek/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/troessner/reek/pulls/593/commits"},"statuses":{"href":"https://api.github.com/repos/troessner/reek/statuses/fbb2b955899356625ce210f762aafd3be682816f"}}}}