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

Paul Wise pabs at debian.org
Mon May 1 08:21:15 UTC 2017


On Mon, 2017-05-01 at 10:42 +0300, Sergei Golovan wrote:

> Looks like a bug in erl_tidy:file/2. It spawns a new Erlang process
> for tidying a file, but doesn't react if the child exits with error. I
> don't know if it's helpful but the attached patch seems to fix this
> bug (haven't reported it upstream yet).

Thanks for the diagnosis and the patch.

> 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.

> 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.

PS: are you aware of any other tools for checking Erlang code?
PPS: have you considered packaging elvis, the Erlang style reviewer?

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

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-erlang-devel/attachments/20170501/8e5f5bf9/attachment.sig>


More information about the Pkg-erlang-devel mailing list