Skip to content

Commit

Permalink
Add a tomlfmt.toml file with better defaults for cargo-sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed Feb 7, 2024
1 parent 85d8fa2 commit e8d8203
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [
"linera-views-derive",
"linera-witty",
"linera-witty-macros",
"linera-witty/test-modules"
"linera-witty/test-modules",
]
exclude = ["examples", "scripts"]
resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
"fungible",
"matching-engine",
"meta-counter",
"social"
"social",
]

[workspace.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion linera-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ test = [
"tempfile",
"test-log",
"test-strategy",
"tokio/parking_lot"
"tokio/parking_lot",
]
rocksdb = ["linera-views/rocksdb", "linera-storage/rocksdb"]
aws = ["linera-views/aws", "linera-storage/aws"]
Expand Down
4 changes: 2 additions & 2 deletions linera-execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ wasmer = [
"wasm-encoder",
"wasmer-middlewares",
"wasmparser",
"wit-bindgen-host-wasmer-rust"
"wit-bindgen-host-wasmer-rust",
]
wasmtime = [
"dep:wasmtime",
"wasm-encoder",
"wasmparser",
"wit-bindgen-host-wasmtime-rust"
"wit-bindgen-host-wasmtime-rust",
]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion linera-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test = [
"linera-chain/test",
"linera-core/test",
"linera-execution/test",
"linera-storage/test"
"linera-storage/test",
]

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion linera-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ wasmer = ["linera-core/wasmer", "linera-execution/wasmer", "linera-storage/wasme
wasmtime = [
"linera-core/wasmtime",
"linera-execution/wasmtime",
"linera-storage/wasmtime"
"linera-storage/wasmtime",
]
test = []

Expand Down
4 changes: 2 additions & 2 deletions linera-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ wasmtime = ["linera-execution/wasmtime", "linera-storage/wasmtime"]
rocksdb = [
"linera-views/rocksdb",
"linera-core/rocksdb",
"linera-storage/rocksdb"
"linera-storage/rocksdb",
]
aws = ["linera-views/aws", "linera-core/aws", "linera-storage/aws"]
scylladb = [
"linera-views/scylladb",
"linera-core/scylladb",
"linera-storage/scylladb"
"linera-storage/scylladb",
]
kubernetes = ["dep:k8s-openapi", "dep:kube", "dep:pathdiff", "dep:fs_extra"]
remote_net = ["dep:k8s-openapi", "dep:kube"]
Expand Down
2 changes: 1 addition & 1 deletion linera-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test = [
"tokio/test-util",
"tokio/time",
"linera-execution/test",
"linera-views/test"
"linera-views/test",
]
wasmer = ["linera-execution/wasmer"]
wasmtime = ["linera-execution/wasmtime"]
Expand Down
2 changes: 1 addition & 1 deletion linera-views/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ aws = [
"aws-sdk-s3",
"aws-smithy-http",
"aws-smithy-types",
"aws-types"
"aws-types",
]
scylladb = ["scylla"]
db_timings = []
Expand Down
19 changes: 19 additions & 0 deletions tomlfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# trailing comma in arrays
always_trailing_comma = false
# trailing comma when multi-line
multiline_trailing_comma = true
space_around_eq = true
# remove all the spacing inside the array
compact_arrays = false
# remove all the spacing inside the object
compact_inline_tables = false
trailing_newline = true
# is it ok to have blank lines inside of a table
# this option needs to be true for the --grouped flag
key_value_newlines = true
allowed_blank_lines = 1
# windows style line endings
crlf = false
# The user specified ordering of tables in a document.
# All unspecified tables will come after these.
table_order = []

0 comments on commit e8d8203

Please sign in to comment.