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: '*'
|
2023-02-07 00:54:26 +03:00
|
|
|
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:
|
|
|
|
script: |
|
2023-02-04 05:04:29 +03:00
|
|
|
ruff -e $FIXTURE | grep "\`os\` imported but unused"
|
2023-01-31 01:59:17 +03:00
|
|
|
ruff --fix $FIXTURE
|
|
|
|
test ! -s $FIXTURE
|
|
|
|
fixture: |
|
|
|
|
import os
|