Skip to content

Commit b0ae701

Browse files
authored
Remove Super-Linter action and move flake8 to pre-commit (apache#7861)
1 parent 8b5ba13 commit b0ae701

2 files changed

Lines changed: 16 additions & 19 deletions

File tree

.github/workflows/linter.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,6 @@ concurrency:
2727
cancel-in-progress: true
2828

2929
jobs:
30-
build:
31-
permissions:
32-
contents: read # for actions/checkout to fetch code
33-
statuses: write # for github/super-linter to mark status of each linter run
34-
name: Super-Linter Check
35-
runs-on: ubuntu-22.04
36-
steps:
37-
- name: Checkout Code
38-
uses: actions/checkout@v3
39-
with:
40-
# Full git history is needed to get a proper list of changed files within `super-linter`
41-
fetch-depth: 0
42-
- name: SuperLinter
43-
uses: github/super-linter/slim@v4.9.6
44-
env:
45-
DEFAULT_BRANCH: main
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47-
VALIDATE_ALL_CODEBASE: false
48-
VALIDATE_PYTHON_FLAKE8: true
4930
pre-commit:
5031
name: Run pre-commit
5132
runs-on: ubuntu-22.04

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,19 @@ repos:
4141
- id: mixed-line-ending
4242
files: \.(java|md|py|txt|yaml|yml)$
4343
# - id: trailing-whitespace
44+
- repo: https://github.com/pycqa/flake8
45+
rev: 6.1.0
46+
hooks:
47+
- id: flake8
48+
args: [--config, .github/linters/.flake8]
49+
exclude: >
50+
(?x)
51+
^agent/bindir/cloud-setup-agent\.in$|
52+
^client/bindir/cloud-update-xenserver-licenses\.in$|
53+
^cloud-cli/bindir/cloud-tool$|
54+
^python/bindir/cloud-grab-dependent-library-versions$|
55+
^python/bindir/cloud-setup-baremetal$|
56+
^scripts/vm/hypervisor/xenserver/storagePlugin$|
57+
^scripts/vm/hypervisor/xenserver/vmopspremium$|
58+
^setup/bindir/cloud-setup-encryption\.in$|
59+
^venv/.*$

0 commit comments

Comments
 (0)