Commit graph

24 commits

Author SHA1 Message Date
Anthony Sottile
0a0af6796b remove master references from tests 2025-04-19 11:46:43 -04:00
Anthony Sottile
b13ff9b868 adjust error outputs to be more standardized 2022-04-06 16:59:53 -04:00
Anthony Sottile
8f6152921e drop python3.6 support
python 3.6 reached end of life on 2021-12-23

Committed via https://github.com/asottile/all-repos
2022-01-15 19:24:05 -05:00
Ersin Yildirim
07af54024c Adjust git dir when checking for merge in worktree 2021-10-15 18:23:43 -04:00
Mikhail Khvoinitsky
10c5e4e166 forbid-new-submodules: fix triggering failure when only a submodule is committed (without any other file); support --from-ref and --to-ref; fixes #609 2021-08-13 21:32:08 +03:00
Max Rozentsveyg
f35bfed79e Don't use LocalPath.strpath 2020-05-20 12:08:42 -04:00
Anthony Sottile
f5c42a050b pre-commit-hooks: python3.6+ 2020-02-05 11:22:18 -08:00
Anthony Sottile
8bb94f0bd4 azure pipelines [skip travis] [skip appveyor] 2019-03-10 16:56:44 -07:00
Anthony Sottile
030bfac7e4 Apply typing to all of pre-commit-hooks 2019-01-31 20:09:15 -08:00
Vinay Karanam
64b9f3dcf0 Added --assume-in-merge option for check-merge-conflict
Fixes #300
2018-06-26 23:59:40 +05:30
Anthony Sottile
9b1b44e9c9 Remove write_file (now unnecessary) 2018-03-26 09:10:43 -07:00
Anthony Sottile
da8ab1ffe8 pull with --no-rebase 2018-03-26 08:33:11 -07:00
Anthony Sottile
4ab791497c Replace deprecated yield_fixture with fixture
Committed via https://github.com/asottile/all-repos
2018-01-21 15:31:23 -08:00
Anthony Sottile
2a902e0a07 Use asottile/add-trailing-comma 2017-07-12 18:58:30 -07:00
Anthony Sottile
6076fd1b15 Support rebase conflicts in check-merge-conflicts 2017-06-12 10:39:07 -07:00
Anthony Sottile
8be6f4c77e Remove pylint 2016-08-22 14:38:49 -07:00
Sander Maijers
9e89b7616a
Increase robustness of tests involving git
1. Disable automatic `git commit` GPG-signing, since that requires interaction.
   This issue was encountered in practice by me, causing spurious test failures
2. In case path operands could turn out to start with dashes, escape the
   operand list with '--'.
2016-06-12 18:58:30 +02:00
Anthony Sottile
a99475afa0 Simplify the tests 2016-05-27 14:09:50 -07:00
Anthony Sottile
4a01f64c8f Fix check-merge-conflict against binary files 2016-05-26 11:20:32 -07:00
William Ting
c92b46587d Add diff3 conflictstyle support for git merge conflicts. 2016-04-30 20:35:33 -07:00
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
635fa7dd9d Only check merge conflicts on conflict commits 2015-03-20 16:21:02 -07:00
Guy Kisel
779a42919a Add check-merge-conflict hook 2015-03-13 16:30:14 -07:00