idlehands

idlehands

Author of Testing Elixir

Possible to skip formatting comments with the formatter?

Hey folks. I am writing some code that is embedded in a book and am using the Elixir formatter to make sure the code lines aren’t too long and that the code is formatted as readers would expect it. I typically use the code formatter as-is but in this case, I need to figure out if there is a way to get it to leave in-line comments alone as the comments that I’m referring to are actually for callouts in the book.

I’ve read the docs and it doesn’t look like there is a way for me to do this but I thought I would ask to see if anyone else has done this before I give up.

Thanks.

Marked As Solved

idlehands

idlehands

Author of Testing Elixir

I had a core team member confirm that this can’t be done both due to style choices, but more importantly, there is a technical limitation that prevents it.

So, I will just keep moving those comments back. :slight_smile:

Also Liked

kokolegorille

kokolegorille

I had the same question in this topic…

but the solution provided will not fit your use case.

Where Next?

Popular in Questions Top

New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement