56c6d73d82
Add `reorder_modules` config option. Two things we must keep in mind when reordering modules: 1. We should not reorder modules with attributes, as doing so could potentially break the code (e.g. `#[macro_use]`). 2. We should not reorder inline modules e.g. `mod foo { /* .. */ }`. We should only reorder module declarations e.g. `mod foo;`. Some open questions: 1. Should we bring modules with `pub` in front of those without `pub` so that they stand out from others? 2. Instead of keeping modules with attributes in the same place, can we bring them in front of others? Is this safe? |
||
---|---|---|
.. | ||
blank_lines_lower_bound | ||
brace_style | ||
comment_width | ||
condense_wildcard_suffixes | ||
control_brace_style | ||
disable_all_formatting | ||
empty_item_single_line | ||
error_on_line_overflow | ||
fn_args_density | ||
fn_single_line | ||
force_explicit_abi | ||
force_multiline_block | ||
format_strings | ||
hard_tabs | ||
indent_style | ||
match_arm_blocks | ||
match_block_trailing_comma | ||
merge_derives | ||
normalize_comments | ||
reorder_imported_names | ||
reorder_imports | ||
reorder_imports_in_group | ||
reorder_modules | ||
space_before_colon | ||
spaces_around_ranges | ||
spaces_within_parens_and_brackets | ||
struct_field_align_threshold | ||
struct_lit_single_line | ||
tab_spaces | ||
trailing_comma | ||
type_punctuation_density | ||
use_try_shorthand | ||
where_single_line | ||
wrap_comments |