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:
Mention IO.puts somewhere in the description/hints
Allow IO.write in the check and reword the comment to include the possibility
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.
Even though I wrote this analyzer check, I still got it wrong :)
I used
IO.write
instead ofIO.puts
. In hindsight, usingIO.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 withFile.write
, then swappedFile
toIO
.I can think of a couple of ways to fix this:
IO.puts
somewhere in the description/hintsIO.write
in the check and reword the comment to include the possibility:ok
" check).I like 3, because that's what I would do as a mentor.