Skip to content

Commit 9d6ea47

Browse files
Merge pull request #27 from LukasKalbertodt/add-ci-basic-style-check
Add a basic style check to CI
2 parents 281e390 + 079738b commit 9d6ea47

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ env:
1010
RUSTFLAGS: --deny warnings
1111

1212
jobs:
13+
style:
14+
name: Check basic style
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: LukasKalbertodt/check-basic-style@v0.1
19+
1320
check:
1421
name: 'Build & test'
1522
runs-on: ubuntu-20.04

src/yaml.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ impl fmt::Display for PrintExpr<'_> {
207207

208208
// All these other types can simply be serialized as is.
209209
Expr::Str(_) | Expr::Float(_) | Expr::Integer(_) | Expr::Bool(_) => {
210-
let out = serde_yaml::to_string(&self.0).expect("string serialization to YAML failed");
210+
let out = serde_yaml::to_string(&self.0)
211+
.expect("string serialization to YAML failed");
211212

212213
// Unfortunately, `serde_yaml` cannot serialize these values on its own
213214
// without embedding them in a full document (starting with `---` and

tests/general.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,9 @@ fn full() {
240240
kind: meta::FieldKind::Leaf {
241241
env: Some("ENV_TEST_FULL_2"),
242242
kind: meta::LeafKind::Required {
243-
default: Some(meta::Expr::Integer(meta::Integer::U16(8080))),
243+
default: Some(
244+
meta::Expr::Integer(meta::Integer::U16(8080))
245+
),
244246
},
245247
},
246248
},

0 commit comments

Comments
 (0)