Commit graph

2809 commits

Author SHA1 Message Date
Ruben Schmidmeister
6a406a822d
Return iterator instead of collecting early 2019-05-14 20:38:28 +02:00
Ruben Schmidmeister
b875fe9485
Name field more verbosely
This makes the comment above it obsolete
2019-05-14 20:23:55 +02:00
Stéphane Campinas
cc97eaf9f9
Merge pull request #3546 from bash/unreachable-pub
Enable unreachable_pub lint
2019-05-10 09:59:07 +02:00
Stéphane Campinas
4bc5911348
Merge pull request #3526 from bash/refactor-apply-newline-style
Refactor apply newline style
2019-05-10 09:48:01 +02:00
Ruben Schmidmeister
d1c1f8e61e
Run rustfmt 2019-05-09 21:13:32 +02:00
Ruben Schmidmeister
618d092bf7
Enable unreachable_pub lint 2019-05-09 20:37:51 +02:00
Andy Russell
ee6f686cc9
use derive feature over serde_derive crate 2019-05-09 13:22:44 -04:00
Ruben Schmidmeister
821a370417
Add tests to cover more edge cases 2019-05-09 17:51:02 +02:00
Ruben Schmidmeister
1f09d94cbb
Make sure windows newlines don't gain an extra carriage return 2019-05-09 17:44:52 +02:00
Ruben Schmidmeister
f54fc2f2fc
Implement conversion to unix newlines 2019-05-09 17:22:16 +02:00
Stéphane Campinas
da1e3c9635
Merge pull request #3540 from rchaser53/issue-3539
correct to get wrong BytePos
2019-05-06 22:31:38 +02:00
David Alber
bfe5e9c108 Fix condition typo 2019-05-05 11:55:11 -07:00
rchaser53
7a93a26aad correct to get wrong BytePos 2019-05-06 00:01:13 +09:00
Ruben Schmidmeister
703a2eab19
Merge remote-tracking branch 'origin/master' into refactor-apply-newline-style 2019-05-02 06:47:41 +02:00
rchaser53
2c58b205d5 fix Comma in comment causes no formatting 2019-04-29 21:38:38 +09:00
topecongiro
3dec18a681 Add doc comment 2019-04-27 18:56:04 +09:00
topecongiro
20bdb2fb9d Use config_type proc macro 2019-04-27 18:56:04 +09:00
Ruben Schmidmeister
7556c420ab
Use more descriptive names 2019-04-24 21:58:50 +02:00
Ruben Schmidmeister
19bd1a44ce
Preserve standalone carriage returns on windows also 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
2e77f2bca7
Split apply with auto detection tests into separate fns 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
0f1d5760ba
Fix auto detection of windows newlines for inputs with multibyte chars 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
20c8d8aabc
Split auto_detect tests into seperate fns 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
764cdf60fa
Extract conversion to windows newlines into fn 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
58d7b2cc66
Extract literals into constants 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
add473667a
Introduce effective newline style 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
8849273efb
Convert to free standing functions 2019-04-24 21:01:09 +02:00
Ruben Schmidmeister
ba5b2e9c9b
Extract applying of newline style into own mod 2019-04-24 21:01:09 +02:00
Seiichi Uchida
a6daccc229
Merge pull request #3523 from topecongiro/issue-3515
Attempt to format attributes if only they exist
2019-04-24 07:22:55 -07:00
Seiichi Uchida
aeb556ecb2
Merge pull request #3522 from topecongiro/issue-3521
Add a path to the parent dir of rustfmt.toml as a prefix to paths in ignore
2019-04-24 07:22:40 -07:00
topecongiro
f520f7e0f8 Suppress spurious parse error messages on skipped files 2019-04-24 20:46:29 +09:00
topecongiro
a20ffc6d52 Add a path to rustfmt.toml to GitIgnore as root path 2019-04-24 20:22:35 +09:00
rChaser53
05547d90b5 leave the comment in parentheses of argumentless Fn (#3518) 2019-04-23 16:21:04 -07:00
topecongiro
af3e940940 Attempt to format attributes if only they exist 2019-04-23 08:50:59 +09:00
topecongiro
f8d3aa5908 Add a path to the parent dir of rustfmt.toml as a prefix
Paths users specify in `ignore` configuraiton option is relative to the
directory which contains the rustfmt.toml file. When processing the ignore paths
internally, rustfmt should add a path to the directory as a  prefix since
RealPath passed from libsyntax is a full path.
2019-04-23 08:12:02 +09:00
Oliver Scherer
c60d6ddc02
"first" element check does nothing 2019-04-22 13:04:44 +02:00
Seiichi Uchida
5dd042c152
Merge pull request #3511 from topecongiro/issue3498
Avoid overflowing item with attributes
2019-04-17 11:40:00 -07:00
Seiichi Uchida
760ec07978
Merge pull request #3510 from topecongiro/issue3509
Fix duplication of attributes on a match arm's body
2019-04-17 11:39:44 -07:00
Ruben Schmidmeister
3dc625c661 Use annotate-snippets for emitting errors (#3507) 2019-04-17 05:33:36 -07:00
Seiichi Uchida
efa3a62b56
Merge pull request #3512 from scampi/issue-2724
exit integration test successfully if the crate build failed before applying rustfmt
2019-04-16 00:42:15 -07:00
Stéphane Campinas
d0df47fc58
Merge pull request #3506 from rchaser53/issue-3505
fix not to emit version
2019-04-16 07:29:26 +02:00
Stéphane Campinas
1c7202b2ee
fix test_ignore_path_set test when run on beta
```
---- ignore_path::test::test_ignore_path_set stdout ----
Warning: can't set `ignore = IgnoreList({"foo.rs", "bar_dir/*"})`, unstable features are only available in nightly channel.
thread 'ignore_path::test::test_ignore_path_set' panicked at 'assertion failed: ignore_path_set.is_match(&FileName::Real(PathBuf::from("src/foo.rs")))', src/ignore_path.rs:51:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
failures:
    ignore_path::test::test_ignore_path_set
```
2019-04-15 14:00:11 +02:00
topecongiro
d3e578b131 Avoid overflowing item if it has attributes 2019-04-14 20:45:04 +09:00
rchaser53
15ab363508 not to use Vec 2019-04-14 20:37:29 +09:00
topecongiro
b57e0e2279 Disallow putting a body with attributes on the same line 2019-04-14 20:13:54 +09:00
topecongiro
3d80678e24 Do not include body's attributes in arrow_span 2019-04-14 20:13:07 +09:00
rChaser53
34bf13718a Allow specifying glob pattern to ignore config option (#3488) 2019-04-14 03:30:44 -07:00
rchaser53
3759a6695d add the error mapping 2019-04-14 17:34:53 +09:00
rchaser53
8a04ec6ec7 fix not to emit version 2019-04-14 00:23:10 +09:00
Matthias Krüger
4352681d62 fix clippy warnings
clippy::needless_return
clippy::redundant_closure
clippy::or_fun_call
clippy::len_zero
clippy::expect_fun_call
clippy::assertions_on_constants
clippy::identity_conversion
clippy::chars_last_cmp
2019-04-11 13:48:13 +02:00
Seiichi Uchida
378b28b06e
Merge pull request #3495 from scampi/issue-1096
keep missed comments appearing after the struct/enum ident
2019-04-10 06:00:51 +09:00