wearerequired / lint-action

✨ GitHub Action for detecting and auto-fixing lint errors
MIT License
555 stars 130 forks source link

Flake8 No Issues but Lint Check Reports Failure #644

Closed lucasantarella closed 1 year ago

lucasantarella commented 1 year ago

Hi All,

Great library, I use it on a number of projects.

Recently ran into an issue with Flake8 and this action. When there are no issues reported from Flake8, the action still reports a failed check to Github Actions, making this difficult to use in branch protection rules and pull requests.

Here's an example:

image

Full Log Archive: logs_7.zip

Github Actions YAML:

name: Lint

on:
  push:
    branches:
      - master
      - develop
  pull_request:
    branches:
      - master
      - develop

jobs:
  run-linters:
    name: Run linters
    runs-on: ubuntu-latest
    permissions:
      checks: write
      contents: write
      pull-requests: write
    steps:
      - name: Check out Git repository
        uses: actions/checkout@v3
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'
      - name: Install Python dependencies
        run: pip install black flake8
      - name: Run linters
        uses: wearerequired/lint-action@v2
        with:
          black: true
          black_args: --line-length 88
          flake8: true
          flake8_args: --config ./setup.cfg

Any help is appreciated.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.