-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
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
Missing new line in the generate files #380
Comments
Hi, @slashmili, thanks for the report. |
Sure thing, sorry I forgot to mention the version:
the diff in highlighted text: diff --git a/lib/helloworld/hello_reply.pb.ex b/lib/helloworld/hello_reply.pb.ex
index 0cfaaec..bbf8ec1 100644
--- a/lib/helloworld/hello_reply.pb.ex
+++ b/lib/helloworld/hello_reply.pb.ex
@@ -4,4 +4,4 @@ defmodule Helloworld.HelloReply do
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
field :message, 1, type: :string
-end
\ No newline at end of file
+end
diff --git a/lib/helloworld/hello_request.pb.ex b/lib/helloworld/hello_request.pb.ex
index 639a09c..71d7267 100644
--- a/lib/helloworld/hello_request.pb.ex
+++ b/lib/helloworld/hello_request.pb.ex
@@ -4,4 +4,4 @@ defmodule Helloworld.HelloRequest do
use Protobuf, syntax: :proto3, protoc_gen_elixir_version: "0.13.0"
field :name, 1, type: :string
-end
\ No newline at end of file
+end Software versions:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
After the files are generated, despite the fact that we pass it to Generator.Util.format/1 when they get saved into file the code is missing a
\n
char.The problem arias because we expect all the source code in our repo pass
mix format
check but the formatter doesn't like the files are missing\n
at the end of the file. We usually have to runmix format
after files are generated which is fine but then on the next regenerate, all the files get changed.Expected
We add extra
\n
to all places we generate the code!Question
Where do you think is the right place to add newline? in
Generator.Util.format/1
or add it to all places that callGenerator.Util.format/1
?The text was updated successfully, but these errors were encountered: