# SPDX-FileCopyrightText: Robin Krahl <robin.krahl@ireas.org>
# SPDX-License-Identifier: CC0-1.0

all: check lint test

.PHONY: check
check:
	cargo check --package ctaphid-types --all-targets --no-default-features
	cargo check --package ctaphid-types --all-targets
	cargo check --package ctaphid-types --all-targets --all-features
	cargo check --all-targets --no-default-features
	cargo check --all-targets
	cargo check --all-targets --all-features

.PHONY: lint
lint:
	cargo fmt --all --check
	cargo clippy --workspace --all-targets
	cargo doc --workspace --no-deps --all-features --features hidapi/linux-static-hidraw
	reuse lint

.PHONY: test
test:
	cargo test --workspace

.PHONY: ci
ci: export RUSTFLAGS=-D warnings
ci: export RUSTDOCFLAGS=-D warnings
ci: check lint test
