Skip to content

tonybajan/flake8-check-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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.

About

Configurably use GitHub Actions to run flake8 as a Check

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •