pantry/projects/github.com/charliermarsh/ruff/package.yml

36 lines
736 B
YAML
Raw Normal View History

2023-01-31 01:59:17 +03:00
distributable:
2023-12-24 03:02:45 +03:00
url: https://github.com/astral-sh/ruff/archive/refs/tags/v{{version}}.tar.gz
2023-01-31 01:59:17 +03:00
strip-components: 1
versions:
2023-12-24 03:02:45 +03:00
github: astral-sh/ruff
2023-01-31 01:59:17 +03:00
strip: /^v /
build:
dependencies:
rust-lang.org: '>=1.60'
rust-lang.org/cargo: '*'
crates.io/semverator: '*'
script: |
if semverator lt {{version}} 0.0.242; then
CRATE=ruff_cli
else
CRATE=crates/ruff_cli
fi
cargo install --locked --path $CRATE --root {{prefix}}
2023-01-31 01:59:17 +03:00
2023-12-24 03:02:45 +03:00
renamed-to: astral.sh/ruff
# provides:
# - bin/ruff
2023-01-31 01:59:17 +03:00
test:
2024-01-12 06:46:46 +03:00
script:
- run: mkdir -p .ruff_cache/{{version}}
if: '>=0.1.12'
- ruff -e $FIXTURE | grep "\`os\` imported but unused"
- ruff --fix $FIXTURE
- test ! -s $FIXTURE
2023-01-31 01:59:17 +03:00
fixture: |
import os