<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Greetings,<br>
    <br>
    If you looked at <a class="moz-txt-link-freetext" href="https://github.com/ebengt/erlang_stdin_formatter">https://github.com/ebengt/erlang_stdin_formatter</a> I
    would be interested in suggestions as to where it was not
    sufficient.<br>
    <br>
    <br>
    Bengt<br>
    <br>
    <div class="moz-cite-prefix">On 05/23/2016 03:11 AM, Mark
      Bucciarelli wrote:<br>
    </div>
    <blockquote
cite="mid:CAFqAhKrixbTGsgFTAgkwKmjKPBo=kXNN9dN0f6go3Cv0QmgSuA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <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
            moz-do-not-send="true"
            href="https://github.com/mbucc/erlfmt"><a class="moz-txt-link-freetext" href="https://github.com/mbucc/erlfmt">https://github.com/mbucc/erlfmt</a></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 moz-do-not-send="true"
            href="http://18.2.1.">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 moz-do-not-send="true"
              href="mailto:roger@differentpla.net" target="_blank">roger@differentpla.net</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">I use
            vimerl (<a moz-do-not-send="true"
              href="https://github.com/jimenezrick/vimerl"
              rel="noreferrer" target="_blank">https://github.com/jimenezrick/vimerl</a>),
            which has an<br>
            escript included:<br>
            <a moz-do-not-send="true"
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 class="HOEnZb">
              <div class="h5"><br>
                On 28 April 2016 at 07:24, Pierre Fenoll <<a
                  moz-do-not-send="true"
                  href="mailto:pierrefenoll@gmail.com"><a class="moz-txt-link-abbreviated" href="mailto:pierrefenoll@gmail.com">pierrefenoll@gmail.com</a></a>>
                wrote:<br>
                > I made <a moz-do-not-send="true"
                  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
                  moz-do-not-send="true" href="mailto:t@crashfast.com"><a class="moz-txt-link-abbreviated" href="mailto:t@crashfast.com">t@crashfast.com</a></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 moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:t@crashfast.com">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 moz-do-not-send="true"
                  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
                > <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
                > <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
                > <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
                <a moz-do-not-send="true"
                  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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
erlang-questions mailing list
<a class="moz-txt-link-abbreviated" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>
<a class="moz-txt-link-freetext" href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>