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

False positive for Doc Cov with Elixir 1.12+ #41

Open
aifrak opened this issue Aug 23, 2021 · 4 comments
Open

False positive for Doc Cov with Elixir 1.12+ #41

aifrak opened this issue Aug 23, 2021 · 4 comments

Comments

@aifrak
Copy link

aifrak commented Aug 23, 2021

Hi,

I have noticed that mix doctor shows false positive for Elixir 1.12+ when I was trying to add doctor to my project.

To be sure the issue is not comming from my project or a custom .doctor.exs, I have tried with different versions of Elixir and Erlang by testing with the Phoenix project on the master branch without any .doctor.exs.

In the example below, the files lib/phoenix/code_reloader/proxy.ex, lib/phoenix/code_reloader/server.ex and lib/phoenix/config.ex should not have Doc Cov to 100%.

What we get when running mix doctor with Elixir 1.12+:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Doc Cov  Spec Cov  Module                                   File                                                      Functions  No Docs  No Specs  Module Doc  Struct Spec
...
100%     0%        Phoenix.CodeReloader                     lib/phoenix/code_reloader.ex                              2          0        2         Yes         N/A        
100%     0%        Phoenix.CodeReloader.Proxy               lib/phoenix/code_reloader/proxy.ex                        5          0        5         Yes         N/A        
100%     0%        Phoenix.CodeReloader.Server              lib/phoenix/code_reloader/server.ex                       8          0        8         Yes         N/A        
100%     20%       Phoenix.Config                           lib/phoenix/config.ex                                     10         0        8         Yes         N/A        
100%     51%       Phoenix.Controller                       lib/phoenix/controller.ex          
...

Results obtained with those versions:

  • elixir: 1.12.2, erlang: 23.3.4.5
  • elixir: 1.12.2, erlang: 24.0.5

What we should expect when running mix doctor:

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Doc Cov  Spec Cov  Module                                   File                                                      Functions  No Docs  No Specs  Module Doc  Struct Spec
...
100%     0%        Phoenix.CodeReloader                     lib/phoenix/code_reloader.ex                              2          0        2         Yes         N/A        
40%      0%        Phoenix.CodeReloader.Proxy               lib/phoenix/code_reloader/proxy.ex                        5          3        5         Yes         N/A        
50%      0%        Phoenix.CodeReloader.Server              lib/phoenix/code_reloader/server.ex                       8          4        8         Yes         N/A        
90%      20%       Phoenix.Config                           lib/phoenix/config.ex                                     10         1        8         Yes         N/A        
100%     51%       Phoenix.Controller                       lib/phoenix/controller.ex 
...

Results obtained with those versions:

  • elixir: 1.10.4, erlang: 22.3.4.20
  • elixir: 1.11.4, erlang: 23.3.4.5
  • elixir: 1.11.4, erlang: 24.0.5
@akoutmos
Copy link
Owner

Thanks for opening up this issue. I'll have to take a look at what has changed in Elixir 1.12 that would have caused this. Looking through the Elixir source code for 1.12, it doesn't look like fetch_docs has changed much 🤔

@elliotb
Copy link

elliotb commented Dec 9, 2021

This appears to no longer be an issue in Elixir 1.13.

@aifrak
Copy link
Author

aifrak commented Dec 12, 2021

I confirm what @elliotb wrote: no issue in Elixir 1.13.

Tested on the Phoenix project with Elixir 1.13.0 and Erlang 24.0.5 and 24.1.7.

@akoutmos
Copy link
Owner

That's great to hear! Still kinda concerning that I wasn't able to find a root cause for 1.12 though...

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

3 participants