doctor
doctor copied to clipboard
Error when running doctor.explain
** (BadBooleanError) expected a boolean on left-side of "and", got: :not_struct (doctor 0.21.0) lib/reporters/module_explain.ex:85: Doctor.Reporters.ModuleExplain.valid_module?/2 (doctor 0.21.0) lib/mix/tasks/doctor.explain.ex:111: Mix.Tasks.Doctor.Explain.run_default/2 (mix 1.15.7) lib/mix/task.ex:455: anonymous fn/3 in Mix.Task.run_task/5 (mix 1.15.7) lib/mix/cli.ex:92: Mix.CLI.run_task/2 /home/lud/.local/share/rtx/installs/elixir/v1.15.7-otp-26/bin/mix:2: (file)
This function returns :not_struct
instead of a boolean:
defp valid_struct_spec?(module_report, config) do
(config.struct_type_spec_required and module_report.has_struct_type_spec == :not_struct) or
module_report.has_struct_type_spec
end