jeremyjh / dialyxir

Mix tasks to simplify use of Dialyzer in Elixir projects.
Apache License 2.0
1.7k stars 140 forks source link

Tidy up some Dialyxir warnings, etc. #357

Closed RichMorin closed 5 years ago

RichMorin commented 5 years ago

Here are some proposed changes, intended to tidy up the Dialyxir warnings, etc.

jeremyjh commented 5 years ago

Thanks for this! Sorry for the late review. Please give the PR a meaningful name.

I'm good with all the verbiage changes, but did you see there is a compiler error in CI?

** (TokenMissingError) lib/dialyxir/warnings/pattern_match_covered.ex:52: missing terminator: """ (for heredoc starting at line 49)
    (elixir) lib/kernel/parallel_compiler.ex:206: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/6
RichMorin commented 5 years ago

Sorry about the missing double quote and meaningless PR name. Let me know if anything else needs love.

jeremyjh commented 5 years ago

The build is still failing, I think you just need to run mix format.

RichMorin commented 5 years ago

You may be amused to learn that this is the first time I've used mix format. Hope I got everything...

RichMorin commented 5 years ago

I'm sorry, but I can't figure out how to commit the tweak I made to https://github.com/RichMorin/dialyxir/blob/patch-1/lib/dialyxir/warnings/pattern_match_covered.ex

RichMorin commented 5 years ago

I've never used Travis CI and can't figure out what it's (still) unhappy about. Help?

jeremyjh commented 5 years ago

It tells you:

mix format --check-formatted
** (Mix) mix format failed due to --check-formatted.
The following files were not formatted:
  * /home/travis/build/jeremyjh/dialyxir/lib/dialyxir/warnings/pattern_match_covered.ex
  * /home/travis/build/jeremyjh/dialyxir/lib/dialyxir/warnings/improper_list_construction.ex

If you run mix format it should update those two files, then you just need to commit them.

RichMorin commented 5 years ago

I downloaded a copy of the RichMorin:patch-1 branch, copied it, and ran mix format on the copy. I then applied the changes to the files I've been editing on GitHub. So, they should be clean...

RichMorin commented 5 years ago

Refreshed my git-fu a little; tried again...

RichMorin commented 5 years ago

I just tried pushing an updated version of patch-1 - still fails. Yeeps. I think fixing this mess is above my pay grade.

jeremyjh commented 5 years ago

I fixed it up and merged.