K.J. Valencik
1fb172f989
LineOverflow: Count tabs as tab_spaces when measuring line length for overflow
2018-01-19 12:18:25 -05:00
Seiichi Uchida
cf4ab38f67
Hide parse error in format_snippet()
2018-01-11 15:19:23 +09:00
topecongiro
75cb236711
Compare extern crate items with its name instead of span
...
When we use span, bugs easily sneak in.
2018-01-04 12:49:37 +09:00
Nick Cameron
f86f6dcd9c
Format some macros 2.0 macro defs
...
cc #1539
2018-01-01 19:51:54 +13:00
Nick Cameron
e95541c7d2
Make the import of Config pub
2017-12-28 10:08:27 +13:00
Marcus Klaas
656edbf0f0
Use std time
2017-12-27 16:34:09 +13:00
Marcus Klaas
dc356ffef7
Add rudimentary timing of parsing and formatting phases
2017-12-27 16:33:21 +13:00
Seiichi Uchida
27167cbbaa
Format code block in comment
...
Closes #554 .
Closes #1695 .
2017-12-24 23:56:51 +09:00
Oliver Schneider
fad903fd14
Move from String to PathBuf where applicable
2017-12-15 10:26:19 +09:00
Seiichi Uchida
3dd31e25bf
Use enumerate()
2017-12-11 11:50:11 +09:00
Seiichi Uchida
e45c0c4815
Rename error_on_unformatted_comments_or_strings to error_on_unformatted
2017-12-11 11:48:17 +09:00
Seiichi Uchida
aea19d5e33
Combine error_on_line_overflow_comments/strings
...
1. Rename to error_on_unformatted_comments_or_strings
2. Set the option to false by default.
2017-12-11 11:48:17 +09:00
Seiichi Uchida
ef6ebaa215
Add a config option to suppress error message on string literal
2017-12-11 11:48:17 +09:00
Seiichi Uchida
414a995926
Replace StringBuffer with String
2017-12-11 09:19:00 +09:00
topecongiro
adc3b12ad4
Remove println! debug :(
2017-12-08 17:48:49 +09:00
topecongiro
821d04b2a4
Do not report errors on skipped items or statements
2017-12-08 17:46:43 +09:00
topecongiro
5e6bb3edb0
Keep track of line number in visitor
2017-12-08 16:59:04 +09:00
Seiichi Uchida
1d9a10e00e
Use explicit lifetime to get rid of unsafe code
...
at least this is why we use Rust
2017-12-07 13:57:54 +09:00
Seiichi Uchida
69a15b2eee
Update FmtVisitor::from_codemap()
2017-12-06 22:51:52 +09:00
topecongiro
16184d3e16
Cargo fmt and update a test
2017-12-03 11:34:18 +09:00
clippered
794a215b27
rename to use_colored_tty; used match as well
2017-11-13 20:18:05 +11:00
clippered
d2f2f25463
add cli option for color
2017-11-13 20:18:03 +11:00
Nick Cameron
e6253c4d31
Extract a closures module
2017-11-13 15:27:16 +13:00
topecongiro
05798572bb
Remove empty lines at the beginning of the file
2017-11-10 17:09:31 +09:00
topecongiro
d8d9fedf9e
Propagate an error rather than panic
2017-11-06 21:48:18 +09:00
topecongiro
3e8f4b7907
Fix PairParts related issues
2017-11-06 21:48:05 +09:00
clippered
3bae42aa5a
fix output panics on unable to write to stderr
2017-11-01 23:45:35 +11:00
Nick Cameron
4022b094f8
Merge pull request #2074 from GuillaumeGomez/emitter
...
Update to last Emitter update
2017-10-28 18:12:46 +13:00
Chris Emerson
92e374e778
Fix a "variable does not need to be mutable" warning.
2017-10-27 22:57:32 +01:00
Nick Cameron
adbe98e522
Merge pull request #2069 from SingingTree/log_path_str_if_after_file_errors
...
Return a more verbose error when formatting a file fails
2017-10-27 01:39:43 +05:30
Guillaume Gomez
e35e27659d
Update to last Emitter update
2017-10-20 17:02:49 +02:00
Matthew McAllister
108e2cd776
Handle #![rustfmt_skip]
at file top level
2017-10-20 00:22:23 -07:00
Bryce Van Dyk
47a0bef91c
Return a more verbose error when formatting a file fails
...
Expands the error message returned if the after_file function fails to
also include path_str. This allows users to better identify files that are
not being formatted.
2017-10-20 15:27:35 +13:00
topecongiro
b751030640
Remove unnecessary wrap_str()
2017-09-19 11:40:20 +09:00
Seiichi Uchida
32fa51a6a9
Move Spanned to spanned.rs from lib.rs
2017-09-19 10:04:35 +09:00
Seiichi Uchida
df7d2be562
Move Indent and Shape to shape.rs from lib.rs
2017-09-19 10:04:35 +09:00
Nick Cameron
c313fb1ddc
Merge pull request #1973 from topecongiro/issue-1972
...
Echo back input from stdin when disable_all_formatting is true
2017-09-18 18:06:49 +12:00
Nick Cameron
cccb7f681e
Merge pull request #1966 from topecongiro/string-to-cow
...
Refactoring: use Cow and etc.
2017-09-18 12:45:25 +12:00
Seiichi Uchida
ede179c62e
Echo back input from stdin when disable_all_formatting is true
2017-09-17 22:14:28 +09:00
topecongiro
f0580ae91a
Use Cow to avoid unnecessary allocation
2017-09-15 18:21:06 +09:00
topecongiro
f51261e93e
Cargo fmt
2017-09-15 12:10:58 +09:00
Seiichi Uchida
e6e696f7b0
Avoid cloning String
2017-09-05 01:04:08 +09:00
Nick Cameron
59d1e84259
Merge pull request #1937 from topecongiro/enhance-macro-rewrite
...
Enhance macro rewrite
2017-08-31 17:43:52 +12:00
topecongiro
848d4559e1
Enhance macro rewrite
2017-08-31 13:52:13 +09:00
Seiichi Uchida
4b79055a15
Apply refactoring from cargo clippy
2017-08-31 12:49:12 +09:00
Nick Cameron
39a91ba292
Fixup warnings and test formatting
2017-08-31 14:20:47 +12:00
Vadim Petrochenkov
6e5c6f5ba3
Use getters to access Span
fields
2017-08-31 14:14:13 +12:00
topecongiro
979d131c5d
Format and preserve attributes on ast::Stmt
2017-08-30 19:27:36 +09:00
topecongiro
343b315830
Handle macros with tabs
2017-08-27 13:44:49 +09:00
topecongiro
1f9e7c25c9
Implement Rewrite trait for ast::ForeignItem
2017-08-25 08:19:51 +09:00