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

Vlad Dumitrescu vladdu55@REDACTED
Fri Dec 18 09:05:21 CET 2015


I believe (but haven't checked) that if you feed your code through the
preprocessor (which you should do because it may contain macros), then epp
will handle the "dot at eof" problem for you.

best regards,
Vlad


On Fri, Dec 18, 2015 at 4:33 AM, Sparr <sparr0@REDACTED> wrote:

> 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),[]),
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151218/0a3412df/attachment.htm>


More information about the erlang-questions mailing list