exercism / elixir-analyzer

GNU Affero General Public License v3.0
31 stars 32 forks source link

Inaccurate analyzer comment in `newsletter` #164

Closed jiegillet closed 3 years ago

jiegillet commented 3 years ago
Screen Shot 2021-09-27 at 10 49 29

Even though I wrote this analyzer check, I still got it wrong :)

I used IO.write instead of IO.puts. In hindsight, using IO.puts is better, but it's not mentioned in the instructions or the hints. I got there because I rushed a bit (like always) and started with File.write, then swapped File to IO.

I can think of a couple of ways to fix this:

  1. Mention IO.puts somewhere in the description/hints
  2. Allow IO.write in the check and reword the comment to include the possibility
  3. Add a check that tells the user "This works, but IO.puts is better because it includes a newline" (and suppress the "ends with :ok" check).

I like 3, because that's what I would do as a mentor.