{"action":"created","issue":{"url":"https://api.github.com/repos/troessner/reek/issues/708","labels_url":"https://api.github.com/repos/troessner/reek/issues/708/labels{/name}","comments_url":"https://api.github.com/repos/troessner/reek/issues/708/comments","events_url":"https://api.github.com/repos/troessner/reek/issues/708/events","html_url":"https://github.com/troessner/reek/issues/708","id":107262830,"number":708,"title":"undefined method `type' for nil:NilClass (NoMethodError) when calling `reek`","user":{"login":"letz","id":1807341,"avatar_url":"https://avatars.githubusercontent.com/u/1807341?v=3","gravatar_id":"","url":"https://api.github.com/users/letz","html_url":"https://github.com/letz","followers_url":"https://api.github.com/users/letz/followers","following_url":"https://api.github.com/users/letz/following{/other_user}","gists_url":"https://api.github.com/users/letz/gists{/gist_id}","starred_url":"https://api.github.com/users/letz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letz/subscriptions","organizations_url":"https://api.github.com/users/letz/orgs","repos_url":"https://api.github.com/users/letz/repos","events_url":"https://api.github.com/users/letz/events{/privacy}","received_events_url":"https://api.github.com/users/letz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-18T19:26:29Z","updated_at":"2015-09-20T21:57:17Z","closed_at":null,"body":"When I try to run the command `reek` or `reek .` it gives me the following error\r\n\r\n```\r\nundefined method `type' for nil:NilClass (NoMethodError)\r\n```\r\n\r\nAny ideas?\r\n\r\nStack trace:\r\n```\r\n$ reek\r\n/Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/ast/sexp_extensions.rb:199:in `attr_with_writable_flag?': undefined method `type' for nil:NilClass (NoMethodError)\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/ast/sexp_extensions.rb:193:in `attribute_writer?'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:95:in `process_send'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:137:in `process_begin'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:46:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:70:in `block in process_def'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:200:in `block in inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:213:in `push'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:199:in `inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:68:in `process_def'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:53:in `block in process_module'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:200:in `block in inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:213:in `push'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:199:in `inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:52:in `process_module'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:137:in `process_begin'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:83:in `block in process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:82:in `process_default'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:53:in `block in process_module'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:200:in `block in inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:213:in `push'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:199:in `inside_new_context'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:52:in `process_module'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:44:in `process'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:38:in `result'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/tree_walker.rb:27:in `walk'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/examiner.rb:87:in `run'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/examiner.rb:42:in `initialize'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/cli/reek_command.rb:13:in `new'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/cli/reek_command.rb:13:in `block in execute'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/cli/reek_command.rb:12:in `each'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/cli/reek_command.rb:12:in `execute'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/lib/reek/cli/application.rb:33:in `execute'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/gems/reek-3.4.0/bin/reek:12:in `<top (required)>'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/bin/reek:23:in `load'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/bin/reek:23:in `<main>'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'\r\n\tfrom /Users/letz/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/troessner/reek/issues/comments/141840126","html_url":"https://github.com/troessner/reek/issues/708#issuecomment-141840126","issue_url":"https://api.github.com/repos/troessner/reek/issues/708","id":141840126,"user":{"login":"andyw8","id":13400,"avatar_url":"https://avatars.githubusercontent.com/u/13400?v=3","gravatar_id":"","url":"https://api.github.com/users/andyw8","html_url":"https://github.com/andyw8","followers_url":"https://api.github.com/users/andyw8/followers","following_url":"https://api.github.com/users/andyw8/following{/other_user}","gists_url":"https://api.github.com/users/andyw8/gists{/gist_id}","starred_url":"https://api.github.com/users/andyw8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyw8/subscriptions","organizations_url":"https://api.github.com/users/andyw8/orgs","repos_url":"https://api.github.com/users/andyw8/repos","events_url":"https://api.github.com/users/andyw8/events{/privacy}","received_events_url":"https://api.github.com/users/andyw8/received_events","type":"User","site_admin":false},"created_at":"2015-09-20T21:57:17Z","updated_at":"2015-09-20T21:57:17Z","body":"Without seeing your code which is being parsed it's very difficult to know what's going wrong.\r\n\r\nCan you try running reek on each directory in your project individually (e.g. `reek lib`), and then, if possible, narrow down the individual file which causes the parsing error? "}}