Skip to content

Commit

Permalink
Merge pull request #41 from 1Password/progdrasil/documentation-fix
Browse files Browse the repository at this point in the history
Add github action to catch badly formated docs
  • Loading branch information
Progdrasil authored Jul 31, 2024
2 parents 440b3c8 + 0c39e62 commit 6c75062
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,22 @@ jobs:
profile: minimal
toolchain: ${{ matrix.rust }}
components: rustfmt
- run: rustup run ${{ matrix.rust}} cargo fmt --all -- --check
- run: rustup run ${{ matrix.rust }} cargo fmt --all -- --check

docs:
name: Documentation
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
- run: RUSTDOCFLAGS="-D warnings " rustup run ${{ matrix.rust }} cargo doc --workspace --no-deps --all-features

test:
name: Test
Expand All @@ -56,7 +71,7 @@ jobs:
with:
profile: minimal
toolchain: ${{ matrix.rust }}
- run: rustup run ${{ matrix.rust }} cargo test
- run: rustup run ${{ matrix.rust }} cargo test

typeshare:
name: Typeshare
Expand Down
5 changes: 4 additions & 1 deletion passkey-types/src/ctap2/get_assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ use crate::{
pub use crate::ctap2::make_credential::Options;

#[cfg(doc)]
use crate::webauthn::{CollectedClientData, PublicKeyCredentialRequestOptions};
use {
crate::webauthn::{CollectedClientData, PublicKeyCredentialRequestOptions},
ciborium::Value,
};

use super::extensions::{AuthenticatorPrfGetOutputs, AuthenticatorPrfInputs, HmacGetSecretInput};

Expand Down
7 changes: 5 additions & 2 deletions passkey-types/src/ctap2/make_credential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ use serde::{Deserialize, Serialize};
use crate::{ctap2::AuthenticatorData, webauthn, Bytes};

#[cfg(doc)]
use crate::webauthn::{
CollectedClientData, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor,
use {
crate::webauthn::{
CollectedClientData, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor,
},
ciborium::value::Value,
};

use super::extensions::{AuthenticatorPrfInputs, AuthenticatorPrfMakeOutputs, HmacGetSecretInput};
Expand Down

0 comments on commit 6c75062

Please sign in to comment.