diff --git a/.travis.yml b/.travis.yml index ed5086d4..522c10bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,12 +23,18 @@ matrix: - rust: nightly before_script: + - rustup component add rustfmt-preview # Configure only if we're doing coverage - > if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then LOCAL="~/.local" && export PATH=$LOCAL/bin:$PATH; fi +script: + - cargo fmt --all -- --check + - cargo build + - cargo test + after_success: > if [[ "$TRAVIS_OS_NAME" == "linux" ]] && [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then wget https://github.com/SimonKagstrom/kcov/archive/v34.tar.gz && diff --git a/rustfmt.toml b/rustfmt.toml index 1260de9d..b42e764f 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -2,31 +2,3 @@ # root of the src directory. You may still get some # formatting errors (whitespace etc) which should be # fixed manually before committing. - -# Max line length that will be parsed by rustfmt -max_width = 160 - -# Organise imports in a consistant way -reorder_imports = true -reorder_imported_names = true -reorder_imports_in_group = true - -# This can sometimes break when comments include line breaks -wrap_comments = true - -# Visually align chained method calls on `.` -chain_indent = "Visual" -chain_one_line_max = 40 - -# Try to place function args on complete lines rather than -# as a vertical block -fn_args_density = "Compressed" - -# Allow for compact formatting of struct literals -stuct_lit_width = 50 -struct_variant_width = 50 -struct_field_align_threshold = 20 -struct_lit_multiline_style = "PreferSingle" - -# Replace calls to the try! macro with ? syntax -use_try_shorthand = true