fix: remove virtual environment from repository and fix code quality checks
- Remove app/.venv from git tracking (should not be committed) - Update flake8 to only scan project code (app/stiftung, app/core) - Update black and isort to only check project code - Update bandit security scanning to only check project code - Excludes third-party packages that cause linting failures
This commit is contained in:
10
.github/workflows/code-quality.yml
vendored
10
.github/workflows/code-quality.yml
vendored
@@ -27,22 +27,22 @@ jobs:
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# Stop the build if there are Python syntax errors or undefined names
|
||||
flake8 app --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
flake8 app/stiftung app/core --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# Exit-zero treats all errors as warnings
|
||||
flake8 app --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
|
||||
flake8 app/stiftung app/core --count --exit-zero --max-complexity=10 --max-line-length=88 --statistics
|
||||
|
||||
- name: Check code formatting with black
|
||||
run: |
|
||||
black --check app
|
||||
black --check app/stiftung app/core
|
||||
|
||||
- name: Check import sorting with isort
|
||||
run: |
|
||||
isort --check-only app
|
||||
isort --check-only app/stiftung app/core
|
||||
|
||||
- name: Check for security issues
|
||||
run: |
|
||||
pip install bandit
|
||||
bandit -r app -f json -o bandit-report.json || true
|
||||
bandit -r app/stiftung app/core -f json -o bandit-report.json || true
|
||||
|
||||
- name: Upload security report
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user