This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new b0ae701ca4e Remove Super-Linter action and move `flake8` to pre-commit
(#7861)
b0ae701ca4e is described below
commit b0ae701ca4e03594914610ece8250966f591ad49
Author: John Bampton <[email protected]>
AuthorDate: Thu Aug 17 17:37:10 2023 +1000
Remove Super-Linter action and move `flake8` to pre-commit (#7861)
---
.github/workflows/linter.yml | 19 -------------------
.pre-commit-config.yaml | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 19 deletions(-)
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/[email protected]
- 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/.*$