Skip to content

Python Linter

Run Python code quality checks using flake8 via Argus SDK

uses: huntridge-labs/argus/.github/actions/linter-python@1.12.2

Run Python code quality checks using flake8 and bandit.

Overview

This action checks Python code for style violations (flake8) and security issues (bandit). It uploads results as artifacts that can be aggregated by the linting summary action.

Usage

- name: Checkout code
  uses: actions/checkout@v6

- name: Run Python linting
  uses: huntridge-labs/argus/.github/actions/linter-python@1.12.2
  with:
    fail_on_issues: false
    max_line_length: '120'

Inputs

Input Description Required Default
fail_on_issues Fail the job if issues are found No false
fail_on_tool_error Fail the job when the linter tool itself errors (a crash — argus exit code 2), independent of fail_on_issues. Tool errors are always surfaced in the job log, status table, and PR comment; this only makes them block. No false
paths Paths to lint (space-separated) No .
python_version Python version to use No 3.12
max_line_length Maximum line length for flake8 No 120
flake8_ignore Flake8 error codes to ignore (comma-separated) No E203,W503

Outputs

Output Description
issues_count Total number of issues found
tool_status Whether the linter tool ran cleanly: ok, or error when the tool itself crashed (argus exit code 2).
flake8_issues Number of flake8 style issues
bandit_issues Number of bandit security issues

Artifacts

  • linter-summary-python: summary for linting-summary
  • python-lint-results: raw lint output

Requirements

  • Repository must be checked out before running this action

Support