Skip to content

ok now i am confused why this is not working, going back to testing t… #13

ok now i am confused why this is not working, going back to testing t…

ok now i am confused why this is not working, going back to testing t… #13

Workflow file for this run

name: Lint Code
on:
push:
branches:
- main
- develop
- feature/linter
pull_request:
branches:
- main
- develop
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.4'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
# - name: Get changed files
# id: get_changed_files
# run: |
# files=$(git diff --name-only HEAD^ HEAD | grep '\.py$' || true | tr '\n' ' ')
# echo "files=$files" >> $GITHUB_ENV
- name: Runing Pylint
run: |
find . -name '*.py' -exec pylint {} \;
# - name: Run Pylint
# run: |
# if [ -n "${{ steps.get_changed_files.outputs.files }}" ]; then
# pylint_output=$(pylint ${{ steps.get_changed_files.outputs.files }})
# echo "$pylint_output"
# score=$(echo "$pylint_output" | grep -oP '\d+\.\d+/\d+' | head -n 1 | cut -d'/' -f1)
# if (( $(echo "$score < 9" | bc -l) )); then
# echo "Pylint score is below 9: $score"
# exit 1
# fi
# else
# echo "No Python files changed."
# fi
# - name: Run Darker
# run: |
# if [ -n "${{ steps.get_changed_files.outputs.files }}" ]; then
# darker_output=$(darker ${{ steps.get_changed_files.outputs.files }})
# echo "$darker_output"
# if [ -n "$darker_output" ]; then
# echo "Code formatting issues found."
# exit 1
# fi
# else
# echo "No Python files changed."
# fi