Change creation and modified dates of item to optional (#33) #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Install rust | |
uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa # 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@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5 | |
- 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@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6 | |
with: | |
sarif_file: clippy_result.sarif | |
- name: Verify rust documentation links | |
run: cargo doc --no-deps | |
env: | |
RUSTDOCFLAGS: "-D warnings" |