mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-02 00:18:17 +00:00
hypothetical rustfmt rules (not yet applied to codebase)
This commit is contained in:
1 parent
eb11bb5118
commit
1e0847ecdd
1 file changed
+39
@@ -0,0 +1,39 @@
|
||||
# Storyteller rustfmt rules
|
||||
# (Not yet happy with these.)
|
||||
|
||||
# Four spaces is excessive in any language.
|
||||
# Conserve horizontal space for small laptop screens.
|
||||
tab_spaces = 2
|
||||
|
||||
# Only Unix
|
||||
newline_style = "unix"
|
||||
|
||||
# We won't change any vendor code.
|
||||
# Note: This appears not to work in stable, so it's necessary to run `cargo +nightly fmt`.
|
||||
ignore = [
|
||||
"vendor"
|
||||
]
|
||||
|
||||
# Item-level imports makes for better diffs and fewer merge conflicts.
|
||||
# Another suitable option is "Module", but that's not the default either.
|
||||
# (This is commented out for now to reduce the first round of rustfmt diffs, but will be enabled.)
|
||||
#imports_granularity = "Item"
|
||||
|
||||
# It's better to keep stdlib, crate (self), and external crates separate.
|
||||
# (This is commented out for now to reduce the first round of rustfmt diffs, but will be enabled.)
|
||||
#group_imports = "StdExternalCrate"
|
||||
|
||||
# The default is wrong
|
||||
match_block_trailing_comma = true
|
||||
|
||||
# 'try!' shouldn't exist in our codebase.
|
||||
use_try_shorthand = true
|
||||
|
||||
# MAYBE
|
||||
struct_lit_single_line = true
|
||||
use_small_heuristics = "Off" # Fix for method chaining?
|
||||
|
||||
# TEMPORARY
|
||||
reorder_imports = false
|
||||
#max_width = 180 # default 100
|
||||
#chain_width = 10
|
||||
Reference in new issue
Block a user