Commit Graph

65 Commits

Author SHA1 Message Date
Nick Cameron
67e26970c3 v0.8.5 + cargo update 2017-06-12 15:44:56 +12:00
est31
727963afe4 Update syntex_syntax
Bases on commit to switch to libsyntax by @nrc
2017-06-06 07:31:47 +02:00
Nick Cameron
a7b8dcc60d Simplify --version info 2017-05-25 16:39:44 +12:00
Nick Cameron
393ba27311 Remove dependency on Itertools 2017-05-25 16:23:07 +12:00
Nick Cameron
80f3b3c9c4 Remove multimap dep 2017-05-25 15:59:06 +12:00
Nick Cameron
219822ba3f Bump version of strings.rs and cargo update 2017-05-18 07:59:09 +12:00
Nick Cameron
18070f4041 bump version (0.8.4) and cargo update 2017-05-10 10:43:34 +12:00
est31
78d4ef1992 Drop rustc-serialize, use serde, update toml dependency 2017-05-03 10:23:50 +02:00
Nick Cameron
b46c147fed 0.8.3
Because I forgot to merge a PR into 0.8.2 that I really wanted :-(
2017-04-06 21:29:26 +12:00
Nick Cameron
fa732ede8b v0.8.2 2017-04-06 21:22:29 +12:00
Nick Cameron
6c206d2931 Skip doctests 2017-03-30 15:49:10 +13:00
Nick Cameron
7377dfc38c release v8.1 2017-03-28 13:19:59 +13:00
Nick Cameron
4ed5a3bac7 Bump version to 0.8 and cargo update 2017-03-08 10:18:10 +13:00
Andy Librian
92ef8f8fc9 include license files into archive on crates.io (#1340) (#1354) 2017-03-08 08:51:23 +13:00
Igor Gnatenko
106e011511 bump syntex_* to 0.58
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:41:32 +01:00
Igor Gnatenko
3323056893 bump regex to 0.2
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:09:31 +01:00
Igor Gnatenko
b9dfd29ce6 bump env_logger to 0.4
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-02-26 15:09:28 +01:00
Jake Goulding
d947646d6f Add categories to Cargo.toml 2017-01-20 12:44:44 -05:00
Nick Cameron
907134c2d1 v0.7.1 2017-01-20 08:21:46 +13:00
Nick Cameron
6572874965 Update to latest Syntex
As a side-effect of the Path changes, we are now a bit more aggressive about normalising paths.
2017-01-20 08:20:49 +13:00
Nick Cameron
923423fa32 v0.7.0 and cargo update 2017-01-17 13:12:08 +13:00
Erick Tryzelaar
836682eef4 Version bump for toml, unicode-segmentation, itertools, and walkdir 2016-12-23 11:26:23 -08:00
Erick Tryzelaar
e67ffcfb21 Update to the latest syntex module
One notable feature is this this adds support for the experimental
`let x = loop { ... break $expr; }` syntax. This also includes a
test for formatting all the break and continue variations.
2016-12-23 11:20:07 -08:00
Nick Cameron
d3eba76e4d update Serde, etc.
Lots of changes to how closures work
2016-11-21 11:02:18 +13:00
Nick Cameron
61ab06a92e v0.6.3 2016-11-20 10:37:34 +13:00
Nick Cameron
f1df5c1aa9 cargo update 2016-10-07 12:58:18 +13:00
Nick Cameron
4418fab4f2 Update to latest Syntex
+ Cargo update
+ 0.6.2 release
2016-09-16 15:28:02 +12:00
Nick Cameron
d022f05f34 v0.6.0 2016-08-11 10:08:59 +12:00
Kamal Marhubi
5361f61110 Include git commit and worktree status in version output (#1060)
This will help in debugging issues as rustfmt gets more users.

If the working tree is clean, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (9f5ed3b)

If the working tree is dirty, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (9f5ed3b worktree dirty)

If git is unavailable, output looks like

    $ target/debug/rustfmt -V
    0.5.0 (git commit unavailable)

To avoid rebuilds on changing tests, the build script will only rerun if
files under src/ are changed. This means the actual git status may show
changed files and this would not show up in the version. This should not
be an issue as files not in src/ should not affect the build output.
2016-06-12 10:38:03 +02:00
Kamal Marhubi
9759068e62 print_diff: Don't print color codes if output is not a tty
On unix, `term::stdout()` just reads the `TERM` environment variable to
decide what features are available. It does not check if the output file
descriptor is in fact a tty. This resulted in printing escape codes when
redirecting output.
2016-05-31 15:15:33 +02:00
Kamal Marhubi
c311b30cac Add type to represent collection of lines in files
This commit adds a type to represent lines in files, and adds it to the
`Config` struct. It will be used for restricting formatting to specific
lines.

Refs #434
2016-05-31 01:24:38 +02:00
Kamal Marhubi
120e1a0b51 deps: Update syntex_syntax to 0.33
This bump brings syntex_syntax support for `..` in tuple and tuple
struct patterns, which come from RFC 1492:
  https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md

These new patterns are not properly handled in this PR; instead #1021
tracks supporting them.

Refs #1021
2016-05-30 14:53:04 +02:00
Kamal Marhubi
66cac1f3e9 Handle pub(restricted) (#1013)
* Handle pub(restricted)

This commit properly handles pub(restricted) as introduced in RFC 1422
[0]. The syntax support was added in #971, but they were not correctly
formatted.

[0] https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md

Fixes #970

* Drop #[inline] attribute on format_visibility

* Make newly non-failing functions return String

The change to `format_visibiilty` means that `format_header` and
`format_unit_struct` can no longer fail. Their return type is updated to
reflect that.
2016-05-28 00:58:25 +02:00
Nick Cameron
67edc325c6 0.5 release 2016-05-13 12:34:55 -07:00
Kamal Marhubi
8309d1a74c deps: Update syntex_syntax to 0.32.0 2016-05-05 16:39:34 -04:00
Kamal Marhubi
fd38acb86f deps: Update syntex_syntax to 0.31.0
Most of the churn on this bump comes from the `Visibility` enum changing
from

    pub enum Visibility {
        Public,
        Inherited,
    }

to

    pub enum Visibility {
        Public,
        Crate,
        Restricted { path: P<Path>, id: NodeId },
        Inherited,
    }

which require taking `Visibility` by reference in most places. The new
variants are not handled at this point.

Refs #970
2016-05-01 23:06:58 -04:00
Nick Cameron
19849fea15 Update the world 2016-04-08 15:51:06 +12:00
Nick Cameron
19768da5c9 Version bump - v0.4
closes #870
2016-03-30 15:19:46 +13:00
Kamal Marhubi
f2b5931c6d deps: Update syntex_syntax to 0.30.0
This bump includes ability to parse inclusive ranges (`a...b`) and the
question mark operator.

Refs #867, #890
2016-03-29 00:04:44 -04:00
Kamal Marhubi
589dabda2f deps: Update syntex_syntax to 0.29.1 2016-03-02 13:08:21 -05:00
Nick Cameron
82a177e486 Version bump
Fixes #805
2016-02-09 17:28:45 +13:00
Utkarsh Kukreti
6a12818c23 Bump diff to 0.1.8. Fixes #606. 2015-12-28 17:22:03 +05:30
Nick Cameron
ecf12778fb Use replace rather than overwrite for cargo fmt 2015-12-16 18:07:59 +13:00
Nick Cameron
909b3560ba Add quick start info to README.md, cargo update. 2015-12-16 17:58:20 +13:00
Jan Likar
f5d1c06739 Remove unneeded dependencies
Remove dependency on Walkdir, which is no longer needed, because
cargo-fmt now uses cargo read-manifest to get a list of targets to
format.
2015-12-15 23:57:05 +01:00
Jan Likar
ec509b0517 Change Cargo.toml
Change Cargo.toml to include cargo-fmt's dependencies and add a
default cargo-fmt feature to enable users to only build rustfmt
if they don't need cargo-fmt.
2015-12-14 15:32:03 +01:00
Nick Cameron
78957d371e Use crates.io for everything 2015-12-14 08:03:58 +13:00
Nick Cameron
e94bd34a06 cargo upgrade, bug fix, and prepare for packaging 2015-12-08 16:19:23 +13:00
Alex Crichton
26958a1c10 Move option parsing to crates.io-based getopts crate
Should help adding more options in the future as well!
2015-10-23 13:46:14 -07:00
Alex Crichton
579fb34417 Remove dependence on rustc/rustc_driver, use syntex
Instead just parse manually with the `syntex_syntax` crate which is a clone of
libsyntax on crates.io which builds on stable Rust.
2015-10-23 13:46:14 -07:00