[Pkg-erlang-devel] [check-all-the-things] 02/02: Fix erl-tidy command line

Sergei Golovan sgolovan at debian.org
Mon May 1 19:17:13 UTC 2017


On Mon, May 1, 2017 at 11:21 AM, Paul Wise <pabs at debian.org> wrote:
> On Mon, 2017-05-01 at 10:42 +0300, Sergei Golovan wrote:
>
>> Unfortunately, I don't see an easy way around this bug. Either remove
>> empty files before running erl_tidy, or write an alternative to
>> erl_tidy:dir which would execute erl_tidy:file, but only for non-empty
>> files.
>
> I'm not familiar with Erlang (just barely managed to write the snippet
> quoted) so I'm not sure how to do that.

After some thoughts I'd say that since you can't control the input,
and since erl_tidy:dir will hang for other files too (not only for
empty ones), you just can't reliably work around this bug. I've
reported it upstream, and can fix it in the Debian package, though I'm
not sure if this bug is worth freeze exception.

>
>> As a side note, the correct syntax for option is  [{test, true},
>> {verbose, false}] (note one level of braces, not two).
>
> Yes, this is from a template, which usually replaces {foo} with values,
> using {{foo}} drops the extra braces instead of replacing with values.

Okay then.

>
> PS: are you aware of any other tools for checking Erlang code?

Sorry, never needed one.

> PPS: have you considered packaging elvis, the Erlang style reviewer?

I'm afraid I don't have much time now for packaging another tool
(especially the tool I don't use myself).

>
> https://anonscm.debian.org/cgit/collab-maint/check-all-the-things.git/tree/data/erlang

I see. Very interesting project. And ambitious!

Cheers!
-- 
Sergei Golovan



More information about the Pkg-erlang-devel mailing list