Commit Graph

5667 Commits

Author SHA1 Message Date
Nick Cameron
2cf2230002 Merge pull request #596 from marcusklaas/where-indent
Fix brace indentation after where clause
2015-11-14 10:04:04 +13:00
Nick Cameron
fb6faed99b Merge pull request #597 from marcusklaas/method-generix
Fix span issue with generic method calls
2015-11-14 10:03:12 +13:00
Nick Cameron
f253bac206 Merge pull request #593 from JanLikar/Fix580
Enable rustfmt to format a list of files
2015-11-14 10:01:58 +13:00
Marcus Klaas
c93c771e71 Fix span issue with generic method calls 2015-11-13 14:53:34 +01:00
Marcus Klaas
d32245a13d Fix brace indentation after where clause 2015-11-13 14:31:20 +01:00
Nick Cameron
686ec52b50 Merge pull request #594 from cskksc/master
Add emacs integration to readme.
2015-11-13 18:56:59 +13:00
cskksc
0330d13a78 Merge branch 'master' of https://github.com/rust-lang-nursery/rustfmt 2015-11-13 08:55:48 +05:30
cskksc
da1b3c1da8 Add emacs integration to readme. 2015-11-13 08:54:04 +05:30
Jan Likar
4443c4b7cc Correct some non-idiomatic code 2015-11-13 02:08:57 +01:00
Nick Cameron
52f887574b Merge pull request #592 from johannhof/coveralls
Try fixing OSX builds
2015-11-13 13:32:25 +13:00
Jan Likar
cb64ab22ec Enable rustfmt to format a list of files
Fix #580 by allowing rustfmt to accept a list of files. This also
enables usage of shell wildcard expansion, although notably this does
not work with cmd.exe on Windows. For example: 'rustfmt *.rs' will
format all rust files in the current working directory.

  - Change usage text to show rustfmt will accept a list of files
  - Change "Using rustfmt config file: {}" message to
    "Using rustfmt config file {} for {}"
  - Change Operation::Format(PathBuf, WriteMode) to
    Operation::Format(Vec<PathBuf>, WriteMode)
  - Loop through Vec<PathBuf>, load config and call 'run' for each path
