You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foo.erl:2:2: no module definition
% 2| -export([test1/0,test2/0]).
% | ^
foo.erl:3:2: the module name must not be empty
% 3| -spec test1() -> ok.
% | ^
foo.erl:6:2: the module name must not be empty
% 6| -spec test2() -> ok.
% | ^
Expected behavior
Only foo.erl:2:2: no module definition reported
Affected versions
I tested with 26.0.2
Additional context
Add any other context about the problem here. If you wish to attach Erlang code you can either write it directly in the post using code tags, create a gist, or attach it as a zip file to this post.
The text was updated successfully, but these errors were encountered:
Summary: Port the fix from erlang/otp#7655 to elp_lint.erl
Reviewed By: robertoaloi
Differential Revision: D49367307
fbshipit-source-id: afc2c9911914ebe08c224b5b4a29afa9f92d2e27
Describe the bug
When a file does not have a module declaration, a
module name must not be empty
diagnostic is generated for each spec in it.To Reproduce
Steps to reproduce the behavior.
./homebrew/Cellar/erlang/26.0.2/bin/erlc -Wall foo.erl
Result
Expected behavior
Only
foo.erl:2:2: no module definition
reportedAffected versions
I tested with 26.0.2
Additional context
Add any other context about the problem here. If you wish to attach Erlang code you can either write it directly in the post using code tags, create a gist, or attach it as a zip file to this post.
The text was updated successfully, but these errors were encountered: