`mix doctor` shows errors for "struct spec" on resource modules

Hello. I'm getting errors in mix doctor on resource modules, like so...
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Doc Cov Spec Cov Module File Functions No Docs No Specs Module Doc Struct Spec
...
N/A N/A SomeMod some_mod.ex 0 0 0 Yes No
...
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Doc Cov Spec Cov Module File Functions No Docs No Specs Module Doc Struct Spec
...
N/A N/A SomeMod some_mod.ex 0 0 0 Yes No
...
What should I do to appease mix doctor for resources? Thanks!
2 Replies
rellen
rellenOP2y ago
One way we've found to clear the error is to add @type t :: Ash.Resource.record() to each resource module, but we're wondering if there's a better way...
ZachDaniel
ZachDaniel2y ago
I might suggest @type t :: %__MODULE__{} to make it slightly more specific and then if you want to get really fancy w/ it, you can type each field according to valid values for each attribute/calc/agg type

Did you find this page helpful?