Skip to content

Commit

Permalink
test: remove dead code checks
Browse files Browse the repository at this point in the history
  • Loading branch information
baptiste-olivier committed Jan 24, 2025
1 parent 61ac0c6 commit 4ff9e96
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,54 +153,3 @@ jobs:
else
echo "Documentation build completed successfully"
fi
find-dead-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Find dead code with vulture
run: vulture src/kili tests 2>&1 | tee dead_code.txt

- name: Find dead code with dead
run: dead 2>&1 | tee -a dead_code.txt

- name: Filter dead code
run: |
cat dead_code.txt | \
grep -e "src/kili" | \
grep -v \
-e "is only referenced in tests" \
-e "_ is never read" \
-e "affected_rows" \
-e "internal" \
-e "src/kili/client.py" \
-e "src/kili/core/graphql/ws_graphql_client" \
-e "src/kili/domain/annotation.py" \
-e "src/kili/domain/ontology.py" \
-e "src/kili/domain/project.py" \
-e "src/kili/entrypoints" \
-e "src/kili/orm" \
-e "src/kili/services" \
-e "src/kili/types.py" \
> dead_code_filtered.txt || true
- name: Crash if dead code found
run: |
if [ $(cat dead_code_filtered.txt | wc -l) -gt 0 ]; then
cat dead_code_filtered.txt
exit 1
else
echo "No dead code found"
fi

0 comments on commit 4ff9e96

Please sign in to comment.