Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.98.1
# rustfmt/clippy are actually exercised in the sibling `lint.yml`
# workflow, not here — this job only needs the compiler.
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: cargo check --workspace --all-targets
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: lint

on:
push:
branches: [main]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

env:
CARGO_TERM_COLOR: always

jobs:
format:
name: cargo fmt --check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# No `toolchain:` input — the action reads `rust-toolchain.toml`, so the
# pinned version lives in exactly ONE place.
components: rustfmt, clippy
- name: cargo fmt --all --check
run: cargo fmt --all --check

clippy:
name: cargo clippy -D warnings
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
# No `toolchain:` input — the action reads `rust-toolchain.toml`, so the
# pinned version lives in exactly ONE place.
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: cargo clippy --all-targets -- -D warnings
run: cargo clippy --all-targets -- -D warnings
4 changes: 2 additions & 2 deletions crates/ogar-dismech/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,12 +832,12 @@ mod concept_id_collision_guard {
#[test]
fn stays_in_the_0x03_ontology_domain_clear_of_documented_bands() {
assert_eq!(DISMECH_CONCEPT_ID >> 8, 0x03);
assert!(
const _: () = assert!(
DISMECH_CONCEPT_ID > 0x0321,
"must clear the documented private-consumer odd-stride run \
(live through 0x031D, retired through 0x0321)"
);
assert!(
const _: () = assert!(
DISMECH_CONCEPT_ID < 0x0340,
"must clear META_STUDY_SPINE (0x0340..=0x0347)"
);
Expand Down
Loading