That is pretty much what I was using (it is what we use in Elixir core
when an exception is raised),
the issue with that is the it does not play out well with multi-line
return values, which was my use case, and therefore this proposal.


 On Fri, 10 Dec 2021 14:42:51 +0100
Wojtek Mach <woj...@wojtekmach.pl> wrote:

> Another popular pattern I've seen in the wild is:
> 
> ## Examples Foo.bar() #=> :baz
> 
> since :baz is in a comment, it is not going to be syntax highlighted,
> but I think that's fine.
> 
> On December 9, 2021, elixir-lang-core <elixir-lang-
> c...@googlegroups.com> wrote:
> > Hi list,
> > documenting functions made me realize the need to be able to disable
> > doctests per documentation entry. So I would like to propose the
> > addition of support for:
> >
> >  `@doc doctest: false`
> >  `@moduledoc doctest: false`
> >  `@typedoc doctest: false`
> >
> > (In the same fashion as we declare guards with `@doc guard: true`)
> >
> > To indicate and to disable doctests for the given documentation
> > entry within the module being defined.
> >
> > While currenty this can be done from the test file, passing the
> > :exclude
> > or :only options to `doctest`, I find it inconvenient to define what
> > gets doctested in another file and have to switch back and forth to
> > make
> > sure of this.
> > I would like to focus on my module and know whether I can write
> > invalid
> > doc tests or not.
> >
> >
> > Please let me know what you thing about this,
> > - Eksperimental
> >
> > -- 
> > You received this message because you are subscribed to the Google
> > Groups "elixir-lang-core" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to elixir-lang-core+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/elixir-lang-
> > core/61b21664.1c69fb81.f6a30.02cfSMTPIN_ADDED_MISSING%40gmr-
> > mx.google.com.  
> 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/61b35bb2.1c69fb81.637fa.d129SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to