2015-11-13 01:32:22 +01:00
Johann
ab2f47eb71 Try fixing OSX builds
... that I broke by introducing travis-cargo.
2015-11-12 23:47:24 +01:00
Nick Cameron
60698b3c79 Merge pull request #590 from johannhof/coveralls
Report test coverage with travis-cargo & coveralls
2015-11-13 10:58:51 +13:00
Johann
87110e7d71 Report test coverage with travis-cargo & coveralls
As this project grows, it might be beneficial to require pull requests
to keep a certain level of test coverage. Plus it's a fun statistic.
2015-11-12 22:57:25 +01:00
Nick Cameron
eed83e4834 Merge pull request #582 from rust-lang-nursery/links
make links work
2015-11-12 11:51:51 +13:00
Nick Cameron
b4d7c6ba5a make links work 2015-11-12 11:51:24 +13:00
Nick Cameron
9d0f8b8ac8 Merge pull request #579 from alex/patch-2
Cache downloaded packages on travis
2015-11-12 09:14:50 +13:00
Nick Cameron
09d8540561 Update README with new url 2015-11-12 09:01:38 +13:00
Nick Cameron
231b9f1172 Merge pull request #578 from alex/patch-1
Update README, cargo install is now stable
2015-11-12 09:00:09 +13:00
Alex Gaynor
77200c5692 Cache downloaded packages on travis 2015-11-11 12:41:12 -05:00
Alex Gaynor
eebb926acb Update README, cargo install is now stable 2015-11-11 12:34:17 -05:00
Nick Cameron
7d4bdc646d Merge pull request #478 from KeenS/travis
Create a binary from travis ci and so on
2015-11-11 11:24:12 +13:00
Nick Cameron
f9cc06df53 Merge pull request #577 from nrc/docs
Information for new contributors
2015-11-11 11:16:20 +13:00
Nick Cameron
8ac0b3144c Information for new contributors 2015-11-11 11:15:54 +13:00
Marcus Klaas de Vries
b6120b39ab Merge pull request #571 from nrc/semi
Don't strip semi-colons from expressions with non-void type since it …
2015-11-10 08:43:29 +01:00
Nick Cameron
5346daf541 Merge pull request #576 from boblehest/check_cwd_for_config
Check if the CWD contains a config (previously it only checked parents)
2015-11-09 17:05:48 -05:00
Jørn Lode
5d07b63ce5 Check if the CWD contains a config (previously it only checked parents) 2015-11-09 21:41:25 +01:00
Marcus Klaas de Vries
e0e24c4e76 Merge pull request #573 from nrc/doom_panic
Format tuple structs better
2015-11-09 20:17:50 +01:00
Marcus Klaas de Vries
5354f96196 Merge pull request #575 from nrc/comments
Option to disable line breaking in comments
2015-11-09 20:15:56 +01:00
Nick Cameron
b7d61254a7 Option to disable line breaking in comments
Set to false by default for now, since we are having a lot of problems with comments. We should set to true once we have a better algorithm.
2015-11-10 08:03:01 +13:00
Nick Cameron
bcda2824a2 Format tuple structs better
closes #546
2015-11-09 19:00:04 +13:00
Nick Cameron
3dc0b804f1 Don't strip semi-colons from expressions with non-void type since it can change semantics 2015-11-09 13:23:19 +13:00
Nick Cameron
1c0934772c Merge pull request #567 from kamalmarhubi/config-docs-flag
Move config help to dedicated --config-help flag
2015-11-07 22:41:16 -05:00
Kamal Marhubi
ae13bbcc98 Move config help to dedicated --config-help flag
The existing help output is very verbose, overflowing a 50+ line
terminal. This moves the configuration options to a separate help flag
to make a mistyped command less annoying!
2015-11-07 19:03:25 -05:00
Nick Cameron
0d0606c3c0 Merge pull request #565 from takkanm/fix_unused_variable_path_warning
fix unused variable `path` warning
2015-11-04 18:37:27 -05:00
Mitsutaka Mimura
67f0b00112 fix unused variable path warning 2015-11-05 08:14:55 +09:00
Nick Cameron
a762a32a0c Add Vim reference to README and reorg 2015-11-04 17:45:01 +13:00
Nick Cameron
af40fef3f8 Merge pull request #560 from Florob/enum_trailing_comma
Honor "enum_trailing_comma" option. Fixes #556
2015-11-03 18:59:43 -05:00
Florian Zeitz
2aa35f0f6d Honor "enum_trailing_comma" option. Fixes #556 2015-11-03 23:57:31 +01:00
Nick Cameron
3c60328df8 Merge pull request #558 from johannhof/master
Stdin support
2015-11-03 03:39:21 -05:00
Johann
154e20a04f Address review concerns 2015-11-03 09:16:33 +01:00
Johann
fcc62cbbe0 Stdin support
Adds support for receiving input from stdin in case no file was
specified. This is useful for editor/IDE integrations and other tooling.

To achieve clean output a new write-mode option called plain was added,
this option is mandatory when using stdin.
2015-11-02 20:45:45 +01:00
Marcus Klaas de Vries
bd0fdbb364 Merge pull request #543 from eefriedman/macro-crash
Fix crash speculatively parsing macro arguments as expressions.
2015-10-28 08:09:44 +01:00
Eli Friedman
1c235de97d Fix crash speculatively parsing macro arguments as expressions.
The problem is essentially that if we try to parse a token tree using a
CodeMap different from the one the tree was originally parsed with,
spans become nonsense. Since CodeMaps can't be cloned, we're basically
forced to use the original ParseSess for additional parsing.

Ideally, rustfmt would be a bit more clever and figure out how to parse
macro arguments based on the definition of the macro itself, rather than
just guessing that a particular token sequence looks like an expression,
but this is good enough for now.

Fixes #538.
2015-10-27 23:41:32 -07:00
Nick Cameron
3abe93596a Merge pull request #541 from zeckalpha/link-in-readme
Link in README
2015-10-27 07:47:39 -04:00
Kyle Marek-Spartz
2b5bc7c9a8 Link in README 2015-10-26 21:51:59 -05:00
Nick Cameron
100058f2de Merge pull request #531 from marcusklaas/match-inner-block
Address some issues with multiline patterns in let statements
2015-10-26 06:46:26 +13:00
Nick Cameron
7a9ae5c4ab Merge pull request #533 from marcusklaas/double-help
Print configuration options once in help message
2015-10-26 02:00:39 +13:00
Marcus Klaas de Vries
3ce2b840cf Merge pull request #522 from marcusklaas/writing-tests
Add a brief overview of rustfmt tests
2015-10-24 16:38:51 +02:00
Marcus Klaas
be77f8a277 Add a brief overview of rustfmt tests 2015-10-24 16:24:51 +02:00