Permalink
Commits on Sep 18, 2018
  1. Bump version to publish 1.2.0. (#742)

    munificent committed Sep 18, 2018
    (Also fix a tiny missing await.)
Commits on Sep 17, 2018
  1. Add more tests for doc comment fix and fix an edge case. (#741)

    munificent committed Sep 17, 2018
    A line that didn't have a leading "*" but did have a "*" elsewhere in
    the line would have everything before the "*" trimmed.
  2. Let users control name shown in errors when reading from stdin. (#740)

    munificent committed Sep 17, 2018
    * Let users control name shown in errors when reading from stdin.
    
    Fix #739.
    
    * Explicit cast from dynamic.
Commits on Sep 14, 2018
  1. Handle all metadata annotations for optional "const". (#738)

    munificent committed Sep 14, 2018
    The visitMetadata() method is only used for metadata annotations on
    members and some other things. visitAnnotation() is where all metadata
    is handled.
    
    Fix #720.
Commits on Sep 13, 2018
  1. Revise doc comment fix (#735)

    munificent committed Sep 13, 2018
    * add fix for doc comments
    
    * Revise "--fix-doc-comments".
    
    - Treat "**/" as a valid end comment and remove both "**".
    - Don't treat "/****", etc. as a doc comment. Preserves some cases where
      users use that for boxes.
    - Don't strip the first character in lines that don't have a "*".
    - Add some more tests.
    - Bump the version and update the CHANGELOG.
    
    * Revise.
Commits on Aug 21, 2018
Commits on Aug 16, 2018
  1. Tweak for style.

    munificent committed Aug 16, 2018
  2. Ignore all non syntactic errors

    danrubel committed Aug 16, 2018
Commits on Aug 13, 2018
  1. misc: drop pkg:browser dependency and web project (#723)

    kevmoo committed Aug 13, 2018
    Web project is not supported.
    pkg:browser dependency breaks travis tests
Commits on Jul 25, 2018
Commits on Jul 17, 2018
  1. Merge branch 'chalin-max-sdk-to-3-0714' of https://github.com/chalin/…

    munificent committed Jul 17, 2018
    …dart_style into chalin-chalin-max-sdk-to-3-0714
    
    # Conflicts:
    #	CHANGELOG.md
    #	analysis_options.yaml
    #	pubspec.lock
    #	pubspec.yaml
  2. Hard split in interpolation (#714)

    munificent committed Jul 17, 2018
    * Allow hard splits inside string interpolation.
    
    Removing *all* splits broken several things. In particular, multiline
    strings and line comments inside interpolation really do need to
    maintain their splits.
    
    This allows all hard splits to split but not soft splits. It also allows
    collection literals to split. That's not ideal, but it should be a rare
    case anyway. If you don't want that to split, don't have a collection
    literal inside a string interpolation in a line that doesn't fit the
    page width.
    
    Fix #711.
    
    * Add another edge case test.
    
    * Bump version and update changelog.
    
    * Revise README.
Commits on Jul 16, 2018
  1. chore: set max SDK version to <3.0.0

    chalin committed Jul 14, 2018
Commits on Jul 6, 2018
  1. Don't split inside string interpolation. (#709)

    munificent committed Jul 6, 2018
    * Don't split inside string interpolation.
    
    When it happens, it's usually a sign that you should split the string
    yourself to avoid it. But it still looks terrible. And in multi-line
    strings, you may *want* to have lines longer than the page width, in
    which case the splitting is really bad.
    
    * Reword doc comment.
Commits on Jun 27, 2018
  1. Reformat expressions inside interpolated expressions. (#708)

    munificent committed Jun 27, 2018
    * Reformat expressions inside interpolated expressions.
    
    If it ever ends up splitting inside an interpolation, it looks pretty
    gnarly, but that's mostly a signal to the user to split up the string.
    It does nicely clean up the whitespace.
    
    More importantly, this means fixes apply inside interpolation too.
    
    Fix #226. Fix #707.
    
    * Add test for fixing "new" inside string interpolation.
    
    Also bump version before publishing.
Commits on Jun 23, 2018
Commits on Jun 18, 2018
  1. Bump to 1.1.0. (#703)

    munificent committed Jun 18, 2018
    * Bump to 1.1.0.
    
    * Update CHANGELOG.
    
    (And update bump script to do it automatically.)
  2. Don't remove "new" and "const" from dartfmt itself yet. (#701)

    munificent committed Jun 18, 2018
    Reverts d80a1ea.
    
    Since people import dartfmt as a library, I don't want to require them
    to move to Dart 2 just yet, so I'm going to postpone removing "new" and
    "const" from dartfmt itself for a while.
    
    It, of course, still supports "--fix" and is able to remove them from
    *your* code.
Commits on Jun 14, 2018
  1. Dogfood the new "--fix" stuff. (#699)

    munificent committed Jun 14, 2018
    * Dogfood the new "--fix" stuff.
    
    Use "=" for named parameter default separators. Remove unnecessary "new"
    and "const". Reformat with the latest rules.
    
    This does mean that dartfmt now only runs in --preview-dart-2, but I
    think we're close to the point in time where that's OK. It has been
    running in the Dart SDK with "--preview-dart-2" for a while.
    
    * Add --preview-dart-2 to Travis environment variables.
  2. Attempt to uniformly format code with or without "new"/"const". (#698)

    munificent committed Jun 14, 2018
    * Attempt to uniformly format code with or without "new"/"const".
    
    One problem with optional new is that dartfmt can no longer reliably
    tell what's a constructor call versus some other kind of invocation
    (usually a static method on a class). In particular, named constructor
    calls do not get formatted as part of a method chain. You get this:
    
      new Foo().named()
          .method()
          .method()
          .method();
    
    Not:
    
      new Foo()
          .named()
          .method()
          .method()
          .method();
    
    But if that were a static method call, you *would* get:
    
      Foo()
          .named()
          .method()
          .method()
          .method();
    
    This means that removing the "new"/"const" keywords from your code can
    change how its formatted (beyond just the changes caused by the lines
    being shorter). In particular, it means if you run:
    
      dartfmt --fix -w .
      dartfmt -w .
    
    The second invocation may produce changes, even though it should be
    strictly redundant. That's because the first call *does* know which
    calls are constructors because the keywords are still there when it's
    parsed, but the second does not.
    
    That violates an expectation that dartfmt is idempotent.
    
    This addresses that by having a uniform set of formatting rules for
    constructors and other invocations. To avoid ugly cases where a named
    constructor would get slurped into a method chain, it pulls out all
    static calls from method chains. So with this change you *would* get:
    
      Foo().named()
          .method()
          .method()
          .method();
    
    It does this for all static calls, not just constructors. That makes
    this a fairly large change. I've run it on a large corpus, and I
    actually think it looks pretty good with that style.
    
    There is no fully reliably way to identify a "static" call just from
    syntax. Instead, it uses the heuristic that class names are capitalized
    (but not all caps). This seems to work correctly on all but the weirdest
    code I've seen in the wild.
    
    * Update CHANGELOG.
Commits on Jun 13, 2018
Commits on Jun 8, 2018
  1. Add support for non-whitespace opt-in "style fixes". (#694)

    munificent committed Jun 8, 2018
    Implement the first fix, converting ":" to "=" as the named default
    value separator.
Commits on May 30, 2018
  1. grammar fix (#692)

    matey-jack authored and munificent committed May 30, 2018
Commits on May 15, 2018
Commits on May 14, 2018
  1. Support the latest pkg:analyzer (#689)

    kevmoo committed May 14, 2018
    Also use new constants names in dart:io from 2-dev.54
Commits on May 1, 2018
Commits on Apr 30, 2018
Commits on Apr 24, 2018
Commits on Apr 23, 2018
  1. Fix version number.

    munificent committed Apr 23, 2018
Commits on Apr 12, 2018
  1. Update CHANGELOG.md correctly

    lrhn committed Apr 12, 2018