Skip to content

stabilize disable_all_formatting #5026

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: stabilize disable_all_formatting
  • Loading branch information
calebcartwright committed Oct 14, 2021
commit af7b0acab66118c9a86806f929d7011e73263a02
6 changes: 4 additions & 2 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,11 +521,13 @@ fn main() {

## `disable_all_formatting`

Don't reformat anything
Don't reformat anything.

Note that this option may be soft-deprecated in the future once the [ignore](#ignore) option is stabilized. Nightly toolchain users are encouraged to use [ignore](#ignore) instead when possible.

- **Default value**: `false`
- **Possible values**: `true`, `false`
- **Stable**: No (tracking issue: #3388)
- **Stable**: Yes

## `edition`

Expand Down
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ create_config! {
"Require a specific version of rustfmt";
unstable_features: bool, false, false,
"Enables unstable features. Only available on nightly channel";
disable_all_formatting: bool, false, false, "Don't reformat anything";
disable_all_formatting: bool, false, true, "Don't reformat anything";
skip_children: bool, false, false, "Don't reformat out of line modules";
hide_parse_errors: bool, false, false, "Hide errors from the parser";
error_on_line_overflow: bool, false, false, "Error if unable to get all lines within max_width";
Expand Down
5 changes: 0 additions & 5 deletions src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,6 @@ fn stdin_works_with_modified_lines() {
#[test]
fn stdin_disable_all_formatting_test() {
init_log();
match option_env!("CFG_RELEASE_CHANNEL") {
None | Some("nightly") => {}
// These tests require nightly.
_ => return,
}
let input = String::from("fn main() { println!(\"This should not be formatted.\"); }");
let mut child = Command::new(rustfmt().to_str().unwrap())
.stdin(Stdio::piped())
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy