Doctor has some issues with generated code. I had to exclude this module in my project because, despite adding documentation, it wasn't able to recognize it.
The issue seems to be that the quote(name) construct is not handled properly. When using doctor.explain, I first got an error because of 2 instances of:
function
|> inspect() # Atom.to_string()
|> String.length()
that I needed to patch (as shown above), which then resulted in the following:
Function @doc @spec
--------------------------------------------------------------------
:filename/0 ✓ ✓
{:unquote, [line: 165], [{:name, [line: 165], nil}]}/2 ✓ ✓
{:unquote, [line: 161], [{:name, [line: 161], nil}]}/1 ✓ ✓
{:unquote, [line: 156], [{:name, [line: 156], nil}]}/1 ✓ ✓
{:unquote, [line: 150], [{:name, [line: 150], nil}]}/1 ✓ ✓
{:unquote, [line: 147], [{:name, [line: 147], nil}]}/1 ✓ ✓
:info/2 ✓ ✓
:names/0 ✓ ✓
:colors/0 ✓ ✓
:create_color_functions_ast/3 ✓ ✓
:extract_property/2 ✓ ✓
Module Results:
Doc Coverage: 18.2%
Spec Coverage: 18.2%
Has Module Doc: ✓
Has Struct Spec: N/A
** (BadBooleanError) expected a boolean on left-side of "and", got:
:not_struct
(doctor 0.22.0) lib/reporters/module_explain.ex:85: Doctor.Reporters.ModuleExplain.valid_module?/2
(doctor 0.22.0) lib/mix/tasks/doctor.explain.ex:111: Mix.Tasks.Doctor.Explain.run_default/2
(mix 1.19.3) lib/mix/task.ex:499: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.19.3) lib/mix/cli.ex:129: Mix.CLI.run_task/2
/home/maze/.asdf/installs/elixir/1.19.3-otp-28/bin/mix:7: (file)
I suspect that doctor has an issue with the macros. If I find time, I might check deeper into the code to figure out what goes wrong. For now I can live with simply excluding the module from the checks
Doctorhas some issues with generated code. I had to exclude this module in my project because, despite adding documentation, it wasn't able to recognize it.The issue seems to be that the
quote(name)construct is not handled properly. When usingdoctor.explain, I first got an error because of 2 instances of:that I needed to patch (as shown above), which then resulted in the following:
Function @doc @spec -------------------------------------------------------------------- :filename/0 ✓ ✓ {:unquote, [line: 165], [{:name, [line: 165], nil}]}/2 ✓ ✓ {:unquote, [line: 161], [{:name, [line: 161], nil}]}/1 ✓ ✓ {:unquote, [line: 156], [{:name, [line: 156], nil}]}/1 ✓ ✓ {:unquote, [line: 150], [{:name, [line: 150], nil}]}/1 ✓ ✓ {:unquote, [line: 147], [{:name, [line: 147], nil}]}/1 ✓ ✓ :info/2 ✓ ✓ :names/0 ✓ ✓ :colors/0 ✓ ✓ :create_color_functions_ast/3 ✓ ✓ :extract_property/2 ✓ ✓ Module Results: Doc Coverage: 18.2% Spec Coverage: 18.2% Has Module Doc: ✓ Has Struct Spec: N/A ** (BadBooleanError) expected a boolean on left-side of "and", got: :not_struct (doctor 0.22.0) lib/reporters/module_explain.ex:85: Doctor.Reporters.ModuleExplain.valid_module?/2 (doctor 0.22.0) lib/mix/tasks/doctor.explain.ex:111: Mix.Tasks.Doctor.Explain.run_default/2 (mix 1.19.3) lib/mix/task.ex:499: anonymous fn/3 in Mix.Task.run_task/5 (mix 1.19.3) lib/mix/cli.ex:129: Mix.CLI.run_task/2 /home/maze/.asdf/installs/elixir/1.19.3-otp-28/bin/mix:7: (file)I suspect that
doctorhas an issue with the macros. If I find time, I might check deeper into the code to figure out what goes wrong. For now I can live with simply excluding the module from the checks