Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
code

GitHub Action

Flake8 with annotations

v1.6

Flake8 with annotations

code

Flake8 with annotations

Flake8 with annotations for Pull Request

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Flake8 with annotations

uses: TrueBrain/actions-flake8@v1.6

Learn more about this action in TrueBrain/actions-flake8

Choose a version

Flake8 with GitHub Actions -- including annotations for Pull Requests

GitHub License GitHub Tag GitHub commits since latest release

This GitHub Actions runs flake8 over your code. Any warnings or errors will be annotated in the Pull Request.

Usage

uses: TrueBrain/actions-flake8@v1

Parameter: path

Indicates the path to run flake8 in. This can be useful if your project is more than Python code.

This parameter is optional; by default flake8 will run on your whole repository.

uses: TrueBrain/actions-flake8@v1
with:
  path: src

Parameter: ignore

Indicates errors and warnings to skip.

This parameter is optional; by default no alerts will be ignored

uses: TrueBrain/actions-flake8@v1
with:
  ignore: E4,W

Parameter: max_line_length

Indicates the maximum allowed line length.

This parameter is optional; by default flake8's default line length will be used.

uses: TrueBrain/actions-flake8@v1
with:
  max_line_length: 90

Parameter: only_warn

Only warn about problems. All errors and warnings are annotated in Pull Requests, but it will act like everything was fine anyway. (In other words, the exit code is always 0.)

This parameter is optional; setting this to any value will enable it.

uses: TrueBrain/actions-flake8@v1
with:
  only_warn: 1