Skip to content

Commit

Permalink
Add ruff cache configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
sffjunkie committed Mar 14, 2024
1 parent 0378102 commit 2d7f8c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pypm := 'pdm'
project := 'astral'

home_dir := env_var('HOME')
dev_home := env_var_or_default("DEVELOPMENT_HOME", "{{home_dir}}/development")
dev_home := env_var_or_default("DEVELOPMENT_HOME", home_dir + "/development")
cache_dir := dev_home + '/cache/' + project

default:
Expand All @@ -13,9 +13,9 @@ default:
lint:
#!/bin/sh
if command -v ruff &>/dev/null; then
ruff check src/{{project}}
ruff check --config "cache-dir = '{{cache_dir}}/ruff'" src/{{project}}
else
pdm run ruff check src/{{project}}
pdm run ruff check --config "cache-dir = '{{cache_dir}}/ruff'" src/{{project}}
fi
if [ $? -eq 0 ]; then
echo "ruff: no problems found"
Expand Down

0 comments on commit 2d7f8c4

Please sign in to comment.