make rustfmt-normalize_comments false by default

This commit is contained in:
Nick Cameron 2017-01-16 14:50:27 +13:00
parent 5349336192
commit 846d7ad387
61 changed files with 63 additions and 5 deletions

View File

@ -393,7 +393,7 @@ create_config! {
take_source_hints: bool, true, "Retain some formatting characteristics from the source code";
hard_tabs: bool, false, "Use tab characters for indentation, spaces for alignment";
wrap_comments: bool, false, "Break comments to fit on the line";
normalize_comments: bool, true, "Convert /* */ comments to // comments where possible";
normalize_comments: bool, false, "Convert /* */ comments to // comments where possible";
wrap_match_arms: bool, true, "Wrap multiline match arms in blocks";
match_block_trailing_comma: bool, false,
"Put a trailing comma after a block based match arm (non-block arms are not affected)";

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// rustfmt-chain_indent: Visual
// rustfmt-chain_base_indent: Visual

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// Test chain formatting.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// Closures
fn main() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
//! Doc comment

View File

@ -1,5 +1,3 @@
// rustfmt-normalize_comments: false
//! Doc comment
fn test() {
// comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
//@ special comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
/* Block comments followed by CRLF newlines should not an extra newline at the end */
/* Something else */

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Test expressions

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
extern "C" {
fn c_func(x: *mut *mut libc::c_void);

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-fn_args_layout: BlockAlways
// rustfmt-fn_args_density: Vertical
// rustfmt-fn_arg_indent: Tabbed

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible! */
,response: NoWay /* hose */) {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-fn_args_layout: Block
fn foo() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// rustfmt-wrap_comments: true
// rustfmt-hard_tabs: true

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
impl Foo for Bar { fn foo() { "hi" } }
pub impl Foo for Bar {

View File

@ -1,3 +1,5 @@
// rustfmt-normalize_comments: true
// Imports.
// Long import.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn main() {
match x {
S(true , .., true ) => (),

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
enum E {
A, //* I am not a block comment (caused panic)
B,

View File

@ -1,3 +1,5 @@
// rustfmt-normalize_comments: true
fn main() {
if /* shouldn't be dropped
shouldn't be dropped */

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// FIXME(#919)
trait NameC { /* comment */ }

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
itemmacro!(this, is.now() .formatted(yay));
itemmacro!(really, long.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb() .is.formatted());

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// Match expressions.
fn foo() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Test of lots of random stuff.
// FIXME split this into multiple, self-contained tests.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-condense_wildcard_suffices: true
fn main() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Struct literal expressions.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_multiline_style: ForceMulti

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_style: Visual

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_style: Visual
// rustfmt-struct_lit_multiline_style: ForceMulti

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
/// A Doc comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn types() {
let x: [ Vec < _ > ] = [];
let y: * mut [ SomeType ; konst_funk() ] = expr();

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
type PrivateTest<'a, I> = (Box<Parser<Input=I, Output=char> + 'a>, Box<Parser<Input=I, Output=char> + 'a>);

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// rustfmt-chain_indent: Visual
// rustfmt-chain_base_indent: Visual

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// Test chain formatting.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// Closures
fn main() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
//! Doc comment

View File

@ -1,5 +1,3 @@
// rustfmt-normalize_comments: false
//! Doc comment
fn test() {
// comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
//@ special comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// Block comments followed by CRLF newlines should not an extra newline at the end
// Something else

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Test expressions

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
extern "C" {
fn c_func(x: *mut *mut libc::c_void);

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-fn_args_layout: BlockAlways
// rustfmt-fn_args_density: Vertical
// rustfmt-fn_arg_indent: Tabbed

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn simple(// pre-comment on a function!?
i: i32, // yes, it's possible!

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-fn_args_layout: Block
fn foo() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-single_line_if_else_max_width: 0
// rustfmt-wrap_comments: true
// rustfmt-hard_tabs: true

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
impl Foo for Bar {
fn foo() {
"hi"

View File

@ -1,3 +1,5 @@
// rustfmt-normalize_comments: true
// Imports.
// Long import.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn main() {
match x {
S(true, .., true) => (),

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
enum E {
A, //* I am not a block comment (caused panic)
B,

View File

@ -1,3 +1,5 @@
// rustfmt-normalize_comments: true
fn main() {
if
// shouldn't be dropped

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// FIXME(#919)
trait NameC {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
itemmacro!(this, is.now().formatted(yay));
itemmacro!(really,

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// Match expressions.
fn foo() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Test of lots of random stuff.
// FIXME split this into multiple, self-contained tests.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-condense_wildcard_suffices: true
fn main() {

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// Struct literal expressions.

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_multiline_style: ForceMulti

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_style: Visual

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
// rustfmt-struct_lit_style: Visual
// rustfmt-struct_lit_multiline_style: ForceMulti

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
// rustfmt-wrap_comments: true
/// A Doc comment

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
fn types() {
let x: [Vec<_>] = [];
let y: *mut [SomeType; konst_funk()] = expr();

View File

@ -1,3 +1,4 @@
// rustfmt-normalize_comments: true
type PrivateTest<'a, I> = (Box<Parser<Input = I, Output = char> + 'a>,
Box<Parser<Input = I, Output = char> + 'a>);