Add rustfmt.toml and update travis to check formatting

master
Paul Woolcock 6 years ago
parent 7462d00c21
commit d617d74fa4
  1. 6
      .travis.yml
  2. 17
      rustfmt.toml

@ -3,6 +3,12 @@ rust:
- stable - stable
- beta - beta
- nightly - nightly
before_script:
- rustup component add rustfmt-preview
script:
- cargo fmt all -- --check
- cargo build
- cargo test
matrix: matrix:
allow_failures: allow_failures:
- rust: nightly - rust: nightly

@ -0,0 +1,17 @@
indent_style = "Visual"
format_strings = true
format_macro_matchers = true
imports_layout = "HorizontalVertical"
merge_imports = true
match_block_trailing_comma = true
merge_derives = true
newline_style = "Unix"
normalize_comments = true
reorder_impl_items = true
space_after_colon = true
space_before_colon = false
struct_lit_single_line = false
type_punctuation_density = "Wide"
use_field_init_shorthand = true
use_try_shorthand = true
wrap_comments = true
Loading…
Cancel
Save