[erlang-questions] Attempting to use erl_lint on a .erl source file

Sparr sparr0@REDACTED
Fri Dec 18 04:33:51 CET 2015


I want to lint the file as-is, not modify it to make my parsing work. The
preprocessor/compiler accepts it without a trailing newline, so should I.

On Thu, Dec 17, 2015 at 7:26 PM, Steve Vinoski <vinoski@REDACTED> wrote:

>
>
> On Thu, Dec 17, 2015 at 9:52 PM, Sparr <sparr0@REDACTED> wrote:
>
>> Figured it out with help from #erlang on freenode. If hello.erl is
>> missing the trailing newline then the last form gets missed. I'm going to
>> try to figure out how to account for that.
>>
>
> You don't need a newline specifically -- a space character will also work,
> for example. Just change this:
>
>   Forms = scan(erl_scan:tokens([],binary_to_list(B),1),[]),
>
> to this:
>
>   Forms = scan(erl_scan:tokens([],binary_to_list(B)++" ",1),[]),
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151217/55a3e906/attachment.htm>


More information about the erlang-questions mailing list