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: add doc job #66

Merged
merged 2 commits into from
Aug 27, 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: 11 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@ jobs:
tools: cargo-nextest
- run: cargo check --all-features --all-targets

doc:
name: Doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Boshen/setup-rust@main
with:
cache-key: warm
components: rust-docs
- run: make doc

test:
name: Test
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: init check build run debug fmt lint fix test test-cov bench clean purge
.PHONY: init bench build check clean debug doc fix fmt lint purge run test test-cov

build:
cargo build --release --all-features
Expand All @@ -12,6 +12,9 @@ check:
debug: tmp/yc-companies.csv
RUST_LOG=keyhunter=debug RUST_BACKTRACE=1 cargo run --features report --example yc_startups

doc:
RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --all-features --document-private-items

fmt:
taplo format
cargo fmt
Expand Down
2 changes: 1 addition & 1 deletion src/extract/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ pub enum DownloadScriptDiagnostic {
#[diagnostic(code(keyhunter::extract::download::read_failed))]
CannotReadBody(/* url */ String, #[source] std::io::Error),

/// Downloaded the resource at a [`Url`] but it was not a JavaScript file
/// Downloaded the resource at a URL but it was not a JavaScript file
#[error("Resource at {0} is not a JavaScript file, but is instead {1}")]
#[diagnostic(code(keyhunter::extract::download::not_js))]
NotJavascript(/* url */ String, /* content type */ String),
Expand Down
6 changes: 3 additions & 3 deletions src/walk/website/walk_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl WebsiteWalkBuilder {
/// accessing websites, and so using a random UA may not be ideal.
///
/// This is a semi-specific case of
/// [`WebsiteWalkBuilder::with_extra_header`]. `User-Agent`s set with this
/// [`WebsiteWalkBuilder::with_header`]. `User-Agent`s set with this
/// method will take precedence.
///
/// By default, no `User-Agent` header is set.
Expand All @@ -156,7 +156,7 @@ impl WebsiteWalkBuilder {

/// Add an extra header to all requests.
///
/// Use [`WebsiteWalkBuilder::with_extra_headers`] for adding multiple headers.
/// Use [`WebsiteWalkBuilder::with_headers`] for adding multiple headers.
#[inline]
pub fn with_header<S: Into<String>>(mut self, key: S, value: S) -> Self {
let key = key.into();
Expand All @@ -171,7 +171,7 @@ impl WebsiteWalkBuilder {

/// Add extra headers to all requests
///
/// Use [`WebsiteWalkBuilder::with_extra_header`] for adding a single header.
/// Use [`WebsiteWalkBuilder::with_header`] for adding a single header.
pub fn with_headers<I>(mut self, headers: I) -> Self
where
I: IntoIterator<Item = (String, String)>,
Expand Down
Loading