Skip to content

Run the code formatter on Mix.Tasks.Compile.App #6663

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

Merged
merged 2 commits into from
Oct 9, 2017

Conversation

Nitrino
Copy link
Contributor

@Nitrino Nitrino commented Oct 9, 2017

No description provided.

Keyword.get(opts, :app, true),
Keyword.get(opts, :runtime, true),
not Keyword.get(opts, :optional, false),
app not in included_applications,
do: app
app not in included_applications, do: app
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about location do block on one line with condition

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. This is a bug. I will investigate!

Mix.raise "Application description (:description) is not a character list, got: #{inspect value}"
Mix.raise(
"Application description (:description) is not a character list, got: #{
inspect(value)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And I'm not sure about such splits of long lines with variables. How best to do in such cases?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msg = "Application description (:description) is not a character list, got: #{inspect(value)}"

or if it still doesn't fit, break using <>:

"Application description (:description) is not a character list, " <>
  "got: #{inspect(value)}"

@josevalim
Copy link
Member

Thanks @Nitrino! For the cases where the interpolation broke apart, it is best to use the concatenation operators. Regarding the do: ..., it is a bug, we will investigate and let you know once this is ready for reformatting.

@josevalim
Copy link
Member

Hi @Nitrino! I have pushed a fix to master for your long comprehension. Please rebase on latest master, run make compile again and then format the file once more. Thanks! ❤️

@Nitrino Nitrino force-pushed the format_compile_app branch 3 times, most recently from bdd5975 to 8c43b96 Compare October 9, 2017 11:59
@Nitrino Nitrino force-pushed the format_compile_app branch from 8c43b96 to a03aa0a Compare October 9, 2017 11:59
@Nitrino
Copy link
Contributor Author

Nitrino commented Oct 9, 2017

@josevalim, after rebasing from master with your fix and recompile, formatter still thinks that do: ... should be on the same line

@josevalim
Copy link
Member

@Nitrino I have tried it locally and it worked. So I will merge it here and fix it locally but meanwhile please try this:

git checkout master
make clean compile

Thank you! ❤️ 💚 💙 💛 💜

@josevalim josevalim merged commit cbd6abe into elixir-lang:master Oct 9, 2017
@Nitrino
Copy link
Contributor Author

Nitrino commented Oct 9, 2017

@josevalim thanks, make clean compile helped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants