Skip to content

Commit

Permalink
Add taplo config and pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Oct 24, 2024
1 parent 68df34b commit 5c6e761
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 37 deletions.
24 changes: 12 additions & 12 deletions .deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ yanked = "deny"

[licenses]
allow = [
"AGPL-3.0",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"MIT",
"MPL-2.0",
"Unicode-DFS-2016",
"Unlicense",
"zlib-acknowledgement",
"Zlib",
"AGPL-3.0",
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"MIT",
"MPL-2.0",
"Unicode-DFS-2016",
"Unlicense",
"zlib-acknowledgement",
"Zlib",
]

[bans]
Expand Down
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ repos:
types_or:
- yaml
- markdown
- repo: https://github.com/ComPWA/taplo-pre-commit
rev: v0.9.3
hooks:
- id: taplo-format
- id: taplo-lint
# https://reuse.software
- repo: https://github.com/fsfe/reuse-tool
rev: v4.0.3
Expand Down
5 changes: 5 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: Copyright (C) 2018-2024 Uwe Klotz <uwedotklotzatgmaildotcom> et al.
# SPDX-License-Identifier: CC0-1.0

[formatting]
column_width = 100
8 changes: 4 additions & 4 deletions crates/backend-webapi-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ aoide-usecases-sqlite.workspace = true
default = []
tokio = ["aoide-backend-embedded/tokio"]
json-schema = [
"dep:schemars",
"aoide-core/json-schema",
"aoide-core-api-json/json-schema",
"aoide-core-json/json-schema",
"dep:schemars",
"aoide-core/json-schema",
"aoide-core-api-json/json-schema",
"aoide-core-json/json-schema",
]
4 changes: 1 addition & 3 deletions crates/repo-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ workspace = true
[dependencies]
anyhow.workspace = true
diesel = { workspace = true, features = ["64-column-tables", "numeric"] }
diesel_migrations = { version = "2.2.0", default-features = false, features = [
"sqlite",
] }
diesel_migrations = { version = "2.2.0", default-features = false, features = ["sqlite"] }
log.workspace = true
mime.workspace = true
strum = { workspace = true, features = ["derive"] }
Expand Down
9 changes: 2 additions & 7 deletions crates/storage-sqlite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,11 @@ serde = { workspace = true, optional = true, features = ["derive"] }
# Bundle SQLite code to prevent dynamic linking.
# The pinned version must be compatible with diesel!
libsqlite3-sys = { version = "=0.30.1", optional = true, default-features = false, features = [
"bundled",
"bundled",
] }

# Feature "tokio"
tokio = { workspace = true, optional = true, features = [
"macros",
"rt",
"sync",
"time",
] }
tokio = { workspace = true, optional = true, features = ["macros", "rt", "sync", "time"] }

[features]
default = ["sqlite-bundled", "tokio"]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
[toolchain]
channel = "stable"
profile = "minimal"
components = [ "rustfmt", "clippy" ]
components = ["rustfmt", "clippy"]
12 changes: 2 additions & 10 deletions websrv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ warp = { version = "0.3.7", default-features = false }
aoide-backend-webapi-json = { "workspace" = true, features = ["tokio"] }
aoide-core = { "workspace" = true, features = ["serde"] }
aoide-repo-sqlite.workspace = true
aoide-storage-sqlite = { "workspace" = true, features = [
"serde",
"sqlite-bundled",
"tokio",
] }
aoide-storage-sqlite = { "workspace" = true, features = ["serde", "sqlite-bundled", "tokio"] }
aoide-usecases.workspace = true
aoide-usecases-sqlite.workspace = true
aoide-websrv-warp-sqlite.workspace = true
Expand Down Expand Up @@ -79,11 +75,7 @@ features = ["tokio", "xdg-portal"]
default = ["json-schema", "mimalloc", "launcher-ui"]

# Enable JSON schema support.
json-schema = [
"dep:schemars",
"aoide-core/json-schema",
"aoide-backend-webapi-json/json-schema",
]
json-schema = ["dep:schemars", "aoide-core/json-schema", "aoide-backend-webapi-json/json-schema"]

# Use mimalloc instead of the default allocator.
mimalloc = ["dep:mimalloc"]
Expand Down

0 comments on commit 5c6e761

Please sign in to comment.