Hirokazu Hata
c0f93a6ea3
cargo +nightly fix --edition-idioms
2019-02-09 15:53:12 +09:00
Evgenii
ece629b1cc
transition to Rust 2018
2019-02-04 13:30:43 +03:00
Seiichi Uchida
6fa804deba
Use edition in rustfmt.toml when no command line argument is passed
2018-10-29 22:53:29 +09:00
Otavio Salvador
e41fcb137c
rustfmt: add support to specify the Rust edition as argument
...
The new `--edition` command line argument allow the setting of the
desired Rust edition to be used.
Refs: #3104 .
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-23 02:33:38 -03:00
Otavio Salvador
e9fa99d8b8
rustfmt: avoid duplicating the error handling for --emit
...
There is no need to produce the error message again as it is already
produced by the helper method that does the emit mode validation.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-23 02:33:25 -03:00
Otavio Salvador
6d7fef078e
bin: replace .unwrap_or
with .map_or
...
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2018-10-12 20:22:10 -03:00
Nick Cameron
88f3b32e43
Remove unnecessary feature flag
2018-09-25 18:23:17 +12:00
Seiichi Uchida
e2b9c66cc9
Cargo fmt
2018-09-19 23:22:26 +09:00
David Hotham
90ec5a226f
Fix typo in usage text
2018-09-07 09:01:44 +01:00
Maximilian Roos
968affc3e0
final clippy changes
2018-09-01 16:32:38 -04:00
Christopher Durham
a15df80e96
Consider "dev" as nightly for feature (un)gating
...
Closes #2940
2018-08-23 04:24:15 -04:00
Ingvar Stepanyan
593a5c40a4
Use is_nightly helper instead of duplicate code
2018-07-31 11:53:22 +01:00
Ingvar Stepanyan
c25deef110
Fix check for unstable features
...
These features are registered only on Nightly and so matches.opt_present panics when it's called without the is_nightly guard.
2018-07-31 11:50:09 +01:00
Nick Cameron
ca6b360c8a
Emit 0 exit code for --version and similar operations
...
Fixes #2878
2018-07-31 13:41:49 +12:00
Nick Cameron
d43874113e
Warn the user if using an unstable option without --unstable-options
...
Fixes #2796
2018-07-31 10:02:32 +12:00
Nick Cameron
43f178bd58
Remove Summary
2018-07-24 21:45:15 +12:00
Nick Cameron
481e85cc58
formatting
2018-07-24 15:46:39 +12:00
Nick Cameron
71d3d04270
factor out a Session
object
2018-07-23 15:37:34 +12:00
Nick Cameron
486f8fd8e7
Fixup formatting of tests and source
2018-07-12 21:37:28 +12:00
Eric Huss
800e488de8
Fix help for --help=file-lines
...
Due to the way getopts works, it requires the equals sign.
2018-07-05 22:50:23 -07:00
Nick Cameron
6541be3c6f
Replace use_colored_tty
with iatty crate
2018-05-21 15:32:27 +12:00
Nick Cameron
9a7fac63c8
Remove format_and_emit_report
from the API
...
Also changes the header/footer stuff
2018-05-21 15:09:17 +12:00
Nick Cameron
95d6b64829
Replace WriteMode with EmitMode and backup bool
2018-05-21 14:14:09 +12:00
Nick Cameron
843c12601a
Use our own FileName
struct rather than exporting libsyntax's
2018-05-21 12:08:39 +12:00
Nick Cameron
539d4d9665
Refactor CliOptions
2018-05-21 11:27:25 +12:00
Nick Cameron
432b1cb253
Rationalise error types
...
cc #2639
2018-05-21 08:58:53 +12:00
Nick Cameron
1452349966
Exit with 1 for license check in --check
mode
...
Closes #2707
2018-05-18 15:30:32 +12:00
Nick Cameron
a3c85cdc41
Reorder the --help message
2018-05-14 11:07:54 +12:00
Nick Cameron
6d0695303a
Make some write modes unstable
2018-05-14 10:55:16 +12:00
Nick Cameron
3b23a98d00
Support unstable options
...
cc #1976
2018-05-14 10:20:51 +12:00
Nick Cameron
5d9f5aa05a
Replace --write-mode
with --emit
...
cc #1976
2018-05-13 14:13:24 +12:00
Nick Cameron
8396da1882
Add --backup
flag
2018-05-13 13:18:08 +12:00
Seiichi Uchida
1b1eccc553
Fix build failure ( #2699 )
2018-05-12 10:36:34 +09:00
Nick Cameron
eca7796fb1
Replace --dump-minimal-config
and --dump-default-config
with --print-config
...
cc #1976
2018-05-11 20:43:08 +12:00
Nick Cameron
4d9de48e06
Add --check
flag.
...
cc #1976
2018-05-11 20:26:00 +12:00
Nick Cameron
798bffb8b1
--help
options
...
cc #1976
2018-05-11 20:12:16 +12:00
Nick Cameron
1869888b1a
Remove --verbose-diff
...
Use `--verbose` instead
cc #1976
2018-05-11 13:58:34 +12:00
Nick Cameron
55ac062da0
Add --quiet
flag, remove Plain
write mode
...
cc #1976
2018-05-11 13:50:30 +12:00
topecongiro
1f738ea208
Cargo fmt
2018-05-06 15:22:29 +09:00
Nick Cameron
e554d8617d
Merge branch 'master' into imports_indent
2018-04-30 11:50:53 +12:00
csmoe
be3be582cc
set stdin default config path to curr
2018-04-29 21:40:37 +08:00
csmoe
f7415bcea2
update self format
2018-04-29 20:53:31 +08:00
Tibo
b7df23c3d5
Replace completely std::error with failure crate
2018-04-26 13:48:48 +10:00
Nick Cameron
ca610d35b3
Refactor to make a sensible public API
...
0.5 - lots of breaking changes
cc #2639
2018-04-20 21:52:02 +12:00
Nick Cameron
6a31741eaa
Get exit codes right
2018-04-20 14:17:56 +12:00
Nick Cameron
5194984812
Add a verbose-diff option
...
And don't print end of line characters by default in diffs
cc #2536
2018-04-20 14:02:44 +12:00
Nick Cameron
7a886e8fe5
Refactoring around write mode in main
2018-04-20 13:42:27 +12:00
Nick Cameron
a73f14aa95
Trivial refactoring in bin
2018-04-20 13:24:45 +12:00
David Barsky
f9532ba8d7
Implemented rough draft of check
write mode. ( #2539 )
...
* Add rough draft of `check` mode. Not unit tested.
* Added assert-cli; simple test case for `--write-mode=check`
* Lightly documented `check` WriteMode
* wrote clearer phrasing for config::options::WriteMode::Check
* Implemented default for WriteMode where default is Overwrite
* Simplified exit code handling
* updated README.md as per @nrc' comment
* collapsed exit-code handling
* Removed write_mode from Summary, introduced partial option parsing earlier
* Handle write-mode parsing in a slightly better way.
2018-04-20 11:14:11 +12:00
Seiichi Uchida
8b731db6ba
Output xml header and footer only once
2018-04-12 13:45:12 +09:00