lpil / dogma

:closed_lock_with_key: A code style linter for Elixir
Other
471 stars 52 forks source link

Error in Phoenix project #112

Closed henrik closed 9 years ago

henrik commented 9 years ago

Running dogma in a Phoenix project and getting an error:

** (EXIT from #PID<0.48.0>) an exception was raised:
    ** (FunctionClauseError) no function clause matching in Dogma.Rule.QuotesInString.check_binary_strings/2
        lib/dogma/rule/quotes_in_string.ex:25: Dogma.Rule.QuotesInString.check_binary_strings(nil, [])
        (elixir) lib/enum.ex:977: anonymous fn/3 in Enum.map/2
        (elixir) lib/enum.ex:1261: Enum."-reduce/3-lists^foldl/2-0-"/3
        (elixir) lib/enum.ex:977: Enum.map/2
        lib/dogma/script.ex:88: Dogma.Script.run_tests/2
        lib/dogma/rules.ex:34: Dogma.Rules.test_script/3
        (elixir) lib/task/supervised.ex:74: Task.Supervised.do_apply/2
        (elixir) lib/task/supervised.ex:19: Task.Supervised.async/3
        (stdlib) proc_lib.erl:237: :proc_lib.init_p_do_apply/3

Debugging it a bit, what seems to be going on is this:

Some ideas for improvement:

knewter commented 9 years ago

I actually just came here to leave this exact Issue. It's like you're in my head @henrik

henrik commented 9 years ago

@knewter Yeah, total coincidence, heard about it from some screencast series :)

henrik commented 9 years ago

@lpil Thanks for fixing this so quickly! :heart:

lpil commented 9 years ago

Did someone mention Dogma in a screencast? That might explain why I've got more visitors the last few days.

No problem @henrik! I feel a bit bad, I keep putting out versions with show stopping bugs. That's v0.x, I suppose :shipit:

lpil commented 9 years ago

I really dislike how github puts that reference comment in every time you force push.

henrik commented 9 years ago

@lpil Yeah, @knewter mentioned it in a recent episode of his http://elixirsips.com/ :)