Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/jslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ jobs:
run: npm install -g prettier

- name: Run Prettier (JS Linting)
run: prettier --check '**/*.{js,ts,jsx,tsx,vue,css,html,json}' --log-level debug --write
run: |
FILES=$(find . -type f \( -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.vue" -o -name "*.css" -o -name "*.html" -o -name "*.json" \))
if [ -n "$FILES" ]; then
echo "$FILES" | xargs prettier --log-level debug --write
else
echo "No matching files found for linting."
fi

- name: Fail on Lint Errors
if: failure()
Expand Down
26 changes: 20 additions & 6 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,27 @@ jobs:
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black
pip install flake8 black diff-cover

- name: Configure Flake8
run: echo -e "[flake8]\nmax-line-length = 256\nindent-size = 4" > .flake8
run: |
echo "[flake8]" > .flake8
echo "max-line-length = 256" >> .flake8
echo "indent-size = 4" >> .flake8

- name: Run Flake8 (Python Linting)
run: flake8 . --count --show-source --statistics
- name: Get changed Python files
id: get_diff
run: |
git fetch origin ${{ github.base_ref }}
echo "changed_files=$(git diff --name-only origin/${{ github.base_ref }} -- '*.py' | tr '\n' ' ')" >> $GITHUB_OUTPUT

- name: Check Python Formatting with Black
run: black --check --diff --line-length 256 --target-version py310 --skip-string-normalization --fast . || true
- name: Run Flake8 on changed files
if: steps.get_diff.outputs.changed_files != ''
run: |
echo "Linting changed files: ${{ steps.get_diff.outputs.changed_files }}"
flake8 ${{ steps.get_diff.outputs.changed_files }}

- name: Check Python Formatting with Black (changed files only)
if: steps.get_diff.outputs.changed_files != ''
run: |
black --check --diff --line-length 256 --target-version py310 --skip-string-normalization --fast ${{ steps.get_diff.outputs.changed_files }}