a_contract_between_doc_and_def/0 below won't get tested or documented, without any warning to that effect:
defmodule NormContractVsDoctest do
@moduledoc """
Demonstrates interaction between `@contract` and `@doc`
"""
use Norm
@doc """
Return `:a`.
iex> a_bare()
:a
"""
def a_bare, do: :a
@doc """
Return `:a`.
iex> a_contract_between_doc_and_def()
:a
"""
@contract a_contract_between_doc_and_def() :: :a
def a_contract_between_doc_and_def, do: :a
@contract a_contract_before_doc() :: :a
@doc """
Return `:a`.
iex> a_contract_before_doc()
:a
"""
def a_contract_before_doc, do: :a
end
Strikes me the suppression might not be fixable without help from both, but you might well be in a position to see the @doc above @contract and give warning. Failing that, let me know and I'll raise a PR to document the problem so people don't have to find it in the issues.
a_contract_between_doc_and_def/0below won't get tested or documented, without any warning to that effect:Strikes me the suppression might not be fixable without help from both, but you might well be in a position to see the
@docabove@contractand give warning. Failing that, let me know and I'll raise a PR to document the problem so people don't have to find it in the issues.