Skip to content

Explore new structure #4287

Explore new structure

Explore new structure #4287

Workflow file for this run

name: Lint
on:
workflow_dispatch:
push:
branches: ["main"]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
style:
name: Check Style
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install rust
uses: dtolnay/rust-toolchain@d8352f6b1d2e870bc5716e7a6d9b65c4cc244a1a # stable
with:
toolchain: stable
- name: Install rust nightly
run: |
rustup toolchain install nightly
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
- name: Cache cargo registry
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Cargo fmt
run: cargo +nightly fmt --check
- name: Install clippy-sarif and sarif-fmt
run: cargo install clippy-sarif sarif-fmt --locked --git https://github.com/psastras/sarif-rs.git --rev 11c33a53f6ffeaed736856b86fb6b7b09fabdfd8
- name: Cargo clippy
run: cargo clippy --all-features --tests --message-format=json |
clippy-sarif | tee clippy_result.sarif | sarif-fmt
env:
RUSTFLAGS: "-D warnings"
- name: Upload Clippy results to GitHub
uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
sarif_file: clippy_result.sarif
- name: Set up Node
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
cache: "npm"
cache-dependency-path: "package-lock.json"
node-version: "16"
- name: NPM setup
run: npm ci
- name: Node Lint
run: npm run lint
- name: Verify rust documentation links
run: cargo doc --no-deps --features internal
env:
RUSTDOCFLAGS: "-D warnings"