Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running doctor.explain #62

Open
lud-wj opened this issue Dec 18, 2023 · 0 comments
Open

Error when running doctor.explain #62

lud-wj opened this issue Dec 18, 2023 · 0 comments

Comments

@lud-wj
Copy link

lud-wj commented Dec 18, 2023

** (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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant