We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I run rebar3 format for source code that has some syntax error in some function, that function just scapes from source code.
rebar3 format
Make syntax error then run rebar3 format.
We get a description in a console and damaged source code.
Run rebar3 with DEBUG=1 and paste its output here. (sorry, I can not do that - The code with syntax error is gone)
** 73: unterminated string starting with ",[Result]).\n " **
Bug description for reproducing:
line Text="abc123, without ending " in the end line "{ok, MP} = re:compile(Regex)" do not have and "," at the end
-module(recipe_14). -export([]). %% %% Tests %% -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). research_02_01() -> %Expected = "12345678910", %?debugFmt("~p~n",[Text]), Regex = "\\w+\\d+", Text="abc123, {ok, MP} = re:compile(Regex) {match, [Result]} = re:run(Text, MP, [{capture, first, list}]), ?debugFmt("~p~n",[Result]). %?_assertEqual(Expected, Result). -endif.
H:\books1\regular expression\regex\Regular Expressions Cookbook 2nd\github\code\ch02\basic>rebar3 format ===> Error parsing files: {modified_ast,"lib/recipe_14/src/recipe_14.erl", "lib/recipe_14/src/recipe_14.erl"} Stack: [{rebar3_ast_formatter,format,3, [{file,"h:/books1/regular expression/regex/Regular Expressions Cookbook 2nd/github/code/ch02/basic/_build/default/plugins/rebar3_format/src/rebar3_ast_formatter.erl"}, {line,40}]}, {rebar3_format_prv,'-format_files/2-fun-0-',2, [{file,"h:/books1/regular expression/regex/Regular Expressions Cookbook 2nd/github/code/ch02/basic/_build/default/plugins/rebar3_format/src/rebar3_format_prv.erl"}, {line,125}]}, {lists,'-filter/2-lc$^0/1-0-',2,[{file,"lists.erl"},{line,1290}]}, {rebar3_format_prv,format_files,2, [{file,"h:/books1/regular expression/regex/Regular Expressions Cookbook 2nd/github/code/ch02/basic/_build/default/plugins/rebar3_format/src/rebar3_format_prv.erl"}, {line,123}]}, {rebar3_format_prv,do,1, [{file,"h:/books1/regular expression/regex/Regular Expressions Cookbook 2nd/github/code/ch02/basic/_build/default/plugins/rebar3_format/src/rebar3_format_prv.erl"}, {line,43}]}, {rebar_core,do,2, [{file,"/home/runner/work/rebar3/rebar3/src/rebar_core.erl"}, {line,155}]}, {rebar3,run_aux,2, [{file,"/home/runner/work/rebar3/rebar3/src/rebar3.erl"}, {line,182}]}, {rebar3,main,1, [{file,"/home/runner/work/rebar3/rebar3/src/rebar3.erl"}, {line,66}]}] =ERROR REPORT==== 27-Aug-2021::09:00:37.853000 === modified_ast: lib/recipe_14/src/recipe_14.erl removed: [{error,no}] added: [{tree,no, {attr,no,[],none}, "* * 73 : unterminated string starting with \",[Result]).\\n \" * *"}] ===> Unknown Formatting Error: {modified_ast,"lib/recipe_14/src/recipe_14.erl", "lib/recipe_14/src/recipe_14.erl"}
The text was updated successfully, but these errors were encountered:
I found a minimal example to reproduce the bug…
-module(recipe_15). -export([x/0]). x() -> "This is an unterminated string, some:more(stuff).
This results in the following when formatted…
-module(recipe_15). -export([x/0]). ** 6: unterminated string starting with "This is an unter" **
It's actually an issue with ktn_dodger. When we try to parse the file with no_fail… it fails anyway.
ktn_dodger
no_fail
Sorry, something went wrong.
I opened inaka/katana-code#66 for this.
No branches or pull requests
Describe the bug
When I run
rebar3 format
for source code that has some syntax error in some function, that function just scapes from source code.To Reproduce
Make syntax error then run
rebar3 format
.Expected behavior
We get a description in a console and damaged source code.
Rebar3 Log
Run rebar3 with DEBUG=1 and paste its output here. (sorry, I can not do that - The code with syntax error is gone)
Additional context
Bug description for reproducing:
Source code:
Stacktrace:
The text was updated successfully, but these errors were encountered: