Giter Club home page Giter Club logo

flake8's Introduction

py-actions/flake8 GitHub Action

Version Linux CI macOS CI Windows CI Lint CodeQL

This GitHub Action installs the Python flake8 package in an environment with a Python interpreter and executes flake8 stylistic and logical linting of Python source files. flake8 installation and execution defaults, and flake8 plugins can be configured with optional Action settings.

The project is tested against the latest GitHub Actions Linux, macOS, and Windows runner environment cPython versions 3.9.x - 3.12.x interpreters on a nightly basis.

Quick Start

Default

name: flake8 Lint

on: [push, pull_request]

jobs:
  flake8-lint:
    runs-on: ubuntu-latest
    name: Lint
    steps:
      - name: Check out source repository
        uses: actions/checkout@v3
      - name: Set up Python environment
        uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - name: flake8 Lint
        uses: py-actions/flake8@v2

With custom settings

name: flake8 Lint

on: [push, pull_request]

jobs:
  flake8-lint:
    runs-on: ubuntu-latest
    name: Lint
    steps:
      - name: Check out source repository
        uses: actions/checkout@v3
      - name: Set up Python environment
        uses: actions/setup-python@v4
        with:
          python-version: "3.11"
      - name: flake8 Lint
        uses: py-actions/flake8@v2
        with:
          ignore: "F401"
          exclude: "src/ignoreme.py"
          max-line-length: "100"
          path: "src"
          plugins: "flake8-bugbear==22.1.11 flake8-black"

See the Inputs section below for details on the defaults and optional configuration settings.

Inputs

Configure the Action with the following optional settings:

flake8-version

Optional flake8 version for testing. Options: ['latest', 'main', 'master', '[VERSION NUMBER]'].Default = "latest".

path

Optional The path to the Python source file(s) or directory. Default = ".".

args

Optional Command line arguments to the flake8 executable. Default = None.

Please note that some command line arguments can be defined with other fields in your configuration. You may combine the args setting with the other settings below, or use args to configure flake8 without the other Action settings.

See the inputs below for additional details.

exclude

Optional Comma-delimited list of ignored file paths. Default = flake8 default.

ignore

Optional Comma-delimited list of ignored flake8 rule codes. Default = flake8 default.

max-line-length

Optional Integer value (as string) representing maximum acceptable line length. Default = flake8 default.

update-pip

Optional Update pip before the flake8 install. Options: ["true", "false"]. Default = "false".

plugins

Optional Space delimited list of flake8 plugin packages to install with pip prior to flake8 execution. Default = none.

Use the syntax:

  • [PACKAGE NAME]: for current PyPI release version across Action runs
  • [PACKAGE NAME]==[VERSION]: for a fixed PyPI release version on every Action run

See the "With custom settings" example above.

Outputs

None

License

Apache License, v2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.