<div dir="ltr">Hi,<div><br></div><div>I didn't look at that as I didn't find it before.</div><div><br></div><div>I tried it, but only got comments out.  Maybe I'm not using it right?</div><div><br></div><div>







<p class="">~/src/erlang_stdin_formatter/src<span class="">$ cat erlfmt </span></p>
<p class="">#!/usr/bin/env escript</p>
<p class="">main([]) -></p>
<p class=""><span class="">     </span>bepp:main([prog]).</p>
<p class="">~/src/erlang_stdin_formatter/src<span class="">$ ./erlfmt < a_program.erl</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">Thanks,</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">Mark</span></p><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 23, 2016 at 1:24 AM, Bengt Kleberg <span dir="ltr"><<a href="mailto:bengt.kleberg@ericsson.com" target="_blank">bengt.kleberg@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Greetings,<br>
    <br>
    If you looked at <a href="https://github.com/ebengt/erlang_stdin_formatter" target="_blank">https://github.com/ebengt/erlang_stdin_formatter</a> I
    would be interested in suggestions as to where it was not
    sufficient.<span class=""><font color="#888888"><br>
    <br>
    <br>
    Bengt</font></span><div><div class="h5"><br>
    <br>
    <div>On 05/23/2016 03:11 AM, Mark
      Bucciarelli wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Thanks for the suggestions!
        <div><br>
        </div>
        <div>I took a look at each, but none of the three options really
          gave me what I wanted.  So I ended up wrapping erl_tidy in a
          way that gives me what I want:</div>
        <div><br>
        </div>
        <div>:%!erlfmt</div>
        <div><br>
        </div>
        <div>Here's the source, such as it is: <a href="https://github.com/mbucc/erlfmt" target="_blank"></a><a href="https://github.com/mbucc/erlfmt" target="_blank">https://github.com/mbucc/erlfmt</a>.</div>
        <div><br>
        </div>
        <div>It was able to format 1,794 out of 1,795 source files under
          /usr/local/Cellar/erlang/<a href="http://18.2.1." target="_blank">18.2.1.</a>  It failed to format
          lib/erlang/lib/wx-1.6/src/gen/gl.erl, which is 971KB in size.</div>
        <div><br>
        </div>
        <div>Mark</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Apr 28, 2016 at 3:09 AM, Roger
          Lipscombe <span dir="ltr"><<a href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I use
            vimerl (<a href="https://github.com/jimenezrick/vimerl" rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl</a>),
            which has an<br>
            escript included:<br>
            <a href="https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl" rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl/blob/master/indent/erlang_indent.erl</a><br>
            <br>
            I *believe* that it's equivalent to Emacs erlang-mode, but I
            don't<br>
            have Emacs installed :-P<br>
            <div>
              <div><br>
                On 28 April 2016 at 07:24, Pierre Fenoll <<a href="mailto:pierrefenoll@gmail.com" target="_blank"></a><a href="mailto:pierrefenoll@gmail.com" target="_blank">pierrefenoll@gmail.com</a>>
                wrote:<br>
                > I made <a href="https://github.com/fenollp/erlang-formatter" rel="noreferrer" target="_blank">https://github.com/fenollp/erlang-formatter</a>
                though it depends on<br>
                > OTP's Emacs erlang-mode.<br>
                ><br>
                > erlang-mode has been the de facto authority in
                terms of linting.<br>
                > However it has some issues, like when indenting
                typed record definitions.<br>
                ><br>
                > Dropping the dependency on Emacs would be great but
                again, which dev/CI<br>
                > machine doesn't have Emacs?<br>
                ><br>
                > On 28 Apr 2016, at 00:46, Tristan Sloughter <<a href="mailto:t@crashfast.com" target="_blank"></a><a href="mailto:t@crashfast.com" target="_blank">t@crashfast.com</a>>
                wrote:<br>
                ><br>
                > Short answer: No.<br>
                ><br>
                > Long answer: No, but I'd love for someone with the
                time to clean up<br>
                > <a href="https://github.com/tsloughter/erl_tidy" rel="noreferrer" target="_blank">https://github.com/tsloughter/erl_tidy</a>
                which is a rebar3 plugin named `fmt`<br>
                > around erl_tidy. the erl_tidy code has issues with
                type specs and other<br>
                > newer syntax and will currently just dump out the
                AST for those. These fixes<br>
                > would then, of course, need to be submitted
                upstream to OTP, but this plugin<br>
                > provides a testing ground and hopefully motivation
                to someone out there :)<br>
                ><br>
                > --<br>
                > Tristan Sloughter<br>
                > <a href="mailto:t@crashfast.com" target="_blank">t@crashfast.com</a><br>
                ><br>
                ><br>
                ><br>
                > On Wed, Apr 27, 2016, at 05:37 PM, Mark Bucciarelli
                wrote:<br>
                ><br>
                > Hi,<br>
                ><br>
                > I'm wondering if anyone here uses or knows of a
                utility like gofmt for<br>
                > Erlang.  If you're not familiar with gofmt, it
                simply reads source code on<br>
                > stdin and writes formatted source code to stdout.<br>
                ><br>
                > I looked at erl_tidy but cannot see how to make it
                read stdin.<br>
                ><br>
                > Thanks,<br>
                ><br>
                > Mark<br>
                > _______________________________________________<br>
                > erlang-questions mailing list<br>
                > <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
                > <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                ><br>
                ><br>
                ><br>
                > _______________________________________________<br>
                > erlang-questions mailing list<br>
                > <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
                > <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                ><br>
                ><br>
                > _______________________________________________<br>
                > erlang-questions mailing list<br>
                > <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
                > <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
                ><br>
                _______________________________________________<br>
                erlang-questions mailing list<br>
                <a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
                <a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
erlang-questions mailing list
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div></div>