Skip to content

Flake8 check action

Actions
Configurably use GitHub Actions to run flake8 as a Check
v1.5.0
Latest
Star (6)

Tags

 (1)

Flake8 Check Action

A GitHub action to run Flake8 against your code

Features

  • Configure path and relevant violations from the workflow YAML file
  • Reports failures using the GitHub Checks API for rich annotations in your pull request
  • Plugins included: as well as reporting violations from pycodestyle and pyflakes, also optionally run the checks from flake8-breakpoint, flake8-bugbear and flake8-logging-format. Enable them by selecting their error prefixes.

Configuration

Create or adapt your workflow file in .github/workflows/ to run tonybajan/flake8-check-action after actions/checkout.

on: push
name: Push
jobs:
  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: tonybajan/[email protected]
      with:
        select: E3,E4,E5,E7,W6,F,B,G0
        maxlinelength: 100
        repotoken: ${{ secrets.GITHUB_TOKEN }}

Parameters

Parameter name Required Description
repotoken The token to use to report GitHub Checks. Should be set to ${{ secrets.GITHUB_TOKEN }}, which is automatically set by GitHub Actions.
path The path to check. Defaults to the whole repo.
select A comma separated list of violations (or violation prefixes) that should fail the build. Defaults to F.
ignore A comma separated list of violations (or violation prefixes) to ignore. Nothing is ignored by default.
maxlinelength The maximum line length for pycodestyle violation E501. Defaults to 79.

Flake8 check action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Configurably use GitHub Actions to run flake8 as a Check
v1.5.0
Latest

Tags

 (1)

Flake8 check action is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.