{"action":"created","issue":{"url":"https://api.github.com/repos/smpallen99/ex_admin/issues/181","repository_url":"https://api.github.com/repos/smpallen99/ex_admin","labels_url":"https://api.github.com/repos/smpallen99/ex_admin/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/smpallen99/ex_admin/issues/181/comments","events_url":"https://api.github.com/repos/smpallen99/ex_admin/issues/181/events","html_url":"https://github.com/smpallen99/ex_admin/issues/181","id":167188998,"number":181,"title":"A lot of warnings like 'warning: the variable \"var_name\" is unsafe as it has been set inside a case/cond/receive/if/&&/||.'","user":{"login":"sobolevn","id":4660275,"avatar_url":"https://avatars.githubusercontent.com/u/4660275?v=3","gravatar_id":"","url":"https://api.github.com/users/sobolevn","html_url":"https://github.com/sobolevn","followers_url":"https://api.github.com/users/sobolevn/followers","following_url":"https://api.github.com/users/sobolevn/following{/other_user}","gists_url":"https://api.github.com/users/sobolevn/gists{/gist_id}","starred_url":"https://api.github.com/users/sobolevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sobolevn/subscriptions","organizations_url":"https://api.github.com/users/sobolevn/orgs","repos_url":"https://api.github.com/users/sobolevn/repos","events_url":"https://api.github.com/users/sobolevn/events{/privacy}","received_events_url":"https://api.github.com/users/sobolevn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-23T15:28:18Z","updated_at":"2016-08-05T08:16:13Z","closed_at":null,"body":"After upgrading to `elixir 1.3` I have faced a lot of warnings! Here are the ones coming from `ex_admin`:\r\n\r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n> \r\n> warning: the variable \"resources\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/form.ex\r\n> \r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n> \r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n> \r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n> \r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n> \r\n> warning: variable speaker is unused\r\n>   lib/ex_admin/show.ex:15\r\n> \r\n> warning: the variable \"controller_route\" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:\r\n> \r\n>     case int do\r\n>       1 -> atom = :one\r\n>       2 -> atom = :two\r\n>     end\r\n> \r\n> should be written as\r\n> \r\n>     atom =\r\n>       case int do\r\n>         1 -> :one\r\n>         2 -> :two\r\n>       end\r\n> \r\n> Unsafe variable found at:\r\n>   lib/ex_admin/register.ex:184\r\n\r\nHere's my `mix.lock` information:\r\n\r\n`\"ex_admin\": {:hex, :ex_admin, \"0.7.6\", \"8ea0b7d21a073bd901edf37a10808a0c504d9bd952e41b19cb78a896ab253c00\", [:mix], [{:xain, \"~> 0.5.3\", [hex: :xain, optional: false]}, {:scrivener, \"~> 1.0\", [hex: :scrivener, optional: false]}, {:phoenix_html, \"~> 2.5\", [hex: :phoenix_html, optional: false]}, {:phoenix_ecto, \"~> 2.0\", [hex: :phoenix_ecto, optional: false]}, {:phoenix, \"~> 1.1\", [hex: :phoenix, optional: false]}, {:inflex, \"~> 1.5\", [hex: :inflex, optional: false]}, {:factory_girl_elixir, \"~> 0.1.1\", [hex: :factory_girl_elixir, optional: false]}, {:exactor, \"~> 2.2.0\", [hex: :exactor, optional: false]}, {:ex_queb, \"~> 0.1\", [hex: :ex_queb, optional: false]}, {:ecto, \"~> 1.1\", [hex: :ecto, optional: false]}, {:decimal, \"~> 1.0\", [hex: :decimal, optional: false]}, {:csvlixir, \"~> 1.0.0\", [hex: :csvlixir, optional: false]}, {:cowboy, \"~> 1.0\", [hex: :cowboy, optional: false]}]},`"},"comment":{"url":"https://api.github.com/repos/smpallen99/ex_admin/issues/comments/237785153","html_url":"https://github.com/smpallen99/ex_admin/issues/181#issuecomment-237785153","issue_url":"https://api.github.com/repos/smpallen99/ex_admin/issues/181","id":237785153,"user":{"login":"aeons","id":1432894,"avatar_url":"https://avatars.githubusercontent.com/u/1432894?v=3","gravatar_id":"","url":"https://api.github.com/users/aeons","html_url":"https://github.com/aeons","followers_url":"https://api.github.com/users/aeons/followers","following_url":"https://api.github.com/users/aeons/following{/other_user}","gists_url":"https://api.github.com/users/aeons/gists{/gist_id}","starred_url":"https://api.github.com/users/aeons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeons/subscriptions","organizations_url":"https://api.github.com/users/aeons/orgs","repos_url":"https://api.github.com/users/aeons/repos","events_url":"https://api.github.com/users/aeons/events{/privacy}","received_events_url":"https://api.github.com/users/aeons/received_events","type":"User","site_admin":false},"created_at":"2016-08-05T08:16:13Z","updated_at":"2016-08-05T08:16:13Z","body":"There's still one left at\r\n```\r\nUnsafe variable found at:\r\n  lib/ex_admin/form.ex:32\r\n```"}}
{"actor":{"display_login":"aeons"}}