Skip to content

nh-util: drop owo_colors in favor of yansi #839

nh-util: drop owo_colors in favor of yansi

nh-util: drop owo_colors in favor of yansi #839

Workflow file for this run

name: "Check formating & lints"
on:
workflow_dispatch:
pull_request:
branches: ["master"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "xtask/Cargo.toml"
- "src/**"
- "xtask/src/**"
- ".cargo/**"
- ".github/workflows/check.yaml"
push:
branches-ignore:
- "update-*"
paths:
- "Cargo.toml"
- "Cargo.lock"
- "xtask/Cargo.toml"
- "src/**"
- "xtask/src/**"
- ".cargo/**"
- ".github/workflows/check.yaml"
jobs:
treewide-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
# Check if the source code is formatted as per the tooling configurations
# in the repository root. Unlike the Clippy lints below, formatting lints
# **must** pass.
- name: Prepare Dev Environment
run: |
eval "$(nix print-dev-env)"
set -x
# Verify that Rust source code is formatted
cargo fmt --check || exit 1
# Verify that TOML files are formatted
taplo fmt --check || exit 1
# We run clippy with lints that help avoid overall low-quality code or what is called "code smell."
# Stylistic lints (e.g., clippy::style and clippy::complexity) are avoided but it is a good idea to
# follow those while working on the codebase.
- name: Clippy Lints
run: |
eval "$(nix print-dev-env)"
set -x
# Lint Changes
cargo clippy -- \
-W clippy::pedantic \
-W clippy::correctness \
-W clippy::suspicious