libcosmic/justfile

33 lines
1 KiB
Makefile
Raw Normal View History

2025-03-24 16:48:20 +00:00
examples := 'applet application calendar config context-menu cosmic image-button menu multi-window nav-context open-dialog table-view'
2024-01-02 14:13:16 +00:00
clippy_args := '-W clippy::all -W clippy::pedantic'
2023-08-02 11:54:07 +02:00
# Check for errors and linter warnings
2023-09-01 09:31:31 +02:00
check *args: (check-wayland args) (check-winit args) (check-examples args)
check-examples *args:
#!/bin/bash
for project in {{examples}}; do
2024-01-02 14:13:16 +00:00
cargo clippy -p ${project} {{args}} -- {{clippy_args}}
done
2023-08-02 11:54:07 +02:00
2023-09-01 09:31:31 +02:00
check-wayland *args:
cargo clippy --no-deps --features="wayland,tokio,xdg-portal" {{args}} -- {{clippy_args}}
2023-09-01 09:31:31 +02:00
check-winit *args:
cargo clippy --no-deps --features="winit,tokio,xdg-portal" {{args}} -- {{clippy_args}}
2023-09-01 09:31:31 +02:00
2023-08-02 11:54:07 +02:00
# Runs a check with JSON message format for IDE integration
check-json: (check '--message-format=json')
2023-09-13 15:19:58 +02:00
# Remove Cargo build artifacts
clean:
cargo clean
# Also remove .cargo and vendored dependencies
clean-dist: clean
rm -rf .cargo vendor vendor.tar target
2023-08-02 11:54:07 +02:00
# Runs an example of the given {{name}}
2023-09-13 15:19:58 +02:00
run name:
cargo run --release -p {{name}}