mirror of
https://github.com/OMGeeky/confique.git
synced 2025-12-30 16:23:58 +01:00
Merge pull request #27 from LukasKalbertodt/add-ci-basic-style-check
Add a basic style check to CI
This commit is contained in:
7
.github/workflows/ci.yaml
vendored
7
.github/workflows/ci.yaml
vendored
@@ -10,6 +10,13 @@ env:
|
||||
RUSTFLAGS: --deny warnings
|
||||
|
||||
jobs:
|
||||
style:
|
||||
name: Check basic style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: LukasKalbertodt/check-basic-style@v0.1
|
||||
|
||||
check:
|
||||
name: 'Build & test'
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
@@ -207,7 +207,8 @@ impl fmt::Display for PrintExpr<'_> {
|
||||
|
||||
// All these other types can simply be serialized as is.
|
||||
Expr::Str(_) | Expr::Float(_) | Expr::Integer(_) | Expr::Bool(_) => {
|
||||
let out = serde_yaml::to_string(&self.0).expect("string serialization to YAML failed");
|
||||
let out = serde_yaml::to_string(&self.0)
|
||||
.expect("string serialization to YAML failed");
|
||||
|
||||
// Unfortunately, `serde_yaml` cannot serialize these values on its own
|
||||
// without embedding them in a full document (starting with `---` and
|
||||
|
||||
@@ -240,7 +240,9 @@ fn full() {
|
||||
kind: meta::FieldKind::Leaf {
|
||||
env: Some("ENV_TEST_FULL_2"),
|
||||
kind: meta::LeafKind::Required {
|
||||
default: Some(meta::Expr::Integer(meta::Integer::U16(8080))),
|
||||
default: Some(
|
||||
meta::Expr::Integer(meta::Integer::U16(8080))
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user