Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: clippy::nursery を有効にする #110

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
RUSTDOCFLAGS: -Dwarnings

jobs:
build_and_test:
Expand Down Expand Up @@ -48,13 +50,16 @@ jobs:
crate: cargo-all-features

- name: Build
run: cargo build-all-features --verbose
run: cargo build-all-features --all-targets --workspace --verbose

- name: Test
run: cargo test
run: cargo test --all-targets --workspace --verbose

- name: Format
run: cargo fmt --all -- --check

- name: Lint
run: cargo clippy --tests --workspace -- -D warnings
run: cargo clippy --all-targets --workspace --verbose -- '-Dclippy::all' -Dwarnings '-Dclippy::nursery'

- name: Lint document
run: cargo doc --no-deps --workspace --document-private-items --verbose
2 changes: 1 addition & 1 deletion src/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub use text_with_frontmatter_loader::*;
pub use yaml_loader::*;

/// [`Loader`] reads [`Value`] from a file. There are several Loaders depending on the type of file.
/// For example, [`FrontmatterLoader`](self::frontmatter_loader::FrontmatterLoader) usually loads markdown files, while [`StaticResourceLoader`](self::static_resource_loader::StaticResourceLoader) loads static resources.
/// For example, [`TextWithFrontmatterLoader`] usually loads markdown files, while [`BlobLoader`] loads static resources as-is.
/// Which Loader reads which file is specified by the user in the configuration file `tempura.json`.
pub trait Loader {
fn load(reader: impl Read) -> anyhow::Result<Value>;
Expand Down
2 changes: 1 addition & 1 deletion src/pipeline/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::{
use super::Pipeline;

/// Resource holds the file contents needed for the build process.
/// One resource instance is created per [`Pipeline`](crate::pipeline::Pipeline).
/// One resource instance is created per [`Pipeline`]
#[derive(Debug)]
pub struct Resource {
value_map: HashMap<usize, Value>,
Expand Down
Loading