Commit Graph

290 Commits

Author SHA1 Message Date
Caleb Cartwright
04bd7201a9 Merge commit '81fe905ca83cffe84322f27ca43950b617861ff7' into rustfmt-sync 2023-10-22 20:21:44 -05:00
Caleb Cartwright
ed3e96e3d1 Merge commit '3f7c366fc0464e01ddcaefbd70647cb3da4202be' into rustfmt-sync 2023-06-19 23:13:56 -05:00
jyn
34a71f67d1 Make the BUG_REPORT_URL configurable by tools
This greatly simplifies how hard it is to set a custom bug report url; previously tools had to copy
the entire hook implementation.

- Switch clippy to the new hook

  This also adds a `extra_info` callback so clippy can include its own version number, which differs
  from rustc's.

- Call `install_ice_hook` in rustfmt
2023-05-01 21:44:04 -05:00
Caleb Cartwright
094b7f599c Merge commit '1d8491b120223272b13451fc81265aa64f7f4d5b' into sync-from-rustfmt 2023-01-24 14:16:03 -06:00
Jacob Pratt
6c6ebec516 Create 2024 edition 2022-04-02 02:45:49 -04:00
Caleb Cartwright
8211d64c71 Merge commit '5ff7b632a95bac6955611d85040859128902c580' into sync-rustfmt-subtree 2022-03-29 23:17:30 -05:00
Caleb Cartwright
6db6bafc61 Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree 2021-12-29 20:49:39 -06:00
Caleb Cartwright
f99e3582bd Merge commit 'ea199bacef07213dbe008841b89c450e3bf0c638' into rustfmt-sync 2021-11-07 20:37:34 -06:00
Caleb Cartwright
2b41b6d022 Merge commit 'efa8f5521d3813cc897ba29ea0ef98c7aef66bb6' into rustfmt-subtree 2021-10-20 00:11:59 -05:00
Caleb Cartwright
e4b8714c09 Merge commit '4236289b75ee55c78538c749512cdbeea5e1c332' into update-rustfmt 2021-07-25 22:57:19 -05:00
Joshua Nelson
c3a5111106 Fix some clippy warnings
This commit can be replicated with
`cargo clippy --fix -Z unstable-options && cargo +nightly-2021-02-10 fmt`.
2021-02-18 20:20:29 -06:00
Caleb Cartwright
dead3a807d fix: backport mod resolution error handling 2020-06-11 21:11:18 -05:00
David Tolnay
bc9a0b2974 Switch to std::error::Error for errors (#3948) 2020-06-11 20:23:24 -05:00
Chris Emerson
99f9f576d4 Return an error if --check or --emit json are used with stdin. (#3875) 2019-10-25 15:05:24 +09:00
CreepySkeleton
e81ec20af0 Add --config command line option (#3767) 2019-09-05 11:15:19 +09:00
Caleb Cartwright
62432fe31b add new flag to list names of misformatted files (#3747) 2019-08-19 11:04:40 +09:00
Caleb Cartwright
dfd27663dc add json emit mode (#3735) 2019-08-16 11:14:53 +09:00
Seiichi Uchida
89940e541f
Fix bugs related to file-lines (#3684) 2019-07-15 22:41:56 +09:00
Stéphane Campinas
6487422b3e fix print-config minimal option (#3687) 2019-07-15 20:58:54 +09:00
Ruben Schmidmeister
3dc625c661 Use annotate-snippets for emitting errors (#3507) 2019-04-17 05:33:36 -07:00
Devin Alvaro
b473e65257 Add --print-config current 2019-03-26 06:49:20 +07:00
Alexander Regueiro
7a3b7c9275 Various cosmetic improvements (#3403) 2019-02-19 11:56:42 +09:00
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