Skip to content

Commit 5cfe9c2

Browse files
authoredAug 16, 2019
[AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems (apache#5835)
* [AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems
1 parent e2d76b9 commit 5cfe9c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+485
-503
lines changed
 

‎.pre-commit-config.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ repos:
2020
- repo: https://github.com/Lucas-C/pre-commit-hooks
2121
rev: v1.1.6
2222
hooks:
23+
- id: forbid-tabs
24+
exclude: ^airflow/_vendor/.*$|^docs/Makefile$
2325
- id: insert-license
2426
name: Add licence for all SQL files
2527
files: \.sql$
@@ -39,12 +41,6 @@ repos:
3941
- license-templates/LICENSE.txt
4042
files: >
4143
\.properties$|\.cfg$|\.conf$|\.ini$|\.ldif$|\.readthedocs$|\.service$|^Dockerfile.*$
42-
- repo: meta
43-
hooks:
44-
- id: check-hooks-apply
45-
- repo: https://github.com/Lucas-C/pre-commit-hooks
46-
rev: v1.1.6
47-
hooks:
4844
- id: insert-license
4945
name: Add licence for all JS files
5046
files: \.js$
@@ -54,6 +50,16 @@ repos:
5450
- "/**| *| */"
5551
- --license-filepath
5652
- license-templates/LICENSE.txt
53+
- repo: meta
54+
hooks:
55+
- id: check-hooks-apply
56+
- repo: https://github.com/pre-commit/pre-commit-hooks
57+
rev: v2.3.0
58+
hooks:
59+
- id: check-merge-conflict
60+
- id: detect-private-key
61+
- id: end-of-file-fixer
62+
- id: mixed-line-ending
5763
- repo: local
5864
hooks:
5965
- id: lint-dockerfile

‎CONTRIBUTING.md

+5
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,11 @@ lint-dockerfile Lint dockerfile
701701
mypy Run mypy
702702
pylint Run pylint
703703
flake8 Run flake8
704+
forbid-tabs Fails if tabs are used in the project
705+
check-merge-conflict Checks if merge conflict is being committed
706+
detect-private-key Detects if private key is added to the repository
707+
end-of-file-fixer Make sure that there is an empty line at the end
708+
mixed-line-ending Detects if mixed line ending is used (\r vs. \r\n)
704709
```
705710
## Using pre-commit hooks
706711

0 commit comments

Comments
 (0)
Please sign in to comment.