mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Use dprint for formatting Cargo.toml files
Invoking cargo tomlfmt on all files is a PITA and as we can see from the CI scripts, it is often forgotten to as new crates are added to the workspace. Using dprint for toml files fixes this. Unfortunately, we can't use dprint for Rust code yet because there hasn't been a release of rustfmt in quite a while but we are already using features from a newer rustfmt via rustup.
This commit is contained in:
parent
c0501627c9
commit
1820139786
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://dprint.dev/schemas/v0.json",
|
|
||||||
"projectType": "openSource",
|
|
||||||
"incremental": true,
|
|
||||||
"markdown": {
|
|
||||||
},
|
|
||||||
"includes": ["**/*.{md}"],
|
|
||||||
"excludes": [
|
|
||||||
|
|
||||||
],
|
|
||||||
"plugins": [
|
|
||||||
"https://plugins.dprint.dev/markdown-0.6.1.wasm"
|
|
||||||
]
|
|
||||||
}
|
|
13
.github/workflows/ci.yml
vendored
13
.github/workflows/ci.yml
vendored
@ -16,22 +16,11 @@ jobs:
|
|||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1.2.0
|
- uses: Swatinem/rust-cache@v1.2.0
|
||||||
id: cache
|
|
||||||
|
|
||||||
- name: Install tomlfmt
|
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
|
||||||
run: cargo install cargo-tomlfmt
|
|
||||||
|
|
||||||
- name: Check Cargo.toml formatting
|
|
||||||
run: |
|
|
||||||
cargo tomlfmt -d -p Cargo.toml
|
|
||||||
cargo tomlfmt -d -p monero-harness/Cargo.toml
|
|
||||||
cargo tomlfmt -d -p swap/Cargo.toml
|
|
||||||
|
|
||||||
- name: Check code formatting
|
- name: Check code formatting
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
- name: Check markdown formatting
|
- name: Check formatting
|
||||||
uses: dprint/check@v1.3
|
uses: dprint/check@v1.3
|
||||||
|
|
||||||
- name: Run clippy with default features
|
- name: Run clippy with default features
|
||||||
|
15
dprint.json
Normal file
15
dprint.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://dprint.dev/schemas/v0.json",
|
||||||
|
"projectType": "openSource",
|
||||||
|
"incremental": true,
|
||||||
|
"markdown": {
|
||||||
|
},
|
||||||
|
"includes": ["**/*.{md}", "**/*.{toml}"],
|
||||||
|
"excludes": [
|
||||||
|
"./tokio-tar/Cargo.toml"
|
||||||
|
],
|
||||||
|
"plugins": [
|
||||||
|
"https://plugins.dprint.dev/markdown-0.6.1.wasm",
|
||||||
|
"https://github.com/thomaseizinger/dprint-plugin-cargo-toml/releases/download/0.1.0/cargo-toml-0.1.0.wasm"
|
||||||
|
]
|
||||||
|
}
|
@ -6,9 +6,9 @@ edition = "2018"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
|
jsonrpc_client = { version = "0.6", features = [ "reqwest" ] }
|
||||||
|
monero = "0.11"
|
||||||
reqwest = { version = "0.11", default-features = false, features = [ "json" ] }
|
reqwest = { version = "0.11", default-features = false, features = [ "json" ] }
|
||||||
serde = { version = "1.0", features = [ "derive" ] }
|
serde = { version = "1.0", features = [ "derive" ] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
jsonrpc_client = { version = "0.6", features = ["reqwest"] }
|
|
||||||
monero = "0.11"
|
|
||||||
|
Loading…
Reference in New Issue
Block a user