Alexander Dupuy
5c752935fd
Refactor check-merge-conflicts tests
...
Do a straight test of detecting a real merge conflict as generated by git.
Test artificial conflict detection while pending merge without a real conflict.
Test artificial non-conflict non-detection in a resolved merge conflict.
Rename test_does_not_care... function to reflect what we want to care about.
Rename is_in_merge_conflict to is_in_merge since that is what it checks.
2015-05-09 04:29:38 +02:00
Alexander Dupuy
eefc46f901
Don't report markup titles as merge conflicts
...
Several markup formats, such as Markdown or Re(Structured)Text
can format titles as text with '=' characters as double underlining,
like this:
```
My Page Title
=============
Lorem ipsum...
```
Rather that considering any line starting with seven '=' as a conflict marker,
require a space (or line-ending newline) after the equals.
This could still create a false positive for a seven character title,
like "Problem", but the markup formats generally allow extra '=' characters,
so by formatting the text like this:
```
Problem
========
Not...
```
these pre-commit warnings can be avoided.
Also updates the tests to add newlines for more realistic conflict files
(while a file might not end with a newline, conflict markers will).
Prevent false negative on test_does_not_care_when_not_in_a_conflict()
by making sure that README.md contains a line identical to a conflict string
(exactly seven '=' followed by a newline).
2015-05-09 04:20:38 +02:00
Anthony Sottile
cedcea550c
Merge pull request #54 from rhoml/rhoml/add-eyaml-support
...
Add eyaml support for check-yaml hook
2015-04-16 00:50:57 -04:00
Rhommel Lamas
efb691467b
Add eyaml support for check-yaml hook
2015-04-16 13:53:19 +10:00
Anthony Sottile
2d83e302cc
Merge pull request #53 from mythmon/patch-1
...
Add q as a debug statement
2015-04-10 14:18:36 -04:00
Mike Cooper
edee3f64b9
Add q as a debug statement
...
q is a debugging tool: https://pypi.python.org/pypi/q
2015-04-10 10:55:33 -07:00
Anthony Sottile
15b678e9c6
Merge pull request #49 from pre-commit/only_check_merge_conflicted_files
...
Only check merge conflicts on conflict commits
2015-03-21 14:04:37 -07:00
Anthony Sottile
635fa7dd9d
Only check merge conflicts on conflict commits
2015-03-20 16:21:02 -07:00
Anthony Sottile
34444ba2c7
Merge pull request #48 from pre-commit/no_more_plumbum
...
Remove dependency on plumbum
2015-03-20 14:30:56 -07:00
Anthony Sottile
713fab4bc7
Remove dependency on plumbum
2015-03-20 14:15:30 -07:00
Anthony Sottile
c9b6161fab
Merge pull request #47 from guykisel/merge-conflict-hook
...
Add check-merge-conflict hook
2015-03-13 17:50:47 -06:00
Guy Kisel
86d8446800
Fix off by one error in line number enumeration
2015-03-13 16:32:21 -07:00
Guy Kisel
779a42919a
Add check-merge-conflict hook
2015-03-13 16:30:14 -07:00
Anthony Sottile
70a319aea3
Merge pull request #46 from guykisel/django-test-hook
...
Add --django flag to test name checker
2015-03-11 20:28:49 -06:00
Guy Kisel
db4b8f02f3
Add --django flag to test name checker
2015-03-11 17:44:59 -07:00
Anthony Sottile
9ce45609a9
Merge pull request #43 from campaul/detect_private_key
...
Detect OpenSSH private keys
2015-03-08 12:38:35 -07:00
Anthony Sottile
4cb861acec
v0.4.1
2015-03-08 12:32:40 -07:00
Anthony Sottile
686d486791
Bump to latest hooks
2015-03-08 11:34:33 -07:00
Anthony Sottile
4078cbedf0
Quickfix to prevent pep8 conflicts
2015-03-08 11:34:04 -07:00
Cameron Paul
68a7729327
Detect OpenSSH private keys
2015-03-07 09:35:30 -08:00
Anthony Sottile
9d1ac3273b
Update README.md
2015-02-27 07:58:59 -08:00
Ken Struys
fc8b97e4ab
Merge pull request #39 from pre-commit/autopep8_via_config
...
Respect autopep8 config. Resolves #38 .
2015-02-26 19:33:40 -08:00
Anthony Sottile
d96cef92c9
Respect autopep8 config. Resolves #38 .
2015-02-26 18:23:52 -08:00
Anthony Sottile
9f107a0327
v0.4.0
2015-02-22 08:39:33 -08:00
Anthony Sottile
c4c3c735fd
Merge pull request #36 from pre-commit/more_natural_sort_requirements
...
More naturally sort requirements.
2015-02-12 09:41:57 -08:00
Anthony Sottile
151d485a81
More naturally sort requirements.
2015-02-12 09:30:17 -08:00
Ken Struys
a4ba3ca567
Merge pull request #35 from pre-commit/use_tokenizer_for_string_fixer
...
Use the tokenizer for great success
2015-02-10 10:28:30 -08:00
Anthony Sottile
2983d4478f
Use the tokenizer for great success
2015-02-10 08:17:35 -08:00
Anthony Sottile
5207d1f29a
Merge pull request #34 from struys/string_fixer
...
implemented a basic double quote string fixer
2015-02-09 10:13:57 -08:00
Ken Struys
fed386438e
Merge pull request #1 from pre-commit/meybs_fixey_fixey
...
Simplify string-fixer
2015-02-09 09:58:59 -08:00
Anthony Sottile
9326fad9c8
Simplify string-fixer
2015-02-09 09:45:58 -08:00
Ken Struys
12f02dfeb8
implemented a basic double quote string fixer
2015-02-08 21:05:12 -08:00
Anthony Sottile
5fe82b3a37
Update README.md
2015-01-19 18:06:06 -08:00
Anthony Sottile
6bd93dca39
Merge pull request #33 from pre-commit/appveyor
...
Add appveyor
2015-01-19 17:42:00 -08:00
Anthony Sottile
e70a83fbd6
Add appveyor
2015-01-19 17:19:03 -08:00
Anthony Sottile
e39cfdf454
Merge pull request #32 from pre-commit/windows_support
...
Fix end-of-file-fixer on windows
2015-01-19 16:47:03 -08:00
Anthony Sottile
dd9a07daf1
Fix end-of-file-fixer on windows
2015-01-19 16:43:10 -08:00
Anthony Sottile
375913d017
Merge pull request #31 from pre-commit/readme_test
...
Add test for readme
2015-01-18 09:55:55 -08:00
Anthony Sottile
a8b89150ff
Add test for readme
2015-01-18 09:48:14 -08:00
Anthony Sottile
144e6a931e
Merge pull request #30 from pre-commit/check-xml
...
Add check-xml hook.
2015-01-17 10:39:10 -08:00
Anthony Sottile
ddc9208a5f
Add check-xml hook.
2015-01-17 10:30:58 -08:00
Anthony Sottile
fea9b2ece7
Merge pull request #28 from pre-commit/use_c_loader
...
Use the CLoader when present to validate yaml
2015-01-15 10:49:28 -08:00
Anthony Sottile
44946b62c1
Temporarily remove pypy3 due to lxml not being installable
2015-01-15 10:33:40 -08:00
Anthony Sottile
e1c091a4e3
Use the CLoader when present to validate yaml
2015-01-15 09:44:48 -08:00
Anthony Sottile
5541a6a046
Merge pull request #25 from guykisel/update-readme-case-conflict
...
Add check-case-conflict to README.md #21 #22
2015-01-13 13:51:25 -08:00
gkisel
566b64ab00
Add check-case-conflict to README.md #21 #22
2015-01-13 12:50:31 -08:00
Anthony Sottile
9b830ad92e
Merge pull request #22 from guykisel/check-case-conflict
...
Add check_case_conflict hook
2015-01-12 16:44:48 -08:00
gkisel
c682b50749
Add check_case_conflict hook #21
2015-01-12 15:38:22 -08:00
Anthony Sottile
fdfc499e48
Merge pull request #23 from kentwills/autopep8_clarification
...
change wording so that people know this hook needs arguments.
2015-01-12 11:17:04 -08:00
Anthony Sottile
cf78558b9e
Merge pull request #24 from campaul/requirements_txt_print
...
Print on requirements.txt failure
2015-01-12 11:08:59 -08:00