One of the same problems with `import` applies to `alias` too though, if a
library has `alias Module` in its `use` macro it would cause this warning if
you aliased it yourself to be explicit. Prehaps this is more suited to a static
analysis tool like credo which already warns you if your
Personally I feel the risk of a false positives is very low for this:
> ^ *iex *>
In how many other situations would you want a line starting with this,
before a test, and not mean for it to be a doctest? I really struggle to
come up with an example, but I might definitely have blind spots.
Yeah I agree that import is more tricky. But for me, alias is the main use
case. I'll see if I can manage a PR.
On Thursday, February 3, 2022 at 11:56:02 PM UTC+1 José Valim wrote:
> We can warn it for aliases no problems and a PR would be welcome.
>
> However, for imports it is a bit more
We can warn it for aliases no problems and a PR would be welcome.
However, for imports it is a bit more complicated because you can import
something multiple times with different parts. Furthermore, maybe a library
Bar is doing "import Foo" and you want to repeat "import Foo" for clarity.
I think
Hi Thibaut,
There are two questions I asked myself:
1. What are the broadcast cases we can warn on to help people running into
situations like these?
2. Can we emit false positives?
One thing to keep in mind is that looking for "iex>" is already a bit lax
today as it doesn't consider
If a module is aliased or imported multipled times by the module, it would
be handy to have a warning.
For example:
defmodule Foo do
alias Ecto.Changeset
alias Ecto.Changeset
end
should result in a warning "duplicate import".
This is low priority, but as there is one for unused
Hello,
While debugging some doctests I haven't written initially myself, I
realised that one can create doctests that are bogus and will be skipped
quite easily, just like this:
## Examples
iex > SomeModule.some_method("param")
"expected_output"
The culprit is the extra space between "iex"
It totally slipped my mind.
I will update the docs to make this more noticeable,
as of now if you look for "skip" the only relevant information is for
skipping tests, not modules or describe blocks.
Thank you Wojtek,
On Thu, 03 Feb 2022 15:50:49 +0100
Wojtek Mach wrote:
> This is already
This is already possible with `@describetag :skip` inside a describe
block. There's a `@moduletag :skip` too!
On February 3, 2022, elixir-lang-core wrote:
> Currently `@tag :skip` is only effictive in tests, but if I have a
> describe block with 10 test, i need to add the tag to each one
>
Currently `@tag :skip` is only effictive in tests, but if I have a
describe block with 10 test, i need to add the tag to each one
individually.
So I propose for the describe blocks to support the skip tag to ease
development testing.
--
You received this message because you are
Ah, that's much simpler!
Thank you for the help!
On Thursday, February 3, 2022 at 9:09:09 AM UTC-5 José Valim wrote:
> IIRC "mix test --formatter MyFormatter" should do it.
>
> On Thu, Feb 3, 2022 at 3:06 PM sp wrote:
>
>> Hi José! Thank you for the reply!
>>
>> I thought about that, but
IIRC "mix test --formatter MyFormatter" should do it.
On Thu, Feb 3, 2022 at 3:06 PM sp wrote:
> Hi José! Thank you for the reply!
>
> I thought about that, but couldn't see a way to change the formatter based
> on a custom flag for 'mix test'...?
>
> Ideally, I'd love to be able to run 'mix
Hi José! Thank you for the reply!
I thought about that, but couldn't see a way to change the formatter based
on a custom flag for 'mix test'...?
Ideally, I'd love to be able to run 'mix test --concise' so I can change
the formatter on the fly.
On Thursday, February 3, 2022 at 8:59:18 AM UTC-5
Hi!
ExUnit supports custom formatters, so my suggestion is to implement your
own formatter and plug it in, without a need to change Elixir. :)
On Thu, Feb 3, 2022 at 1:47 PM sp wrote:
> Hello!
>
> While working through a project I found that I just wanted a print out of
> tests that failed and
Hello!
While working through a project I found that I just wanted a print out of
tests that failed and on what line instead of the full description and
stack trace. Something like:
test/my_test.exs:5
test/my_test.exs:12
etc
I was able to 'grep' something close to this but feel it would be
15 matches
Mail list logo