{"action":"created","issue":{"url":"https://api.github.com/repos/rrrene/credo/issues/143","repository_url":"https://api.github.com/repos/rrrene/credo","labels_url":"https://api.github.com/repos/rrrene/credo/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/rrrene/credo/issues/143/comments","events_url":"https://api.github.com/repos/rrrene/credo/issues/143/events","html_url":"https://github.com/rrrene/credo/issues/143","id":169668502,"number":143,"title":"PipeChainStart with put_in/update_in etc","user":{"login":"adamkittelson","id":54364,"avatar_url":"https://avatars.githubusercontent.com/u/54364?v=3","gravatar_id":"","url":"https://api.github.com/users/adamkittelson","html_url":"https://github.com/adamkittelson","followers_url":"https://api.github.com/users/adamkittelson/followers","following_url":"https://api.github.com/users/adamkittelson/following{/other_user}","gists_url":"https://api.github.com/users/adamkittelson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamkittelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamkittelson/subscriptions","organizations_url":"https://api.github.com/users/adamkittelson/orgs","repos_url":"https://api.github.com/users/adamkittelson/repos","events_url":"https://api.github.com/users/adamkittelson/events{/privacy}","received_events_url":"https://api.github.com/users/adamkittelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-05T18:29:59Z","updated_at":"2016-08-07T14:33:31Z","closed_at":null,"body":"I wanted start a discussion on an aspect of the PipeChainStart rule that I'm not sure I agree with.\r\n\r\nThe rule raises a `Pipe chain should start with a raw value.` warning on things like:\r\n\r\n```elixir\r\nput_in(users[\"john\"][:age], 28)\r\n|> ....\r\n|> ....\r\n```\r\n\r\nI think that refactoring that to\r\n\r\n```elixir\r\nusers[\"john\"][:age]\r\n|> put_in(28)\r\n|> ....\r\n|> ....\r\n```\r\n\r\nis somewhat confusing in that at a glance it looks like we're looking up the value returned by `users[\"john\"][:age]` and piping it to put_in which isn't what's happening. (It still works in practice, I just think that when reading the code this way it leads to moments of confusion.)\r\n\r\n\r\nI think it still makes sense for credo to complain about this though:\r\n```elixir\r\nput_in(users, [\"john\", :age], 28)\r\n|> ....\r\n|> ....\r\n```\r\n\r\nbecause in that case I think\r\n```elixir\r\nusers\r\n|> put_in([\"john\", :age], 28)\r\n|> ....\r\n|> ...\r\n```\r\nis better. I generally prefer to use this syntax anyway but sometimes I'm not able to, e.g. when working with structs.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/rrrene/credo/issues/comments/238085810","html_url":"https://github.com/rrrene/credo/issues/143#issuecomment-238085810","issue_url":"https://api.github.com/repos/rrrene/credo/issues/143","id":238085810,"user":{"login":"rrrene","id":311914,"avatar_url":"https://avatars.githubusercontent.com/u/311914?v=3","gravatar_id":"","url":"https://api.github.com/users/rrrene","html_url":"https://github.com/rrrene","followers_url":"https://api.github.com/users/rrrene/followers","following_url":"https://api.github.com/users/rrrene/following{/other_user}","gists_url":"https://api.github.com/users/rrrene/gists{/gist_id}","starred_url":"https://api.github.com/users/rrrene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rrrene/subscriptions","organizations_url":"https://api.github.com/users/rrrene/orgs","repos_url":"https://api.github.com/users/rrrene/repos","events_url":"https://api.github.com/users/rrrene/events{/privacy}","received_events_url":"https://api.github.com/users/rrrene/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T14:33:31Z","updated_at":"2016-08-07T14:33:31Z","body":"This will be fixed in the next version (see commit reference above)."}}
{"actor":{"display_login":"rrrene"}}