Skip to content

Commit

Permalink
Standardize the pre-commit config (#22686)
Browse files Browse the repository at this point in the history
Minor sorting of files/folder/terms

GitOrigin-RevId: 29fb62d5df4212e3388beb729871cff195ac042b
  • Loading branch information
jbampton authored and Cloud Composer Team committed Sep 12, 2024
1 parent 133608b commit 5821961
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ repos:
rev: v2.1.0
hooks:
- id: doctoc
name: Add TOC for md files
name: Add TOC for md and rst files
files:
^README\.md$|^CONTRIBUTING\.md$|^UPDATING.*\.md$|^chart/UPDATING.*\.md$|^dev/.*\.md$|^dev/.*\.rst$
^CONTRIBUTING\.md$|^README\.md$|^UPDATING.*\.md$|^chart/UPDATING.*\.md$|^dev/.*\.md$|^dev/.*\.rst$
exclude: ^airflow/_vendor/
args:
- "--maxlevel"
Expand All @@ -40,7 +40,7 @@ repos:
rev: v1.1.10
hooks:
- id: forbid-tabs
exclude: ^docs/Makefile$|^clients/gen/go\.sh|\.gitmodules$|^airflow/_vendor/
exclude: ^airflow/_vendor/|^clients/gen/go\.sh$|^\.gitmodules$
- id: insert-license
name: Add license for all SQL files
files: \.sql$
Expand All @@ -61,7 +61,7 @@ repos:
- license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
files: >
\.properties$|\.cfg$|\.conf$|\.ini$|\.ldif$|\.readthedocs$|\.service$|\.tf$|Dockerfile.*$
\.cfg$|\.conf$|\.ini$|\.ldif$|\.properties$|\.readthedocs$|\.service$|\.tf$|Dockerfile.*$
- id: insert-license
name: Add license for all rst files
exclude: ^\.github/.*$|^airflow/_vendor/
Expand All @@ -73,8 +73,8 @@ repos:
- --fuzzy-match-generates-todo
files: \.rst$
- id: insert-license
name: Add license for all JS/TS/TSX/CSS/PUML files
files: \.(js|ts|tsx|css|puml)$
name: Add license for all CSS/JS/PUML/TS/TSX files
files: \.(css|js|puml|ts|tsx)$
exclude: ^\.github/.*$|^airflow/_vendor/
args:
- --comment-style
Expand All @@ -95,7 +95,7 @@ repos:
- id: insert-license
name: Add license for all shell files
exclude: ^\.github/.*$|^airflow/_vendor/
files: ^breeze$|^breeze-complete$|\.sh$|\.bash$
files: ^breeze$|^breeze-complete$|\.bash$|\.sh$
args:
- --comment-style
- "|#|"
Expand Down Expand Up @@ -136,7 +136,7 @@ repos:
- id: insert-license
name: Add license for all md files
files: \.md$
exclude: ^\.github/.*$|PROVIDER_CHANGES.*\.md|^airflow/_vendor/
exclude: ^\.github/.*$|PROVIDER_CHANGES.*\.md$|^airflow/_vendor/
args:
- --comment-style
- "<!--|| -->"
Expand Down Expand Up @@ -206,15 +206,15 @@ repos:
name: Check YAML files with yamllint
entry: yamllint -c yamllint-config.yml --strict
types: [yaml]
exclude: ^.*init_git_sync\.template\.yaml$|^.*airflow\.template\.yaml$|^chart/(?:templates|files)/.*\.yaml$|openapi/.*\.yaml|pre-commit-config|^airflow/_vendor/
exclude: ^.*init_git_sync\.template\.yaml$|^.*airflow\.template\.yaml$|^chart/(?:templates|files)/.*\.yaml$|openapi/.*\.yaml$|^\.pre-commit-config\.yaml$|^airflow/_vendor/
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
name: Run isort to sort imports in Python files
files: \.py$|\.pyi$
# To keep consistent with the global isort skip config defined in setup.cfg
exclude: ^build/.*$|^\.tox/.*$|^venv/.*$|^airflow/_vendor/
exclude: ^airflow/_vendor/|^build/.*$|^venv/.*$|^\.tox/.*$
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
Expand Down Expand Up @@ -550,7 +550,7 @@ repos:
entry: ./scripts/ci/pre_commit/pre_commit_check_provider_yaml_files.py
language: python
require_serial: true
files: provider\.yaml$|^scripts/ci/pre_commit/pre_commit_check_provider_yaml_files\.py$|^docs/
files: ^docs/|provider\.yaml$|^scripts/ci/pre_commit/pre_commit_check_provider_yaml_files\.py$
additional_dependencies:
- 'PyYAML==5.3.1'
- 'jsonschema>=3.2.0,<5.0.0'
Expand Down Expand Up @@ -700,7 +700,7 @@ repos:
entry: ./scripts/ci/pre_commit/pre_commit_inline_scripts_in_docker.py
language: python
pass_filenames: false
files: ^Dockerfile$|^Dockerfile.ci|^scripts/docker/.*$
files: ^Dockerfile$|^Dockerfile.ci$|^scripts/docker/.*$
require_serial: true
- id: ui-lint
name: ESLint against airflow/ui
Expand Down

0 comments on commit 5821961

Please sign in to comment.