#!/usr/bin/env bash
# Generated by blq ci generate
# Command: lint
# Description: Run ruff linter
#
# Usage: ./lint.sh [extra args...]

set -euo pipefail

# Check if blq is available for log capture
if command -v blq &> /dev/null && [ -d ".lq" ]; then
    # Use blq to capture and parse output
    if [ $# -gt 0 ]; then
        blq run lint -- "$@"
    else
        blq run lint
    fi
else
    # Fallback: run command directly
    CMD='python -m ruff check src/ tests/'
    if [ $# -gt 0 ]; then
        CMD="$CMD $*"
    fi
    echo "Running: $CMD"
    eval "$CMD"
fi
