Remove Super-Linter action and move `flake8` to pre-commit (#7861)

This commit is contained in:
John Bampton 2023-08-17 17:37:10 +10:00 committed by GitHub
parent 8b5ba13b81
commit b0ae701ca4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 19 deletions

View File

@ -27,25 +27,6 @@ concurrency:
cancel-in-progress: true
jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
statuses: write # for github/super-linter to mark status of each linter run
name: Super-Linter Check
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: SuperLinter
uses: github/super-linter/slim@v4.9.6
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_FLAKE8: true
pre-commit:
name: Run pre-commit
runs-on: ubuntu-22.04

View File

@ -41,3 +41,19 @@ repos:
- id: mixed-line-ending
files: \.(java|md|py|txt|yaml|yml)$
# - id: trailing-whitespace
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--config, .github/linters/.flake8]
exclude: >
(?x)
^agent/bindir/cloud-setup-agent\.in$|
^client/bindir/cloud-update-xenserver-licenses\.in$|
^cloud-cli/bindir/cloud-tool$|
^python/bindir/cloud-grab-dependent-library-versions$|
^python/bindir/cloud-setup-baremetal$|
^scripts/vm/hypervisor/xenserver/storagePlugin$|
^scripts/vm/hypervisor/xenserver/vmopspremium$|
^setup/bindir/cloud-setup-encryption\.in$|
^venv/.*$