Skip to content

Commit dc1494d

Browse files
committed
Added fix end of file hook.
1 parent 8c30419 commit dc1494d

File tree

13 files changed

+15
-16
lines changed

13 files changed

+15
-16
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11

22
- repo: git@github.com:pre-commit/pre-commit-hooks
3-
sha: 12794c1c19c001e3d05bcfe316b4f93b414035a7
3+
sha: 76739902911688e8d7b13241409f9facc0e534e4
44
hooks:
55
- id: pyflakes
66
files: '\.py$'
77
- id: debug-statements
88
files: '\.py$'
99
- id: trailing-whitespace
10-
files: '\.(py|sh)$'
10+
files: '\.(py|sh|yaml)$'
1111
- id: name-tests-test
1212
files: 'tests/.+\.py$'
13+
- id: end-of-file-fixer
14+
files: '\.(py|sh|yaml)$'
1315

1416
- repo: git@github.com:pre-commit/pre-commit
1517
sha: 47b7ca44ed1fcaa83464ed00cef72049ae22c33d

pre_commit/clientlib/validate_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ def validate(filename=None):
5050

5151
return obj
5252

53-
return validate
53+
return validate

pre_commit/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
'python',
1010
'ruby',
1111
'node',
12-
])
12+
])

pre_commit/hooks_workspace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def in_hooks_workspace():
1818
local.path(get_pre_commit_dir_path()).mkdir()
1919

2020
with local.cwd(get_pre_commit_dir_path()):
21-
yield
21+
yield

pre_commit/languages/all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
'node': node,
2222
'python': python,
2323
'ruby': ruby,
24-
}
24+
}

pre_commit/languages/ruby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ def install_environment():
3333

3434
def run_hook(hook, file_args):
3535
with in_env() as env:
36-
return helpers.run_hook(env, hook, file_args)
36+
return helpers.run_hook(env, hook, file_args)

tests/clientlib/validate_base_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ def test_raises_when_additional_validation_fails(additional_validator):
6969

7070
def test_returns_object_after_validating(noop_validator):
7171
ret = noop_validator('tests/data/array_yaml_file.yaml')
72-
assert ret == ['foo', 'bar']
72+
assert ret == ['foo', 'bar']

tests/clientlib/validate_manifest_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ def is_valid_according_to_schema(obj, schema):
5959
))
6060
def test_is_valid_according_to_schema(manifest_obj, expected):
6161
ret = is_valid_according_to_schema(manifest_obj, MANIFEST_JSON_SCHEMA)
62-
assert ret is expected
62+
assert ret is expected

tests/data/array_yaml_file.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
- foo
2-
- bar
2+
- bar
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
foo: "
1+
foo: "

0 commit comments

Comments
 (0)