diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 3dcddb2e110..e3b6f34c3be 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 75014782442..73298a1400d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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/.*$