mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-27 13:47:00 +00:00
chore(CI): Add lint CI (#100)
* Add lint CI * Clippy allow complex types, warn on some others * bevy_gltf_blueprints use workspace lints * Update toolchain for workspace wide lints * Use workspace lints on the other crates as well
This commit is contained in:
parent
fd625ef2e0
commit
572a2b89a6
30
.github/workflows/ci.yml
vendored
Normal file
30
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ubuntu-latest-cargo-lint-${{ hashFiles('**/Cargo.toml') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: 1.75.0
|
||||
components: rustfmt, clippy
|
||||
- name: Install alsa and udev
|
||||
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
|
||||
- name: Run clippy
|
||||
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
|
||||
- name: Check format
|
||||
run: cargo fmt --all -- --check
|
12
Cargo.toml
12
Cargo.toml
@ -19,6 +19,18 @@ members = [
|
||||
]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.lints.clippy]
|
||||
type_complexity = "allow"
|
||||
doc_markdown = "warn"
|
||||
manual_let_else = "warn"
|
||||
undocumented_unsafe_blocks = "warn"
|
||||
redundant_else = "warn"
|
||||
match_same_arms = "warn"
|
||||
semicolon_if_nothing_returned = "warn"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
#### --------------------Dev/ debug-------------------------------
|
||||
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
|
||||
[profile.dev.package."*"]
|
||||
|
@ -10,6 +10,9 @@ categories = ["game-development"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
|
||||
|
||||
|
@ -10,6 +10,9 @@ categories = ["game-development"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
|
||||
|
@ -10,6 +10,9 @@ categories = ["game-development"]
|
||||
edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
[toolchain]
|
||||
channel = '1.72.0'
|
||||
channel = '1.75.0'
|
||||
|
Loading…
Reference in New Issue
Block a user