pre-commit-hooks/pre_commit_hooks
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
..
__init__.py Initial commit. 2014-03-13 08:41:35 -07:00
autopep8_wrapper.py Respect autopep8 config. Resolves #38. 2015-02-26 18:23:52 -08:00
check_added_large_files.py Add check_case_conflict hook #21 2015-01-12 15:38:22 -08:00
check_case_conflict.py Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
check_docstring_first.py Add check-docstring-first hook. 2015-01-04 13:06:21 -08:00
check_json.py Update pre-commit hooks 2015-01-04 16:05:54 -08:00
check_merge_conflict.py Don't report markup titles as merge conflicts 2015-05-09 04:20:38 +02:00
check_xml.py Add check-xml hook. 2015-01-17 10:30:58 -08:00
check_yaml.py Use the CLoader when present to validate yaml 2015-01-15 09:44:48 -08:00
debug_statement_hook.py Add q as a debug statement 2015-04-10 10:55:33 -07:00
detect_private_key.py Detect OpenSSH private keys 2015-03-07 09:35:30 -08:00
end_of_file_fixer.py Fix end-of-file-fixer on windows 2015-01-19 16:43:10 -08:00
requirements_txt_fixer.py More naturally sort requirements. 2015-02-12 09:30:17 -08:00
string_fixer.py Use the tokenizer for great success 2015-02-10 08:17:35 -08:00
tests_should_end_in_test.py Add --django flag to test name checker 2015-03-11 17:44:59 -07:00
trailing_whitespace_fixer.py Remove dependency on plumbum 2015-03-20 14:15:30 -07:00
util.py Remove dependency on plumbum 2015-03-20 14:15:30 -07:00